/*
 * Dorm Laundry — "notice board on black stock".
 * Warm black ground with grain, bone ink, square plates with a hairline edge.
 * Brass marks the one action that matters (book / submit); blue marks what is yours.
 * No shadows, no glow; the only "gradient" is a halftone (dots that thin out).
 */

@font-face {
    font-family: "Oswald";
    src: url("../fonts/oswald.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}
@font-face {
    font-family: "Literata";
    src: url("../fonts/literata.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --stock: #14110e;
    --raise: #1c1814;
    --sheet: #231e19;
    --line: #2e2822;
    --edge: #3a332b;
    --edge-2: #5c5246;
    --ink: #f2e8d5;
    --dim: #a99f8d;
    --faint: #6f675b;
    --brass: #e8b54a;
    --brass-ink: #1a1206;
    --brass-wash: rgba(232, 181, 74, .12);
    --blue: #4a8df0;
    --blue-ink: #a9c8ff;
    --blue-wash: rgba(74, 141, 240, .14);
    --ok: #5cc98a;
    --bad: #ff8566;
    --bad-wash: rgba(255, 133, 102, .1);
    --display: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, sans-serif;
    --serif: "Literata", Georgia, "Times New Roman", serif;
    --r: 3px;
    --gutter: 16px;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .91 0 0 0 0 .84 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--stock) var(--grain);
    color: var(--ink);
    font: 400 16px/1.55 var(--serif);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration-color: var(--edge-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

h1, h2, h3, .display {
    font-family: var(--display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.1;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(1.9rem, 6vw, 2.75rem); font-weight: 700; }
h2 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
strong, b, dt, th { font-family: var(--display); font-weight: 500; letter-spacing: .02em; }
code { font-family: var(--display); }

.label {
    font-family: var(--display);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
}
.muted { color: var(--dim); }
.small { font-size: .875rem; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- top bar ---------- */

.bar {
    background: var(--stock);
    border-bottom: 1px solid var(--edge);
}
.bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.bar .brand { min-height: 60px; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.brand img { width: 30px; height: 30px; display: block; }

.nav-toggle {
    margin-left: auto;
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--edge);
    border-radius: var(--r);
    background: none;
    color: var(--ink);
    cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 18px; height: 2px; margin: 0 auto;
    background: currentColor; position: relative; content: "";
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a, .nav button {
    display: block;
    padding: 8px 12px;
    font: 500 .9rem/1.2 var(--display);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dim);
    text-decoration: none;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}
.nav a:hover, .nav button:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }
.nav form { margin: 0; }

@media (max-width: 991px) {
    .nav-toggle { display: block; }
    .nav { display: none; flex-basis: 100%; margin-left: 0; }
    .nav.open { display: block; }
    .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 12px; }
    .nav li + li { border-top: 1px solid var(--line); }
    .nav a, .nav button { width: 100%; text-align: left; padding: 14px 2px; border-bottom: 0;
                          font-size: 1rem; }
    .nav a[aria-current="page"] { color: var(--brass); }
}

/* ---------- page ---------- */

main { flex: 1; padding: 28px 0 48px; }

.foot {
    border-top: 1px solid var(--line);
    padding: 18px 0 22px;
}
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.head { margin-bottom: 22px; }
.head h1 { margin-bottom: 0; }
.head .label { display: block; margin-bottom: 6px; color: var(--brass); }
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }

/* a plate: the one box */
.plate {
    background: var(--raise);
    border: 1px solid var(--edge);
    border-radius: var(--r);
}
.plate-body { padding: 22px; }
.plate-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--edge);
}
.plate-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: .08em; }

.narrow { max-width: 460px; margin: 0 auto; }
.medium { max-width: 600px; margin: 0 auto; }
.stack > * + * { margin-top: 16px; }
.center { text-align: center; }

