/* Corporate AI Readiness (tools/ai-readiness/static/style.css)
   Spec section 3: light, generous whitespace, high contrast, restrained color, credible
   enough to send to a CTO or compliance leader. Every value below comes from the variables
   in tools/shared/static/base.css, which carry the docs/DESIGN.md storefront tokens. */

.lede {
    color: var(--muted);
    margin: calc(var(--s6) * -1) 0 var(--s6);
}

/* --- Landing (section 4) ------------------------------------------------------------ */

/* The banner ground is the exact page background, so the image reads as part of the page
   rather than as a pasted rectangle. aspect-ratio reserves the box before the file lands,
   which keeps the headline from jumping. */
.hero-banner {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    margin-bottom: var(--s6);
}

.hero {
    padding: 0 0 var(--s10);
    border-bottom: 1px solid var(--line);
}

@media (max-width: 600px) {
    /* Narrower crop on phones: at full width the curves flatten into near-horizontal lines
       and the divergence, which is the whole point, stops reading. */
    .hero-banner {
        aspect-ratio: 2 / 1;
        object-fit: cover;
        object-position: 70% center;
    }
}

.hero-support {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 34em;
    margin: 0 0 var(--s6);
}

.hero-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2) var(--s4);
    margin: 0 0 var(--s8);
    padding: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.hero-meta li {
    padding-right: var(--s4);
    border-right: 1px solid var(--line);
}

.hero-meta li:last-child {
    border-right: 0;
    padding-right: 0;
}

.button-lg {
    padding: var(--s4) var(--s8);
    font-size: 1rem;
}

.explainer {
    padding: var(--s8) 0;
    max-width: 46em;
    color: var(--muted);
}

.dimensions h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 var(--s4);
}

.dimension-grid {
    list-style: none;
    margin: 0 0 var(--s10);
    padding: 0;
    display: grid;
    gap: var(--s3);
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
}

.dimension-tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: var(--s4);
}

/* --- Assessment shell (sections 5 and 6) -------------------------------------------- */

.assessment-header {
    margin-bottom: var(--s10);
}

.assessment-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s4);
    margin-bottom: var(--s2);
    font-size: 0.875rem;
    color: var(--muted);
}

.assessment-step {
    font-weight: 700;
    color: var(--ink);
}

.progress-track {
    height: 4px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
}

/* Scaled rather than resized: animating width thrashes layout on every frame, and this
   bar updates on each answer. transform is composited. */
.progress-fill {
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: var(--brand);
    transition: transform 240ms ease;
}

.assessment-stage {
    min-height: 22rem;
}

.question-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 var(--s6);
    max-width: 30em;
}

.question-title:focus {
    outline: none; /* programmatic focus for screen readers, not a visible affordance */
}

.question-help {
    color: var(--muted);
    font-size: 0.875rem;
    margin: calc(var(--s6) * -1) 0 var(--s6);
}

.option-list {
    display: grid;
    gap: var(--s3);
    max-width: 34em;
}

.option {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: var(--s4);
    font: inherit;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease;
}

.option:hover:not(:disabled) {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.option:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Selection is carried by border, background and aria-pressed, never by color alone. */
.option.is-selected {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: inset 3px 0 0 var(--brand);
    font-weight: 700;
}

.option.is-disabled,
.option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.assessment-nav {
    display: flex;
    align-items: center;
    gap: var(--s4);
    margin-top: var(--s8);
}

.button-quiet {
    background: none;
    border: 0;
    color: var(--muted);
    font: inherit;
    padding: var(--s3) 0;
    cursor: pointer;
    text-decoration: underline;
}

.button-quiet:hover {
    color: var(--ink);
}

.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.resume-actions {
    display: flex;
    align-items: center;
    gap: var(--s4);
}

.processing {
    color: var(--muted);
}

/* --- Notices ------------------------------------------------------------------------ */

.notice {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: var(--s3) var(--s4);
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0 0 var(--s6);
}

.notice-error {
    border-color: var(--brand);
    color: var(--ink);
    margin: var(--s4) 0 0;
}

/* --- Report (sections 21.1 to 21.6 and 21.8) ---------------------------------------- */

.report-hero {
    padding-bottom: var(--s8);
    border-bottom: 1px solid var(--line);
    margin-bottom: var(--s8);
}

.report-eyebrow {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0 0 var(--s2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.score-label {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0;
}

.report-section {
    margin-bottom: var(--s10);
}

.report-section h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 var(--s4);
}

.section-note {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0 0 var(--s3);
}

.summary-line {
    max-width: 44em;
    margin: 0 0 var(--s3);
}

/* Adoption vs governance (section 21.4). Numbers sit beside every bar so the comparison
   survives without the visualization - no meaning is carried by color or width alone. */
.meter {
    margin-bottom: var(--s4);
    max-width: 34em;
}

.meter-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--s2);
}

