@font-face {
    font-family: "Geist Mono";
    src: url("/static/fonts/geist-mono-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
:root {
    color-scheme: dark;
    --bg: #282828;
    --surface: #32302f;
    --raised: #3c3836;
    --line: #504945;
    --text: #ebdbb2;
    --strong: #fbf1c7;
    --muted: #a89984;
    --accent: #fabd2f;
    --green: #b8bb26;
    --blue: #83a598;
    --red: #fb4934;
    --ink: #282828;
    --mono: "Geist Mono", "DejaVu Sans Mono", Consolas, monospace;
}
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #fbf1c7;
    --surface: #f2e5bc;
    --raised: #ebdbb2;
    --line: #bdae93;
    --text: #3c3836;
    --strong: #282828;
    --muted: #665c54;
    --accent: #805800;
    --green: #626500;
    --blue: #39645b;
    --red: #9d2819;
    --ink: #fff7db;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 var(--mono);
    font-feature-settings: "ss02";
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip {
    position: fixed;
    top: -5em;
    left: 12px;
    z-index: 2;
    padding: 9px;
    background: var(--surface);
}
.skip:focus { top: 12px; }
.meta, .section-no, .facts h3, dt, footer, nav small, .theme, .tag {
    font: 11px/1.5 var(--mono);
    letter-spacing: .07em;
}
.meta, dt, .facts h3, footer { text-transform: uppercase; }
aside {
    position: fixed;
    inset: 0 auto 0 0;
    width: 196px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 34px 18px 22px;
    display: flex;
    flex-direction: column;
}
.identity { padding: 0 11px; }
.mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 48px;
    background: var(--accent);
    color: var(--ink);
    font: bold 27px/1 var(--mono);
    letter-spacing: -.12em;
    padding-right: 4px;
}
.identity strong {
    display: block;
    color: var(--strong);
    margin-top: 18px;
    font-size: 15px;
    letter-spacing: .04em;
}
.identity .meta, nav small, .folio, figcaption, footer, dt { color: var(--muted); }
nav {
    display: grid;
    margin-top: 40px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}
nav a {
    display: flex;
    gap: 16px;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-left: 2px solid transparent;
    font-weight: 600;
}
nav [aria-current] { border-color: var(--accent); background: var(--raised); }
nav [aria-current], nav [aria-current] small, nav a:hover, .cue, .section-no, footer b { color: var(--accent); }
.theme {
    display: none;
    cursor: pointer;
    margin-top: auto;
    padding: 12px;
    border: 1px solid var(--line);
    color: var(--text);
    background: transparent;
}
.theme-enabled .theme { display: block; }
.theme:hover, .tag { background: var(--raised); }
.theme > span:first-child { color: var(--accent); }
.dark-option, [data-theme="light"] .light-option { display: none; }
[data-theme="light"] .dark-option { display: inline; }
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 196px;
    padding: 34px clamp(28px, 5vw, 84px) 16px;
}
.folio, footer {
    display: flex;
    align-items: center;
    gap: 16px;
}
.folio > :first-child { color: var(--accent); font-weight: 700; }
.rule {
    height: 1px;
    flex: 1;
    background: var(--line);
}
.intro {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(185px, 1fr);
    align-items: center;
    gap: 32px;
    padding: 48px 0 40px;
}
.intro-plain { grid-template-columns: 1fr; }
.cue { font-size: 13px; letter-spacing: .13em; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3, dd { color: var(--strong); }
h1 {
    hyphens: auto;
    overflow-wrap: anywhere;
    margin: 10px 0 16px;
    font-size: clamp(44px, 5.1vw, 82px);
    line-height: 1;
    letter-spacing: -.065em;
}
.intro p { max-width: 53ch; }
.intro .motto {
    margin-top: 16px;
    padding: 2px 0 2px 12px;
    border-left: 3px solid var(--accent);
    color: var(--strong);
    font-weight: 600;
}
.action {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 10px 16px;
    margin-top: 22px;
    background: var(--accent);
    color: var(--ink);
    font-weight: 700;
    box-shadow: 3px 3px 0 var(--line);
}
.action:hover {
    background: var(--green);
    box-shadow: 3px 3px 0 var(--strong);
}
.diagram {
    width: 100%;
    max-width: 320px;
    justify-self: end;
    color: var(--accent);
}
.drawing {
    border: 1px solid var(--line);
    border-top: 2px solid var(--accent);
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%2388888870' d='M0 0h1v1H0z'/%3E%3C/svg%3E");
}
.drawing svg { display: block; width: 100%; }
.hardware { color: var(--blue); }
.system { color: var(--green); }
figcaption.meta { padding-top: 8px; font-size: 10px; }
figcaption span { margin: 0 4px; color: var(--red); }
section { border-top: 1px solid var(--line); padding: 22px 0; }
h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -.04em;
    margin-bottom: 18px;
}
.section-no {
    padding: 3px 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
}
.facts, .strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts { gap: 14px; }
.facts .card {
    --card-accent: var(--accent);
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 2px solid var(--card-accent);
}
.facts .card:nth-child(2) { --card-accent: var(--blue); }
.facts .card:nth-child(3) { --card-accent: var(--green); }
.facts h3 { color: var(--card-accent); margin-bottom: 8px; }
section p, section address { font-size: 15px; }
address { font-style: normal; }
address strong { color: var(--strong); }
.text-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.note {
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
}
.legal-text p + p, .legal-text p + address { margin-top: 10px; }
.legal-block + .legal-block { margin-top: 14px; }
.legal-block h3 { margin-bottom: 12px; font-size: 17px; }
.legal {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px 18px;
    font-size: 15px;
}
.legal dt { font-size: 11px; padding-top: 3px; }
.legal dd { color: inherit; }
.strip {
    margin: 4px 0 28px;
    border: 1px solid var(--line);
    border-top: 2px solid var(--blue);
    background: var(--surface);
}
.strip div { padding: 15px 18px; }
.strip div + div { border-left: 1px solid var(--line); }
.strip dt { color: var(--blue); }
.strip dd { font-weight: 700; margin-top: 5px; }
.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 8px 2px 0;
    background: var(--green);
}
.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tag {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-left: 2px solid var(--tag-accent, var(--red));
    color: var(--strong);
    letter-spacing: 0;
}
.projects {
    display: grid;
    gap: 10px;
}
.projects .card, .cv-entry, .skill-group {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 2fr;
    gap: 16px;
}
.projects .card, .cv-entry {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--blue);
}
.projects .card { border-left-color: var(--green); }
.cv-entry + .cv-entry { margin-top: 10px; }
.skill-group {
    --tag-accent: var(--accent);
    border-top: 1px solid var(--line);
    padding: 14px 0;
    align-items: start;
}
.skill-group:nth-of-type(2) { --tag-accent: var(--blue); }
.skill-group:nth-of-type(3) { --tag-accent: var(--green); }
.projects h3, .cv-entry h3, .skill-group h3 { font-size: 17px; }
.skill-group h3 {
    padding-left: 10px;
    border-left: 2px solid var(--tag-accent);
}
.cv-period {
    color: var(--blue);
    font-weight: 700;
    align-self: start;
}
.cv-org {
    color: var(--muted);
    font-size: 14px;
    margin: 3px 0 8px;
}
footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 16px 0;
    font-size: 10px;
}
.footer-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-user { color: var(--strong); }
.inline-form { display: inline; margin: 0; }
.footer-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}
footer a:hover, footer [aria-current], .footer-button:hover { color: var(--accent); }
footer a:hover, .footer-button:hover { text-decoration: underline; text-underline-offset: 3px; }
button.action {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.auth-form {
    display: grid;
    gap: 16px;
    max-width: 440px;
}
.auth-form .action {
    justify-self: start;
    margin-top: 6px;
}
.field {
    display: grid;
    gap: 6px;
}
.field label { color: var(--muted); }
.field input, .field select, .invite-url {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
    color: var(--strong);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
}
.field input:focus, .field select:focus, .invite-url:focus {
    border-color: var(--accent);
}
.field-hint {
    color: var(--muted);
    font-size: 13px;
}
.alert {
    margin-bottom: 18px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--red);
    color: var(--strong);
}
.notice {
    margin-bottom: 18px;
    border-left-color: var(--green);
}
.invite-created {
    display: grid;
    gap: 10px;
    border-left-color: var(--green);
}
.invite-url {
    font: 13px/1.4 var(--mono);
}
.admin-list {
    display: grid;
    gap: 10px;
}
.admin-row {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 116px;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--blue);
}
.admin-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.admin-row-meta .meta {
    width: 100%;
    color: var(--muted);
}
.admin-row-body h3 { font-size: 17px; }
.admin-row-actions { justify-self: end; }
.btn-secondary {
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    background: var(--raised);
    color: var(--strong);
    font: 11px/1.4 var(--mono);
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-danger:hover {
    border-color: var(--red);
    color: var(--red);
}
.status-active { --tag-accent: var(--green); }
.status-used { --tag-accent: var(--blue); }
.status-revoked { --tag-accent: var(--red); }
.status-expired { --tag-accent: var(--muted); }
.media-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 24px;
    padding: 14px 0 16px;
}
.media-header-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.media-header h1 {
    margin: 0;
    font-size: clamp(26px, 2.5vw, 34px);
    line-height: 1.05;
    letter-spacing: -.045em;
}
.media-header p {
    color: var(--muted);
    font-size: 14px;
    max-width: 52ch;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
    border-top: 1px solid var(--line);
    padding: 18px 0 22px;
}
.media-col {
    min-width: 0;
    border-top: 0;
    padding: 0;
}
.media-col h2 {
    font-size: 20px;
    margin-bottom: 12px;
}
.now-playing {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--green);
}
.now-playing-poster {
    grid-template-columns: 75px minmax(0, 1fr);
}
.now-playing-body {
    min-width: 0;
    display: grid;
    gap: 4px;
}
.now-playing-status { color: var(--green); }
.now-playing h3 {
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}
.track-artist {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}
.track-album { color: var(--muted); }
.track-link:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cover {
    display: block;
    width: 112px;
    height: 112px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--raised);
}
.cover-sm {
    width: 42px;
    height: 42px;
}
.cover-poster {
    width: 75px;
    height: 112px;
}
.cover-poster-sm {
    width: 28px;
    height: 42px;
}
.cover-empty {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 24px;
}
.cover-sm.cover-empty, .cover-poster-sm.cover-empty { font-size: 14px; }
.recent-listens { margin-top: 14px; }
.recent-heading {
    color: var(--muted);
    margin-bottom: 8px;
}
.listen-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.listen-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 2px solid var(--blue);
}
.listen-row-poster {
    grid-template-columns: 28px minmax(0, 1fr) auto;
}
.listen-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.listen-title {
    color: var(--strong);
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.listen-meta {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.listen-time {
    color: var(--muted);
    white-space: nowrap;
}
.movie-search-form { max-width: 640px; }
.search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}
.search-bar .search-submit {
    margin-top: 0;
    gap: 12px;
    white-space: nowrap;
}
.movie-search-results { margin-top: 14px; }
.manual-movie-details {
    margin-top: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
}
.manual-movie-details summary {
    cursor: pointer;
    padding: 11px 14px;
    color: var(--strong);
}
.manual-movie-details[open] summary {
    border-bottom: 1px solid var(--line);
}
.movie-manual-form { padding: 16px; }
.field-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.admin-movies-logged { margin-top: 20px; }
.admin-movie-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--blue);
}
.admin-movie-row .admin-row-body { min-width: 0; }
.admin-movie-row .cv-org { margin: 2px 0 0; }
.movie-year-inline {
    color: var(--muted);
    font-weight: 400;
}
.movie-overview {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.movie-add-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.movie-date-input {
    min-height: 38px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--raised);
    color: var(--strong);
    font: 12px/1.3 var(--mono);
}
.movie-date-input:focus {
    border-color: var(--accent);
}
@media (max-width: 960px) {
    .media-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .media-col + .media-col {
        border-top: 1px solid var(--line);
        padding-top: 22px;
    }
}
@media (max-width: 800px) {
    aside {
        position: static;
        width: auto;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 20px;
        border: 0;
        border-bottom: 1px solid var(--line);
    }
    .identity {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0;
    }
    .identity strong { margin: 0; }
    .mark {
        width: 45px;
        height: 44px;
        font-size: 23px;
    }
    nav {
        display: flex;
        margin: 0 0 0 auto;
        border: 0;
        padding: 0;
    }
    nav a {
        gap: 6px;
        border-left: 0;
        border-bottom: 2px solid transparent;
    }
    .theme { margin: 0; }
    main { margin: 0; padding: 24px; }
    .admin-row { grid-template-columns: 1fr; gap: 10px; }
    .admin-row-actions { justify-self: start; }
    .admin-movie-row { grid-template-columns: 28px minmax(0, 1fr); }
    .admin-movie-row .admin-row-actions { grid-column: 1 / -1; justify-self: start; }
    .movie-add-form { justify-content: flex-start; }
}
@media (max-width: 600px) {
    aside { justify-content: space-between; }
    nav {
        order: 3;
        width: 100%;
        border-top: 1px solid var(--line);
    }
    nav a { flex: 1; }
    .theme {
        position: relative;
        width: 44px;
        height: 44px;
        padding: 0;
        font-size: 18px;
        line-height: 1;
        letter-spacing: 0;
    }
    .theme-enabled .theme {
        display: grid;
        place-items: center;
    }
    .theme-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    main { padding: 20px; }
    .intro {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 28px 0;
    }
    .diagram { max-width: 230px; justify-self: start; }
    .facts, .strip { grid-template-columns: 1fr; }
    .facts { gap: 10px; }
    .facts .card { padding: 14px 16px; }
    .strip div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 12px;
    }
    .strip div + div { border: 0; border-top: 1px solid var(--line); }
    .strip dd { margin: 0; }
    .projects .card, .cv-entry, .skill-group { grid-template-columns: 1fr; gap: 6px; }
    .search-bar, .field-pair { grid-template-columns: 1fr; }
    .legal { grid-template-columns: 1fr; gap: 2px; }
    .legal dd + dt { margin-top: 8px; }
    .now-playing {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 14px;
        padding: 12px;
    }
    .now-playing-poster {
        grid-template-columns: 60px minmax(0, 1fr);
    }
    .cover { width: 88px; height: 88px; }
    .cover-poster { width: 60px; height: 88px; }
    .cover-sm { width: 40px; height: 40px; }
    .cover-poster-sm { width: 27px; height: 40px; }
    .now-playing h3 { font-size: 18px; }
    .listen-row {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
    }
    .listen-row-poster {
        grid-template-columns: 27px minmax(0, 1fr);
    }
    .listen-time { grid-column: 2; }
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    border-block: 1px solid var(--line);
}
.admin-nav a {
    gap: 6px;
    border-left: 0;
    border-bottom: 2px solid transparent;
}
.admin-nav [aria-current] { border-bottom-color: var(--accent); }
movie-filter { display: block; }
movie-filter .field { margin-bottom: 12px; }
movie-filter:not(:defined) .movie-filter-field,
movie-filter [hidden] { display: none; }
.movie-date-edit { margin-bottom: 6px; }
.movie-date-edit summary { cursor: pointer; }
.movie-date-edit form {
    display: grid;
    gap: 6px;
    margin-block: 8px;
}
