/* ==========================================================================
   Focus Pomodoro — light theme
   ========================================================================== */

:root {
  --bg: #fbfaf7;
  --bg-soft: #f4f1ec;
  --surface: #ffffff;
  --ink: #1d1a17;
  --ink-2: #4a4540;
  --muted: #7a736b;
  --line: #ebe6df;
  --line-strong: #ddd6cc;

  --tomato: #e8483f;
  --tomato-600: #d23a31;
  --tomato-50: #fff1ef;
  --tomato-100: #ffe1dd;
  --green: #1f9d63;
  --green-50: #e9f8f0;
  --blue: #2f6fdf;
  --blue-50: #ecf2fe;

  --mode: var(--tomato);
  --mode-soft: var(--tomato-50);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(29, 26, 23, .05);
  --shadow: 0 1px 2px rgba(29, 26, 23, .04), 0 8px 24px -8px rgba(29, 26, 23, .10);
  --shadow-lg: 0 2px 4px rgba(29, 26, 23, .04), 0 24px 60px -16px rgba(29, 26, 23, .18);

  --font: "Montserrat", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1160px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tomato) 45%, transparent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--tomato-100); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }

/* Typography -------------------------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; color: var(--ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--tomato-600);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 12px; }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 18px; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 650; font-size: 16px; line-height: 1; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { --btn-bg: var(--tomato); }
.btn--primary:hover { --btn-bg: var(--tomato-600); box-shadow: 0 10px 24px -10px rgba(232, 72, 63, .6); }
.btn--ghost { --btn-bg: var(--surface); --btn-fg: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -0.02em; }
.logo svg { width: 32px; height: 32px; }
.logo span { color: var(--tomato); }

.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-list a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-size: 15px; font-weight: 550; color: var(--ink-2);
  transition: background-color .2s, color .2s;
}
.nav-list a:hover { background: var(--bg-soft); color: var(--ink); }
.nav-list a[aria-current="page"] { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 650; color: var(--ink-2); background: var(--surface);
}
.lang-switch:hover { color: var(--ink); border-color: var(--ink-2); }
.lang-switch svg { width: 16px; height: 16px; }

.nav-app { display: none; }
.nav-app a { align-items: center; justify-content: center; gap: 8px; font-weight: 650; }
.nav-app svg { width: 20px; height: 20px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface);
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); position: relative;
  transition: transform .25s var(--ease), background-color .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 20px 24px; box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .25s var(--ease), visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { padding: 12px 14px; font-size: 17px; border-radius: 12px; }
  .nav-app { display: block; margin-top: 10px; }
  .nav-list .nav-app a { display: flex; color: #fff; background: var(--tomato); padding: 14px; }
  .header-actions { margin-left: auto; }
}

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; padding: 56px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--mode) 16%, transparent), transparent 70%);
  transition: background .6s;
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -30% -15%; width: 560px; height: 560px; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 196, 120, .18), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 66px); letter-spacing: -0.035em; margin-top: 18px; }
.hero h1 em { font-style: normal; color: var(--tomato); }
.hero-lead { margin-top: 20px; font-size: 19px; color: var(--ink-2); max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 32px; color: var(--muted); font-size: 15px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--green); }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 550; color: var(--ink-2);
}
.badge b { padding: 3px 9px; border-radius: 999px; background: var(--tomato-50); color: var(--tomato-600); font-size: 12px; font-weight: 700; }

@media (max-width: 920px) {
  .hero { padding: 32px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Timer ------------------------------------------------------------------- */
.timer-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  padding: 22px 22px 26px;
}
.timer[data-mode="short"] { --mode: var(--green); --mode-soft: var(--green-50); }
.timer[data-mode="long"]  { --mode: var(--blue);  --mode-soft: var(--blue-50); }

