/* ================================================================
   NAIDI 2026 — Light & Classic Design System
   Logo-aligned navy palette × Material 3 surface system
   ================================================================ */

:root {
    /* Brand — anchored to logo #1A467D */
    --primary:           #1A467D;
    --primary-deep:      #0E2D55;
    --primary-darker:    #061A3A;
    --primary-soft:      #4F76A8;
    --primary-pale:      #D8E3F5;
    --primary-tint:      #E9F0FA;
    --on-primary:        #FFFFFF;

    /* Secondary — teal medical accent (Material 3 inspired) */
    --secondary:         #006C4F;
    --secondary-deep:    #00513B;
    --secondary-pale:    #D0F2E3;
    --secondary-tint:    #E6FAF1;

    /* Tertiary — warm amber for cautions */
    --tertiary:          #8B5A2B;
    --tertiary-pale:     #FFE4C4;

    /* Accent — Honor Gold (brand bible) for structural rules, metrics, section numerals */
    --accent:            #B27B00;
    --accent-deep:       #8A5F00;
    --accent-soft:       #D9A847;
    --accent-pale:       #F5E9D0;
    --accent-tint:       #FAF3E2;

    /* Surface system */
    --background:                #FBFAFD;
    --surface:                   #FFFFFF;
    --surface-dim:               #DCDADF;
    --surface-bright:            #FBFAFD;
    --surface-container-lowest:  #FFFFFF;
    --surface-container-low:     #F5F4F8;
    --surface-container:         #EEEDF2;
    --surface-container-high:    #E8E6EC;
    --surface-container-highest: #E2E0E6;

    /* On-surface text */
    --on-bg:             #1B1B22;
    --on-surface:        #1B1B22;
    --on-surface-variant:#45464E;
    --on-surface-muted:  #6B6C75;
    --on-surface-faint:  #8C8D96;

    /* Borders */
    --outline:           #767682;
    --outline-variant:   #C7C5CF;
    --outline-pale:      #E2E0E6;

    /* Status */
    --ok:                #006C4F;
    --warn:              #B27B00;
    --danger:            #B3261E;
    --info:              #1A467D;

    /* Type */
    --font-headline:    'Manrope', 'Noto Sans JP', system-ui, sans-serif;
    --font-headline-ja: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', Georgia, serif;
    --font-body:        'Inter', 'Noto Sans JP', system-ui, sans-serif;
    --font-serif:       'Noto Serif JP', Georgia, serif;
    --font-mono:        'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

    /* Layout */
    --max:        1280px;
    --max-narrow: 920px;
    --max-prose:  720px;
    --pad:        clamp(20px, 4vw, 40px);

    /* Radius — classic, restrained */
    --r-xs:  2px;
    --r-sm:  4px;
    --r-md:  8px;
    --r-lg:  12px;
    --r-xl:  16px;
    --r-full: 999px;

    /* Shadow — subtle, paper-like */
    --sh-1: 0 1px 2px rgba(11,17,32,0.04), 0 1px 3px rgba(11,17,32,0.06);
    --sh-2: 0 1px 2px rgba(11,17,32,0.04), 0 6px 14px rgba(11,17,32,0.06);
    --sh-3: 0 4px 6px rgba(11,17,32,0.04), 0 16px 28px rgba(11,17,32,0.08);
    --sh-4: 0 8px 16px rgba(11,17,32,0.06), 0 24px 48px rgba(11,17,32,0.10);

    /* Motion */
    --ease:    cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast:  150ms;
    --t-base:  280ms;
    --t-slow:  600ms;
}

/* ============== Reset ============== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}
body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--on-bg);
    line-height: 1.7;
    font-feature-settings: "palt", "kern";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
/* Section-level clipping prevents reveal-right transforms from leaking past viewport */
.section, .section-tight, .hero, .page-head, .product-hero {
    overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
::selection { background: var(--primary-pale); color: var(--primary-deep); }

/* ============== Containers ============== */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 var(--pad); }
.wrap-prose { max-width: var(--max-prose); margin: 0 auto; padding: 0 var(--pad); }

