/* ============================================================================
   Rightangled Help Center — public theme (self-contained, no Tailwind/build).
   Brand: royal blue + Montserrat headings. See docs/help-center-public-site-plan.md
   ========================================================================== */

/* ---- Montserrat (self-hosted, headings) ---------------------------------- */
@font-face {
    font-family: 'Montserrat';
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/help-center/Montserrat-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/help-center/Montserrat-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/help-center/Montserrat-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-weight: 900;
    font-display: swap;
    src: url('/fonts/help-center/Montserrat-Black.woff2') format('woff2');
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
    --hc-blue: #1a17e6;
    --hc-blue-600: #140fce;
    --hc-blue-700: #100ba6;
    --hc-blue-tint: #eeeefe;
    --hc-blue-tint-2: #e3e3fd;

    --hc-ink: #10173a;          /* headings — dark navy */
    --hc-body: #414868;         /* body copy */
    --hc-muted: #6b7280;
    --hc-line: #e7e9f2;
    --hc-line-strong: #d7dae8;

    --hc-bg: #ffffff;
    --hc-bg-soft: #f7f8fc;

    --hc-radius: 16px;
    --hc-radius-sm: 10px;
    --hc-radius-pill: 999px;

    --hc-shadow: 0 1px 2px rgba(16, 23, 58, .04), 0 10px 30px rgba(16, 23, 58, .06);
    --hc-shadow-hover: 0 18px 40px rgba(26, 23, 230, .16);

    --hc-max: 1120px;
    --hc-gap: 24px;

    --hc-font-head: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --hc-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---- Base --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--hc-font-body);
    color: var(--hc-body);
    background: var(--hc-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--hc-font-head); color: var(--hc-ink); line-height: 1.2; margin: 0; }
a { color: var(--hc-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.hc-container { max-width: var(--hc-max); margin: 0 auto; padding: 0 24px; }

:focus-visible { outline: 3px solid rgba(26, 23, 230, .35); outline-offset: 2px; border-radius: 4px; }

/* ---- Header (sits on the blue hero) ------------------------------------- */
.hc-header { position: relative; z-index: 3; }
.hc-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; max-width: var(--hc-max); margin: 0 auto; padding: 22px 24px;
}
.hc-logo { display: inline-flex; align-items: center; color: #fff; }
.hc-logo:hover { text-decoration: none; opacity: .92; }
/* Single white wordmark recoloured via mask → inherits currentColor
   (white on the hero, brand blue in the footer). */
.hc-logo-img {
    display: block; width: 176px; height: 30px; background-color: currentColor;
    -webkit-mask: url('/help-center-logo.webp') left center / contain no-repeat;
    mask: url('/help-center-logo.webp') left center / contain no-repeat;
}
.hc-header-link { color: rgba(255, 255, 255, .88); font-size: 14px; font-weight: 500; }
.hc-header-link:hover { color: #fff; }

/* ---- Hero --------------------------------------------------------------- */
.hc-hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 480px at 85% -10%, var(--hc-blue-600), transparent 60%), linear-gradient(180deg, var(--hc-blue), var(--hc-blue-700));
    color: #fff;
}
.hc-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
    background-size: 22px 22px; mask-image: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 70%);
}
.hc-hero-inner { position: relative; z-index: 1; max-width: var(--hc-max); margin: 0 auto; padding: 40px 24px 64px; }
.hc-hero h1 { color: #fff; font-weight: 900; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.01em; margin-bottom: 6px; }
.hc-hero p { margin: 0 0 28px; font-size: 17px; color: rgba(255, 255, 255, .82); }
.hc-hero--compact .hc-hero-inner { padding: 20px 24px 34px; }
.hc-hero--compact h1 { font-size: clamp(24px, 3vw, 32px); }

/* ---- Search ------------------------------------------------------------- */
.hc-search { display: flex; max-width: 640px; background: #fff; border-radius: var(--hc-radius-pill); padding: 6px; box-shadow: 0 14px 40px rgba(8, 11, 60, .28); }
.hc-search input {
    flex: 1; border: none; background: transparent; outline: none;
    padding: 12px 8px 12px 20px; font-size: 16px; color: var(--hc-ink); font-family: var(--hc-font-body);
}
.hc-search input::placeholder { color: #98a0b8; }
.hc-search button {
    display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
    background: var(--hc-blue); color: #fff; font-weight: 600; font-family: var(--hc-font-head);
    padding: 0 22px; border-radius: var(--hc-radius-pill); font-size: 15px; transition: background .15s;
}
.hc-search button:hover { background: var(--hc-blue-600); }
.hc-search svg { width: 18px; height: 18px; }
.hc-hero--compact .hc-search { max-width: 520px; }

/* ---- Main --------------------------------------------------------------- */
.hc-main { padding: 56px 0 72px; }
.hc-section-title { font-family: var(--hc-font-head); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--hc-muted); margin: 0 0 22px; }

/* ---- Category grid (home) ----------------------------------------------- */
.hc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hc-gap); }
.hc-card {
    display: flex; flex-direction: column; gap: 12px; background: var(--hc-bg);
    border: 1px solid var(--hc-line); border-radius: var(--hc-radius); padding: 26px 24px;
    box-shadow: var(--hc-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hc-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--hc-shadow-hover); border-color: var(--hc-blue-tint-2); }
