/* IBV style — sourced from ibvgroup.com (Red Hat Display, amber hero,
   brand red CTAs, cream sections). */

:root {
    --bg: #ffffff;
    --bg-cream: #fffcf1;
    --bg-amber: #fbb504;
    --ink: #222222;
    --ink-soft: #333333;
    --ink-muted: #6b6f78;
    --rule: #ececec;
    --brand-red: #dd000f;
    --brand-red-hover: #b3000c;
    --on-amber: #ffffff;
    --shell-max: 1200px;
    --gutter: 2rem;
    --header-h: 90px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink-soft);
    font-family: 'Red Hat Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--ink);
    text-decoration: none;
}
a:hover { color: var(--brand-red); }

h1, h2, h3, h4 {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 300;
    color: var(--ink);
    margin: 0 0 0.5em;
    letter-spacing: -0.005em;
}
h1 { font-size: 4.4rem; line-height: 1.0; }
h2 { font-size: 3rem;   line-height: 1.08; }
h3 { font-size: 1.5rem; line-height: 1.2;  font-weight: 500; }
h4 { font-size: 1rem;   line-height: 1.3;  font-weight: 600; }

p  { margin: 0 0 1em; max-width: 65ch; }
.muted { color: var(--ink-muted); }
strong { font-weight: 600; }

.eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-muted);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
}

/* Shell */
.shell {
    max-width: var(--shell-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Header — fixed, transparent over hero, amber/cream-friendly */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: var(--ink);
}
.site-brand img { display: block; height: 32px; width: auto; }
.site-brand .brand-divider {
    width: 1px;
    height: 22px;
    background: rgba(0, 0, 0, 0.18);
}
.site-brand .brand-product {
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    font-weight: 400;
}

.site-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    font-size: 0.9375rem;
}
.site-nav a {
    color: var(--ink);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.8125rem;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--brand-red); }
.site-nav a.cta-link { color: var(--brand-red); }
.site-nav a.cta-link:hover { color: var(--brand-red-hover); }

/* Push content below the fixed header. */
main { padding-top: var(--header-h); }

/* Hero — amber band, white type, large light heading. */
.hero {
    background: var(--bg-amber);
    color: var(--on-amber);
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.hero h1 { color: var(--on-amber); max-width: 22ch; }
.hero p  { color: rgba(255, 255, 255, 0.92); font-size: 1.125rem; max-width: 56ch; }
.hero .muted { color: rgba(255, 255, 255, 0.75); }
.hero .btn-row { margin-top: 2rem; }

/* Sub-hero variant (used on Inputs / Preview / Export — keeps the amber
   wash but tightens vertical rhythm). */
.hero.compact { padding: 4rem 0 3rem; }

/* Hero on cream — used when we want a softer landing band. */
.hero.cream { background: var(--bg-cream); color: var(--ink); }
.hero.cream h1 { color: var(--ink); }
.hero.cream p  { color: var(--ink-soft); }
.hero.cream .eyebrow { color: var(--ink-muted); }

/* Sections */
section.block {
    padding: 5rem 0;
    border-top: 1px solid var(--rule);
    background: var(--bg);
}
section.block.cream { background: var(--bg-cream); border-top-color: transparent; }
section.block:first-of-type { border-top: 0; }
section.block .block-head {
    display: grid;
    grid-template-columns: minmax(180px, 260px) 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
    align-items: start;
}
@media (max-width: 720px) {
    section.block { padding: 3rem 0; }
    section.block .block-head { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Vertical list (home) */
.vertical-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--rule);
}
.vertical-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--rule);
    transition: padding-left 160ms ease;
}
.vertical-list li:hover { padding-left: 0.5rem; }
.vertical-list .name { font-size: 1.5rem; font-weight: 400; color: var(--ink); }
.vertical-list .actions { display: flex; gap: 1.75rem; font-size: 0.8125rem; }
.vertical-list .actions a {
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
}
.vertical-list .actions a:hover { color: var(--brand-red); }

/* Buttons — solid red CTA on amber, outlined on cream/white. */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    background: var(--brand-red);
    color: #ffffff;
    border: 1px solid var(--brand-red);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.btn:hover { background: var(--brand-red-hover); border-color: var(--brand-red-hover); color: #ffffff; }
.btn-secondary {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
}
.btn-secondary:hover { background: #ffffff; color: var(--ink); border-color: #ffffff; }
.hero.cream .btn-secondary,
section.block .btn-secondary {
    color: var(--ink);
    border-color: var(--ink);
}
.hero.cream .btn-secondary:hover,
section.block .btn-secondary:hover {
    background: var(--ink); color: #ffffff; border-color: var(--ink);
}
.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Text-link CTA with arrow ("READ MORE →" style on ibvgroup.com). */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-red);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
.cta-link::after { content: "→"; transition: transform 160ms ease; }
.cta-link:hover { color: var(--brand-red-hover); }
.cta-link:hover::after { transform: translateX(3px); }

/* Sub-nav (breadcrumb-ish) */
.subnav {
    display: flex;
    gap: 2rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--ink-muted);
    padding: 1.75rem 0 0;
}
.subnav a { color: var(--ink-muted); }
.subnav a:hover, .subnav a.is-active { color: var(--brand-red); }