/* ============== Typography ============== */
h1, h2, h3, h4, .font-headline {
    font-family: var(--font-headline);
    color: var(--on-surface);
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.25rem); font-weight: 700; }
h4 { font-size: 0.95rem; font-weight: 700; }

.lead {
    font-size: clamp(0.98rem, 1.2vw, 1.08rem);
    color: var(--on-surface-variant);
    line-height: 1.85;
    max-width: 60ch;
}

/* Eyebrow — classic numbered/lined label */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-headline);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
}
.eyebrow .dash {
    width: 28px;
    height: 1px;
    background: currentColor;
}
.eyebrow .num {
    font-family: var(--font-mono);
    color: var(--on-surface-faint);
}

/* Section headline pattern: number + bar + title */
.section-title {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: baseline;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--outline-variant);
}
.section-title .num {
    font: 700 14px var(--font-mono);
    color: var(--primary);
    letter-spacing: 0.1em;
}
.section-title h2 {
    margin: 0;
}
.section-title .lead {
    grid-column: 2;
    margin-top: 12px;
}

/* ============== Header ============== */
.n-header {
    position: sticky;
    top: 0;
    z-index: 90;
    height: 72px;
    display: flex;
    align-items: center;
    background: rgba(251, 250, 253, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.n-header.is-scrolled {
    border-bottom-color: var(--outline-variant);
    background: rgba(251, 250, 253, 0.96);
}

.n-nav {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad);
    display: flex;
    align-items: center;
    gap: 32px;
}

.n-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-headline);
    font-weight: 800;
    font-size: 18px;
    color: var(--primary-deep);
    letter-spacing: -0.02em;
}
.n-logo img { height: 28px; }

.n-menu {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.n-menu a {
    font-family: var(--font-headline);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--on-surface-variant);
    padding: 8px 14px;
    border-radius: var(--r-md);
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
    position: relative;
}
.n-menu a:hover {
    color: var(--primary-deep);
    background: var(--surface-container-low);
}
.n-menu a.is-active {
    color: var(--primary-deep);
    background: var(--primary-tint);
}

.n-actions { display: flex; align-items: center; gap: 10px; }

.n-status-pill {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ok);
    background: var(--secondary-tint);
    border: 1px solid var(--secondary-pale);
    border-radius: var(--r-full);
}

.n-lang {
    padding: 7px 26px 7px 12px;
    border: 1px solid var(--outline-variant);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--on-surface-variant);
    font: 600 12.5px var(--font-headline);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23767682' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    cursor: pointer;
    transition: border-color var(--t-fast);
}
.n-lang:hover { border-color: var(--primary); }