.timer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mode-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-soft); }
.mode-tab {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 650; color: var(--muted);
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.mode-tab:hover { color: var(--ink); }
.mode-tab { white-space: nowrap; }
@media (max-width: 420px) {
  .timer-card { padding: 16px 14px 20px; }
  .mode-tab { padding: 8px 10px; font-size: 13px; }
}
.mode-tab[aria-selected="true"] { background: var(--surface); color: var(--mode); box-shadow: var(--shadow-sm); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); transition: color .2s, border-color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 20px; height: 20px; }

.timer-dial { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 22px auto 6px; }
.timer-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: var(--bg-soft); stroke-width: 10; }
.dial-progress {
  fill: none; stroke: var(--mode); stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset .35s linear, stroke .4s;
}
.dial-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.timer-time {
  font-size: clamp(56px, 13vw, 76px); font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.timer-label { margin-top: 10px; font-size: 14px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--mode); }

.session-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.session-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: background-color .3s, transform .3s; }
.session-dots i.is-done { background: var(--tomato); }

.timer-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.timer-main-btn {
  min-width: 156px; min-height: 58px; border-radius: 999px; border: 0;
  background: var(--mode); color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--mode) 80%, transparent);
  transition: transform .2s var(--ease), background-color .4s, box-shadow .2s;
}
.timer-main-btn:hover { transform: translateY(-1px); }
.timer-main-btn:active { transform: scale(.98); }

.timer-task { margin-top: 20px; }
.timer-task label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input:focus { outline: none; border-color: var(--mode); background: var(--surface); box-shadow: 0 0 0 4px var(--mode-soft); }
.timer-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.timer-stats > span { white-space: nowrap; }
@media (hover: none) { .kbd-hint { display: none; } }
.timer-stats strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.kbd-hint { font-size: 13px; }
kbd {
  font-family: var(--font-mono); font-size: 12px; padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--bg);
}

/* Settings dialog */
.dialog {
  width: min(100% - 32px, 440px); max-height: calc(100dvh - 32px); overflow: auto;
  margin: auto; inset: 0; /* the global margin reset removes the native centering */
  padding: 0; border: 0; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(29, 26, 23, .32); backdrop-filter: blur(3px); }
.dialog-inner { padding: 24px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dialog-head h2 { font-size: 22px; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.toggle-row:first-of-type { margin-top: 18px; }
.toggle-row span { font-weight: 550; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background-color .2s; }
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease);
}
.switch input:checked + i { background: var(--tomato); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--tomato) 45%, transparent); outline-offset: 2px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Sections ---------------------------------------------------------------- */
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 72px 0; }
@media (max-width: 720px) { .section { padding: 72px 0; } }

/* Feature cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--tomato-50); color: var(--tomato);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-icon.is-green { background: var(--green-50); color: var(--green); }
.feature-icon.is-blue { background: var(--blue-50); color: var(--blue); }
.feature h3 { font-size: 21px; margin-bottom: 8px; }
.feature p { color: var(--ink-2); }
@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr; } }

/* About intro */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; margin-bottom: 56px; }
.intro-grid p { color: var(--ink-2); font-size: 18px; }
.intro-grid p + p { margin-top: 14px; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; gap: 16px; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--tomato); margin-bottom: 36px;
}
.step::after {
  content: ""; position: absolute; top: 37px; left: 64px; right: 24px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 16px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Cycle visual */
.cycle { margin-top: 40px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.cycle-title { font-size: 14px; font-weight: 650; color: var(--muted); margin-bottom: 14px; }
.cycle-bar { display: flex; gap: 6px; height: 44px; }
.cycle-bar span {
  display: grid; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 650; color: #fff; min-width: 0; overflow: hidden;
}
.cycle-bar .w { flex: 25; background: var(--tomato); }
.cycle-bar .s { flex: 5; background: var(--green); }
.cycle-bar .l { flex: 20; background: var(--blue); }
.cycle-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.cycle-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cycle-legend i { width: 10px; height: 10px; border-radius: 3px; }

/* Presets */
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; }
.preset-btn {
  width: 100%; height: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px;
  padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.preset-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--tomato-100); }
