/* DayCounter design system — coordinated pass v2.
   Radii: 3 tiers only (--r-lg 22 / --r 14 / pill 999). One card language. One shadow story. */
:root {
  --r-lg: 22px; --r: 14px; --r-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f7fbf8; --ink: #0f1f17; --muted: #55685e;
  --surface: rgba(255,255,255,.9);
  --accent: #12a15c; --accent-2: #0b7a43; --accent-strong: #085a32;
  --accent-soft: rgba(18,161,92,.1);
  --border: rgba(15,31,23,.09);
  --glow1: rgba(18,161,92,.1); --glow2: rgba(64,196,132,.09);
  --shadow-sm: 0 6px 18px -10px rgba(11,122,67,.18);
  --shadow: 0 22px 50px -28px rgba(11,122,67,.35);
  --danger: #c2453a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* ambient orbs — two, symmetric, subtle */
.orb { position: fixed; border-radius: 50%; filter: blur(110px); pointer-events: none; z-index: 0; }
.orb-1 { width: 460px; height: 460px; top: -160px; right: -120px; background: var(--glow1); }
.orb-2 { width: 420px; height: 420px; bottom: -160px; left: -140px; background: var(--glow2); }
.orb-3 { display: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 26px; position: relative; z-index: 1; }

/* ── nav ─────────────────────────────────────────── */
nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(247,251,248,.82); border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.2px; color: var(--ink); text-decoration: none; }
.logo .badge { width: 32px; height: 32px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px -6px var(--accent-2); }
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 7px 13px; border-radius: var(--r-sm); transition: .15s; }
.nav-links a:hover { color: var(--ink); background: var(--accent-soft); }
.langsel { font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm); padding: 7px 10px; }