.n-burger {
    display: none;
    width: 36px; height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: var(--r-md);
}
.n-burger:hover { background: var(--surface-container-low); }
.n-burger span {
    width: 18px; height: 2px;
    background: var(--on-surface);
    border-radius: 2px;
    transition: transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
}
.n-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.n-burger.is-open span:nth-child(2) { opacity: 0; }
.n-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
    /* Hamburger pinned to the absolute right edge of the viewport */
    .n-nav { padding-right: 6px; gap: 12px; }
    .n-actions { margin-left: auto; gap: 0; }
    .n-actions .btn-primary,
    .n-actions .hcp-switch,
    .n-actions .n-lang { display: none; }

    .n-burger {
        display: flex;
        position: relative;
        z-index: 220;
        width: 44px;
        height: 44px;
        margin-right: 0;
    }

    /* Inline menu hidden by default on mobile */
    .n-menu { display: none; }

    body.menu-open { overflow: hidden; }
    /* Bump the header above the scrim so the menu (inside the header's
       stacking context) is actually clickable. */
    body.menu-open .n-header { z-index: 220; }
    body.menu-open::before {
        content: '';
        position: fixed;
        inset: 64px 0 0 0;
        background: rgba(11, 17, 32, 0.40);
        z-index: 150;
        pointer-events: none;
        animation: m-fade .18s var(--ease);
    }
    @keyframes m-fade {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* === Open menu: simple top-down full-width vertical dropdown === */
    .n-menu.is-open {
        display: flex !important;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: auto;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 8px 0 16px;
        background: #FFFFFF;
        border-top: 1px solid var(--outline-variant);
        border-bottom: 1px solid var(--outline-variant);
        box-shadow: 0 14px 36px rgba(11,17,32,0.16);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 210;
        list-style: none;
        animation: m-down .22s var(--ease) both;
    }
    @keyframes m-down {
        from { transform: translateY(-8px); opacity: 0; }
        to   { transform: translateY(0); opacity: 1; }
    }

    .n-menu.is-open > li {
        display: block;
        list-style: none;
        margin: 0;
    }
    .n-menu.is-open > li:not(.n-drawer-foot) > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px var(--pad);
        font-family: var(--font-headline);
        font-size: 17px;
        font-weight: 700;
        color: var(--on-surface);
        background: transparent;
        border-bottom: 1px solid var(--outline-pale);
        border-radius: 0;
        line-height: 1.3;
    }
    .n-menu.is-open > li:not(.n-drawer-foot) > a::after {
        content: "›";
        font-family: var(--font-mono);
        font-size: 22px;
        line-height: 1;
        color: var(--on-surface-faint);
    }
    .n-menu.is-open > li:not(.n-drawer-foot) > a:active {
        background: var(--surface-container-low);
    }
    .n-menu.is-open > li:not(.n-drawer-foot) > a.is-active {
        color: var(--primary-deep);
        background: var(--primary-tint);
    }

    /* Bottom group: lang select, HCP pill, contact CTA */
    .n-menu > li.n-drawer-foot { display: none; }
    .n-menu.is-open > li.n-drawer-foot {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 18px var(--pad) 4px;
        border-bottom: none;
        list-style: none;
    }
    .n-menu.is-open > li.n-drawer-foot .n-lang {
        display: block;
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
        background-position: right 16px center;
    }
    .n-menu.is-open > li.n-drawer-foot .hcp-switch {
        display: inline-flex;
        align-self: flex-start;
    }
    .n-menu.is-open > li.n-drawer-foot .btn {
        display: inline-flex;
        width: 100%;
        padding: 16px;
        font-size: 15px;
        text-align: center;
        justify-content: center;
    }
}

@media (min-width: 961px) {
    .n-menu > li.n-drawer-foot { display: none !important; }
}

/* ============== Multilingual visibility (lang-attribute driven) ============== */
/* Hide elements that don't match the current document language. */
html[lang="ja"] [lang="en"],
html[lang="ja"] [lang="zh"],
html[lang="en"] [lang="ja"],
html[lang="en"] [lang="zh"],
html[lang="zh"] [lang="ja"],
html[lang="zh"] [lang="en"] { display: none !important; }