.preset-btn.is-active { border-color: var(--tomato); box-shadow: 0 0 0 4px var(--tomato-50); }
.preset-time { font-size: 36px; font-weight: 800; letter-spacing: -0.04em; color: var(--tomato); line-height: 1.1; font-variant-numeric: tabular-nums; }
.preset-time small { font-size: 20px; color: var(--green); font-weight: 700; }
.preset-name { font-weight: 700; font-size: 17px; margin-top: 6px; }
.preset-desc { font-size: 14px; color: var(--muted); }
.presets-more { margin-top: 24px; }
.presets-more a { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--tomato-600); }
.presets-more svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .presets { grid-template-columns: repeat(2, 1fr); } }
.center-cta { text-align: center; margin-top: 40px; }
.center-cta .btn svg { width: 18px; height: 18px; }
.feed-link { margin-top: 10px !important; font-size: 15px !important; }
.feed-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.feed-link a:hover { color: var(--tomato-600); }
.feed-link svg { width: 16px; height: 16px; }
.blog-grid { padding-bottom: 96px; }
.post-card h2 { font-size: 20px; margin: 10px 0 8px; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; }

/* Blog cards */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-thumb {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background: var(--thumb-bg, linear-gradient(135deg, #ffe1dd, #fff4e6));
  color: var(--thumb-fg, var(--tomato));
}
.post-thumb svg { width: 64px; height: 64px; transition: transform .5s var(--ease); }
.post-card:hover .post-thumb svg { transform: scale(1.08) rotate(-3deg); }
.post-thumb::after {
  content: ""; position: absolute; width: 180%; height: 180%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), transparent 40%);
}
.thumb-1 { --thumb-bg: linear-gradient(135deg, #ffe1dd, #ffeccf); --thumb-fg: #d23a31; }
.thumb-2 { --thumb-bg: linear-gradient(135deg, #e3eefe, #eaf7ff); --thumb-fg: #2f6fdf; }
.thumb-3 { --thumb-bg: linear-gradient(135deg, #f2e8ff, #ffe8f1); --thumb-fg: #8b46d6; }
.thumb-4 { --thumb-bg: linear-gradient(135deg, #dff6ea, #f1fbe2); --thumb-fg: #1f9d63; }
.thumb-5 { --thumb-bg: linear-gradient(135deg, #fff1cc, #ffe5d6); --thumb-fg: #c26a00; }
.thumb-6 { --thumb-bg: linear-gradient(135deg, #e0f4f7, #e8eefe); --thumb-fg: #0f8aa0; }
.thumb-7 { --thumb-bg: linear-gradient(135deg, #ffe8de, #fff6d9); --thumb-fg: #e05a2a; }
.thumb-8 { --thumb-bg: linear-gradient(135deg, #e9e7ff, #e3f3ff); --thumb-fg: #5146d6; }
.post-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tomato-600); }
.post-card h3 { font-size: 20px; margin: 10px 0 8px; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card p { color: var(--ink-2); font-size: 16px; }
.read-more { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 15px; color: var(--ink); }
.read-more svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.post-card:hover .read-more svg { transform: translateX(3px); }
@media (max-width: 960px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .posts { grid-template-columns: 1fr; } }

/* App section */
.app-panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  padding: 56px; border-radius: var(--radius-xl);
  background: linear-gradient(140deg, #fff 0%, #fff6f2 55%, #ffe9e3 100%);
  border: 1px solid var(--line);
}
.app-panel h2 { font-size: clamp(30px, 4vw, 42px); margin-top: 12px; }
.app-panel > div > p { margin-top: 14px; color: var(--ink-2); font-size: 18px; max-width: 480px; }
.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 24px 0 30px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-weight: 550; }
.check-list svg { width: 20px; height: 20px; flex: none; color: var(--green); }
.app-store-btn { min-height: 56px; padding: 0 22px 0 18px; }
.app-store-btn svg { width: 26px; height: 26px; }
.app-store-btn small { display: block; font-size: 11px; font-weight: 500; opacity: .75; line-height: 1.1; }
.app-store-btn strong { display: block; font-size: 18px; line-height: 1.15; }
.app-store-btn .stack { text-align: left; }

.phone {
  justify-self: center; position: relative; width: 248px; aspect-ratio: 9 / 19; border-radius: 42px;
  padding: 10px; background: #1d1a17; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.06);
  transform: rotate(4deg);
}
.phone-screen {
  height: 100%; border-radius: 33px; overflow: hidden; display: grid; place-content: center; text-align: center; gap: 12px;
  background: linear-gradient(160deg, #ff8a5b 0%, #e8483f 55%, #b92a4a 100%); color: #fff;
}
.phone-screen::before {
  content: ""; position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 80px; height: 22px; border-radius: 20px; background: #1d1a17;
}
.phone-time { font-size: 54px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.phone-label { font-size: 13px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.phone-btn { justify-self: center; margin-top: 10px; padding: 10px 26px; border-radius: 999px; background: rgba(255,255,255,.95); color: #e8483f; font-weight: 700; font-size: 14px; }
@media (max-width: 920px) {
  .app-panel { grid-template-columns: 1fr; padding: 36px 24px; }
  .phone { width: 210px; }
}
@media (max-width: 480px) { .check-list { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px; cursor: pointer; font-size: 19px; font-weight: 650; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1a17' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform .25s var(--ease), background-color .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--tomato-50); }
.faq .answer { padding: 0 4px 24px; color: var(--ink-2); max-width: 720px; }
.faq .answer a { color: var(--tomato-600); text-decoration: underline; text-underline-offset: 3px; }

/* CTA band */
.cta-band {
  text-align: center; padding: 64px 24px; border-radius: var(--radius-xl);
  background: var(--ink); color: #fff; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: -40% auto auto 50%; translate: -50% 0; width: 600px; height: 600px;
  background: radial-gradient(closest-side, rgba(232, 72, 63, .45), transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(28px, 4vw, 40px); }
.cta-band p { margin: 12px auto 28px; color: rgba(255,255,255,.75); max-width: 520px; font-size: 18px; }

/* Article ----------------------------------------------------------------- */
.breadcrumb { padding-top: 28px; font-size: 14px; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb [aria-current] { color: var(--ink-2); }

.article-head { max-width: 760px; margin: 0 auto; padding: 40px 0 32px; text-align: center; }
.article-head h1 { font-size: clamp(34px, 5.4vw, 54px); letter-spacing: -0.035em; margin: 14px 0 18px; }
.article-head .lead { font-size: 20px; color: var(--ink-2); }
.article-head .post-meta { justify-content: center; margin-top: 22px; font-size: 14px; }
.article-hero { max-width: 960px; margin: 0 auto 48px; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.article-hero img { width: 100%; height: auto; aspect-ratio: 1200 / 630; }

.article-layout { display: grid; grid-template-columns: 1fr minmax(0, 720px) 1fr; gap: 40px; }
.article-layout > .prose { grid-column: 2; }
.toc { grid-column: 3; align-self: start; position: sticky; top: calc(var(--header-h) + 24px); font-size: 14px; max-width: 240px; }
.toc p { font-weight: 700; margin-bottom: 10px; color: var(--ink); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.toc ol { list-style: none; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.4; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--tomato-600); border-left-color: var(--tomato); }
@media (max-width: 1180px) {
  .article-layout { grid-template-columns: minmax(0, 720px); justify-content: center; }
  .article-layout > .prose { grid-column: 1; }
  .toc { display: none; }
}

.prose { font-size: 18.5px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 28px; color: var(--ink); margin-top: 2em; letter-spacing: -0.025em; }
.prose h3 { font-size: 22px; color: var(--ink); margin-top: 1.6em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--tomato-600); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 28px; }
.prose li + li { margin-top: .55em; }
.prose ul li::before {
  content: ""; position: absolute; left: 6px; top: .72em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--tomato); box-shadow: 0 0 0 4px var(--tomato-50);
}
.prose blockquote {
  padding: 20px 24px; border-radius: var(--radius); background: var(--tomato-50); border-left: 4px solid var(--tomato);
  color: var(--ink); font-size: 19px; font-weight: 500;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; overflow-x: auto; }
.prose thead { background: var(--bg-soft); }
.prose th, .prose td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose td:last-child, .prose th:last-child { white-space: normal; min-width: 200px; width: 100%; }
.prose th { color: var(--ink); font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose ol { counter-reset: ol; }
.prose ol > li { counter-increment: ol; padding-left: 40px; }
.prose ol > li::before {
  content: counter(ol); position: absolute; left: 0; top: .15em; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--tomato-600); background: var(--tomato-50);
}
.prose .callout { padding: 22px 24px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }

.app-inline {
  display: flex; align-items: center; gap: 20px; margin-top: 48px; padding: 24px; border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #fff, #fff1ec); border: 1px solid var(--tomato-100);
}
.app-inline-icon { flex: none; width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(160deg, #ff8a5b, #e8483f); display: grid; place-items: center; color: #fff; }
.app-inline-icon svg { width: 34px; height: 34px; }
.app-inline h2, .app-inline .app-inline-title { font-size: 19px; color: var(--ink); margin: 0; font-weight: 750; letter-spacing: -0.02em; }
.app-inline p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.app-inline .btn { margin-left: auto; }
@media (max-width: 640px) { .app-inline { flex-wrap: wrap; } .app-inline .btn { margin-left: 0; width: 100%; } }

.article-foot { max-width: 720px; margin: 48px auto 0; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.share { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }

/* Simple pages */
.page-head { padding: 48px 0 24px; max-width: 760px; }
.page-head h1 { font-size: clamp(34px, 5vw, 50px); margin-top: 12px; }
.page-head p { margin-top: 14px; font-size: 19px; color: var(--ink-2); }
.page-body { max-width: 760px; padding-bottom: 96px; }

/* 404 */
.notfound { text-align: center; padding: 120px 0; }
.notfound .code { font-size: clamp(90px, 18vw, 160px); font-weight: 800; letter-spacing: -0.06em; line-height: 1; color: var(--tomato); }
.notfound h1 { font-size: 32px; margin-top: 12px; }
.notfound p { color: var(--ink-2); margin: 12px auto 28px; max-width: 460px; }

/* Footer ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 64px 0 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 14px; color: var(--muted); font-size: 15px; max-width: 300px; }
.footer-col h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: var(--ink-2); font-size: 15px; }
.footer-col a:hover { color: var(--tomato-600); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* App promo toast (non-blocking) ----------------------------------------- */
.app-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(100% - 40px, 360px);
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateY(16px); opacity: 0; visibility: hidden;
  transition: transform .35s var(--ease), opacity .35s, visibility .35s;
}
.app-toast.is-visible { transform: none; opacity: 1; visibility: visible; }
.app-toast .app-inline-icon { width: 48px; height: 48px; border-radius: 12px; }
.app-toast .app-inline-icon svg { width: 26px; height: 26px; }
.app-toast strong { display: block; font-size: 16px; letter-spacing: -0.01em; }
.app-toast p { font-size: 14px; color: var(--ink-2); line-height: 1.45; margin: 2px 0 10px; }
.app-toast .close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; background: transparent; }
@media (max-width: 520px) { .app-toast { right: 12px; left: 12px; bottom: 12px; width: auto; } }

/* Reveal ------------------------------------------------------------------ */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
