/* ================= abfr12/help.css =================
   layout abfr12_manual: the a better finder rename 12 help
   pages and the card-style help index.

   palette: the abfr 12 brand blue (#1E5AA8, the theme-color the
   layouts declare) on a cool neutral ground, with the icon's
   green reserved for the download / trial action.
   ==================================================== */

:root {
    --bg: #F5F6F8;
    --bg-alt: #EEF0F3;
    --surface: #FFFFFF;
    --border: #D9DDE3;
    --border-light: #E7EAEE;
    --text: #1D1D1F;
    --text-secondary: #3C3C43;
    --text-muted: #6E6E73;

    --brand: #1E5AA8;
    --brand-dark: #174A8B;
    --brand-soft: rgba(30, 90, 168, 0.08);
    --brand-soft-border: rgba(30, 90, 168, 0.22);
    --green: #2E9E5B;
    --green-dark: #24804A;
    --amber-soft: #FFF6DF;
    --amber-border: #F2D98B;

    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --mono: "SF Mono", ui-monospace, Menlo, Monaco, monospace;

    --measure: 46rem;       /* ~68 characters at 17px */
    --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--text);
    margin: 0;
}
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
::selection { background: rgba(30, 90, 168, 0.16); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ---------------- buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--brand-soft-border); }
.btn-secondary:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-download { background: var(--green); color: #fff; }
.btn-download:hover { background: var(--green-dark); }
.btn-lg { padding: 12px 22px; font-size: 1rem; }

/* ---------------- site header ---------------- */
.brand-bar { height: 4px; background: linear-gradient(90deg, #1E5AA8 0%, #2F8BD6 55%, #2E9E5B 100%); }
header.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border-light);
}
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 10px; display: block; }
.brand-name { display: block; font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--text); line-height: 1.15; }
.brand-sub { display: block; font-size: 0.78rem; color: var(--text-muted); }
nav.site-nav { display: flex; align-items: center; gap: 22px; font-size: 0.9rem; }
nav.site-nav a { color: var(--text-secondary); font-weight: 500; }
nav.site-nav a:hover { color: var(--brand); text-decoration: none; }
nav.site-nav a[aria-current] { color: var(--brand); }
nav.site-nav a.btn-primary, nav.site-nav a.btn-primary:hover { color: #fff; }
nav.site-nav a.btn-secondary, nav.site-nav a.btn-secondary:hover { color: var(--brand); }
nav.site-nav .btn { margin-left: 4px; }
@media (max-width: 760px) {
    nav.site-nav a:not(.btn) { display: none; }
    nav.site-nav { gap: 8px; }
    .brand-sub { display: none; }
    .brand-name { white-space: nowrap; font-size: 0.95rem; }
}
@media (max-width: 480px) {
    .brand-name { display: none; }   /* icon only; the accessible name stays in the alt text */
}

main { flex: 1; padding: 40px 0 72px; }
.reader { max-width: 760px; margin: 0 auto; }

/* ---------------- breadcrumbs ---------------- */
.breadcrumbs { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 18px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; color: var(--border); margin-right: 6px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current] { color: var(--text-secondary); }

/* ---------------- page header ---------------- */
.page-header { margin-bottom: 28px; }
.page-kicker {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand);
    margin-bottom: 8px;
}
.page-header h1, .page-title { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 10px; text-wrap: balance; }
.page-summary { font-size: 1.08rem; line-height: 1.5; color: var(--text-muted); max-width: var(--measure); }

/* ---------------- article body ---------------- */
.page-body { max-width: var(--measure); }
.page-body > * + * { margin-top: 14px; }
.page-body h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 10px; text-wrap: balance; }
.page-body h2 {
    font-size: 1.3rem;
    color: var(--brand-dark);
    margin-top: 40px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    scroll-margin-top: 88px;
}
.page-body h3 { font-size: 1.08rem; margin-top: 26px; scroll-margin-top: 88px; }
.page-body h4 { font-size: 1rem; margin-top: 20px; }
.page-body p, .page-body li { color: var(--text-secondary); }
.page-body p strong, .page-body li strong { color: var(--text); font-weight: 600; }
.page-body ul, .page-body ol { padding-left: 24px; }
.page-body li { margin: 6px 0; }
.page-body li::marker { color: var(--brand); font-weight: 600; }
.page-body code {
    font-family: var(--mono);
    font-size: 0.86em;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    padding: 1px 6px;
    color: var(--text);
    white-space: nowrap;
}
.page-body pre {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 18px;
    overflow-x: auto;
    font-size: 0.9rem;
}
.page-body pre code { background: none; border: 0; padding: 0; white-space: pre; }
.page-body img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 16px 0;
}
.page-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.page-body th, .page-body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.page-body th { font-weight: 600; color: var(--text); }
.page-body blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    background: var(--brand-soft);
    border-left: 3px solid var(--brand);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.page-body blockquote p { margin: 4px 0; }