/* ── hero ────────────────────────────────────────── */
header.hero { text-align: center; padding: 92px 0 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: var(--accent-strong); background: var(--accent-soft); border: 1px solid var(--border); padding: 7px 16px; border-radius: 999px; }
.eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .45; transform: scale(1.5);} }
h1.hero-title { font-size: clamp(40px, 6vw, 62px); font-weight: 850; letter-spacing: -.035em; line-height: 1.06; margin: 22px auto 16px; max-width: 780px; }
.grad { background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shine 5s linear infinite; }
@keyframes shine { to { background-position: 200% 0; } }
.sub { color: var(--muted); font-size: 17.5px; max-width: 620px; margin: 0 auto 32px; }
.ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── buttons (one system: 48px main / 36px small) ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 15.5px; font-weight: 700; padding: 0 28px; height: 48px; border-radius: var(--r); cursor: pointer; border: 1px solid transparent; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; font-family: var(--font); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.btn.pri { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 12px 26px -12px var(--accent-2); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn.small { font-size: 13.5px; height: 36px; padding: 0 16px; border-radius: var(--r-sm); }
.trust { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 34px; color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* ── widget card (toolcard) ──────────────────────── */
.toolcard { margin: 48px auto 0; background: var(--surface); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; max-width: 880px; position: relative; }
.toolcard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent)); opacity: .9; }
.tabs { display: flex; gap: 6px; padding: 16px 16px 0; }
.tab { flex: 1; text-align: center; padding: 14px 8px; font-size: 15px; font-weight: 700; color: var(--muted); border: none; background: transparent; cursor: pointer; border-radius: var(--r) var(--r) 0 0; border-bottom: 2px solid transparent; transition: .15s; font-family: var(--font); }
.tab.active { color: var(--accent-strong); background: var(--accent-soft); border-bottom-color: var(--accent); }
.panel { display: none; padding: 34px 36px 40px; }
.panel.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input[type=date], .field input[type=number], .field input[type=text], .field select { font-size: 16px; font-family: var(--font); padding: 11px 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--bg); color: var(--ink); min-width: 178px; }
.field input:focus, .field select:focus, .hg textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding-bottom: 12px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.result { text-align: center; margin-top: 30px; }
.big-num { font-size: clamp(56px, 9vw, 82px); font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; background: linear-gradient(180deg, var(--ink) 30%, var(--accent-strong)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.big-unit { font-size: 20px; font-weight: 750; color: var(--accent); margin-left: 10px; }
.breakdown { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.bchip { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--accent-soft); border: 1px solid var(--border); border-radius: 999px; padding: 7px 15px; }
.bchip b { color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.chip { font-size: 14px; font-weight: 600; padding: 8px 17px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); cursor: pointer; transition: all .15s; font-family: var(--font); }
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.chip.sel { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px var(--accent-2); }
.rings { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.ring { position: relative; width: 78px; height: 78px; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: var(--border); }
.ring .fill { stroke: var(--accent); transition: stroke-dashoffset .6s ease; }
.ring.done .fill { stroke: var(--accent-2); }
.ring .lab { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .lab .d { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.ring .lab .t { font-size: 10px; color: var(--muted); font-weight: 700; margin-top: 1px; }
.ring.done .lab .d { color: var(--accent-strong); }
.next-up { margin-top: 18px; font-size: 14.5px; color: var(--muted); text-align: center; }
.next-up b { color: var(--accent-strong); }
.tool-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(194,69,58,.4); }

/* ── tool / guide page (wide column — title, widget, prose share one left edge) ── */
.tool-page { padding: 46px 0 20px; }
.tool-page .toolcard { max-width: none; margin: 26px 0 0; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumb a { color: var(--accent); text-decoration: none; }
.tool-page h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 850; letter-spacing: -.025em; line-height: 1.15; max-width: none; }
.tool-page .tagline { color: var(--muted); font-size: 17px; margin-top: 12px; max-width: 640px; }
.prose { max-width: 780px; margin: 40px 0 0; }
.prose h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; margin: 30px 0 10px; }
.prose p { color: var(--muted); font-size: 15.5px; margin-bottom: 14px; }
.prose ul { color: var(--muted); font-size: 15.5px; margin: 0 0 14px 22px; }
.prose li { margin-bottom: 6px; }
.related { margin-top: 40px; }
.related h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.related-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.related-grid a { font-size: 13.5px; font-weight: 650; color: var(--accent-strong); background: var(--accent-soft); border: 1px solid var(--border); border-radius: 999px; padding: 8px 15px; text-decoration: none; transition: .15s; }
.related-grid a:hover { background: var(--accent); color: #fff; }

/* ── home sections (one rhythm: 76px) ────────────── */
section.langs, section.clusters, section.faq { padding: 76px 0 0; }
section.langs, section.clusters { text-align: center; }
section.faq { max-width: 720px; margin-left: auto; margin-right: auto; }
.sec-title { font-size: clamp(26px, 3.6vw, 34px); font-weight: 850; letter-spacing: -.025em; }
.sec-sub { color: var(--muted); margin: 10px auto 34px; max-width: 560px; font-size: 16px; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.lang { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 14px; transition: .15s; text-align: left; }
.lang:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.lang .n { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.lang .s { font-size: 14.5px; font-weight: 650; margin-top: 4px; line-height: 1.4; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 16px; margin-top: 30px; text-align: left; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 26px; transition: transform .18s, box-shadow .18s, border-color .18s; position: relative; overflow: hidden; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: var(--accent); }
.card .ic { width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 16px; }
.card h3 { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; }
.card .cnt { font-size: 12px; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.card p { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; text-decoration: none; transition: .15s; }
.tag:hover { border-color: var(--accent); color: var(--accent-strong); }
.mini { margin-top: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--border); font-size: 13px; }
.mini .row { display: flex; justify-content: space-between; color: var(--muted); font-weight: 650; }
.mini .row b { color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.mini .bar { height: 7px; border-radius: 99px; background: var(--border); margin-top: 8px; overflow: hidden; }
.mini .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s ease; }
.stats { display: flex; gap: 34px; flex-wrap: wrap; justify-content: center; margin: 76px auto 0; padding: 32px 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); max-width: 880px; }
.stat { text-align: center; min-width: 120px; }
.stat .v { font-size: 30px; font-weight: 850; color: var(--accent-strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 650; margin-top: 3px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 22px; margin-bottom: 10px; text-align: left; transition: border-color .15s; }
details:hover, details[open] { border-color: rgba(18,161,92,.4); }
summary { cursor: pointer; font-weight: 750; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::after { content: '+'; font-size: 20px; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: '−'; }
details p { color: var(--muted); font-size: 14.5px; margin-top: 10px; }

/* ── quiz ────────────────────────────────────────── */
.quiz { max-width: 640px; margin: 0 auto; }
.quiz .progress { display: flex; gap: 7px; margin-bottom: 22px; }
.quiz .progress span { flex: 1; height: 6px; border-radius: 99px; background: var(--border); }
.quiz .progress span.on { background: var(--accent); }
.quiz .q { font-size: 19px; font-weight: 750; margin-bottom: 18px; line-height: 1.35; }
.quiz .opts { display: flex; flex-direction: column; gap: 10px; }
.quiz .opt { text-align: left; font-size: 15px; font-weight: 600; padding: 15px 18px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; transition: .15s; font-family: var(--font); }
.quiz .opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz .back { margin-top: 18px; background: transparent; border: none; color: var(--muted); font-size: 14px; cursor: pointer; font-family: var(--font); }
.quiz .tier-badge { display: inline-block; font-size: 14px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); padding: 8px 20px; border-radius: 999px; margin-bottom: 14px; }
.quiz .tier-text { color: var(--muted); font-size: 15.5px; margin-bottom: 20px; text-align: left; }
.quiz-note { margin-top: 26px; padding: 14px 18px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--border); color: var(--muted); font-size: 13.5px; }

/* ── hostsgen ────────────────────────────────────── */
.hg textarea { width: 100%; min-height: 120px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--bg); color: var(--ink); resize: vertical; }

/* ── extras modules (savings / urge log / phase plan / check-in grid) ── */
.extras { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.extras:empty { display: none; }
.ex-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; width: 100%; max-width: 640px; }
.ex-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 12px; }
.ex-inputs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.ex-inputs .field input { min-width: 0; width: 130px; }
.ex-out { text-align: center; color: var(--muted); font-size: 15px; }
.ex-out b { color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.urge-bars { display: flex; gap: 8px; align-items: flex-end; justify-content: center; height: 74px; margin-top: 14px; }
.urge-bars .u { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 30px; }
.urge-bars .u i { display: block; width: 14px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent), var(--accent-2)); min-height: 3px; transition: height .3s; }
.urge-bars .u span { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.urge-bars .u.today i { outline: 2px solid var(--accent); outline-offset: 2px; }
.urge-bars .u.today span { color: var(--accent-strong); }
.grid30 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 440px; margin: 0 auto; }
.grid30 .g { aspect-ratio: 1; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 800; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; font-family: var(--font); padding: 0; }
.grid30 .g.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.grid30 .g.today { border: 2px solid var(--accent); color: var(--accent-strong); }
.grid30 .g.today.on { color: #fff; }
.grid30 .g.future { opacity: .35; cursor: default; }
.grid30 .g:hover:not(.future) { transform: translateY(-2px); }
.phase-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.phase-pill { font-size: 12.5px; font-weight: 700; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); }
.phase-pill.cur { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.phase-pill.done { color: var(--accent-strong); border-color: var(--accent); }

/* ── inline feedback ─────────────────────────────── */
.qt-msg { display: none; margin-top: 16px; padding: 11px 16px; border-radius: var(--r); background: rgba(18,161,92,.1); color: var(--accent-strong); font-size: 14px; }
.qt-msg.show { display: block; }
.btn.danger { border-color: #dc2626 !important; color: #dc2626 !important; background: rgba(220,38,38,.08) !important; }

/* ── footer ──────────────────────────────────────── */
footer { margin-top: 96px; border-top: 1px solid var(--border); padding: 46px 0 54px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; color: var(--muted); font-size: 13.5px; }
.foot-grid h4 { color: var(--ink); font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.foot-grid a { color: var(--muted); text-decoration: none; display: block; margin-bottom: 6px; }
.foot-grid a:hover { color: var(--accent); }
.disc { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12.5px; text-align: center; max-width: 700px; margin-left: auto; margin-right: auto; }

/* ── mobile ──────────────────────────────────────── */
@media (max-width: 680px) {
  header.hero { padding: 64px 0 8px; }
  .nav-links { display: none; }
  .panel { padding: 24px 18px 30px; }
  .field-row { flex-direction: column; align-items: stretch; }
  .field input { width: 100%; min-width: 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .tool-page { padding: 30px 0 10px; }
  .stats { padding: 26px 22px; gap: 22px; }
  section.langs, section.clusters, section.faq { padding: 60px 0 0; }
}
