:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --text: #111827;
  --muted: #6e7681;
  --accent: #000000;
  --card-radius: 12px;
  --container: 1140px;
}
[data-theme="dark"] {
  --bg: #0b0b0b;
  --surface: #121212;
  --text: #e6e6e6;
  --muted: #9aa3ad;
  --accent: #ffffff;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.logo svg {
  width: 28px;
  height: 28px;
  opacity: 0.95;
}
.nav a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.hero {
  padding: 80px 0 56px;
  text-align: center;
}
.hero h1 {
  font-size: 40px;
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 17px;
}
.chips {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.chip {
  background: transparent;
  border: 1px solid var(--surface);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
}
.section {
  background: var(--surface);
  padding: 36px;
  border-radius: 16px;
  margin: 32px 0;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.tool-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.tool-card h3 {
  margin: 0;
  font-size: 18px;
}
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.post-card {
  background: var(--bg);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.post-card h4 {
  margin: 0 0 8px;
}
.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 48px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.tool-wrapper {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.tool-box {
  background: var(--bg);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 640px;
}
.field {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.select,
.input,
.button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  font-size: 15px;
  width: 100%;
}
.button {
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), transparent);
}
.theme-toggle {
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
}
@media (max-width: 720px) {
  .hero h1 {
    font-size: 28px;
  }
  .container {
    padding: 32px 16px;
  }
}

/* Cookie banner (minimal, matches your style) */
.ts-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 999;
  display: flex;
  justify-content: center;
  pointer-events: auto;
}
.ts-consent-inner {
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.06);
  width: calc(100% - 48px);
  max-width: 1140px;
}
.ts-consent-text {
  flex: 1;
  color: var(--text);
}
.ts-consent-desc {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.ts-consent-actions {
  display: flex;
  gap: 10px;
}
.ts-btn {
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  cursor: pointer;
}
.ts-btn.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: transparent;
}
.ts-btn.ghost {
  background: transparent;
  color: var(--muted);
}
[data-theme="dark"] .ts-consent-inner {
  background: var(--surface);
}

/* Typeahead styles */
.ta-box .ta-item {
  padding: 8px 12px;
  cursor: pointer;
}
.ta-box .ta-item:hover {
  background: rgba(0, 0, 0, 0.03);
}
.ta-empty {
  padding: 8px 12px;
  color: var(--muted);
}

/* Countdown ring animation smoothness */
#cd-ring {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Stopwatch display pulse */
#sw-display {
  transition: transform 0.06s linear;
}

/* Pomodoro progress transition */
#pm-ring {
  transition: stroke-dashoffset 0.4s linear;
}

/* Games modal styles */
.games-modal {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
}
.games-modal .choice {
  transition: background 0.12s ease;
}
#reaction-box {
  user-select: none;
}
/* =========================
   BLOG LAYOUT (SAFE)
========================= */

.blog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    display: none;
  }
}

/* =========================
   BLOG CONTENT
========================= */

.blog-article {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.blog-article section {
  margin-bottom: 44px;
}

/* Typography */
.blog-article h1 {
  font-size: 2.5rem;
  line-height: 1.25;
}

.blog-article h2 {
  font-size: 1.7rem;
  margin-top: 36px;
}

.blog-article p {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* =========================
   IMAGES (SAFE)
========================= */

.blog-image {
  margin: 36px auto;
  text-align: center;
}

.blog-image img {
  width: 960px;
  max-width: 100%;
  border-radius: 16px;
  display: block;
  margin: 0 auto;
}

.blog-image figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* =========================
   TOC
========================= */

.blog-sidebar {
  position: sticky;
  top: 96px;
}

.toc-card {
  padding: 18px;
  border-radius: 14px;
}

/* =========================
   ADS
========================= */

.ad-inline {
  margin: 42px 0;
  text-align: center;
}

.ad-placeholder {
  padding: 20px;
  border-radius: 14px;
  font-size: 0.85rem;
}
