:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0f17;
  color: #e7edf7;
}

* { box-sizing: border-box; }

html { min-width: 280px; }

body { background: #0b0f17; color: #e7edf7; margin: 0; }

main { margin: 2rem auto 4rem; width: min(calc(100% - 2rem), 760px); }

header { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1.5rem; }
.header-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: .5rem; }

h1, h2, h3, p { margin-top: 0; }

h1 { margin-bottom: .5rem; }

.eyebrow { color: #9eabc0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; }

.card { background: #141b26; border: 1px solid #2d3a4d; border-radius: .75rem; box-shadow: 0 1px 3px rgb(0 0 0 / 35%); margin: 1rem 0; padding: 1.25rem; }

.muted { background: #101722; color: #aab6c8; }
.holiday-card { border-color: #c89535; }

button, .button-link { align-items: center; border: 0; border-radius: .4rem; background: #2f6fdb; color: #fff; cursor: pointer; display: inline-flex; font: inherit; font-weight: 650; justify-content: center; min-height: 44px; padding: .65rem .9rem; text-decoration: none; touch-action: manipulation; }
button:hover:not(:disabled), .button-link:hover { background: #3f7ee8; }
button:disabled { cursor: not-allowed; opacity: .55; }
button.secondary, .button-link.secondary { background: #28354a; color: #e7edf7; }
button.secondary:hover:not(:disabled), .button-link.secondary:hover { background: #35445d; }
button.danger { background: #b33b4c; }
button.danger:hover:not(:disabled) { background: #c94a5c; }
button.compact { font-size: .82rem; min-height: 36px; padding: .35rem .55rem; }
button:focus-visible, .button-link:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #76a9ff; outline-offset: 2px; }

.control-fold > summary { align-items: center; cursor: pointer; display: flex; gap: .75rem; list-style: none; min-height: 44px; }
.control-fold > summary::-webkit-details-marker { display: none; }
.control-fold > summary::before { color: #76a9ff; content: "▸"; flex: 0 0 auto; font-size: 1.2rem; }
.control-fold[open] > summary::before { content: "▾"; }
.control-fold > summary h2 { margin: 0; }
.control-fold[open] > summary { border-bottom: 1px solid #2d3a4d; margin-bottom: 1rem; padding-bottom: 1rem; }
.holiday-card.control-fold > summary::before { color: #ffc76b; }

form { display: grid; gap: 1rem; }
label, fieldset { display: grid; gap: .4rem; font-weight: 600; }
fieldset label { display: block; font-weight: 400; margin: .35rem 0; }
fieldset { border-color: #43516a; min-width: 0; }
input, textarea { background: #0f1621; border: 1px solid #52627a; border-radius: .35rem; color: #e7edf7; font: inherit; font-size: 1rem; min-width: 0; padding: .55rem; width: 100%; }
input::placeholder, textarea::placeholder { color: #8491a5; opacity: 1; }
input[type="checkbox"] { accent-color: #4c8dff; width: auto; }
textarea { min-height: 5rem; resize: vertical; }

.notice { border-radius: .4rem; font-weight: 600; min-height: 1.4rem; padding: 0 .15rem; }
.notice.pending { color: #ffc76b; }
.notice.error { color: #ff8794; }
.notice.success { color: #65d69c; }
.local-notice { margin: 1rem 0 0; }
.warning { color: #ffc76b; font-weight: 600; }
.preview { background: #2b2417; border-left: .3rem solid #d9952d; margin-top: 1rem; padding: 1rem; }
.preview > label { align-items: center; display: flex; gap: .6rem; }
.preview > label input[type="checkbox"] { flex: 0 0 auto; }
.identity { color: #aab6c8; font-size: .9rem; }
.inline-form { align-items: end; grid-template-columns: 1fr max-content; }
.status-line { background: #18263a; border-radius: .4rem; margin-top: 1rem; padding: .75rem; }
.control-list { display: grid; gap: .5rem; padding-left: 1.25rem; }
.control-list li { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; }
.schedule-list { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1rem; }
.schedule-list dt { font-weight: 700; }
.schedule-list dd { margin: 0; }
.reload-row { align-items: center; display: grid; gap: .75rem; grid-template-columns: max-content minmax(0, 1fr); }
.reload-status { font-weight: 700; min-height: 1.4rem; }
.reload-status.pending { color: #ffc76b; }
.reload-status.success { color: #65d69c; }
.reload-status.error { color: #ff8794; }
.api-summary { color: #aab6c8; }
.api-server { overflow-wrap: anywhere; }
.api-paths { display: grid; gap: .75rem; }
.api-endpoint { background: #101722; border: 1px solid #2d3a4d; border-radius: .5rem; padding: 1rem; }
.api-endpoint-heading { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: .5rem; }
.api-endpoint-heading code { font-size: .95rem; }
.api-endpoint p { margin-bottom: 0; }
.method-badge { border-radius: .3rem; color: #071018; font-size: .78rem; font-weight: 800; min-width: 4.5rem; padding: .25rem .45rem; text-align: center; }
.method-get { background: #65d69c; }
.method-post { background: #76a9ff; }
.method-delete { background: #ff8794; }
code { background: #0d1520; border-radius: .25rem; color: #c7d8f4; overflow-wrap: anywhere; padding: .1rem .25rem; }

@media (max-width: 560px) {
  main { margin: 1rem auto 2rem; width: min(calc(100% - 1rem), 760px); }
  header { display: block; }
  .header-actions { display: grid; grid-template-columns: 1fr; margin-top: .75rem; }
  .card { padding: 1rem; }
  .inline-form { grid-template-columns: 1fr; }
  .schedule-list { grid-template-columns: 1fr; }
  .schedule-list dd { margin-bottom: .5rem; }
  .control-list { padding-left: 1rem; }
  .control-list li { align-items: stretch; flex-direction: column; }
  form > button, .preview > button, #sign-in, #sign-out, .control-list button { width: 100%; }
}