/* halftone: dots that thin out towards the bottom-left */
.halftone { position: relative; overflow: hidden; }
.halftone::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, var(--dot, rgba(232, 181, 74, .55)) 1.1px, transparent 1.6px) 0 0 / 7px 7px;
    -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 62%);
    mask-image: linear-gradient(200deg, #000 0%, transparent 62%);
    pointer-events: none;
}
.halftone > * { position: relative; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    font: 600 .92rem/1.1 var(--display);
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--r);
    border: 1px solid var(--edge-2);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background-color .12s, color .12s, border-color .12s;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.btn-primary:hover { background: #f2c661; border-color: #f2c661; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #210a04; }
.btn-danger:hover { background: #ff9a80; border-color: #ff9a80; }
.btn-quiet-danger { color: var(--bad); border-color: rgba(255, 133, 102, .45); }
.btn-quiet-danger:hover { border-color: var(--bad); background: var(--bad-wash); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- forms ---------- */

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; }
.form-control {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font: 400 1rem/1.4 var(--serif);
    color: var(--ink);
    background: var(--stock);
    border: 1px solid var(--edge);
    border-radius: var(--r);
}
.form-control:hover { border-color: var(--edge-2); }
.form-control:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.form-check-input { width: 18px; height: 18px; accent-color: var(--brass); }
.field-error { margin-top: 6px; color: var(--bad); font-size: .9rem; }
.field-help { margin-top: 6px; color: var(--faint); font-size: .85rem; }
.field-help ul { margin: 4px 0 0; padding-left: 18px; }
.links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- notices ---------- */

.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: var(--raise);
    border: 1px solid var(--edge);
    border-left: 3px solid var(--dim);
    border-radius: var(--r);
}
.notice > div { flex: 1; }
.notice-success { border-left-color: var(--ok); }
.notice-error, .notice-danger { border-left-color: var(--bad); }
.notice-warning { border-left-color: var(--brass); }
.notice-info { border-left-color: var(--blue); }
.notice-close {
    flex: none;
    width: 28px; height: 28px; margin: -4px -6px -4px 0;
    border: 0; background: none; color: var(--dim);
    font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.notice-close:hover { color: var(--ink); }

/* ---------- schedule ---------- */

.seg {
    display: inline-flex;
    border: 1px solid var(--edge-2);
    border-radius: var(--r);
    padding: 3px;
    gap: 3px;
}
.seg a {
    padding: 8px 16px;
    font: 500 .88rem/1.2 var(--display);
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--dim);
    border-radius: 2px;
}
.seg a:hover { color: var(--ink); }
.seg a[aria-current="page"] { background: var(--ink); color: var(--stock); }

.rules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--edge);
    border-bottom: 1px solid var(--edge);
}
.rules li { padding: 12px 16px 12px 0; font-size: .9rem; color: var(--dim); line-height: 1.4; }
.rules li + li { padding-left: 16px; border-left: 1px solid var(--line); }
.rules b { display: block; color: var(--ink); font-size: 1.05rem; text-transform: uppercase; }
@media (max-width: 699px) {
    .rules { grid-template-columns: 1fr; }
    .rules li, .rules li + li { padding: 10px 0; border-left: 0; font-size: .88rem; }
    .rules li + li { border-top: 1px solid var(--line); }
    .rules b { font-size: .95rem; }
}

.days {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: 16px;
}

.day { overflow: hidden; }
.day-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--edge);
}
.day-num {
    font: 700 2.1rem/1 var(--display);
    min-width: 1.4em;
}
.day-name { font: 600 1.05rem/1.15 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.day-month { display: block; }
.stamp {
    margin-left: auto;
    padding: 4px 9px;
    font: 600 .75rem/1 var(--display);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brass-ink);
    background: var(--brass);
    border-radius: 2px;
}
.day.is-today { border-color: var(--brass); }
.day.is-today .day-head { border-bottom-color: var(--brass); }

.grid {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}
.grid col.time { width: 62px; }
.grid thead th {
    padding: 9px 4px 7px;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.grid thead th:first-child { text-align: left; padding-left: 14px; }
.grid tbody tr { border-top: 1px solid var(--line); }
.grid th[scope="row"] {
    padding: 6px 4px 6px 14px;
    text-align: left;
    font: 500 .88rem/1.15 var(--display);
    letter-spacing: .02em;
    color: var(--ink);
    white-space: nowrap;
}
.grid th[scope="row"] .to { display: block; color: var(--faint); font-size: .78rem; }
.grid td { padding: 5px 4px; text-align: center; vertical-align: middle; }
.grid td:last-child { padding-right: 10px; }
.grid form { margin: 0; }

.cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    min-height: 46px;
    padding: 5px 4px;
    border-radius: var(--r);
    font-size: .82rem;
    line-height: 1.2;
    overflow-wrap: break-word;
    hyphens: auto;
}
.cell-free {
    font: 600 .8rem/1.1 var(--display);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brass);
    background: transparent;
    border: 1px solid rgba(232, 181, 74, .38);
    cursor: pointer;
    transition: background-color .12s, color .12s;
}
.cell-free:hover, .cell-free:focus-visible { background: var(--brass); color: var(--brass-ink); }
.cell-taken { background: var(--sheet); color: var(--dim); }
.cell-mine { background: var(--blue-wash); border: 1px solid var(--blue); color: var(--ink); }
.cell-mine .who { font-family: var(--display); font-weight: 500; }
.cell-mine a {
    font: 500 .72rem/1.3 var(--display);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bad);
    text-decoration: none;
    padding: 2px 4px;
}
.cell-mine a:hover { text-decoration: underline; }
.cell-off { color: var(--faint); min-height: 46px; display: flex; align-items: center; justify-content: center; }

