/* Breadkin's own tokens, lifted from the app (BreadkinApp.swift → Theme) so the
   web pages read as part of the product rather than as a bolted-on legal annexe.
   If the app's palette changes, change it here too. */
:root {
  --paper:   #F3F0EA;
  --card:    #FFFFFF;
  --sunk:    #F1EDE4;
  --ink:     #2E2A26;
  --muted:   #8A8279;
  --sage:    #7C9A85;
  --crust:   #4F6656;
  --rule:    #E5E1DA;
  --clay:    #BA4F42;
  --clay-bg: #FBEFED;
  --shadow:  0 1px 2px rgba(46, 42, 38, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161514; --card: #252321; --sunk: #1E1C1A;
    --ink: #F5F2ED; --muted: #ADA699; --sage: #96B6A0; --crust: #B6CEBE;
    --rule: #3C3834; --clay: #F28273; --clay-bg: #2B1F1D; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --paper: #161514; --card: #252321; --sunk: #1E1C1A;
  --ink: #F5F2ED; --muted: #ADA699; --sage: #96B6A0; --crust: #B6CEBE;
  --rule: #3C3834; --clay: #F28273; --clay-bg: #2B1F1D; --shadow: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 40rem;
  margin-inline: auto;
  padding-inline: 20px;
  padding-block: clamp(36px, 6vw, 64px) 80px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* Site chrome ------------------------------------------------------------ */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.topbar nav { display: flex; gap: 18px; font-size: 15px; }

/* Type ------------------------------------------------------------------- */
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
h1 {
  font-family: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6.5vw, 2.7rem);
  line-height: 1.1; margin: 0; text-wrap: balance; color: var(--ink);
}
h2 {
  font-family: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  font-weight: 600; font-size: 1.32rem; margin: 0 0 2px; color: var(--ink);
  display: flex; align-items: center; gap: 14px; text-wrap: balance;
}
/* The app's own SectionRule: a label with a hairline running off to the right. */
h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
h3 {
  font-family: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  font-weight: 600; font-size: 1.05rem; margin: 0; color: var(--crust);
}
p { margin: 0; }
.dates { color: var(--muted); font-size: 15px; }
.note { color: var(--muted); font-size: 15.5px; }

a { color: var(--crust); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 2px; }

section { display: flex; flex-direction: column; gap: 14px; }
ul.plain { margin: 0; padding-left: 1.15em; display: flex; flex-direction: column; gap: 9px; }
ul.plain li::marker { color: var(--sage); }

/* The one lifted block per page. Not everything is a card. */
.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.panel h2 { font-size: 1.15rem; }
.panel ul { margin: 0; padding-left: 1.15em; display: flex; flex-direction: column; gap: 9px; }
.panel li::marker { color: var(--sage); }

.draft {
  background: var(--clay-bg);
  border-left: 3px solid var(--clay);
  border-radius: 4px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.draft strong { color: var(--clay); }
.draft p { font-size: 15.5px; }

.scroller { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 700; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
td:first-child { font-weight: 700; white-space: nowrap; padding-right: 24px; }

footer {
  border-top: 1px solid var(--rule);
  padding-top: 22px; color: var(--muted); font-size: 15px;
  display: flex; flex-direction: column; gap: 8px;
}
.placeholder {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em; background: var(--sunk);
  border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px;
}