.meter-label {
    color: var(--muted);
}

.meter-number {
    font-family: var(--font-display);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.meter-track {
    height: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 999px;
}

.meter-fill-adoption {
    background: var(--accent);
}

.meter-fill-governance {
    background: var(--brand);
}

.gap-callout {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2) var(--s3);
    align-items: baseline;
    background: var(--brand-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: var(--s4);
    margin: var(--s6) 0 0;
    max-width: 34em;
}

.gap-callout span {
    color: var(--muted);
}

.report-dimension-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--s4);
    /* Without min() this track stays 280px inside a 272px column at 320px wide,
       forcing horizontal scroll on the smallest phones. */
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}

.report-dimension-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: var(--s4);
}

.report-dimension-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--s2);
}

.card-score {
    display: flex;
    align-items: baseline;
    gap: var(--s2);
    margin: 0 0 var(--s3);
}

.card-score-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.card-status {
    font-size: 0.875rem;
    color: var(--muted);
}

.card-explanation {
    margin: 0 0 var(--s3);
    font-size: 0.875rem;
}

.card-list {
    margin: 0 0 var(--s3);
    padding-left: var(--s4);
    font-size: 0.875rem;
    color: var(--muted);
}

.card-strength {
    margin: 0;
    font-size: 0.875rem;
    color: var(--brand-dark);
    border-top: 1px solid var(--line);
    padding-top: var(--s3);
}

.finding-list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 40em;
}

.finding-list li {
    padding: var(--s3) 0 var(--s3) var(--s4);
    border-bottom: 1px solid var(--line);
    position: relative;
}

/* The marker is a shape plus position, not a color cue on its own. */
.finding-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--muted);
}

.finding-list-positive li::before {
    content: "+";
    color: var(--brand);
}

.next-steps {
    margin: 0;
    padding-left: var(--s5);
    max-width: 40em;
}

.next-steps li {
    padding: var(--s2) 0;
    padding-left: var(--s2);
}

/* --- Prose pages: methodology (section 31) ------------------------------------------ */

.prose {
    max-width: 42em;
}

.prose-section {
    margin-bottom: var(--s8);
}

.prose-section h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 var(--s3);
}

.prose-section p {
    margin: 0 0 var(--s3);
}

.prose-cta {
    border-top: 1px solid var(--line);
    padding-top: var(--s6);
}

/* --- Teaser and email gate (sections 15, 16, 17) ------------------------------------ */

.teaser-gaps {
    font-family: var(--font-display);
    font-weight: 700;
    margin: var(--s6) 0 var(--s2);
}

.teaser-insight {
    max-width: 44em;
    color: var(--muted);
    margin: 0;
}

.gated {
    position: relative;
    margin-bottom: var(--s10);
}

/* Placeholder shapes, never redacted content: the real report is not in this page. */
.gated-preview {
    filter: blur(5px);
    opacity: 0.5;
    user-select: none;
    pointer-events: none;
}

.skeleton-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: var(--s4);
    margin-bottom: var(--s4);
}

.skeleton-title {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 0 0 var(--s3);
}

.skeleton-line {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    margin-bottom: var(--s2);
}

.skeleton-line-short {
    width: 62%;
}

.gate-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: var(--s10);
}

.gate-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: var(--s8);
    max-width: 30em;
    width: 100%;
    box-shadow: 0 12px 32px rgb(24 35 48 / 12%);
}