@media (max-width: 400px) {
    .grid col.time { width: 52px; }
    .grid th[scope="row"] { padding-left: 10px; font-size: .82rem; }
    .grid thead th:first-child { padding-left: 10px; }
    .grid td { padding: 4px 2px; }
    .grid td:last-child { padding-right: 6px; }
    .cell-free { letter-spacing: .02em; font-size: .74rem; }
    .cell { font-size: .76rem; }
}

/* ---------- reservations ---------- */

.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
}
.rows li + li { border-top: 1px solid var(--line); }
.date-block { text-align: center; line-height: 1; }
.date-block .d { display: block; font: 700 1.9rem/1 var(--display); }
.date-block .m { display: block; margin-top: 3px; }
.row-main { min-width: 0; }
.row-main .what { font: 500 1.05rem/1.25 var(--display); letter-spacing: .03em; }
.row-main .where { color: var(--dim); font-size: .9rem; }
.rows.past .date-block .d { color: var(--dim); }
.badge {
    display: inline-block;
    padding: 4px 8px;
    font: 500 .72rem/1 var(--display);
    letter-spacing: .12em;
    text-transform: uppercase;
    border: 1px solid var(--edge-2);
    border-radius: 2px;
    color: var(--dim);
}
.badge-done { color: var(--ok); border-color: rgba(92, 201, 138, .5); }
.empty { padding: 22px 18px; color: var(--dim); }

@media (max-width: 480px) {
    .rows li { grid-template-columns: 52px 1fr; padding: 14px; }
    .rows li > :last-child { grid-column: 2; justify-self: start; }
}

/* ---------- account ---------- */

.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; }
.facts dt, .facts dd { padding: 12px 0; margin: 0; border-top: 1px solid var(--line); }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
.facts dt { padding-right: 24px; }
.facts dd { overflow-wrap: anywhere; }
@media (max-width: 480px) {
    .facts { grid-template-columns: 1fr; }
    .facts dd { border-top: 0; padding-top: 0; }
}

.pin {
    display: table;
    margin: 4px 0 14px;
    padding: 10px 18px;
    font: 600 2.2rem/1 var(--display);
    letter-spacing: .28em;
    color: var(--brass);
    background: var(--stock);
    border: 1px dashed var(--edge-2);
    border-radius: var(--r);
}

/* ---------- auth poster ---------- */

.poster {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 920px;
    margin: 0 auto;
}
.poster-art {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    border-right: 1px solid var(--edge);
    min-height: 100%;
}
.poster-art img { width: min(220px, 70%); height: auto; margin: 28px auto; display: block; }
.poster-art .display { font-size: 2.4rem; font-weight: 700; margin: 0; }
.poster-form { padding: 32px 28px; }
@media (max-width: 760px) {
    .poster { grid-template-columns: 1fr; max-width: 460px; }
    .poster-art { border-right: 0; border-bottom: 1px solid var(--edge); flex-direction: row;
                  align-items: center; justify-content: flex-start; padding: 18px 20px; gap: 18px; }
    .poster-art img { width: 64px; margin: 0; order: -1; }
    .poster-art .display { font-size: 1.6rem; }
    .poster-art .label { display: none; }
    .poster-form { padding: 24px 20px; }
}

.mark { width: 64px; height: 64px; margin: 0 auto 16px; display: block; }

.tight { margin-bottom: 4px; }
.flush { margin-bottom: 0; }
.gap-above { margin-top: 16px; }
.gap-below { margin-bottom: 16px; }
.left { text-align: left; }