/* Scenario columns (preview) */
.scenarios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--bg);
}
.scenarios .col {
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--rule);
}
.scenarios .col:last-child { border-right: 0; }
.scenarios .col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-muted);
    margin-bottom: 1.25rem;
    font-weight: 600;
}
.scenarios .metric {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 0.9375rem;
}
.scenarios .metric:last-child { border-bottom: 0; }
.scenarios .metric .label { color: var(--ink-muted); }
.scenarios .metric .value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--ink);
}

@media (max-width: 720px) {
    .scenarios { grid-template-columns: 1fr; }
    .scenarios .col { border-right: 0; border-bottom: 1px solid var(--rule); }
    .scenarios .col:last-child { border-bottom: 0; }
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2rem; }
}

/* Footer — dark band, amber chevron logo accent. */
.site-footer {
    background: var(--bg-cream);
    border-top: 1px solid var(--rule);
    padding: 3rem 0;
    color: var(--ink-muted);
    font-size: 0.8125rem;
}
.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.site-footer img { height: 28px; width: auto; opacity: 0.9; }

/* Auth — centered card on a cream page-fill. Used by sign-in and
   password-change. Sits inside <main> so the site header still shows. */
.auth-page {
    background: var(--bg-cream);
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}
.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem 2.5rem;
    border-top: 3px solid var(--bg-amber);
    border-bottom: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
    border-right: 1px solid var(--rule);
}
@media (max-width: 480px) {
    .auth-card { padding: 2.25rem 1.5rem 2rem; }
}
.auth-card-head { margin-bottom: 2rem; }
.auth-logo {
    display: block;
    height: 32px;
    width: auto;
    margin-bottom: 1.5rem;
}
.auth-eyebrow {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.auth-headline {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 300;
    color: var(--ink);
    margin: 0 0 0.5rem;
    letter-spacing: -0.005em;
}
.auth-sub {
    font-size: 0.9375rem;
    color: var(--ink-muted);
    margin: 0;
}

.auth-form { display: flex; flex-direction: column; gap: 1.25rem; margin: 0; }
.auth-field { display: flex; flex-direction: column; }
.auth-field label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.auth-field input {
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--rule);
    border-radius: 0;
    padding: 0.85rem 0.95rem;
    transition: border-color 140ms ease, box-shadow 140ms ease;
    width: 100%;
}
.auth-field input:hover { border-color: rgba(0, 0, 0, 0.32); }
.auth-field input:focus {
    outline: none;
    border-color: var(--bg-amber);
    box-shadow: 0 0 0 3px rgba(251, 181, 4, 0.22);
}
.auth-field input[aria-invalid="true"],
.auth-field-error + input {
    border-color: var(--brand-red);
}

.auth-help-text {
    display: block;
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 0.5rem;
    line-height: 1.5;
}
.auth-field-error {
    font-size: 0.8125rem;
    color: var(--brand-red);
    margin-top: 0.4rem;
    font-weight: 500;
}

.auth-error {
    background: rgba(221, 0, 15, 0.06);
    border-left: 3px solid var(--brand-red);
    padding: 0.75rem 1rem;
    color: var(--brand-red);
    font-size: 0.875rem;
}
.auth-error p { margin: 0; max-width: none; }
.auth-error p + p { margin-top: 0.25rem; }

.auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.auth-help {
    margin: 1.75rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--ink-muted);
    max-width: none;
}


/* ── Context Apps ──────────────────────────────────────────────────────────
   Documentation browser. Card chrome matches the navigator's; the reference
   docs get cards because they are the point, while a system's 40+ verbatim
   source docs collapse into groups so they don't drown them. */

.hero-actions { margin-top: 1.75rem; }
.hero-actions a {
    color: var(--brand-red);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}