.hc-card:hover .hc-card-title { color: var(--hc-blue); }
.hc-chip { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--hc-blue-tint); color: var(--hc-blue); }
.hc-chip svg { width: 26px; height: 26px; }
.hc-card-title { font-family: var(--hc-font-head); font-weight: 700; font-size: 18px; color: var(--hc-ink); transition: color .15s; }
.hc-card-desc { color: var(--hc-muted); font-size: 14.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hc-card-count { margin-top: auto; padding-top: 6px; color: var(--hc-blue); font-weight: 600; font-size: 13px; font-family: var(--hc-font-head); }

/* ---- Two-column inner layout (category + article) ----------------------- */
.hc-layout { display: grid; grid-template-columns: 288px 1fr; gap: 44px; align-items: start; }

/* ---- Breadcrumbs -------------------------------------------------------- */
.hc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--hc-muted); margin: 0 0 26px; font-weight: 500; }
.hc-crumbs a { color: var(--hc-blue); }
.hc-crumbs .sep { color: var(--hc-line-strong); }

/* ---- Sidebar nav -------------------------------------------------------- */
.hc-sidebar { position: sticky; top: 24px; }
.hc-nav-title { font-family: var(--hc-font-head); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--hc-muted); margin: 0 0 12px; padding: 0 6px; }
.hc-nav { list-style: none; margin: 0; padding: 0; }
.hc-nav > li { border-bottom: 1px solid var(--hc-line); }
.hc-nav-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 12px; color: var(--hc-ink); font-weight: 600; font-size: 14.5px; font-family: var(--hc-font-head);
    border-radius: 8px; transition: background .12s, color .12s;
}
.hc-nav-item:hover { text-decoration: none; background: var(--hc-bg-soft); color: var(--hc-blue); }
.hc-nav-item.is-active { color: var(--hc-blue); }
.hc-nav-item .chev { width: 16px; height: 16px; flex: none; transition: transform .18s; color: var(--hc-line-strong); }
.hc-nav > li.is-open .hc-nav-item .chev { transform: rotate(90deg); color: var(--hc-blue); }
.hc-subnav { list-style: none; margin: 2px 0 10px; padding: 0 0 0 12px; }
.hc-subnav a { display: block; padding: 8px 12px; font-size: 14px; color: var(--hc-body); border-left: 2px solid var(--hc-line); }
.hc-subnav a:hover { text-decoration: none; color: var(--hc-blue); border-left-color: var(--hc-blue); }
.hc-subnav a.is-active { color: var(--hc-blue); font-weight: 600; border-left-color: var(--hc-blue); }

/* mobile <details> toggle — hidden on desktop; nav always visible on desktop
   regardless of the details open/closed state (covers a mobile→desktop resize). */
.hc-sidebar > summary { display: none; }
.hc-sidebar > .hc-nav-wrap { display: block; }

/* ---- Content: category sections ----------------------------------------- */
.hc-content-head h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; margin-bottom: 12px; }
.hc-content-head p { color: var(--hc-body); font-size: 16.5px; margin: 0; }
.hc-content-head { padding-bottom: 26px; margin-bottom: 8px; border-bottom: 1px solid var(--hc-line); }
.hc-section { padding: 30px 0; border-bottom: 1px solid var(--hc-line); }
.hc-section:last-child { border-bottom: none; }
.hc-section > h2 { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.hc-links { list-style: none; margin: 8px 0 0; padding: 0; }
.hc-links li { margin: 0; }
.hc-links a {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin: 0 -12px;
    color: var(--hc-body); font-size: 15.5px; border-radius: 10px; transition: background .12s, color .12s;
}
.hc-links a:hover { text-decoration: none; background: var(--hc-bg-soft); color: var(--hc-blue); }
.hc-links a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hc-blue-tint-2); flex: none; transition: background .12s; }
.hc-links a:hover::before { background: var(--hc-blue); }

