/* DawnRSS website — "paper & ink", like the app: two colours and one grey,
   serif for reading, sans for labels, hairlines instead of cards. The only
   colour is the five highlighter pens. */

:root {
  color-scheme: light dark;
  --paper: #F7F4EC;
  --paper-dim: #EFEBE0;
  --ink: #1B1B1B;
  --soft: #6B675E;
  --rule: #D9D4C7;
  --pen-mix: 78%;
  --serif: Georgia, "Noto Serif", "Source Han Serif SC", "Noto Serif CJK SC",
    "Songti SC", "STSong", "SimSun", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

:lang(zh-Hant) {
  --serif: Georgia, "Noto Serif", "Source Han Serif TC", "Noto Serif CJK TC",
    "Songti TC", "PMingLiU", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang TC",
    "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121212;
    --paper-dim: #1C1C1C;
    --ink: #E6E1D6;
    --soft: #9A958A;
    --rule: #2E2E2E;
    --pen-mix: 42%;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.75 var(--serif);
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.label {
  font: 12px/1.4 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--soft);
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 18px;
}
.brand svg { width: 26px; height: auto; fill: currentColor; }
.langs { font: 13px var(--sans); color: var(--soft); display: flex; gap: 14px; }
.langs a { text-decoration: none; }
.langs a:hover { text-decoration: underline; }
.langs [aria-current] { color: var(--ink); font-weight: 600; }

/* The app's list header: one thick rule over one thin. */
.double-rule {
  border: 0;
  margin: 0;
  height: 5px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  gap: 48px;
  padding: 56px 0 72px;
  align-items: center;
}
.hero h1 {
  font-weight: 400;
  font-size: clamp(46px, 9vw, 88px);
  line-height: 1.08;
  margin: 14px 0 20px;
  letter-spacing: -.01em;
}
.hero .lede {
  font-size: clamp(21px, 3vw, 27px);
  line-height: 1.45;
  margin: 0 0 14px;
}
.hero .sub { color: var(--soft); max-width: 30em; margin: 0 0 30px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.button {
  display: inline-block;
  font: 600 15px/1 var(--sans);
  padding: 14px 20px;
  border: 1px solid var(--ink);
  text-decoration: none;
}
a.button { background: var(--ink); color: var(--paper); }
a.button:hover { background: transparent; color: var(--ink); }
span.button { font-weight: 400; }
.actions .more { font: 15px var(--sans); }

.epigraph {
  margin: 44px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  max-width: 30em;
  font-style: italic;
  color: var(--soft);
}
:lang(zh) .epigraph { font-style: normal; }
.epigraph cite { display: block; font: 13px var(--sans); margin-top: 4px; font-style: normal; }

/* ---------- figures (drawn, not screenshots) ---------- */

figure { margin: 0; }
figcaption { font: 12px var(--sans); color: var(--soft); margin-top: 10px; text-align: center; }

.screen {
  border: 1px solid var(--ink);
  max-width: 340px;
  margin: 0 auto;
  padding: 18px 18px 0;
  font-size: 15px;
  line-height: 1.5;
}
.screen .head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 11px var(--sans);
  color: var(--soft);
  padding-bottom: 7px;
}
.row { padding: 13px 0; border-bottom: 1px solid var(--rule); }
.row .meta { font: 11px var(--sans); color: var(--soft); margin-bottom: 3px; }
.row .title { font-weight: 700; line-height: 1.38; }
.row .summary {
  font: 13px/1.55 var(--sans);
  color: var(--soft);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row.read { opacity: .55; }
.row.read .title { font-weight: 400; }
.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font: 11px var(--sans);
  color: var(--soft);
  text-align: center;
  border-top: 1px solid var(--ink);
  margin: -1px -18px 0;
}
.tabs span { padding: 11px 0 12px; border-top: 2px solid transparent; margin-top: -1px; }
.tabs .on { color: var(--ink); font-weight: 700; border-top-color: var(--ink); }

mark {
  color: inherit;
  background: color-mix(in srgb, var(--pen) var(--pen-mix), var(--paper));
  padding: 0 .12em;
}
.p1 { --pen: #FFE433; }
.p2 { --pen: #8FE36B; }
.p3 { --pen: #FF8CC6; }
.p4 { --pen: #79C8FF; }
.p5 { --pen: #FFAE42; }

.plate { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 18px 0; }
.plate p { margin: 0; }
.plate .pens { display: flex; flex-wrap: wrap; gap: 8px 12px; font: 14px var(--sans); margin-bottom: 14px; }
.plate .note-head { margin-bottom: 8px; }
.plate .note-title { font-size: 21px; line-height: 1.3; margin-bottom: 10px; }
.plate sup { font: 11px var(--sans); color: var(--soft); vertical-align: baseline; margin: 0 1px; }

.swatches { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.swatches div { padding: 22px 18px; font-size: 19px; line-height: 1.4; }
.swatches small { display: block; font: 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 6px; }
.swatches .day { background: #F7F4EC; color: #1B1B1B; }
.swatches .night { background: #121212; color: #E6E1D6; }

/* ---------- contents ---------- */

.section-head { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0 0; }

.feature {
  display: grid;
  gap: 22px;
  padding: 44px 0;
  border-bottom: 1px solid var(--rule);
}
.feature:last-of-type { border-bottom: 0; }
.feature .num { font-size: 15px; font-style: italic; color: var(--soft); }
.feature h2 { font-weight: 400; font-size: clamp(27px, 4vw, 36px); line-height: 1.25; margin: 0 0 14px; }
.feature p { margin: 0 0 14px; max-width: 34em; }
.feature ul { margin: 0; padding: 0; list-style: none; max-width: 36em; font: 15px/1.65 var(--sans); color: var(--soft); }
.feature li { padding: 7px 0 7px 1.4em; position: relative; border-top: 1px solid var(--rule); }
.feature li::before { content: "—"; position: absolute; left: 0; }

/* ---------- closing ---------- */

.closing { padding: 64px 0 72px; text-align: center; }
.closing svg { width: 64px; fill: currentColor; }
.closing h2 { font-weight: 400; font-size: clamp(28px, 5vw, 40px); line-height: 1.25; margin: 18px 0 10px; }
.closing p { color: var(--soft); margin: 0 auto 26px; max-width: 30em; }
.closing .actions { justify-content: center; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 16px 0 40px;
  font: 13px var(--sans);
  color: var(--soft);
}
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- account email pages (auth/) ---------- */

.wrap.narrow { max-width: 600px; }
.auth { padding: 48px 0 80px; }
.auth h1 { font-weight: 400; font-size: clamp(30px, 6vw, 40px); line-height: 1.25; margin: 0 0 16px; }
.auth form p { margin: 0 0 24px; }
.auth form .label { display: block; margin-bottom: 6px; }
button.button { background: var(--ink); color: var(--paper); cursor: pointer; }
button.button:hover:not(:disabled) { background: transparent; color: var(--ink); }
button.button:disabled { background: transparent; color: var(--soft); border-color: var(--rule); cursor: default; }
.field { display: flex; border-bottom: 1px solid var(--ink); margin-bottom: 14px; }
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 18px/1.4 var(--sans);
  padding: 8px 0;
}
.field input:focus { outline: none; }
.field:focus-within { border-bottom-width: 2px; margin-bottom: 13px; }
.field button { border: 0; background: none; color: var(--soft); font: 13px var(--sans); cursor: pointer; padding: 0 0 0 12px; }
.rules { list-style: none; margin: 0 0 28px; padding: 0; font: 14px/1.9 var(--sans); color: var(--soft); }
.rules li::before { content: "□"; display: inline-block; width: 1.6em; }
.rules li.met { color: var(--ink); }
.rules li.met::before { content: "☑"; }
.status { font: 15px/1.6 var(--sans); color: var(--soft); min-height: 1.6em; margin: 20px 0 0; }
.status.done { font: 19px/1.6 var(--serif); color: var(--ink); border-top: 1px solid var(--ink); padding-top: 16px; }

@media (min-width: 860px) {
  .wrap { padding: 0 32px; }
  .hero { grid-template-columns: 1.15fr .85fr; gap: 64px; padding: 80px 0 96px; }
  .feature { grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; padding: 60px 0; align-items: start; }
  .feature.plain { grid-template-columns: 64px minmax(0, 1fr); }
  .feature figure { padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