.page-body a { text-decoration: underline; text-decoration-color: var(--brand-soft-border); text-underline-offset: 2px; }
.page-body a:hover { text-decoration-color: currentColor; }
.page-body hr { border: 0; border-top: 1px solid var(--border-light); margin: 28px 0; }

/* ---------------- callouts ---------------- */
.callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--brand-soft-border);
    background: var(--brand-soft);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: var(--measure);
}
.callout svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--brand); }
.callout strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.callout p { color: var(--text-secondary); }
.callout-guide { border-color: var(--amber-border); background: var(--amber-soft); margin-bottom: 28px; }
.callout-guide svg { color: #A6710B; }

/* ---------------- related topics ---------------- */
.related { margin-top: 48px; }
.related h2 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.related-card {
    display: block;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.35;
}
.related-card:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ---------------- prev / next pager ---------------- */
.pager {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.9rem;
}
.pager a { display: flex; flex-direction: column; gap: 2px; max-width: 48%; }
.pager a:hover { text-decoration: none; }
.pager a:hover strong { text-decoration: underline; }
.pager span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.pager strong { font-weight: 500; color: var(--brand); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------------- conversion strip ---------------- */
.cta-strip {
    margin-top: 56px;
    padding: 26px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cta-strip img { width: 56px; height: 56px; border-radius: 13px; flex-shrink: 0; }
.cta-text { flex: 1; min-width: 240px; }
.cta-text h2 { font-size: 1.1rem; margin-bottom: 4px; }
.cta-text p { font-size: 0.9rem; color: var(--text-muted); }
.cta-text p a { font-weight: 500; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- footer ---------------- */
footer.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border-light);
    padding: 48px 0 32px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-col h4 {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    margin-bottom: 14px;
}
.footer-col p { margin-bottom: 7px; }
.footer-col a { color: var(--text-secondary); }
.footer-col a:hover { color: var(--brand); text-decoration: none; }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------------- help index ---------------- */
.hub-header { max-width: 760px; margin-bottom: 28px; }

.start-here { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 28px 0 36px; }
.start-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); }
.start-card:hover { border-color: var(--brand); text-decoration: none; }
.start-card svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--brand); margin-top: 2px; }
.start-card strong { display: block; font-weight: 600; font-size: 0.95rem; }
.start-card small { display: block; color: var(--text-muted); font-size: 0.82rem; margin-top: 2px; line-height: 1.4; }

.jump { position: sticky; top: 68px; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border-light); margin-bottom: 28px; }
.jump ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; overflow-x: auto; font-size: 0.84rem; height: 44px; align-items: center; scrollbar-width: none; }
.jump ul::-webkit-scrollbar { display: none; }
.jump a { color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.jump a:hover { color: var(--brand); text-decoration: none; }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.topic-section { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; scroll-margin-top: 120px; }
.topic-section.wide { grid-column: 1 / -1; }
.topic-section h2 { font-size: 1.05rem; margin-bottom: 10px; color: var(--brand-dark); }
.topic-section ul { list-style: none; margin: 0; padding: 0; }
.topic-section.wide ul { columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .topic-section.wide ul { columns: 1; } }
.topic-section li { padding: 5px 0; border-top: 1px solid var(--border-light); font-size: 0.93rem; line-height: 1.4; break-inside: avoid; }
.topic-section li:first-child { border-top: 0; }
.topic-section li a { color: var(--text); }
.topic-section li a:hover { color: var(--brand); }
.topic-section .important { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #B4530A; background: var(--amber-soft); border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: middle; }

/* video links: a play-in-screen icon before the title, on the index cards (a.video-link)
   and on any youtube link inside a topic page. mask-image lets the icon take the link colour. */
a.video-link::before,
.page-body a[href*="youtu.be/"]::before,
.page-body a[href*="youtube.com/"]::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.35em;
    vertical-align: -0.15em;
    background-color: var(--brand);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m10 9 5 3-5 3z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m10 9 5 3-5 3z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.video-link:hover::before,
.page-body a[href*="youtu.be/"]:hover::before,
.page-body a[href*="youtube.com/"]:hover::before { background-color: currentColor; }

.video-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-alt);
    border-radius: 999px;
    padding: 2px 8px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}