/* ============== Buttons ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font: 700 14px/1 var(--font-headline);
    border-radius: var(--r-md);
    transition: transform var(--t-fast) var(--ease),
                background var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease);
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--primary-deep);
    color: var(--on-primary);
}
.btn-primary:hover {
    background: var(--primary-darker);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -4px rgba(14, 45, 85, 0.4);
}
.btn-secondary {
    background: var(--secondary);
    color: var(--on-primary);
}
.btn-secondary:hover {
    background: var(--secondary-deep);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -4px rgba(0, 108, 79, 0.4);
}
.btn-ghost {
    background: transparent;
    color: var(--primary-deep);
    border: 1px solid var(--outline-variant);
}
.btn-ghost:hover {
    border-color: var(--primary);
    background: var(--primary-tint);
}
.btn-text {
    background: transparent;
    color: var(--primary);
    padding: 8px 14px;
}
.btn-text:hover {
    background: var(--primary-tint);
}

.btn .arrow {
    display: inline-block;
    transition: transform var(--t-fast) var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 700 13.5px var(--font-headline);
    color: var(--primary);
    transition: color var(--t-fast);
}
.link-arrow:hover { color: var(--primary-darker); }
.link-arrow .arrow { transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ============== Section frame ============== */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-tight { padding: clamp(48px, 7vw, 80px) 0; }
.section-bg-soft  { background: var(--surface-container-low); }
.section-bg-tint  { background: var(--primary-tint); }
.section-bg-deep  { background: var(--primary-deep); color: var(--on-primary); }
.section-bg-deep h1, .section-bg-deep h2, .section-bg-deep h3,
.section-bg-deep h4 { color: var(--on-primary); }
.section-bg-deep .lead { color: rgba(255, 255, 255, 0.78); }
.section-bg-deep .eyebrow { color: var(--primary-pale); }

/* Slim section divider rule */
.rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--outline-variant), transparent);
    margin: clamp(32px, 5vw, 56px) 0;
}

/* ============== HERO (left-aligned, classic) ============== */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--background);
    padding: clamp(72px, 10vw, 120px) 0 clamp(64px, 9vw, 96px);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, var(--outline-pale) 1px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at 100% 50%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 100% 50%, #000 30%, transparent 80%);
}
.hero > .wrap { position: relative; z-index: 1; }

.threads-bg {
    position: absolute;
    top: -20px;
    right: 0;
    bottom: 20px;
    left: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.18;
    mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
    mix-blend-mode: multiply;
}
@media (max-width: 700px) {
    .threads-bg { opacity: 0.12; }
}
@media (prefers-reduced-motion: reduce) {
    .threads-bg { display: none; }
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    font: 700 11px/1 var(--font-mono);
    color: var(--primary);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 28px;
}
.hero-eyebrow::before {
    content: "";
    width: 36px;
    height: 1px;
    background: var(--primary);
}

.hero h1 .accent {
    color: var(--primary);
    position: relative;
}

.hero-lead {
    font-size: clamp(1.02rem, 1.3vw, 1.15rem);
    line-height: 1.85;
    color: var(--on-surface-variant);
    max-width: 56ch;
    margin: 28px 0 36px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--outline-variant);
}
.hero-meta .m-item .num {
    font: 800 1.7rem/1 var(--font-headline);
    color: var(--primary-deep);
    letter-spacing: -0.02em;
}
.hero-meta .m-item .lbl {
    font: 600 11px var(--font-mono);
    color: var(--on-surface-muted);
    margin-top: 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
@media (max-width: 640px) {
    .hero-meta { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
}

/* Hero visual card (right column) */
.hero-card {
    position: relative;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-3);
}
.hero-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--r-xl);
    padding: 1px;
    background: linear-gradient(135deg, var(--primary-pale), transparent 50%, var(--secondary-pale));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.hero-card .h-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 700 10.5px var(--font-mono);
    color: var(--ok);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.hero-card .h-tag::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 0 rgba(0, 108, 79, 0.4);
    animation: pulse 2s var(--ease) infinite;
}
.hero-card h3 { color: var(--on-surface); margin-bottom: 8px; }
.hero-card .stack {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    font: 500 13px var(--font-mono);
    color: var(--on-surface-variant);
}
.hero-card .stack .step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: var(--surface-container-low);
    border-radius: var(--r-md);
}
.hero-card .stack .step .k {
    color: var(--primary);
    font-weight: 700;
}
.hero-card .stack .step .v {
    color: var(--on-surface-variant);
}
.hero-card .stack .step .ok {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--secondary-tint);
    color: var(--secondary);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
}

