/* Theme + flat visual style. Loaded after style.css and overrides it.
   Light is the default; [data-theme="dark"] swaps the palette. */

:root {
  --bg: #faf9f6;
  --ink: #17171c;
  --text: #3a3a44;
  --muted: #6a6a77;
  --line: #e3e3e8;
  --soft: #f1f1f4;
  --accent: #0f766e;
  --accent-2: #0f766e; /* same as accent on purpose: no gradients */
  --card: #fff;
}

[data-theme="light"] { color-scheme: light; }

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111114;
  --ink: #f0f0f3;
  --text: #cfcfd6;
  --muted: #9a9aa8;
  --line: #2c2c34;
  --soft: #212127;
  --accent: #0d9488;
  --accent-2: #0d9488;
  --green: #34d399;
  --mid: #f0b429;
  --low: #f87171;
  --card: #1a1a1f;
}

body { background: var(--bg); }

/* ---------- header ---------- */
.top-in { justify-content: flex-start; gap: 8px; }
.brand { margin-inline-end: auto; }
.theme-btn { padding: 8px 10px; line-height: 0; }

/* line icons (replace the emoji) */
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.theme-btn .ico { width: 18px; height: 18px; }
.drop-ico { color: var(--accent); }
.drop-ico .ico { width: 40px; height: 40px; stroke-width: 1.6; }
.ri { display: inline-flex; font-size: 1.1rem; }
.ri.ok { color: var(--green); }
.ri.no { color: var(--low); }
.ri.eye { color: var(--muted); }
.ri.tip { color: var(--mid); }
.mi { color: var(--accent); }
.n-ico { color: var(--mid); font-size: 1.4rem; display: inline-flex; }

/* ---------- flat surfaces: no shadows, no tints ---------- */
.chip, .panel, .stats, .box, .meas-card, .scale-row, .faq details, .lang-list, .btn-ghost { background: var(--card); }
.panel, .stats, .box, .rules { border-color: var(--line); }
.panel, .stats, .btn-main, .btn-green, .pill { box-shadow: none; }
.lang-list { box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.pill { border-color: var(--card); }

.drop { background: var(--card); border-color: #cfcfd6; }
.rules, .metric, .tips-list li, .mesh-card, .mi { background: var(--soft); }
.mesh-card { border-color: var(--line); }
.ring { background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), var(--line) 0); }
.steps-list .dot { border-color: var(--line); }
.steps-list li.cur .dot { box-shadow: inset 0 0 0 3px var(--card); }
.stats-row small, .drop-hint { color: var(--muted); }
.c-above { border-inline-start-color: #2563eb; }
.hud-bl small { color: #99f6e4; }

/* ---------- squarer corners ---------- */
.panel, .stats, .box, .mesh-card, .how-card, .meas-card { border-radius: 12px; }
.drop, .ex, .rules, .notice, .faq details, .lang-list { border-radius: 10px; }
.metric, .tips-list li, .scale-row, .mi, .mesh-box { border-radius: 8px; }
.chip, .btn-main, .btn, .btn-green, .pill { border-radius: 8px; }
.ex-row svg { border-radius: 6px; }
.lang-list a { border-radius: 6px; }

/* ---------- front page: text on one side, upload on the other ---------- */
#screenStart .hero { text-align: start; padding: 36px 0 24px; }
#screenStart h1 { margin: 0 0 16px; max-width: 760px; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
#screenStart .lead { margin: 0; }
#screenStart .badges { justify-content: flex-start; }

@media (min-width: 900px) {
  #screenStart {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    column-gap: 56px;
    align-items: center;
  }
  #screenStart .hero { padding: 56px 0; }
  #screenStart .panel { margin: 0; max-width: none; }
  #screenStart .ad-wrap { grid-column: 1 / -1; }
}

/* ---------- info sections: aligned to the start instead of centered ---------- */
.sec-title { text-align: start; }
.sec-sub { text-align: start; margin-inline: 0; }
.faq, .scale, .notice { margin-inline: 0; }
.how-card { text-align: start; }
.how-card i { inset-inline: auto; inset-inline-start: 20px; margin: 0; border-radius: 8px; }

/* ---------- dark-only fixes (things style.css hard-codes in light colors) ---------- */
[data-theme="dark"] .drop { border-color: #3a3a44; }
[data-theme="dark"] .ex-good { background: #0f2a1e; border-color: #1f5a3c; }
[data-theme="dark"] .ex-bad { background: #2f1517; border-color: #6b2a2a; }
[data-theme="dark"] .ex-good .ex-label { color: #6ee7a8; }
[data-theme="dark"] .ex-bad .ex-label { color: #fca5a5; }
[data-theme="dark"] .notice { background: #2a2712; border-color: #5a5025; }
[data-theme="dark"] .notice p { color: #cfc9a0; }
[data-theme="dark"] .foot { background: #0b2523; }
