:root {
  /* daypartprep.com brand: crimson tower, slate wordmark, steel-blue clipboard */
  --bg: #f3f5f7;
  --panel: #ffffff;
  --ink: #2e3844;
  --muted: #687989;
  --line: #dde2e8;
  --accent: #c21e41;      /* brand crimson */
  --accent-ink: #ffffff;
  --accent-soft: #f9e4e9;
  --steel: #687989;       /* brand steel blue */
  --ok: #2f6b3d;
  --warn: #9a5b00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(46,56,68,.06), 0 4px 14px rgba(46,56,68,.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1f26; --panel: #232a33; --ink: #e8ecf0; --muted: #9babba; --line: #35404c;
    --accent: #e3486b; --accent-ink: #ffffff; --accent-soft: #3a2029; --steel: #9babba; --ok: #7fc28f; --warn: #e2b153;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1f26; --panel: #232a33; --ink: #e8ecf0; --muted: #9babba; --line: #35404c;
  --accent: #e3486b; --accent-ink: #ffffff; --accent-soft: #3a2029; --steel: #9babba; --ok: #7fc28f; --warn: #e2b153;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { font-size: 18px; }
html[data-size="large"] { font-size: 21px; }
html[data-size="xl"] { font-size: 24px; }
body { background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Top bar */
/* The top bar stays white in dark mode too, so the logo always sits on its own background. */
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 3px solid #c21e41;
  --panel: #fff; --ink: #2e3844; --muted: #687989; --line: #dde2e8; --accent: #c21e41; --accent-ink: #fff; --accent-soft: #f9e4e9; color: #2e3844; }
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 50px; width: auto; display: block; }
@media (max-width: 560px) { .brand img { height: 34px; } }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--accent-soft); color: var(--ink); }
.nav a.active { background: var(--accent); color: var(--accent-ink); }
.who { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }

/* Layout */
.wrap { max-width: 1320px; margin: 0 auto; padding: 20px 16px 60px; }
.narrow { max-width: 760px; }
.layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }
.layout.story-layout { grid-template-columns: 1fr 380px; }
@media (max-width: 860px) { .layout, .layout.story-layout { grid-template-columns: 1fr; } .side { position: static !important; } }
.side { position: sticky; top: 72px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.side h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); margin: 6px 6px 8px; font-family: var(--font); }
.layout.story-layout .side { position: static; }
.side > a { display: block; text-decoration: none; color: var(--ink); padding: 6px 8px; border-radius: 6px; font-size: .95rem; }
.side > a:hover { background: var(--accent-soft); }
.side .count { float: right; color: var(--muted); font-size: .8rem; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 16px; }

