/* The rules the week page and the shelf page share. Each page keeps its own rules in its own
   <style> block, below this file. */

:root {
  --ground: #F3F5F7;
  --surface: #FFFFFF;
  --ink: #141B22;
  --muted: #56626F;
  --rule: #D8DEE5;
  --accent: #1F4E79;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3ECF5;
  --done: #2E7A4E;
  --warn-ink: #6E4A00;
  --warn-bg: #FFF3D1;
  --warn-rule: #E3BE5C;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --text: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E1318;
    --surface: #161D25;
    --ink: #E7ECF1;
    --muted: #9AA7B4;
    --rule: #2A3542;
    --accent: #8DB8E3;
    --accent-ink: #0E1318;
    --accent-soft: #1C2B3B;
    --done: #6CC291;
    --warn-ink: #F3CD76;
    --warn-bg: #2E250D;
    --warn-rule: #6B5520;
  }
}
:root[data-theme="dark"] {
  --ground: #0E1318;
  --surface: #161D25;
  --ink: #E7ECF1;
  --muted: #9AA7B4;
  --rule: #2A3542;
  --accent: #8DB8E3;
  --accent-ink: #0E1318;
  --accent-soft: #1C2B3B;
  --done: #6CC291;
  --warn-ink: #F3CD76;
  --warn-bg: #2E250D;
  --warn-rule: #6B5520;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.5 var(--text);
  -webkit-text-size-adjust: 100%;
}
.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.small { font-size: 12px; color: var(--muted); }
.note, .copy-status { font-size: 13px; color: var(--muted); min-height: 1.4em; margin: 0; }

.banner {
  border: 1.5px dashed var(--warn-rule);
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 700;
}
.notice {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
}

.block { display: flex; flex-direction: column; gap: 12px; }

.chip {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.checks {
  background: var(--warn-bg);
  border: 1px solid var(--warn-rule);
  color: var(--warn-ink);
  border-radius: 8px;
  padding: 12px 14px;
}
.checks p { margin: 0 0 6px; font-weight: 700; }
.checks ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }

.visual { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
}
.visual img:not([src]) { min-height: 8rem; }
.visual figcaption { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.visual figcaption a { color: inherit; }
.text-only { font-size: 15px; color: var(--muted); margin: 0; }

.post {
  font-size: 16.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-user-select: text;
  user-select: text;
  margin: 0;
}

footer {
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* The password screen. */
.gate { display: flex; flex-direction: column; gap: 10px; padding-top: 10vh; }
.gate h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 2.6rem);
  line-height: 1.05;
  margin: 0 0 8px;
}
.gate-input {
  font: 400 18px/1.4 var(--text);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  box-sizing: border-box;
}
.gate-button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 16px/1 var(--text);
  padding: 16px 18px;
  width: 100%;
  cursor: pointer;
}
.gate-button:disabled { opacity: 0.6; cursor: default; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