.gate-card h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 var(--s2);
}

.gate-subtitle {
    color: var(--muted);
    margin: 0 0 var(--s6);
}

#gate-form label {
    display: block;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: var(--s2);
}

#gate-form input {
    width: 100%;
    padding: var(--s3) var(--s4);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    margin-bottom: var(--s4);
}

#gate-form input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    border-color: var(--brand);
}

/* Invalid state carries a border change plus the message below, never color alone. */
#gate-form input[aria-invalid="true"] {
    border-color: var(--accent-dark, var(--accent));
    border-width: 2px;
}

#gate-form button {
    width: 100%;
}

/* The message text carries the meaning; the tint only draws the eye to it. Nothing here
   depends on color alone, and role="alert" announces it. */
.gate-error {
    margin: 0 0 var(--s3);
    color: var(--ink);
    font-size: 0.875rem;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: var(--s3);
}

.gate-support {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

@media (max-width: 600px) {
    .gate-overlay {
        position: static;
        padding-top: 0;
    }

    /* On a narrow screen the overlay stacks instead of floating, so the blurred preview
       behind it would only add scroll. */
    .gated-preview {
        display: none;
    }

    .gate-card {
        padding: var(--s6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gated-preview {
        filter: none;
        opacity: 0.35;
    }
}

/* --- Email confirmation and sharing ------------------------------------------------- */

.sent-notice {
    background: var(--brand-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: var(--s3) var(--s4);
    margin: 0 0 var(--s8);
    font-size: 0.875rem;
    max-width: 44em;
}

.share-block {
    border-top: 1px solid var(--line);
    padding-top: var(--s6);
}

.share-sent {
    margin: var(--s3) 0 0;
    font-size: 0.875rem;
    color: var(--brand-dark);
}

.share-dialog {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: var(--s8);
    max-width: 30em;
    width: calc(100% - var(--s8));
    background: var(--surface);
    color: var(--ink);
}

.share-dialog::backdrop {
    background: oklch(20% 0.025 235 / 45%);
}

.share-dialog h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 var(--s2);
}

.share-subtitle {
    color: var(--muted);
    margin: 0 0 var(--s6);
    font-size: 0.875rem;
}

.share-dialog label {
    display: block;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: var(--s2);
}

.share-dialog input {
    width: 100%;
    padding: var(--s3) var(--s4);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    margin-bottom: var(--s4);
}

.share-dialog input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    border-color: var(--brand);
}

.share-actions {
    display: flex;
    align-items: center;
    gap: var(--s4);
}

.report-footer {
    border-top: 1px solid var(--line);
    padding-top: var(--s6);
    color: var(--muted);
    font-size: 0.875rem;
}

.score-headline {
    display: flex;
    align-items: baseline;
    gap: var(--s2);
    margin-bottom: var(--s6);
}

.score-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.score-scale {
    color: var(--muted);
}

.score-summary {
    display: grid;
    gap: var(--s2);
    margin: 0 0 var(--s8);
    max-width: 34em;
}

.score-summary > div {
    display: flex;
    justify-content: space-between;
    gap: var(--s4);
    padding: var(--s3) 0;
    border-bottom: 1px solid var(--line);
}

.score-summary dt {
    color: var(--muted);
}

.score-summary dd {
    margin: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.assessment-id {
    font-size: 0.875rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--s4);
    margin: 0 0 var(--s2);
}

/* --- Responsive (section 26) -------------------------------------------------------- */

@media (max-width: 600px) {
    .option-list {
        gap: var(--s2);
    }

    .option {
        padding: var(--s4) var(--s3);
        min-height: 3rem;   /* comfortable one-thumb tap target */
    }

    .assessment-header {
        position: sticky;
        top: 0;
        z-index: 1;
        background: var(--bg);
        padding: var(--s3) 0;
        margin-bottom: var(--s6);
    }

    .hero-meta li {
        border-right: 0;
        padding-right: 0;
    }
}

/* --- Reduced motion (section 27) ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .progress-fill,
    .option {
        transition: none;
    }
}
