/*
 * Daily Thread kit: the app's elements for the website and the web app, drawn from the same values as
 * the Android app (Theme.kt, Ui.kt, Streak.kt, Stats.kt, Screens.kt). One dp in the app = one CSS px here.
 * Themes: follows [data-theme] on the page; .dt-light / .dt-dark force one theme for a single block.
 * No middle dots as separators anywhere (house rule).
 */
:root, .dt-light {
  --dt-paper: #FAF8F9; --dt-ink: #0A0A0A; --dt-muted: #5F5965; --dt-line: #D6D2D9;
  --dt-label: #D9437F; --dt-glow: #E04FD8; --dt-card: #FFFFFF; --dt-on-label: #FFFFFF;
  --dt-fill: rgba(10, 10, 10, .12);           /* fill(): ink 12 % in light */
  --dt-field: rgba(10, 10, 10, .05);          /* the writing field on the Heute card */
  --dt-label-soft: color-mix(in srgb, var(--dt-label) 80%, white);   /* pink softened 20 % in light */
  /* mood tint strengths (MoodCover, DayDot, week strip, streak tile) */
  --dt-tile-a0: .14; --dt-tile-a1: .12;       /* MoodCover: .14 + .12 * strength */
  --dt-dot-a: .24; --dt-week-a: .22; --dt-gold-a: .26;
  --dt-deep: black; --dt-deep-k: 35%;         /* numbers: mood colour 35 % towards black */
  color-scheme: light;
}
[data-theme="dark"], .dt-dark {
  --dt-paper: #000000; --dt-ink: #F5F5F5; --dt-muted: #B8B1BF; --dt-line: #2A2A2E;
  --dt-label: #FF85BA; --dt-glow: #F07AE6; --dt-card: #111113; --dt-on-label: #1A0010;
  --dt-fill: rgba(245, 245, 245, .11);
  --dt-field: rgba(245, 245, 245, .08);
  --dt-label-soft: var(--dt-label);
  --dt-tile-a0: .18; --dt-tile-a1: .14;
  --dt-dot-a: .32; --dt-week-a: .30; --dt-gold-a: .32;
  --dt-deep: white; --dt-deep-k: 35%;         /* lerpWhite: 35 % towards white */
  color-scheme: dark;
}
.dt-light { --dt-deep: black; color-scheme: light; }

.dt { font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--dt-ink); }
.dt-surface { background: var(--dt-paper); color: var(--dt-ink); }

/* type scale of the app (Theme.kt) */
.dt-display  { font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -.6px; }
.dt-headline { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.5px; }
.dt-title    { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.2px; }
.dt-titlem   { font-size: 15px; line-height: 20px; font-weight: 500; }
.dt-body     { font-size: 16px; line-height: 24px; }
.dt-bodym    { font-size: 14px; line-height: 20px; }
.dt-muted    { color: var(--dt-muted); }
.dt-eyebrow  { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dt-muted); }

/* the one container: card colour, 20 px corners, 1 px hairline */
.dt-card { background: var(--dt-card); border: 1px solid var(--dt-line); border-radius: 20px; }

/* mood tile (MoodCover): 12 px corners, flat tint growing with the mood, number in a deeper shade */
.dt-tile {
  --m: 224, 79, 216; --s: .35; width: 46px; height: 46px; flex: none;
  border-radius: 12px; position: relative; display: grid; place-items: center;
  background: rgba(var(--m), calc(var(--dt-tile-a0) + var(--dt-tile-a1) * var(--s)));
  color: color-mix(in srgb, rgb(var(--m)), var(--dt-deep) var(--dt-deep-k));
  font-weight: 700; font-size: 22px; line-height: 1;
}
.dt-tile.empty { background: var(--dt-fill); color: var(--dt-muted); }
.dt-tile .dt-check { position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; }

/* streak tile (StreakCircle): the gold of a 10, filled once today is written, outlined before */
.dt-streak {
  --gold: 255, 176, 102; width: 52px; height: 52px; flex: none; border-radius: 12px;
  position: relative; display: grid; place-items: center; font-weight: 700; font-size: 17px; line-height: 22px;
  background: rgba(var(--gold), var(--dt-gold-a));
  color: color-mix(in srgb, rgb(var(--gold)), var(--dt-deep) 38%);
}
.dt-dark .dt-streak, [data-theme="dark"] .dt-streak { color: color-mix(in srgb, rgb(var(--gold)), white 35%); }
.dt-light .dt-streak { color: color-mix(in srgb, rgb(var(--gold)), black 38%); }
.dt-streak.open { background: transparent; box-shadow: inset 0 0 0 2px rgba(var(--gold), var(--dt-gold-a)); }
.dt-streak .dt-sun { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; }