/* ---- Article ------------------------------------------------------------ */
.hc-article { max-width: 760px; }
.hc-article > h1 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
.hc-article .hc-subtitle { color: var(--hc-muted); font-size: 18px; margin: 0 0 28px; }
.hc-article-meta { display: flex; gap: 8px; align-items: center; color: var(--hc-muted); font-size: 13.5px; margin-bottom: 24px; }
.hc-body { font-size: 16.5px; color: var(--hc-body); }
.hc-body > :first-child { margin-top: 0; }
.hc-body p { margin: 0 0 18px; }
.hc-body h2 { font-size: 23px; font-weight: 700; margin: 34px 0 12px; }
.hc-body h3 { font-size: 19px; font-weight: 700; margin: 26px 0 10px; }
.hc-body ul, .hc-body ol { margin: 0 0 18px; padding-left: 22px; }
.hc-body li { margin: 6px 0; }
.hc-body a { color: var(--hc-blue); text-decoration: underline; text-underline-offset: 2px; }
.hc-body img { height: auto; border-radius: 12px; border: 1px solid var(--hc-line); margin: 10px 0; }
.hc-body blockquote { margin: 20px 0; padding: 6px 20px; border-left: 4px solid var(--hc-blue-tint-2); color: var(--hc-ink); background: var(--hc-bg-soft); border-radius: 0 10px 10px 0; }
.hc-body table { border-collapse: collapse; width: 100%; margin: 20px 0; font-size: 15px; }
.hc-body th, .hc-body td { border: 1px solid var(--hc-line); padding: 10px 14px; text-align: left; }
.hc-body th { background: var(--hc-bg-soft); font-weight: 700; color: var(--hc-ink); }
.hc-body code { background: var(--hc-bg-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }

/* helpful widget */
.hc-helpful { margin: 40px 0 8px; padding: 22px 24px; background: var(--hc-bg-soft); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); text-align: center; }
.hc-helpful strong { font-family: var(--hc-font-head); color: var(--hc-ink); font-size: 16px; }
.hc-helpful-btns { display: inline-flex; gap: 12px; margin-top: 14px; }
.hc-btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-family: var(--hc-font-head); font-weight: 600; font-size: 14px;
    padding: 10px 20px; border-radius: var(--hc-radius-pill); border: 1px solid var(--hc-line-strong); background: #fff; color: var(--hc-ink); transition: all .14s;
}
.hc-btn:hover { border-color: var(--hc-blue); color: var(--hc-blue); }
.hc-helpful-thanks { display: none; color: var(--hc-blue); font-weight: 600; font-family: var(--hc-font-head); margin-top: 12px; }

/* related */
.hc-related { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--hc-line); }
.hc-related h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--hc-muted); font-weight: 700; margin-bottom: 12px; }

/* ---- Search results ----------------------------------------------------- */
.hc-result-meta { color: var(--hc-muted); font-size: 15px; margin: 0 0 22px; }
.hc-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hc-result {
    display: block; padding: 18px 22px; background: #fff; border: 1px solid var(--hc-line);
    border-radius: var(--hc-radius); box-shadow: var(--hc-shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.hc-result:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--hc-shadow-hover); border-color: var(--hc-blue-tint-2); }
.hc-result h3 { font-size: 17px; font-weight: 700; color: var(--hc-ink); margin-bottom: 3px; }
.hc-result:hover h3 { color: var(--hc-blue); }
.hc-result p { margin: 0; color: var(--hc-muted); font-size: 14px; }
.hc-result .hc-result-cat { font-size: 12px; color: var(--hc-blue); font-weight: 600; font-family: var(--hc-font-head); text-transform: uppercase; letter-spacing: .04em; }

/* ---- Empty state -------------------------------------------------------- */
.hc-empty { text-align: center; color: var(--hc-muted); padding: 56px 20px; }
.hc-empty svg { width: 46px; height: 46px; color: var(--hc-line-strong); margin-bottom: 12px; }

/* ---- Footer ------------------------------------------------------------- */
.hc-footer { border-top: 1px solid var(--hc-line); background: var(--hc-bg); margin-top: 20px; }
.hc-footer-inner { max-width: var(--hc-max); margin: 0 auto; padding: 34px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hc-footer-logo { display: inline-flex; align-items: center; color: var(--hc-blue); }
.hc-footer-logo .hc-logo-img { width: 152px; height: 26px; }
.hc-footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.hc-socials { display: flex; gap: 10px; }
.hc-social { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #3a3f52; color: #fff; transition: background .15s, transform .15s; }
.hc-social:hover { background: var(--hc-blue); transform: translateY(-2px); text-decoration: none; }
.hc-social svg { width: 17px; height: 17px; }
.hc-copyright { color: var(--hc-muted); font-size: 13.5px; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 960px) {
    .hc-grid { grid-template-columns: repeat(2, 1fr); }
    .hc-layout { grid-template-columns: 1fr; gap: 24px; }

    /* sidebar becomes a native collapsible dropdown */
    .hc-sidebar { position: static; border: 1px solid var(--hc-line); border-radius: var(--hc-radius); overflow: hidden; }
    .hc-sidebar > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; padding: 16px 18px; font-family: var(--hc-font-head); font-weight: 700; color: var(--hc-ink); background: var(--hc-bg-soft); }
    .hc-sidebar > summary::-webkit-details-marker { display: none; }
    .hc-sidebar > summary .chev { width: 18px; height: 18px; transition: transform .18s; }
    .hc-sidebar[open] > summary .chev { transform: rotate(90deg); }
    .hc-nav-wrap { padding: 8px 14px 14px; }
    .hc-nav-title { display: none; }
}

@media (max-width: 620px) {
    .hc-grid { grid-template-columns: 1fr; }
    .hc-hero-inner { padding: 28px 24px 44px; }
    .hc-footer-inner { flex-direction: column; align-items: flex-start; }
    .hc-footer-right { align-items: flex-start; }
    .hc-header-link { display: none; }
}