/* ============== Cards ============== */
.card {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: var(--r-lg);
    transition: transform var(--t-base) var(--ease),
                box-shadow var(--t-base) var(--ease),
                border-color var(--t-base) var(--ease);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-2);
    border-color: var(--primary-soft);
}
.card .card-num {
    font: 700 12px var(--font-mono);
    color: var(--primary);
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}
.card .card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: var(--primary-tint);
    color: var(--primary);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}
.card .card-icon .material-symbols-outlined { font-size: 24px; }
.card h3 { margin-bottom: 10px; }
.card p {
    color: var(--on-surface-variant);
    font-size: 14px;
    line-height: 1.75;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font: 700 10.5px var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--r-sm);
}
.badge-approved { background: var(--secondary-tint); color: var(--secondary-deep); }
.badge-research { background: #FFF4E0; color: #8B5A2B; border: 1px solid #FFE4C4; }
.badge-platform { background: var(--primary-tint); color: var(--primary-deep); }
.badge-news     { background: var(--primary-tint); color: var(--primary-deep); }
.badge-press    { background: #FEF3C7; color: #92400E; }
.badge-product  { background: var(--secondary-tint); color: var(--secondary-deep); }

/* legacy .tag backward-compat (used in news/, recruit/) */
.tag {
    display: inline-block;
    padding: 4px 10px;
    margin-right: 10px;
    border-radius: var(--r-sm);
    font: 700 10.5px var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.tag.is-news    { background: var(--primary-tint); color: var(--primary-deep); }
.tag.is-press   { background: #FEF3C7; color: #92400E; }
.tag.is-product { background: var(--secondary-tint); color: var(--secondary-deep); }

/* ============== Animated List ============== */
.alist { display: flex; flex-direction: column; }
.alist .row {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 22px 4px;
    border-bottom: 1px solid var(--outline-variant);
    transition: background var(--t-base) var(--ease), padding-left var(--t-base) var(--ease);
    cursor: pointer;
}
.alist .row:first-child { border-top: 1px solid var(--outline-variant); }
.alist .row:hover {
    background: var(--surface-container-low);
    padding-left: 16px;
}
.alist .row .date {
    font: 600 12.5px var(--font-mono);
    color: var(--on-surface-muted);
    letter-spacing: 0.04em;
}
.alist .row .title {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--on-surface);
}
.alist .row .arrow {
    color: var(--on-surface-faint);
    transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
    font-family: var(--font-mono);
}
.alist .row:hover .arrow { transform: translateX(4px); color: var(--primary); }
.alist .badge { margin-right: 10px; }

@media (max-width: 640px) {
    .alist .row { grid-template-columns: 1fr; gap: 6px; padding: 16px 4px; }
    .alist .row .arrow { display: none; }
}

/* ============== Page header ============== */
.page-head {
    padding: clamp(72px, 10vw, 110px) 0 clamp(40px, 6vw, 64px);
    background: var(--background);
    border-bottom: 1px solid var(--outline-variant);
}
.page-head .crumb {
    font: 600 11px var(--font-mono);
    letter-spacing: 0.12em;
    color: var(--on-surface-muted);
    margin-bottom: 18px;
    text-transform: uppercase;
}
.page-head h1 { margin-bottom: 18px; max-width: 22ch; }
.page-head .lead { max-width: 60ch; }

/* ============== Advisory ============== */
.advisory {
    padding: 16px 18px;
    background: #FFFAEB;
    border: 1px solid #FBE4A2;
    border-radius: var(--r-md);
    color: #6B4D00;
    font-size: 13.5px;
    line-height: 1.7;
}
.advisory strong { display: block; margin-bottom: 4px; color: #4F3700; }
.advisory.is-strong {
    background: #FEF1F0;
    border-color: #F5C9C5;
    color: #6F1410;
}
.advisory.is-strong strong { color: #4D0E0B; }
.advisory.is-info {
    background: var(--primary-tint);
    border-color: var(--primary-pale);
    color: var(--primary-deep);
}
.advisory.is-info strong { color: var(--primary-darker); }
.advisory.is-success {
    background: var(--secondary-tint);
    border-color: var(--secondary-pale);
    color: var(--secondary-deep);
}

/* ============== Footer ============== */
.n-footer {
    background: var(--surface-container-low);
    color: var(--on-surface-variant);
    padding: 80px 0 32px;
    border-top: 1px solid var(--outline-variant);
}
.n-footer .f-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 48px;
    margin-bottom: 56px;
}
@media (max-width: 960px) {
    .n-footer .f-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
}
@media (max-width: 560px) {
    .n-footer .f-grid { grid-template-columns: 1fr; }
}
.n-footer h4 {
    font: 700 11px var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-surface-muted);
    margin-bottom: 18px;
}
.n-footer ul { display: grid; gap: 10px; }
.n-footer a {
    font-size: 13.5px;
    color: var(--on-surface-variant);
    transition: color var(--t-fast);
}
.n-footer a:hover { color: var(--primary-deep); }

.n-footer .f-brand .n-logo { color: var(--primary-deep); }
.n-footer .f-brand p {
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--on-surface-muted);
    margin-top: 16px;
    max-width: 320px;
}

.n-footer .f-bottom {
    padding-top: 28px;
    border-top: 1px solid var(--outline-variant);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: var(--on-surface-muted);
}
.n-footer .f-bottom .legal-links { display: flex; flex-wrap: wrap; gap: 18px; }
.n-footer .f-bottom .legal-links a:hover { color: var(--primary); }

.f-disclaimer {
    margin-top: 40px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-left: 3px solid var(--primary);
    border-radius: var(--r-md);
    font-size: 12px;
    line-height: 1.8;
    color: var(--on-surface-muted);
}
.f-disclaimer strong {
    color: var(--on-surface);
    display: block;
    margin-bottom: 8px;
    font: 700 11.5px var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ============== Cookie consent ============== */
.cookie-bar {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 80;
    display: none;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    background: var(--primary-deep);
    color: #fff;
    border-radius: var(--r-md);
    box-shadow: var(--sh-4);
}
.cookie-bar.is-on { display: grid; }
.cookie-bar p { font-size: 13px; line-height: 1.6; max-width: 64ch; }
.cookie-bar a { color: var(--primary-pale); text-decoration: underline; }
.cookie-bar .cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-bar .btn { padding: 9px 16px; font-size: 12.5px; }
.cookie-bar .btn-ghost {
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}
.cookie-bar .btn-ghost:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.5);
}
.cookie-bar .btn-secondary {
    background: var(--secondary);
}
@media (max-width: 640px) {
    .cookie-bar { grid-template-columns: 1fr; }
}

/* ============== Forms ============== */
.field { margin-bottom: 18px; }
.field label {
    display: block;
    font: 600 12.5px var(--font-headline);
    color: var(--on-surface);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}
.field label .req { color: var(--danger); margin-left: 4px; }
.field input, .field textarea, .field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--outline-variant);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--on-surface);
    font: 400 14.5px var(--font-body);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 70, 125, 0.12);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ============== Misc ============== */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 108, 79, 0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(0, 108, 79, 0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============== Mobile fixes ============== */
@media (max-width: 640px) {
    /* Spec tables on product detail / about pages can overflow at 375px */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Section title with two-column grid: stack on mobile */
    .section-title {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    /* Right-align lift in nested flex headers */
    .section-title > div[style*="flex-end"] {
        align-items: flex-start !important;
    }
}

/* Tawk.to widget — keep above cookie bar but below modal */
#tawk-bubble-container,
.widget-visible iframe[title*="chat"] {
    z-index: 70 !important;
}
@media (max-width: 640px) {
    /* Avoid overlap with cookie bar on mobile */
    body.cookie-visible #tawk-bubble-container {
        bottom: 88px !important;
    }
}

/* Material Symbols sizing */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    vertical-align: middle;
}