.hero-actions a:hover { color: var(--brand-red-hover); }
.hero .eyebrow a { color: inherit; text-decoration: none; }
.hero .eyebrow a:hover { color: #ffffff; }

/* Cards — same chrome as the navigator's app cards. */
.ca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}
.ca-card {
    background: #ffffff;
    border: 1px solid var(--rule);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 180px;
    height: 100%;
    transition: border-color 160ms ease, transform 160ms ease;
}
.ca-card h3 { font-size: 1.25rem; font-weight: 500; color: var(--ink); margin: 0; }
.ca-card p {
    font-size: 0.9375rem; color: var(--ink-muted);
    line-height: 1.55; margin: 0; flex-grow: 1;
}
.ca-card .ca-meta {
    flex-grow: 0; font-size: 0.75rem; color: var(--ink-muted);
    text-transform: uppercase; letter-spacing: 0.1em;
}
.ca-card .arrow {
    color: var(--brand-red); text-transform: uppercase;
    letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 600;
}
.ca-card .arrow::after { content: ' →'; }
a.ca-card-link { text-decoration: none; color: inherit; display: block; }
a.ca-card-link:hover .ca-card { border-color: var(--brand-red); transform: translateY(-2px); }
a.ca-card-link:hover h3 { color: var(--brand-red); }

/* Verbatim source docs — collapsed by folder. */
.ca-group { border-bottom: 1px solid var(--rule); }
.ca-group:first-of-type { border-top: 1px solid var(--rule); margin-top: 2.5rem; }
.ca-group > summary {
    cursor: pointer; padding: 1rem 0; list-style: none;
    display: flex; align-items: center; gap: 0.75rem;
    font-weight: 500; color: var(--ink); text-transform: capitalize;
}
.ca-group > summary::-webkit-details-marker { display: none; }
.ca-group > summary::before {
    content: '+'; color: var(--brand-red); font-weight: 400;
    width: 1rem; font-size: 1.1rem; line-height: 1;
}
.ca-group[open] > summary::before { content: '−'; }
.ca-group > summary:hover { color: var(--brand-red); }
.ca-group-count {
    margin-left: auto; color: var(--ink-muted); font-size: 0.75rem;
    letter-spacing: 0.1em;
}
.ca-doclist { list-style: none; padding: 0 0 1rem 1.75rem; margin: 0; }
.ca-doclist li { padding: 0.4rem 0; }
.ca-doclist a { color: var(--ink-soft); text-decoration: none; font-size: 0.9375rem; }
.ca-doclist a:hover { color: var(--brand-red); }

.ca-shell { max-width: 900px; }
.ca-badge {
    display: inline-block; margin-top: 1.25rem; padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.9); border-left: 3px solid var(--brand-red);
    color: var(--ink-soft); font-size: 0.85rem;
}

/* Rendered markdown */
.ca-prose { line-height: 1.7; color: var(--ink-soft); }
.ca-prose h1, .ca-prose h2, .ca-prose h3, .ca-prose h4 {
    font-weight: 300; color: var(--ink); line-height: 1.25; margin: 2.5rem 0 1rem;
}
.ca-prose h1 { font-size: 2rem; }
.ca-prose h2 { font-size: 1.5rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.5rem; }
.ca-prose h3 { font-size: 1.15rem; font-weight: 500; }
.ca-prose h4 { font-size: 1rem; font-weight: 600; }
.ca-prose h1:first-child, .ca-prose h2:first-child { margin-top: 0; }
.ca-prose a { color: var(--brand-red); }
.ca-prose code {
    background: var(--bg-cream); border: 1px solid var(--rule);
    padding: 0.1rem 0.35rem; border-radius: 3px; font-size: 0.85em;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    overflow-wrap: break-word;
}
.ca-prose pre {
    background: var(--bg-cream); border: 1px solid var(--rule);
    padding: 1rem; overflow-x: auto; border-radius: 3px;
}
.ca-prose pre code { background: none; border: none; padding: 0; }
.ca-prose blockquote {
    margin: 1.5rem 0; padding: 0.75rem 0 0.75rem 1.25rem;
    border-left: 3px solid var(--bg-amber); color: var(--ink-muted);
}
.ca-prose blockquote > :first-child { margin-top: 0; }
.ca-prose blockquote > :last-child { margin-bottom: 0; }
/* Schema tables are wide; scroll them rather than bursting the page. */
.ca-prose table {
    border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: 0.875rem;
    display: block; overflow-x: auto;
}
.ca-prose th, .ca-prose td {
    border: 1px solid var(--rule); padding: 0.5rem 0.75rem;
    text-align: left; vertical-align: top;
}
.ca-prose th { background: var(--bg-cream); font-weight: 600; white-space: nowrap; }
.ca-prose td code { white-space: nowrap; }
.ca-prose ul, .ca-prose ol { padding-left: 1.5rem; }
.ca-prose li { margin: 0.35rem 0; }
.ca-prose hr { border: none; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
