/* ==========================================================================
   Helpdesk styles — layered on top of legal.css
   ========================================================================== */

/* ---------- LANDING HERO ---------- */
.help-hero {
    background:
        radial-gradient(900px 400px at 20% 0%, rgba(0, 128, 96, 0.09), transparent 60%),
        radial-gradient(700px 300px at 85% 100%, rgba(0, 128, 96, 0.06), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, var(--brand-mint-soft) 100%);
    border-bottom: 1px solid var(--brand-mint);
    padding: calc(var(--navbar-height) + 64px) 24px 72px;
    text-align: center;
    position: relative;
}

.help-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.03em;
    margin: 0 0 12px;
}

.help-hero p.lede {
    color: var(--ink-70);
    font-size: 1.1rem;
    margin: 0 auto 28px;
    max-width: 620px;
}

/* Search bar */
.help-search {
    max-width: 640px;
    margin: 0 auto 24px;
    position: relative;
}

.help-search input {
    width: 100%;
    padding: 16px 22px 16px 52px;
    font-size: 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    font-family: inherit;
    color: var(--ink);
    outline: none;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.help-search input:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.15), var(--shadow-md);
}

.help-search::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d7175' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

/* Popular chips */
.help-popular {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto;
    font-size: 0.9rem;
    color: var(--ink-50);
}

.help-popular .label {
    color: var(--ink-70);
    font-weight: 600;
    margin-right: 4px;
}

.help-popular a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--ink-70);
    text-decoration: none;
    font-size: 0.88rem;
    transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.help-popular a:hover {
    border-color: var(--brand-green);
    color: var(--brand-green-dark);
    background: var(--brand-mint-soft);
}

/* ---------- CATEGORY GRID ---------- */
.help-categories {
    max-width: 1120px;
    margin: 0 auto;
    padding: 64px 24px;
}

.help-categories .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.help-category {
    display: block;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.help-category:hover {
    border-color: var(--brand-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.help-category .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brand-mint);
    color: var(--brand-green-dark);
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.help-category h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 0 0 6px;
}

.help-category p {
    color: var(--ink-70);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 14px;
}

.help-category .count {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--brand-green);
    font-weight: 600;
}

.help-category .count::after {
    content: " articles";
    color: var(--ink-50);
    font-weight: 400;
}

/* ---------- POPULAR ARTICLES BLOCK ---------- */
.help-popular-block {
    max-width: 1120px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.help-popular-block h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 20px;
    letter-spacing: -0.015em;
}

.help-popular-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.help-popular-block li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    color: var(--ink);
    font-size: 0.96rem;
    transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.help-popular-block li a:hover {
    border-color: var(--brand-green);
    color: var(--brand-green-dark);
}

.help-popular-block li a::before {
    content: "📄";
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.help-popular-block li a::after {
    content: "→";
    margin-left: auto;
    color: var(--brand-green);
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.help-popular-block li a:hover::after {
    opacity: 1;
    transform: translateX(3px);
}

/* ---------- CONTACT CTA ---------- */
.help-contact {
    max-width: 1120px;
    margin: 40px auto 80px;
    padding: 44px 32px;
    background:
        radial-gradient(500px 200px at 80% 0%, rgba(255,255,255,0.15), transparent),
        linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 16px 40px -16px rgba(0, 128, 96, 0.4);
}

.help-contact h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.help-contact p {
    color: rgba(255,255,255,0.9);
    margin: 0 0 24px;
    font-size: 1rem;
}

.help-contact .btn-row {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.help-contact a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}

.help-contact .btn-primary-inv {
    background: #fff;
    color: var(--brand-green-dark);
}

.help-contact .btn-primary-inv:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--brand-green-dark);
}

.help-contact .btn-secondary-inv {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: none;
}

.help-contact .btn-secondary-inv:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.7);
}

/* ---------- ARTICLE LAYOUT (per-article page) ---------- */
.help-article-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: calc(var(--navbar-height) + 32px) 24px 80px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 44px;
}