/* Day header */
.dayhead { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dayhead h1 { font-size: 2rem; text-transform: uppercase; }
.dayhead .kicker { color: var(--steel); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }

/* Sections and headlines */
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 26px; overflow: hidden; scroll-margin-top: 80px; }
.section > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 20px; border-bottom: 3px solid var(--accent); }
.section > header h2 { font-size: 1.4rem; text-transform: uppercase; }
.section .group { padding: 16px 20px 2px; font-weight: 700; color: var(--accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.items { list-style: none; margin: 0; padding: 6px 0; }
.items li { padding: 14px 20px; display: flex; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items a.hl { color: var(--ink); text-decoration: none; font-weight: 600; flex: 1; font-size: 1.12rem; line-height: 1.45; }
.items a.hl:hover { color: var(--accent); text-decoration: underline; }
.items .quick a.hl { font-weight: 450; font-size: 1.05rem; }
.slotted { font-size: .75rem; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; white-space: nowrap; font-weight: 600; }
.pill { display: inline-block; font-size: .75rem; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.note { color: var(--warn); font-size: .85rem; font-weight: 600; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 3px 9px; font-size: .85rem; }
.btn.danger { color: #b3261e; }
.btn:disabled { opacity: .5; cursor: default; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=time], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 140px; }
.row > .shrink { flex: 0 0 auto; min-width: 0; }
.msg { padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); font-size: .92rem; }
.msg.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }

/* Auth */
.auth { max-width: 420px; margin: 8vh auto; }
.auth h1 { font-size: 2.2rem; text-align: center; margin-bottom: 4px; }
.auth h1 span { color: var(--accent); }
.auth .logo { display: block; margin: 0 auto 6px; width: 100%; max-width: 340px; height: auto; background: #fff; border-radius: 8px; padding: 10px; }
.tabs { display: flex; gap: 4px; margin: 18px 0 14px; }
.tabs button { flex: 1; border: 1px solid var(--line); background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Story page */
.story h1 { font-family: var(--font); font-size: 1.6rem; font-weight: 700; line-height: 1.25; }
.story .body { font-size: 1.08rem; line-height: 1.65; }
.story .body p { margin: .6em 0; }
.sources a { margin-right: 10px; }
.crumbs { font-size: .9rem; margin-bottom: 10px; }
.crumbs a { text-decoration: none; }
.pager { display: flex; justify-content: space-between; gap: 10px; }

/* Break board */
.breaks { list-style: none; margin: 0; padding: 0; }
.break { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; background: var(--bg); }
.break .bh { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.break .time { font-family: var(--display); font-size: 1.15rem; font-weight: 800; }
.break .label { color: var(--muted); font-size: .9rem; flex: 1; }
.break ol { margin: 6px 0 0 18px; padding: 0; font-size: .92rem; }
.break ol li { margin: 3px 0; }
.break.here { border-color: var(--accent); }
.break .empty { font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* Clock editor */
.clock-rows .crow { display: grid; grid-template-columns: 120px 1fr auto auto auto; gap: 8px; align-items: center; margin-bottom: 6px; }
@media (max-width: 560px) { .clock-rows .crow { grid-template-columns: 100px 1fr auto; } .clock-rows .crow .mv { display: none; } }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .85rem; cursor: pointer; user-select: none; }
.chip input { margin: 0; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); }

@media print {
  .topbar, .side, .noprint { display: none !important; }
  body { background: #fff; }
  .panel, .section, .break { box-shadow: none; }
  .layout { display: block; }
}

/* Text size switch */
.sizer { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sizer button { border: 0; background: transparent; padding: 4px 9px; cursor: pointer; font-weight: 700; color: var(--muted); line-height: 1; }
.sizer button.on { background: var(--accent); color: var(--accent-ink); }
.sizer button + button { border-left: 1px solid var(--line); }

/* Top Talk */
.section.top { border: 2px solid var(--accent); }
.section.top > header { background: var(--accent); color: var(--accent-ink); border-bottom: 0; }
.section.top > header .pill { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 50%, transparent); }
.section.top .items a.hl { font-size: 1.25rem; }
.from { font-size: .78rem; color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; }
.rank { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--accent); min-width: 1.6em; }

/* Admin order list */
.order-list { list-style: none; margin: 0; padding: 0; }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--bg); }
.order-list li .t { flex: 1; font-weight: 600; }

.badge { display: inline-block; min-width: 1.4em; padding: 0 .4em; margin-left: 4px; border-radius: 999px; background: #c21e41; color: #fff; font-size: .75rem; font-weight: 800; line-height: 1.4em; text-align: center; vertical-align: 1px; }
.nav a.active .badge { background: #fff; color: #c21e41; }
.request { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 16px; background: var(--bg); }
.request + .request { margin-top: 10px; }
.request dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 12px; font-size: .95rem; }
.request dt { color: var(--muted); }
.request dd { margin: 0; }
textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); resize: vertical; }

/* Trending on TikTok widget */
.section.tiktok { border: 0; background: #1f262f; color: #eef2f5; --muted: #a9b6c3; --line: #36404c; }
.section.tiktok > header { border-bottom: 0; padding-bottom: 6px; }
.section.tiktok > header h2 { display: flex; align-items: center; gap: 10px; color: #fff; }
.section.tiktok > header .pill { color: #cfd8e1; border-color: #4a5664; }
.tt-icon { width: 1.3em; height: 1.3em; fill: none; stroke: #25f4ee; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.tt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 8px 20px 20px; }
.tt-card { position: relative; background: #28313c; border: 1px solid #36404c; border-radius: 12px; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: inset 3px 0 0 #25f4ee, inset -3px 0 0 #fe2c55; }
.tt-card:hover { border-color: #5b6a7a; }
.tt-rank { font-weight: 800; font-size: .85rem; letter-spacing: .06em; color: #25f4ee; }
.tt-head { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.08rem; line-height: 1.35; }
.tt-head:hover { text-decoration: underline; }
.tt-teaser { margin: 0; color: #c6d0da; font-size: .93rem; line-height: 1.5; flex: 1; }
.tt-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tt-tag { font-size: .8rem; font-weight: 600; color: #fff; background: #3a4552; border-radius: 999px; padding: 2px 9px; text-decoration: none; }
.tt-tag:hover { background: #fe2c55; }
.tt-open { margin-left: auto; font-size: .85rem; font-weight: 700; color: #25f4ee; text-decoration: none; }
.tt-open:hover { text-decoration: underline; }
.section.tiktok .slotted { background: #fe2c55; color: #fff; }

/* Left column: Sections list with the TikTok strip running single file underneath */
.sidecol { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sidecol .side { position: static; }
.sidecol .section.tiktok { margin: 0; }
.sidecol .section.tiktok > header { padding: 14px 14px 4px; }
.sidecol .section.tiktok > header h2 { font-size: 1.05rem; }
.sidecol .tt-grid { grid-template-columns: 1fr; gap: 10px; padding: 8px 12px 14px; }
.sidecol .tt-card { padding: 12px 12px 10px; gap: 6px; }
.sidecol .tt-head { font-size: .98rem; }
.sidecol .tt-teaser { font-size: .86rem; }
.sidecol .tt-tag { font-size: .74rem; }