/* ================================================================
   2026-05-19 REFRESH — Editorial Authority + Clinical Instrument
   Hybrid A+B per docs/superpowers/specs/2026-05-19-naidi-hp-refresh-design.md
   ================================================================ */

/* --- Japanese headings → Noto Serif JP (Editorial gravitas) --- */
h1[lang="ja"],
h2[lang="ja"],
h3[lang="ja"] {
    font-family: var(--font-headline-ja);
    letter-spacing: 0.01em;
    line-height: 1.35;
    font-weight: 700;
}
h1[lang="ja"] { font-weight: 800; line-height: 1.3; }
.section-bg-deep h1[lang="ja"],
.section-bg-deep h2[lang="ja"] { color: #fff; }

/* --- Hero accent: Honor Gold (was: NAIDI Royal) --- */
.hero h1 .accent {
    color: var(--accent);
}
.hero h1 .accent::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    opacity: 0.45;
}

/* --- Hero eyebrow: Honor Gold rule + label --- */
.hero-eyebrow {
    color: var(--accent-deep);
}
.hero-eyebrow::before {
    background: var(--accent);
    width: 48px;
}

/* --- Section number → Honor Gold (was: NAIDI Royal) --- */
.section-title .num {
    color: var(--accent-deep);
}
.section-bg-deep .section-title .num {
    color: var(--accent-soft);
}