.help-sidebar {
    position: sticky;
    top: calc(var(--navbar-height) + 24px);
    align-self: start;
    max-height: calc(100vh - var(--navbar-height) - 48px);
    overflow-y: auto;
    padding-right: 8px;
}

.help-sidebar h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    color: var(--ink-50);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    margin: 22px 0 10px;
}

.help-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.help-sidebar li a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-70);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.4;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.help-sidebar li a:hover {
    background: var(--brand-mint-soft);
    color: var(--brand-green-dark);
}

.help-sidebar li a.active {
    background: var(--brand-mint);
    color: var(--brand-green-dark);
    font-weight: 600;
}

.help-article {
    max-width: 780px;
}

.help-article .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--ink-50);
    margin-bottom: 16px;
}

.help-article .breadcrumb a {
    color: var(--ink-70);
    text-decoration: none;
}

.help-article .breadcrumb a:hover {
    color: var(--brand-green-dark);
}

.help-article .breadcrumb .sep::before {
    content: "›";
    color: var(--ink-30);
}

.help-article h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 0 0 12px;
}

.help-article .updated {
    font-size: 0.86rem;
    color: var(--ink-50);
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.help-article h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink);
    margin: 28px 0 12px;
    letter-spacing: -0.015em;
}

.help-article h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ink);
    margin: 22px 0 8px;
    letter-spacing: -0.01em;
}

.help-article p {
    line-height: 1.7;
    color: var(--ink-70);
    margin: 0 0 14px;
}

.help-article ul, .help-article ol {
    padding-left: 22px;
    margin: 0 0 14px;
    color: var(--ink-70);
    line-height: 1.65;
}

.help-article li {
    margin-bottom: 8px;
}

.help-article code {
    background: var(--surface-highlight);
    color: var(--ink);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.88em;
    border: 1px solid var(--border-hairline);
}

.help-article pre {
    background: var(--surface-highlight);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    overflow-x: auto;
    margin: 14px 0;
    line-height: 1.5;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.88rem;
}

.help-article pre code {
    background: transparent;
    border: 0;
    padding: 0;
}

.help-callout {
    background: var(--brand-mint-soft);
    border: 1px solid var(--brand-mint);
    border-left: 3px solid var(--brand-green);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin: 18px 0;
    color: var(--ink-90);
    font-size: 0.95rem;
}

.help-callout strong { color: var(--brand-green-dark); }

.help-tip {
    background: #fffbf1;
    border: 1px solid #fde68a;
    border-left: 3px solid #d97706;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin: 18px 0;
    color: #78350f;
    font-size: 0.95rem;
}

.help-tip strong { color: #451a03; }

/* Feedback block */
.help-feedback {
    margin: 44px 0 32px;
    padding: 24px 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-warm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.help-feedback strong {
    color: var(--ink);
    font-size: 1rem;
}

.help-feedback .buttons {
    display: inline-flex;
    gap: 8px;
}

.help-feedback button {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink-70);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
}

.help-feedback button:hover {
    border-color: var(--brand-green);
    color: var(--brand-green-dark);
    background: var(--brand-mint-soft);
}

/* Related articles */
.help-related {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.help-related h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: var(--ink);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}

.help-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-related li {
    margin-bottom: 8px;
}

.help-related a {
    color: var(--brand-green);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.help-related a:hover {
    color: var(--brand-green-dark);
}

/* Mobile */
@media (max-width: 900px) {
    .help-article-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: calc(var(--navbar-height) + 24px);
    }
    .help-sidebar {
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 24px;
    }
    .help-hero { padding: calc(var(--navbar-height) + 32px) 20px 48px; }
    .help-categories { padding: 40px 20px; }
    .help-contact { margin: 30px 20px 60px; padding: 32px 24px; }
    .help-feedback { flex-direction: column; align-items: flex-start; }
}
