/* Spoorbase palette: black, off-white, teal; green and red only for published and failed. */
:root { --black: #0A0B0D; --panel: #121418; --line: #23272E; --line-2: #3A3F47; --white: #E8EAED; --muted: #9AA1AC;
        --teal: #5AD2C6; --green: #199F5B; --red: #D83B46; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--black); color: var(--white); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
h1 span { color: var(--teal); }
h2 { font-size: 16px; margin: 0 0 12px; }
main { max-width: 1180px; margin: 0 auto; padding: 8px 16px 48px; }
section { margin-top: 32px; }
.muted { color: var(--muted); }
.count { color: var(--muted); font-weight: 400; margin-left: 4px; }

.top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; max-width: 1180px;
       margin: 0 auto; padding: 16px; }
.account { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; }
.back { text-decoration: none; color: var(--teal); }

button, input, select, textarea { font: inherit; color: inherit; }
a.button { display: inline-block; text-decoration: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 14px; }
a.button.primary { background: var(--teal); border-color: var(--teal); color: var(--black); font-weight: 600; }
button { background: transparent; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button:hover { border-color: var(--white); }
button.primary { background: var(--teal); border-color: var(--teal); color: var(--black); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
input, select, textarea { background: var(--black); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 10px; width: 100%; }
textarea { resize: vertical; line-height: 1.45; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
label { display: block; font-size: 13px; color: var(--muted); }
label input, label select, label textarea { margin-top: 4px; color: var(--white); font-size: 15px; }

.alert, .note { border: 1px solid var(--red); border-radius: 8px; padding: 10px 12px; margin: 12px 0; overflow-wrap: anywhere; }
.note { border-color: var(--teal); }

.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 1px 7px; border-radius: 999px;
         border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.state-scheduled .badge, .state-publishing .badge, .key.state-scheduled { border-color: var(--teal); color: var(--teal); }
.state-published .badge, .key.state-published { border-color: var(--green); color: #4fd08d; }
.state-failed .badge, .state-blocked .badge, .key.state-failed, .badge.state-failed { border-color: var(--red); color: #ff7b84; }
.state-manual .badge, .key.state-manual { border-color: var(--white); color: var(--white); }
.badge.state-scheduled { border-color: var(--teal); color: var(--teal); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: flex; gap: 12px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
        text-decoration: none; min-width: 0; }
.card:hover { border-color: var(--line-2); }
.card img { width: 72px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; background: var(--line); flex: none; }
.card-text { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; font-size: 13px; }
.card-text strong { font-size: 14px; overflow-wrap: anywhere; }
.card-text .muted { overflow-wrap: anywhere; }

.month-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.month-head h2 { margin: 0; font-size: 20px; }
.month-head nav { display: flex; gap: 6px; }
.month-head nav a { text-decoration: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 12px; }
.month-head nav a:hover { border-color: var(--white); }
.legend { display: flex; gap: 8px; margin: 10px 0; }
.key { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid; }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.weekday { padding: 6px 8px; font-size: 12px; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.day { min-height: 116px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
       display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.day.other { background: #0d0f12; }
.day.other .date { color: var(--line-2); }
.date { font-size: 12px; color: var(--muted); }
.date .wide { display: none; }
.day.today .date { color: var(--teal); font-weight: 700; }
.chip { display: flex; gap: 6px; align-items: flex-start; text-decoration: none; font-size: 11px; line-height: 1.3; padding: 4px;
        border-radius: 8px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-2); min-width: 0; }
.chip:hover { border-color: var(--line-2); }
.chip.state-scheduled, .chip.state-publishing { border-left-color: var(--teal); }
.chip.state-published { border-left-color: var(--green); }
.chip.state-failed { border-left-color: var(--red); }
.chip.state-manual { border-left-color: var(--white); }
.chip img { width: 32px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; flex: none; background: var(--line); }
.chip span { min-width: 0; overflow-wrap: anywhere; }
.chip .badge { font-size: 10px; padding: 0 5px; }
.chip b { font-size: 12px; }
.none-this-month:empty { display: none; }

.log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.log li { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.log time { color: var(--muted); min-width: 120px; }
.log a { color: var(--teal); text-decoration: none; }
.log span { overflow-wrap: anywhere; }

.login { max-width: 340px; margin: 14vh auto 0; }
.login h1 { font-size: 24px; margin-bottom: 20px; }
.login form { display: grid; gap: 14px; }

.post h1 { font-size: 22px; overflow-wrap: anywhere; }
.status { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0 0; }
.status a { color: var(--teal); }
.slides { display: flex; gap: 10px; overflow-x: auto; padding: 16px 0 10px; scroll-snap-type: x proximity; }
.slides img { height: min(60vh, 520px); aspect-ratio: 4 / 5; object-fit: contain; border-radius: 8px; background: var(--panel);
              border: 1px solid var(--line); scroll-snap-align: start; flex: none; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }
.caption { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
           padding: 14px; margin: 0; }
.schedule { display: grid; gap: 10px; max-width: 320px; }
details { margin: 16px 0; }
summary { cursor: pointer; color: var(--teal); }
details form { margin-top: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

@media (max-width: 760px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  /* On a phone the month becomes a list of the days that have posts. */
  .calendar { display: block; border: 0; }
  .weekday, .day.empty { display: none; }
  .day { min-height: 0; border: 0; border-top: 1px solid var(--line); padding: 10px 0; }
  .day.other { background: none; }
  .date { font-size: 13px; }
  .date .wide { display: inline; }
  .chip { font-size: 13px; padding: 8px; }
  .chip img { width: 48px; }
  .chip b { font-size: 14px; }
  .slides img { height: min(62vh, 440px); }
}

.new { max-width: 720px; }
.request { display: grid; gap: 14px; margin-top: 16px; }
.request .hint { margin: -8px 0 0; font-size: 13px; }
.request button { justify-self: start; }
.reference { margin-top: -6px; font-size: 13px; }
.reference code, .requests code { display: block; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--white);
                 overflow-wrap: anywhere; }
.reference .help { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; }
.reference .help[hidden] { display: none; }
.reference p { margin: 6px 0 0; }
.requests { list-style: none; margin: 0; padding: 0; }
.requests li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.requests code { display: inline; }
.requests form { margin-left: auto; }
.edit { display: grid; gap: 10px; }
.edit button { justify-self: start; }
.song { margin: 8px 0 0; overflow-wrap: anywhere; }