/* week strip: circles of 38 px, today ringed in pink */
.dt-week { display: flex; justify-content: space-between; }
.dt-week .day { display: grid; justify-items: center; gap: 6px; padding: 4px 2px; }
.dt-week .dot {
  --m: 224, 79, 216; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--dt-fill); font-size: 12px; font-weight: 700;
}
.dt-week .dot.mood { background: rgba(var(--m), var(--dt-week-a)); color: color-mix(in srgb, rgb(var(--m)), var(--dt-deep) var(--dt-deep-k)); }
.dt-week .dot.today { box-shadow: inset 0 0 0 1.5px var(--dt-label); }
.dt-week .wd { font-size: 12px; color: var(--dt-muted); }
.dt-week .wd.today { color: var(--dt-label); font-weight: 700; }

/* month calendar (DayDot): circles at 86 % of the cell */
.dt-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 0; }
.dt-month .wh { text-align: center; font-size: 12px; color: var(--dt-muted); padding-bottom: 4px; }
.dt-month .c { aspect-ratio: 1; display: grid; place-items: center; }
.dt-month .d {
  --m: 224, 79, 216; width: 86%; height: 86%; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; color: var(--dt-muted);
}
.dt-month .d.mood { background: rgba(var(--m), var(--dt-dot-a)); color: color-mix(in srgb, rgb(var(--m)), var(--dt-deep) 40%); font-weight: 700; font-size: 14px; }
.dt-month .d.today { box-shadow: inset 0 0 0 1.5px var(--dt-label); color: var(--dt-label); }
.dt-month .d.future { opacity: .35; }

/* pill (Pill): selected = pink 22 %, otherwise the soft fill */
.dt-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 8px 16px; background: var(--dt-fill); color: var(--dt-muted); font-size: 14px; font-weight: 500; }
.dt-pill.on { background: color-mix(in srgb, var(--dt-label) 22%, transparent); color: var(--dt-label); }
.dt-chip { display: inline-flex; border-radius: 999px; padding: 4px 10px; background: var(--dt-fill); color: var(--dt-muted); font-size: 12px; }

/* list row (ListRow): 20 / 12 padding, title medium, subtitle muted */
.dt-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; }
.dt-row .txt { flex: 1; min-width: 0; }
.dt-row .t { font-size: 16px; line-height: 24px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.dt-row .s { font-size: 14px; line-height: 20px; color: var(--dt-muted); margin-top: 2px; }
.dt-row .fav { width: 14px; height: 14px; }
.dt-row .more { width: 20px; height: 20px; color: var(--dt-muted); }

/* the Heute card */
.dt-today { padding: 18px 20px 20px; display: grid; gap: 18px; }
.dt-today .top { display: flex; align-items: center; gap: 14px; }
.dt-today .top .txt { flex: 1; min-width: 0; display: grid; gap: 6px; }
.dt-today .eye { font-size: 11px; letter-spacing: 1.5px; color: var(--dt-muted); text-transform: uppercase; }
.dt-today .eye.done { color: var(--dt-label); }
.dt-field { display: flex; align-items: center; border-radius: 999px; background: var(--dt-field); padding: 6px 6px 6px 20px; }
.dt-field .ph { flex: 1; font-size: 16px; line-height: 24px; color: var(--dt-muted); }
.dt-field .ph.done { color: var(--dt-ink); }
.dt-field .go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--dt-label-soft); color: var(--dt-on-label); }
.dt-field .go.done { background: var(--dt-card); color: var(--dt-muted); }
/* dark: a card-coloured circle sank in as a black hole inside the lighter field; a soft light circle instead */
.dt-dark .dt-field .go.done, [data-theme="dark"] .dt-field .go.done { background: rgba(245, 245, 245, .1); color: var(--dt-ink); }
.dt-field .go svg { width: 15px; height: 15px; }

/* check-in circle (Glow): flat tint, stronger for better moods */
.dt-glow { --m: 224, 79, 216; --s: .35; border-radius: 50%; display: grid; place-items: center;
  background: rgba(var(--m), min(.5, calc(var(--dt-tile-a0) + .18 * var(--s)))); }

/* phone frame for the website (not part of the app) */
/* corners and frame grow with the phone's width (a fixed 44 px made small phones look like a pill) */
.dt-phone { --bz: clamp(4px, 3vw, 9px); width: 300px; max-width: 100%; aspect-ratio: 9 / 19.5; border-radius: 14.7% / 6.8%; background: var(--dt-paper);
  box-shadow: 0 0 0 var(--bz) #1d1b21, 0 0 0 calc(var(--bz) + 1px) #3a3640, 0 30px 60px rgba(0, 0, 0, .35); overflow: hidden; position: relative; }

.dt-icon { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dt-row .fav { fill: var(--dt-label); }
.dt-row .more { fill: currentColor; }
.dt-glow span { font-weight: 500; letter-spacing: -1.5px; font-size: 66px; }
/* no streak yet: the pen with today's (empty) progress ring */
.dt-penring { width: 52px; height: 52px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--dt-line);
  display: grid; place-items: center; color: var(--dt-muted); }
.dt-penring .dt-pen { width: 18px; height: 18px; }
