/* site.css
 * How NYC Works — shared stylesheet
 * "Bureaucratic cool": Win95/XP system UI as design vocabulary,
 * paired with modern editorial typography and generous whitespace.
 */

/* ---------- Reset ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- Tokens ---------- */
:root {
    /* Desktop — neutral medium-dark grey, no blue cast.
       Lighter than before so it reads as a dim field, not a void. */
    --desktop-bg: #5e5e60;
    --desktop-bg-shadow: rgba(0, 0, 0, 0.45);

    /* Window surfaces */
    --window-bg: #fbfaf6;
    --chrome-gray: #c8c5bc;       /* classic 95-ish but slightly warmed */

    /* Title bar — neutral dark grey gradient, no blue cast */
    --titlebar-from: #2a2a2c;
    --titlebar-to: #131314;
    --titlebar-text: #ffffff;

    /* Bevels — high contrast so they actually read */
    --bevel-light: #ffffff;
    --bevel-mid: #e3e0d6;
    --bevel-dark: #8a8678;
    --bevel-darker: #4a4740;

    /* Text */
    --text: #15171a;
    --text-muted: #5a574f;
    --rule: #d6d3c8;

    /* Accents */
    --accent: #b45309;
    --accent-hover: #7c3a06;
    --link: #1c4f8c;

    /* Window control colors (XP-evoking traffic-light style) */
    --ctl-min: #f5c451;
    --ctl-max: #5fb35a;
    --ctl-close: #d8483a;

    /* Type */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-chrome: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
}

/* ---------- Bevel utilities (no border-radius anywhere) ---------- */
.bevel-out {
    border-top: 3px solid var(--bevel-light);
    border-left: 3px solid var(--bevel-light);
    border-right: 3px solid var(--bevel-darker);
    border-bottom: 3px solid var(--bevel-darker);
}

.bevel-out-inner {
    /* secondary inner edge for that classic double-bevel look */
    border-top: 1px solid var(--bevel-mid);
    border-left: 1px solid var(--bevel-mid);
    border-right: 1px solid var(--bevel-dark);
    border-bottom: 1px solid var(--bevel-dark);
}

.bevel-in {
    border-top: 3px solid var(--bevel-darker);
    border-left: 3px solid var(--bevel-darker);
    border-right: 3px solid var(--bevel-light);
    border-bottom: 3px solid var(--bevel-light);
}

/* ---------- Desktop ---------- */
html {
    background: var(--desktop-bg);
}

body {
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--desktop-bg);
}

body.desktop {
    min-height: 100vh;
    padding: 3rem 1.5rem 4rem;
}

/* ---------- Window frame ---------- */
.window {
    max-width: 1260px;
    margin: 0 auto;
    background: var(--chrome-gray);
    /* Outset bevel — high contrast so it pops on the teal desktop */
    border-top: 3px solid var(--bevel-light);
    border-left: 3px solid var(--bevel-light);
    border-right: 3px solid var(--bevel-darker);
    border-bottom: 3px solid var(--bevel-darker);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 6px 6px 0 var(--desktop-bg-shadow);
    padding: 3px;
    display: flex;
    flex-direction: column;
}

/* ---------- Title bar ---------- */
.window-titlebar {
    background: linear-gradient(180deg, var(--titlebar-from) 0%, var(--titlebar-to) 100%);
    color: var(--titlebar-text);
    font-family: var(--font-chrome);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 6px 6px 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    border-top: 1px solid #3f3f41;
    border-bottom: 1px solid #050505;
}

.window-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.window-title-icon {
    color: var(--ctl-min);
    font-size: 14px;
    line-height: 1;
}

.window-controls {
    display: inline-flex;
    gap: 4px;
}

.window-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 18px;
    color: rgba(0, 0, 0, 0.7);
    font-family: var(--font-chrome);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    /* Outset bevel on each button */
    border-top: 2px solid var(--bevel-light);
    border-left: 2px solid var(--bevel-light);
    border-right: 2px solid var(--bevel-darker);
    border-bottom: 2px solid var(--bevel-darker);
}