/* --- Section dividers: 1px Honor Gold rule between sections --- */
.section + .section,
.hero + .section {
    border-top: 1px solid var(--accent-pale);
}
.section-bg-deep + .section,
.section + .section-bg-deep {
    border-top-color: rgba(178, 123, 0, 0.35);
}

/* ============== PROOF / METRICS SECTION ============== */
.proof-strip {
    background: var(--surface-container-low);
    padding: clamp(56px, 7vw, 88px) 0;
    position: relative;
}
.proof-strip .proof-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    font: 700 11px/1 var(--font-mono);
    color: var(--accent-deep);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 36px;
    justify-content: center;
}
.proof-strip .proof-eyebrow::before,
.proof-strip .proof-eyebrow::after {
    content: "";
    flex: 0 0 48px;
    height: 1px;
    background: var(--accent);
}
.proof-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 48px);
}
@media (max-width: 760px) {
    .proof-grid { grid-template-columns: repeat(2, 1fr); }
}
.proof-item {
    text-align: center;
    padding: 16px 8px;
    border-left: 1px solid var(--accent-pale);
}
.proof-item:first-child { border-left: 0; }
@media (max-width: 760px) {
    .proof-item:nth-child(3) { border-left: 0; }
}
.proof-num {
    font-family: var(--font-headline);
    font-weight: 800;
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.04em;
    display: block;
}
.proof-num[data-pending="true"]::after {
    content: "·";
    color: var(--on-surface-faint);
    font-size: 0.5em;
    vertical-align: super;
    margin-left: 4px;
}
.proof-label {
    display: block;
    margin-top: 12px;
    font-family: var(--font-headline-ja);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    line-height: 1.45;
    letter-spacing: 0.02em;
}
.proof-label[lang="en"],
.proof-label[lang="zh"] {
    font-family: var(--font-body);
    font-weight: 600;
}
.proof-note {
    margin-top: 32px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--on-surface-faint);
    font-style: italic;
}

/* ============== PRODUCTS REDESIGN — Digital Doctor main card ============== */
.products-main {
    background: var(--surface);
    border: 1px solid var(--outline-pale);
    border-radius: var(--r-lg);
    padding: clamp(32px, 4vw, 56px);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}
