.site-header { border-bottom: 1px solid var(--border); }
.header-main { min-height: 98px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.75rem; }
.brand { display: inline-flex; align-items: baseline; justify-self: start; font-size: 2.05rem; line-height: 1; font-weight: 850; letter-spacing: -.085em; }
.brand-cut { transform: skew(-7deg); }
.brand-domain { font-family: var(--font-label); font-size: .75rem; letter-spacing: -.04em; margin-left: .15rem; }
.area-nav { display: flex; align-self: stretch; align-items: stretch; gap: .5rem; }
.area-nav a { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: 0 1.1rem; position: relative; color: var(--muted); text-transform: uppercase; }
.area-nav a[aria-current] { color: var(--text); background: var(--panel); }
.area-nav a[aria-current]::after { content: ''; position: absolute; height: 3px; background: var(--accent); inset: auto 0 0; }
.area-nav a:hover { color: var(--text); background: var(--panel); }
.area-number { color: var(--muted); font-size: .625rem; }
.area-nav .arrow { font-size: 1rem; color: var(--accent); }
.area-current { width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.palette-control { justify-self: end; display: flex; flex-direction: column; gap: .35rem; padding-block: .65rem; letter-spacing: 0; }
.palette-label { color: var(--muted); text-transform: uppercase; font-size: .625rem; letter-spacing: .09em; }
.palette-options { display: flex; border: 1px solid var(--border); border-radius: var(--corner); }
.palette-options button { display: flex; align-items: center; justify-content: center; gap: .35rem; min-height: 38px; padding: 0 .55rem; border: 0; background: transparent; font-family: inherit; font-size: .625rem; transition: background var(--motion-fast); }
.palette-options button + button { border-left: 1px solid var(--border); }
.palette-options button:hover { background: var(--panel); }
.palette-options button[aria-pressed='true'] { color: var(--accent-ink); background: var(--accent); }
.palette-swatch { height: 8px; width: 8px; border: 1px solid currentColor; display: inline-block; transform: rotate(-12deg); }
.swatch-chromatic { background: #75586c; }
.swatch-weathered { background: #987850; }
.header-sub { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 48px; border-top: 1px solid var(--line); }
.area-caption { color: var(--muted); font-size: .625rem; }
.section-nav { display: flex; align-items: center; gap: 1.6rem; }
.section-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.section-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .35rem; }
.button { display: inline-flex; justify-content: space-between; align-items: center; gap: 2rem; min-height: 52px; padding: .8rem 1.2rem; border-radius: var(--corner); font-size: .875rem; font-weight: 600; transition: transform var(--motion-fast), background var(--motion-fast); }
.button-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.button:hover { transform: translateY(-2px); }
.button .arrow { font-size: 1.4rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.section-label { display: flex; align-items: center; gap: .8rem; color: var(--muted); }
.section-label > span { color: var(--accent); border: 1px solid var(--border); font-size: .65rem; padding: .2rem .4rem; }
.label-tag { color: var(--muted); font-size: .625rem; border: 1px solid var(--border); padding: .3rem .55rem; }
.micro-note { color: var(--muted); font-size: .625rem; }
.plain-details { border-top: 1px solid var(--border); padding-top: 1rem; }
.plain-details summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; font-size: .8rem; }
summary::-webkit-details-marker { display: none; }
.plain-details summary span { font-size: 1.25rem; color: var(--accent); }
.plain-details[open] summary span { transform: rotate(45deg); }
.plain-details > p { color: var(--muted); font-size: .85rem; margin: .5rem 0 .2rem; max-width: 60ch; }
.passage-section { padding-bottom: var(--space-section); }
.passage { display: grid; grid-template-columns: 130px 1fr 100px; gap: clamp(1.5rem, 4vw, 3.8rem); padding: clamp(1.6rem, 4vw, 3rem); border: 1px solid var(--border); background: var(--panel); position: relative; }
.passage::before { content: ''; position: absolute; inset: -1px auto auto -1px; width: 42px; border-top: 3px solid var(--accent); }
.passage-code { border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: space-between; padding-right: 1.5rem; }
.passage-code > span { font-size: 5rem; line-height: 1; font-family: var(--font-display); font-weight: 900; letter-spacing: -.05em; color: var(--highlight); }
.passage-code > small { font-family: var(--font-label); font-size: .625rem; letter-spacing: .04em; color: var(--muted); padding-top: 1.5rem; }
.passage-copy h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); margin: .7rem 0 .65rem; }
.passage-copy > p:not(.eyebrow) { color: var(--muted); font-size: .9rem; }
.passage-action { display: inline-block; margin-top: 1.4rem; font-size: .85rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.passage-arrow { justify-self: end; font-size: 5rem; font-weight: 200; line-height: 1; color: var(--accent); transition: transform var(--motion-fast) var(--ease); }
.passage:hover { border-color: var(--accent); }
.passage:hover .passage-arrow { transform: translate(4px, -4px); }
.passage:hover .passage-action { border-color: var(--accent); }
.site-footer { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 1.5rem; border-top: 1px solid var(--border); min-height: 120px; padding-block: 2rem; }
.footer-brand { font-size: 1.6rem; font-weight: 800; letter-spacing: -.08em; }
.footer-brand > span { font-size: .65rem; font-family: var(--font-label); margin-left: .2rem; letter-spacing: -.05em; }
.site-footer > p { color: var(--muted); font-family: var(--font-note); font-size: .95rem; font-style: italic; text-align: center; }
.footer-meta { justify-self: end; display: flex; flex-direction: column; align-items: end; gap: .35rem; font-size: .625rem; color: var(--muted); }
@media (max-width: 1000px) {
    .header-main { grid-template-columns: auto 1fr auto; gap: 1rem; }
    .area-nav { justify-self: center; }
    .area-nav a { padding-inline: .7rem; gap: .4rem; }
    .palette-options button { font-size: .625rem; padding-inline: .4rem; }
    .brand { font-size: 1.8rem; }
    .passage { grid-template-columns: 95px 1fr 60px; }
    .passage-code > span { font-size: 4rem; }
    .passage-arrow { font-size: 4rem; }
}
@media (max-width: 740px) {
    .header-main { grid-template-columns: 1fr 1fr; gap: 0 1rem; padding-top: .75rem; }
    .brand { font-size: 1.8rem; }
    .area-nav { grid-row: 2; grid-column: 1 / -1; width: 100%; min-height: 55px; margin-top: .7rem; gap: 0; }
    .area-nav a { flex: 1; }
    .palette-control { grid-column: 2; grid-row: 1; }
    .palette-label { font-size: .625rem; }
    .palette-options button { min-height: 36px; font-size: .625rem; padding-inline: .4rem; }
    .header-sub { min-height: 48px; gap: .5rem; }
    .area-caption { display: none; }
    .section-nav { width: 100%; justify-content: space-between; font-size: .75rem; gap: .9rem; }
    .section-heading { margin-bottom: 1.75rem; align-items: flex-start; }
    .section-label { font-size: .625rem; gap: .55rem; }
    .micro-note { max-width: 20ch; font-size: .625rem; text-align: right; }
    .label-tag { font-size: .625rem; }
    .passage { grid-template-columns: 1fr 45px; gap: 1.3rem; }
    .passage-code { grid-column: 1 / -1; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 1rem; align-items: center; }
    .passage-code > span { font-size: 2.25rem; }
    .passage-code > small { padding-top: 0; }
    .passage-arrow { font-size: 3rem; }
    .passage-copy .eyebrow { font-size: .625rem; }
    .passage-copy h2 { font-size: 1.85rem; }
    .site-footer { grid-template-columns: 1fr 1fr; row-gap: 1rem; }
    .site-footer > p { grid-row: 2; grid-column: 1 / -1; text-align: left; }
    .footer-meta { font-size: .625rem; }
}

.section-nav a[aria-current='page'] { color: var(--accent); text-decoration: underline; text-underline-offset: .4rem; text-decoration-thickness: 2px; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; border-bottom: 1px solid transparent; }
.back-link:hover { color: var(--accent); border-color: var(--accent); }
.page-index { display: flex; flex-wrap: wrap; border-block: 1px solid var(--border); }
.page-index a { flex: 1; min-height: 66px; padding: 1rem; display: flex; align-items: center; gap: .75rem; font: .75rem/1.5 var(--font-label); }
.page-index a + a { border-left: 1px solid var(--line); }
.page-index a > span:first-child { color: var(--muted); font-size: .65rem; }
.page-index a > span:last-child { color: var(--accent); margin-left: auto; }
.page-index a:hover { background: var(--panel); }
.section-nav a[aria-current='location'] { color: var(--accent); border-bottom: 1px dashed var(--accent); }
@media (max-width: 700px) { .page-index a { flex-basis: 50%; } .page-index a:nth-child(odd) { border-left: 0; } }
