/* Dawno site in the app's "Kartka" tokens (DESIGN.md). Ink means "your move", red only for holidays. */
:root {
  --bg: #F1F2EE;
  --card: #FFFFFF;
  --border: #DCDDD7;
  --text: #15171C;
  --secondary: #4B4F58;
  --muted: #63676F;
  --accent: #15171C;
  --on-accent: #F7F7F4;
  --narrow: "Dawno Narrow", "Arial Narrow", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@font-face {
  font-family: "Dawno Narrow";
  src: url("fonts/roboto-flex-narrow.woff2") format("woff2");
  font-weight: 800 1000;
  font-display: swap;
}

:root[data-theme="dark"] {
  --bg: #0F1012;
  --card: #1A1B1F;
  --border: #2C2E34;
  --text: #F1F1EC;
  --secondary: #B4B6BD;
  --muted: #8C8F97;
  --accent: #F1F1EC;
  --on-accent: #0F1012;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main, header, footer {
  max-width: 40rem;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

header { padding-top: 28px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--narrow);
  font-stretch: 62.5%;
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
}

.brand svg { width: 44px; height: 44px; }
.brand .sheet { fill: var(--text); }
.brand .cut { fill: var(--bg); }
.brand .cut-line { stroke: var(--bg); }

h1, h2 {
  font-weight: 750;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.08; margin: 40px 0 16px; }
h2 { font-size: 22px; line-height: 1.25; margin: 40px 0 10px; }
h3 { font-size: 17px; margin: 24px 0 4px; }

p { margin: 0 0 12px; color: var(--secondary); max-width: 62ch; }
.lead { font-size: 19px; }
a { color: var(--text); }

.example {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin: 28px 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.row + .row { border-top: 1px solid var(--border); }
.row svg { width: 44px; height: 44px; flex-shrink: 0; }
.row .who { flex: 1; min-width: 0; }
.row .name { font-weight: 600; color: var(--text); }
.row .sub { font-size: 15px; color: var(--muted); }
.row .num { text-align: right; font-family: var(--narrow); font-stretch: 62.5%; font-weight: 900; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.row .num small { display: block; font: 13px var(--sans); color: var(--muted); }
.row .num.hot, .row .num.hot small { color: var(--text); }

.ring-track { stroke: var(--border); }

.points {
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.points details + details { border-top: 1px solid var(--border); }

.points summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
}

.points summary::-webkit-details-marker { display: none; }

.points summary::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: translateY(-3px) rotate(45deg);
}

.points details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.points summary h2 { margin: 0; font-size: 18px; }
.points details p { padding: 0 18px 16px; margin: 0; }
.points summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 16px; }

dl { margin: 0; }
dt { font-weight: 600; margin-top: 18px; }
dd { margin: 2px 0 0; color: var(--secondary); }

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 8px;
}

.store {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.store[href] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.store[href]:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.note { font-size: 15px; color: var(--muted); }

footer {
  margin-top: 56px;
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

footer a { color: var(--secondary); }