.products-main::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
}
.products-main .badge {
    margin-bottom: 18px;
}
.products-main h3 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 800;
    margin-bottom: 24px;
}
.organ-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(8px, 1.5vw, 20px);
    margin: 32px 0 28px;
    padding: 24px 0;
    border-top: 1px solid var(--outline-pale);
    border-bottom: 1px solid var(--outline-pale);
}
@media (max-width: 720px) {
    .organ-row { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
    .organ-row .organ-item:nth-child(n+4) {
        grid-column: span 1;
    }
}
.organ-item {
    text-align: center;
}
.organ-icon {
    width: clamp(40px, 6vw, 56px);
    height: clamp(40px, 6vw, 56px);
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    border: 1px solid var(--outline-pale);
    border-radius: var(--r-md);
    color: var(--primary);
    background: var(--surface-container-low);
}
.organ-icon .material-symbols-outlined {
    font-size: clamp(22px, 3vw, 28px);
    color: var(--primary);
}
.organ-name {
    font: 600 0.85rem/1.3 var(--font-headline-ja);
    color: var(--on-surface);
    margin-bottom: 4px;
}
.organ-rev {
    font: 500 0.7rem/1 var(--font-mono);
    color: var(--accent-deep);
    letter-spacing: 0.05em;
}

/* --- Pipeline diagram (DICOM → De-ID → AI → Audit) --- */
.pipeline-diagram {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--accent-pale);
}
.pipeline-eyebrow {
    font: 700 11px/1 var(--font-mono);
    color: var(--accent-deep);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.pipeline-eyebrow::before {
    content: "";
    width: 36px;
    height: 1px;
    background: var(--accent);
}
.pipeline-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    position: relative;
}
@media (max-width: 760px) {
    .pipeline-flow { grid-template-columns: 1fr; gap: 12px; }
}
.pipeline-step {
    padding: 20px 16px;
    background: var(--surface-container-low);
    border-radius: var(--r-md);
    text-align: center;
    position: relative;
    margin-right: 28px;
}
.pipeline-step:last-child { margin-right: 0; }
@media (max-width: 760px) {
    .pipeline-step { margin-right: 0; }
}
.pipeline-step::after {
    content: "→";
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    font: 700 18px/1 var(--font-mono);
    color: var(--accent);
}
.pipeline-step:last-child::after { display: none; }
@media (max-width: 760px) {
    .pipeline-step::after {
        right: 50%;
        top: auto;
        bottom: -10px;
        transform: translate(50%, 0) rotate(90deg);
    }
}
.pipeline-step .step-num {
    font: 500 0.7rem/1 var(--font-mono);
    color: var(--accent-deep);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.pipeline-step .step-name {
    font: 700 1rem/1.3 var(--font-headline);
    color: var(--on-surface);
    margin-bottom: 4px;
}
.pipeline-step .step-desc {
    font-size: 0.78rem;
    color: var(--on-surface-muted);
    line-height: 1.4;
}

/* --- Products secondary grid (2 cards under main) --- */
.products-secondary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width: 720px) {
    .products-secondary { grid-template-columns: 1fr; }
}

/* ============== LEADERSHIP — photo with Honor Gold border, abstract fallback ============== */
.leader-photo {
    width: 96px;
    height: 96px;
    border-radius: var(--r-md);
    margin-bottom: 18px;
    background-color: var(--surface-container-low);
    background-size: cover;
    background-position: center top;
    border: 1px solid var(--accent);
    position: relative;
    overflow: hidden;
}
.leader-photo::before {
    /* Abstract silhouette fallback when no photo is set */
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 38%, var(--primary-soft) 0%, var(--primary-soft) 22%, transparent 23%),
        radial-gradient(ellipse at 50% 105%, var(--primary-soft) 0%, var(--primary-soft) 48%, transparent 49%),
        linear-gradient(180deg, var(--primary-tint) 0%, var(--primary-pale) 100%);
    opacity: 0.85;
    z-index: 0;
}
.leader-photo[data-photo]::before { display: none; }
.leader-photo[data-photo] {
    background-image: var(--photo-url, none);
}
.leader-photo::after {
    /* Honor Gold inner ring (mark) */
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(178, 123, 0, 0.35);
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
}