.window-control:nth-child(1) { background: var(--ctl-min); }
.window-control:nth-child(2) { background: var(--ctl-max); }
.window-control:nth-child(3) {
    background: var(--ctl-close);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

/* ---------- Window body ---------- */
.window-body {
    background: var(--window-bg);
    /* sunken inner panel */
    border-top: 2px solid var(--bevel-darker);
    border-left: 2px solid var(--bevel-darker);
    border-right: 2px solid var(--bevel-light);
    border-bottom: 2px solid var(--bevel-light);
    padding: 2.25rem 2.75rem 2.5rem;
}

.back-link {
    display: inline-block;
    font-family: var(--font-chrome);
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2rem;
    padding: 3px 8px;
    margin-left: -8px;
}

.back-link:hover {
    color: var(--accent);
    background: #f3f1e9;
}

/* ---------- Shared section heading (mono uppercase, dashed rule) ---------- */
.section-heading,
.hearing-summary h3 {
    font-family: var(--font-chrome);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed var(--bevel-dark);
}

/* ---------- Hearing header ---------- */
.hearing-header {
    margin-bottom: 2.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}

.hearing-header h1 {
    font-family: var(--font-body);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.012em;
    color: var(--text);
    margin-bottom: 0.85rem;
    max-width: 42ch;
}

.hearing-meta {
    font-family: var(--font-chrome);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.hearing-meta time,
.hearing-meta .duration {
    color: var(--text-muted);
}

.meta-sep {
    color: var(--bevel-dark);
}

.youtube-link {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.youtube-link:hover {
    border-bottom-color: var(--accent);
    color: var(--accent-hover);
}

/* ---------- Summary body ---------- */
.hearing-summary {
    color: var(--text);
}

/* "Summary" — top-level section title, dominant */
.hearing-summary h2 {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.008em;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--text);
    color: var(--text);
}

.hearing-summary h2:first-child {
    margin-top: 0;
}

.hearing-summary p {
    margin-bottom: 1rem;
    max-width: 68ch;
}

.hearing-summary ul,
.hearing-summary ol {
    margin: 0 0 1rem 1.25rem;
    max-width: 66ch;
}

.hearing-summary li {
    margin-bottom: 0.4rem;
}

.hearing-summary a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.hearing-summary a:hover {
    color: var(--accent);
}

.hearing-summary strong {
    font-weight: 600;
}

/* ---------- Transcript well (sunken bevel) ---------- */
.hearing-transcript {
    margin-top: 2.5rem;
    background: transparent;
    padding: 0;
    border: none;
}

.hearing-transcript > summary {
    list-style: none;
    cursor: pointer;
    /* match h3 subsection style */
    font-family: var(--font-chrome);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    padding: 0.5rem 0 0.35rem;
    background: transparent;
    border-bottom: 1px dashed var(--bevel-dark);
    user-select: none;
}

.hearing-transcript > summary::-webkit-details-marker {
    display: none;
}

.hearing-transcript > summary:hover {
    color: var(--accent);
}

.transcript-body {
    padding: 1.5rem 1.5rem 1.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
}

.transcript-body p {
    margin-bottom: 0.85rem;
    max-width: 70ch;
}

.transcript-body strong {
    display: inline-block;
    margin-top: 0.6rem;
    font-family: var(--font-chrome);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* ---------- Status bar footer ---------- */
.window-statusbar {
    background: var(--chrome-gray);
    font-family: var(--font-chrome);
    font-size: 11px;
    color: var(--text);
    padding: 4px 4px 5px;
    display: flex;
    gap: 4px;
    user-select: none;
}

.status-cell {
    flex: 1 1 auto;
    height: 14px;
    /* sunken inset */
    border-top: 1px solid var(--bevel-darker);
    border-left: 1px solid var(--bevel-darker);
    border-right: 1px solid var(--bevel-light);
    border-bottom: 1px solid var(--bevel-light);
    background: var(--chrome-gray);
}

/* fixed-width accent cells flanking a wider center cell */
.status-cell--sm {
    flex: 0 0 64px;
}

/* ---------- Index page ---------- */
.intro-block {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}

.intro-block h1 {
    font-family: var(--font-body);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin-bottom: 0.75rem;
}

.intro-block .intro {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 58ch;
}

.index-section {
    margin-bottom: 2.5rem;
}

.index-section:last-child { margin-bottom: 0; }

/* Sunken "well" containing the listing — mirrors the window-body inset bevel */
.listing-well {
    background: #f3f1e9;            /* slightly cooler than window-bg */
    border-top: 2px solid var(--bevel-darker);
    border-left: 2px solid var(--bevel-darker);
    border-right: 2px solid var(--bevel-light);
    border-bottom: 2px solid var(--bevel-light);
    padding: 0.25rem 0;
}

.hearing-index {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hearing-row { margin: 0; }

.hearing-row + .hearing-row {
    border-top: 1px dashed var(--bevel-dark);
}

.hearing-row a {
    display: grid;
    grid-template-columns: 18ch 1fr;
    gap: 1.25rem;
    align-items: baseline;
    padding: 0.7rem 1rem;
    text-decoration: none;
    color: var(--text);
}

.hearing-row a:hover {
    background: #ece9de;
}

.hearing-row__date {
    font-family: var(--font-chrome);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
}

.hearing-row__title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text);
}

.hearing-row a:hover .hearing-row__title {
    color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    body.desktop {
        padding: 1rem 0.5rem 2rem;
    }

    .window-body {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .hearing-header h1 {
        font-size: 1.55rem;
    }

    .hearing-summary h2 {
        font-size: 1.5rem;
    }

    .window-title {
        font-size: 11px;
    }

    .hearing-row a {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.75rem 1rem;
    }
}
