/* Space Grotesk (SIL OFL 1.1, see /fonts/OFL.txt) — self-hosted variable font, 400–700.
   Only the latin / latin-ext ranges are shipped; the browser downloads a file when needed. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --black: #000;
  --white: #fff;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-500: #767676; /* min WCAG AA contrast on white */
  --border: 1px solid #000;
  --border-light: 1px solid #e0e0e0;

  /* Site-chrome theme tokens — used by nav/footer/content pages, and by the
     Meeting/Focus Timer and 20-20-20 Eye Rest surfaces + Resolution Checker
     readout, which follow the site theme rather than staying fixed black.
     Literal-colour tool OUTPUT surfaces (white/black/colour screen, pixel
     test, floating bar, cookie banner) intentionally keep using
     --black/--white directly above, so they never change with the site
     theme. */
  --ink: #000;
  --paper: #fff;
  --ink-rgb: 0,0,0;
  --paper-rgb: 255,255,255;
  --muted: #767676;
  --muted-bg: #f5f5f5;
  --border-c: 1px solid var(--ink);
  --border-light-c: 1px solid #e0e0e0;
  --prose-text: #333;
  --code-bg: #f5f5f5;
  --nav-h: 69px; /* header height before js measures it; keeps the tool area from jumping */
  --warn: #8a5200; /* amber for warnings/overruns; AA on both light surfaces */
  --danger: #c42b2b; /* meeting overrun */
  --ok: #1b7a43; /* eye-rest break ring */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2f2f2;
    --paper: #0b0b0b;
    --ink-rgb: 242,242,242;
    --paper-rgb: 11,11,11;
    --muted: #9a9a9a;
    --muted-bg: #171717;
    --border-c: 1px solid #f2f2f2;
    --border-light-c: 1px solid #2a2a2a;
    --prose-text: #c9c9c9;
    --code-bg: #171717;
  --warn: #e5a34a;
  --danger: #e35555;
  --ok: #6fcf97;
  }
}
:root[data-theme="dark"] {
  --ink: #f2f2f2;
  --paper: #0b0b0b;
  --ink-rgb: 242,242,242;
  --paper-rgb: 11,11,11;
  --muted: #9a9a9a;
  --muted-bg: #171717;
  --border-c: 1px solid #f2f2f2;
  --border-light-c: 1px solid #2a2a2a;
  --prose-text: #c9c9c9;
  --code-bg: #171717;
  --warn: #e5a34a;
  --danger: #e35555;
  --ok: #6fcf97;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* ─── Navigation ─────────────────────────────── */
.site-nav {
  border-bottom: var(--border-c);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 200;
}

.nav-brand {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.nav-brand .logo-icon {
  font-size: .875rem;
  font-style: normal;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .4rem .75rem;
  display: block;
  border-left: var(--border-c);
  transition: background .1s;
}

.nav-links li:last-child a { border-right: var(--border-c); }
.nav-links a:hover, .nav-links a.active {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  background: none;
  border: var(--border-c);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: .3rem .6rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.nav-utility { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* the home page has no wordmark in its header; an empty block of the same width keeps the
   links in the same place as on every other page */
@media (min-width: 861px) {
  .site-nav:not(:has(.nav-brand))::before { content: ""; flex: none; width: 130px; }
}
/* ─── Language picker / More Tools / Theme toggle (shared dropdown pattern) ── */
#lang-picker, #more-tools, #theme-picker { position: relative; flex-shrink: 0; }
/* these are filled in by js: reserve their size so the header doesn't shift when they appear */
#lang-picker { min-width: 5.9rem; }
#more-tools { min-width: 6.2rem; }
#lang-picker .lang-toggle, #more-tools .more-tools-toggle { width: 100%; justify-content: center; }
@media (max-width: 860px) { #lang-picker { min-width: 3.7rem; } }

.lang-toggle, .more-tools-toggle, .theme-toggle, .install-btn {
  background: none;
  border: var(--border-c);
  cursor: pointer;
  padding: .3rem .6rem;
  font-size: .625rem;
  font-weight: 700;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink);
  min-width: 2.5rem;
  text-align: center;
}
.lang-toggle:hover, .more-tools-toggle:hover, .theme-toggle:hover, .install-btn:hover { background: var(--ink); color: var(--paper); }

.theme-toggle { min-width: auto; padding: .3rem .5rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.lang-toggle { display: inline-flex; align-items: center; gap: .45rem; }
.lang-toggle .lang-code { display: none; }
.install-btn { display: none; }
.install-btn.visible { display: inline-block; }

.lang-menu, .more-tools-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  background: var(--paper);
  border: var(--border-c);
  list-style: none;
  z-index: 500;
  min-width: 200px;
  max-height: min(80vh, 700px);
  overflow-y: auto;
}
.more-tools-menu { width: min(660px, calc(100vw - 2rem)); max-height: none; overflow: visible; padding: 1.25rem 1.5rem 1.5rem; }
.lang-menu.open { display: block; }
.more-tools-menu.open { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.lang-menu li { border-bottom: var(--border-light-c); }
.lang-menu li:last-child { border-bottom: none; }
.lang-menu button {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 44px;
  padding: .55rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
}
.lang-menu button:hover { background: var(--muted-bg); }
.lang-menu button[aria-current] { background: var(--ink); color: var(--paper); font-weight: 700; }
.theme-menu { min-width: 180px; }

/* grouped tool list — shared by the desktop "All tools" panel and the phone Menu */
.tools-group ul { list-style: none; }
.tools-group-title {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--prose-text);
  padding-bottom: .5rem;
  margin-bottom: .25rem;
  border-bottom: var(--border-light-c);
}
.tools-group a {
  display: block;
  padding: .5rem .5rem;
  margin: 0 -.5rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.tools-group a:hover { background: var(--muted-bg); }
.tools-group a[aria-current="page"] { font-weight: 700; box-shadow: inset 2px 0 0 var(--ink); padding-left: .75rem; }

.nav-all-panel { display: none; }

@media (max-width: 860px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: var(--border-c);
    z-index: 200;
  }
  .nav-links li:last-child a { border-right: none; }
  .nav-links a {
    border-left: none;
    border-top: var(--border-light-c);
    padding: .875rem 2rem;
  }
  /* on phones the Menu shows every tool in groups, so the quick links and
     the separate All-tools button step aside */
  .nav-links, .nav-links.open { display: none; }
  .nav-links.open ~ .nav-all-panel { display: block; }
  .nav-all-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: var(--border-c);
    z-index: 200;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-all-panel .tools-group-title { padding: .9rem 1rem .5rem; margin: 0; border-bottom: 0; background: var(--muted-bg); }
  .nav-all-panel .tools-group a { margin: 0; padding: .75rem 1rem; min-height: 48px; border-top: var(--border-light-c); }
  .nav-all-panel .tools-group a[aria-current="page"] { padding-left: 1rem; }
  #more-tools { display: none; }
  .lang-toggle .lang-name { display: none; }
  .lang-toggle .lang-code { display: inline; }
  .nav-toggle { display: block; }
  .site-nav { position: relative; flex-wrap: wrap; padding: .75rem 1rem; gap: .5rem; }
  .nav-utility { margin-left: auto; }
}
@media (max-width: 420px) {
  .nav-brand { font-size: .875rem; letter-spacing: .08em; }
  .site-nav { gap: .4rem; }
  .nav-toggle { padding-left: .5rem; padding-right: .5rem; }

  .lang-menu, .more-tools-menu { right: 0; left: auto; }
}

/* ─── Layout ─────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Hero / Masthead ────────────────────────── */
.hero {
  padding: 2.5vw 2rem 0;
  border-bottom: var(--border-c);
}

.hero-title {
  max-width: 1200px;
  margin: 0 auto 2.5vw;
  font-size: clamp(3.5rem, 14vw, 13rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: .95;
}

.hero-meta {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 1.5rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-desc {
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 500;
  max-width: 380px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 0;
}

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
  border: var(--border-c);
  cursor: pointer;
  transition: background .1s, color .1s;
  font-family: inherit;
  white-space: nowrap;
}

.btn + .btn { border-left: none; }
.btn:hover { background: var(--ink); color: var(--paper); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { opacity: .8; }

.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ─── Tool index (numbered contents list) ────── */
.tool-index-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: var(--border-light-c);
  padding: 1.25rem 0;
  text-decoration: none;
  color: var(--ink);
  transition: background .1s;
  gap: 2rem;
}

.tool-index-row:hover {
  background: var(--ink);
  color: var(--paper);
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
}

.tool-index-row:hover .tool-index-num,
.tool-index-row:hover .tool-index-sub { color: rgba(128,128,128,.7); }

.tool-index-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.tool-index-name {
  overflow-wrap: anywhere;
  hyphens: auto;
  font-size: clamp(1.1rem, 2.6vw, 2.25rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.1;
}

.tool-index-sub {
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.tool-index-num {
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  text-align: right;
}

/* group headings inside the directory */
.tool-index-group { margin-top: 2.5rem; }
.tool-index-group:first-child { margin-top: 0; }
.tool-index-group-title {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--prose-text);
  padding-bottom: .75rem;
  border-bottom: var(--border-c);
}
.tool-index-group .tool-index-row:last-child { border-bottom: 0; }

/* ─── Tool thumbnails (pure CSS; decorative) ─── */
.tool-thumb {
  display: block;
  width: 104px;
  height: 65px;
  flex-shrink: 0;
  border: 1px solid rgba(128,128,128,.45);
  background-color: #000;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.thumb-lg { width: 100%; height: auto; aspect-ratio: 16 / 10; }
@media (max-width: 600px) { .tool-index-row { gap: 1rem; } .tool-index-row .tool-thumb { width: 80px; height: 50px; } }
.thumb-white { background-image: url(../img/thumbs/white.svg); }
.thumb-black { background-image: url(../img/thumbs/black.svg); }
.thumb-colour { background-image: url(../img/thumbs/colour.svg); }
.thumb-night { background-image: url(../img/thumbs/night.svg); }
.thumb-focus { background-image: url(../img/thumbs/focus.svg); }
.thumb-meeting { background-image: url(../img/thumbs/meeting.svg); }
.thumb-eye { background-image: url(../img/thumbs/eye.svg); }
.thumb-res { background-image: url(../img/thumbs/res.svg); }
.thumb-pixel { background-image: url(../img/thumbs/pixel.svg); }
.thumb-uni { background-image: url(../img/thumbs/uni.svg); }
.thumb-refresh { background-image: url(../img/thumbs/refresh.svg); }
.thumb-burnin { background-image: url(../img/thumbs/burnin.svg); }
.thumb-contrast { background-image: url(../img/thumbs/contrast.svg); }
.thumb-banding { background-image: url(../img/thumbs/banding.svg); }

/* ─── Featured tools strip (home) ────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
}
.featured-card, .related-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .75rem .75rem 1rem;
  border: var(--border-light-c);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.featured-card:hover, .related-card:hover { border-color: var(--ink); background: var(--muted-bg); }
.featured-card .tool-thumb, .related-card .tool-thumb { margin-bottom: .5rem; }
.featured-name, .related-name { font-size: .9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.featured-sub, .related-sub { font-size: .6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) { .featured-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── Related tools (tool pages) ─────────────── */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.25rem; }
.related-card .tool-thumb { width: 100%; height: auto; aspect-ratio: 16 / 7; }
@media (max-width: 720px) {
  .related-grid { grid-template-columns: 1fr; }
  .related-card { display: grid; grid-template-columns: 72px 1fr; column-gap: 1rem; row-gap: .15rem; align-content: center; }
  .related-card .tool-thumb { width: 72px; height: 48px; aspect-ratio: auto; margin: 0; grid-row: 1 / 3; }
}

/* ─── Section headers ────────────────────────── */
.section { padding: 4rem 0; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: var(--border-c);
  padding-bottom: .75rem;
  margin-bottom: 2rem;
  gap: 1rem;
}

.section-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.section-count {
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ─── Use cases grid ─────────────────────────── */
.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  border-left: var(--border-c);
  border-top: var(--border-c);
}

.use-case {
  border-right: var(--border-c);
  border-bottom: var(--border-c);
  padding: 1.5rem;
}

.use-case .uc-num {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: .75rem;
  display: block;
}

.use-case h3 {
  font-size: .9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .625rem;
}

.use-case p {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 500;
}

/* ─── Tips grid ──────────────────────────────── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  border-left: var(--border-c);
  border-top: var(--border-c);
  margin-top: 1.5rem;
}

.tip-card {
  border-right: var(--border-c);
  border-bottom: var(--border-c);
  padding: 1.5rem;
}

.tip-card h3 {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .5rem;
}

.tip-card p {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 500;
}

/* ─── FAQ ────────────────────────────────────── */
.faq-item { border-bottom: var(--border-light-c); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.25rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink);
  gap: 2rem;
  font-family: inherit;
}

.faq-question .faq-arrow {
  font-size: .6875rem;
  color: var(--muted);
  transition: transform .2s;
  flex-shrink: 0;
}

.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding-bottom: 1.25rem;
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 500;
  max-width: 680px;
}

.faq-item.open .faq-answer { display: block; }

/* ─── Footer ─────────────────────────────────── */
footer {
  border-top: var(--border-c);
  padding: 3rem 2rem;
  margin-top: 6rem;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: var(--border-light-c);
  align-items: start;
}

.footer-brand-name {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-decoration: none;
  color: var(--ink);
  display: block;
  margin-bottom: .5rem;
}

.footer-tagline {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 500;
}

.footer-cols { display: flex; gap: 4rem; flex-wrap: wrap; }

.footer-col h3 {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 1rem;
  color: var(--muted);
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }

.footer-col a {
  color: var(--ink);
  text-decoration: none;
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color .1s;
}
.footer-col a:hover { color: var(--muted); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ─── Tool viewport ──────────────────────────── */
.tool-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tool-surface {
  position: absolute;
  inset: 0;
}

.tool-surface:fullscreen,
.tool-surface:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}

/* Used by tools whose visible content (readouts, grids, markers) lives as
   siblings of .tool-surface rather than inside it — fullscreening just the
   surface would hide that content, so the whole viewport goes fullscreen. */
.tool-viewport:fullscreen,
.tool-viewport:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}

/* Fallback "fullscreen" for browsers with no element Fullscreen API
   (notably iOS Safari, which never supports it outside <video>). Expands
   the tool viewport to fill the screen and hides the rest of the page. */
html.st-fake-fullscreen,
html.st-fake-fullscreen body {
  height: 100%;
  overflow: hidden;
}
html.st-fake-fullscreen .site-nav,
html.st-fake-fullscreen main,
html.st-fake-fullscreen footer,
html.st-fake-fullscreen #st-cookie-banner {
  display: none;
}
html.st-fake-fullscreen .tool-viewport {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  z-index: 1000;
}

/* Floating toolbar — always a dark overlay regardless of site theme, since
   it sits on top of arbitrary tool-surface colors (black/white/color/etc). */
/* The bar and the scene backdrops are fixed-dark, so the theme tokens inside them are
   pinned to their dark values — otherwise light mode puts black text/outlines on black. */
.floating-bar,
.timer-surface.scene-dawn, .timer-surface.scene-forest, .timer-surface.scene-sea, .timer-surface.scene-night {
  --ink: #f2f2f2;
  --paper: #0b0b0b;
  --ink-rgb: 242,242,242;
  --paper-rgb: 11,11,11;
  --muted: #9a9a9a;
  --muted-bg: #171717;
  --border-c: 1px solid #f2f2f2;
  --border-light-c: 1px solid #2a2a2a;
  --prose-text: #c9c9c9;
  --code-bg: #171717;
  --warn: #e5a34a;
  --danger: #e35555;
  --ok: #6fcf97;
}
.floating-bar {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .125rem;
  padding: .3rem;
  border-radius: 999px;
  /* frosted-glass pill: dark enough that white text always passes contrast, even over a white screen */
  background: var(--bar-bg, rgba(12,12,14,.86));
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 10px 32px rgba(0,0,0,.38), 0 2px 6px rgba(0,0,0,.25);
  transition: opacity .3s ease;
  z-index: 10;
  white-space: nowrap;
}
/* The glass follows what is behind it, via --bar-bg on the tool area:
   - timer scenes: a dark tint of the scene's own colour
   - dark mode with the plain timer: a light glass, so the bar reads as raised
   - colour / night-light / other screen tools: a darkened shade of the chosen colour (js/i18n.js) */
.tool-viewport:has(.timer-surface.scene-dawn)   { --bar-bg: rgba(58,28,22,.62); }
.tool-viewport:has(.timer-surface.scene-forest) { --bar-bg: rgba(8,32,20,.62); }
.tool-viewport:has(.timer-surface.scene-sea)    { --bar-bg: rgba(6,34,46,.62); }
.tool-viewport:has(.timer-surface.scene-night)  { --bar-bg: rgba(14,17,50,.62); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tool-viewport:has(.timer-surface:not([class*="scene-"])) { --bar-bg: rgba(255,255,255,.1); }
}
:root[data-theme="dark"] .tool-viewport:has(.timer-surface:not([class*="scene-"])) { --bar-bg: rgba(255,255,255,.1); }
@media (prefers-reduced-transparency: reduce) {
  .floating-bar, .tool-hint, .scroll-cue { background: #0c0c0e; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.floating-bar.fade { opacity: 0; pointer-events: none; }
/* while the cookie card is open, keep the toolbar above it (set by js/cookies.js) */
html.st-cookie-open .floating-bar { bottom: calc(2rem + var(--st-cookie-h, 0px)); }
@media (min-width: 1721px) { html.st-cookie-open .floating-bar { bottom: 2rem; } }
/* keyboard users tabbing into a faded bar should see it */
.floating-bar.fade:focus-within { opacity: 1; pointer-events: auto; }

/* First-visit tip and "Guide & FAQ" cue on tool pages */
.tool-hint {
  position: absolute;
  top: .875rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: .25rem .75rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100% - 1.5rem);
  padding: .4rem .4rem .4rem 1.1rem;
  border-radius: 999px;
  background: var(--bar-bg, rgba(12,12,14,.88));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 10px 32px rgba(0,0,0,.3);
  color: #f2f2f2;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  transition: opacity .3s ease;
}
.tool-hint.leaving { opacity: 0; }
.tool-hint-text { flex: 1 1 auto; text-align: center; }
.tool-hint-fs, .tool-hint-x {
  font-family: inherit;
  cursor: pointer;
  border-radius: 999px;
  min-height: 36px;
  color: #fff;
  transition: background .15s;
}
.tool-hint-fs {
  background: rgba(255,255,255,.14);
  border: 0;
  padding: 0 1rem;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tool-hint-x { background: none; border: 0; width: 36px; font-size: 1.25rem; line-height: 1; }
.tool-hint-fs:hover, .tool-hint-x:hover { background: rgba(255,255,255,.24); }
html.st-fake-fullscreen .tool-hint, html.st-fake-fullscreen .scroll-cue { display: none; }
@media (max-width: 600px) {
  .tool-hint { width: calc(100% - 1.5rem); border-radius: 1.25rem; padding: .75rem .5rem .5rem .75rem; justify-content: space-between; }
  .tool-hint-text { flex: 1 1 100%; text-align: left; }
}

.scroll-cue {
  position: absolute;
  right: 1.25rem;
  bottom: 2rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: var(--bar-bg, rgba(12,12,14,.86));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: rgba(255,255,255,.85);
  font-family: inherit;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(0,0,0,.3);
  transition: background .15s, color .15s;
}
.scroll-cue:hover { background: rgba(32,32,36,.95); color: #fff; }
.scroll-cue svg { animation: scroll-cue-nudge 2.4s ease-in-out infinite; }
@keyframes scroll-cue-nudge { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(3px); } }
@media (max-width: 1100px) { .scroll-cue { right: .75rem; bottom: auto; top: .75rem; } .tool-viewport.has-hint .scroll-cue { display: none; } }

.bar-btn {
  background: none;
  border: none;
  border-radius: 999px;
  color: var(--white);
  cursor: pointer;
  padding: .55rem 1rem;
  min-height: 34px;
  font-size: .6875rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: background .15s, color .15s;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-family: inherit;
  text-decoration: none;
}
.bar-btn:hover { background: rgba(255,255,255,.12); }
.bar-btn:active { background: rgba(255,255,255,.2); }
.bar-btn.active { background: rgba(255,255,255,.2); }
.bar-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

.bar-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.72);
  padding: 0 0 0 .5rem;
}

.bar-divider {
  width: 1px;
  height: 18px;
  margin: 0 .35rem;
  background: rgba(255,255,255,.16);
  align-self: center;
  flex-shrink: 0;
}

.bar-input {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: var(--white);
  font-family: inherit;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: .4rem .8rem;
  width: 96px;
  text-transform: uppercase;
}
.bar-input::placeholder { color: rgba(255,255,255,.55); }

.bar-range {
  width: 90px;
  margin: 0 .5rem;
  accent-color: #fff;
  cursor: pointer;
}

.bar-range-value {
  font-size: .6875rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  min-width: 32px;
}

/* ─── Color swatches ─────────────────────────── */
.swatch-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: 0 .25rem;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.28);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color .15s, transform .15s;
  flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.12); outline-color: rgba(255,255,255,.5); }
.color-swatch.active { outline-color: var(--white); }

.color-picker-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 1.5px dashed rgba(255,255,255,.5);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: .6875rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: border-color .15s, transform .15s;
}
.color-picker-btn:hover { border-color: var(--white); transform: scale(1.12); }

input[type="color"] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

/* ─── Tool content (below fold) ─────────────── */
.tool-content { padding: 4rem 0; scroll-margin-top: var(--nav-h); }

.tool-content h1,
.tool-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: var(--border-c);
  padding-bottom: .75rem;
  margin-bottom: 1.5rem;
}

.tool-content .tip-card h2 {
  font-size: .8125rem;
  letter-spacing: .08em;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: .5rem;
}

.tool-content p {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 500;
  max-width: 680px;
  margin-bottom: 1rem;
}

.tool-content strong { color: var(--ink); }

.tool-content p a,
.tip-card p a { color: var(--ink); text-decoration: underline; text-underline-offset: .15em; }

.tool-content table {
  border-collapse: collapse;
  font-size: .8125rem;
  color: var(--ink);
  margin-top: 1rem;
  border-top: var(--border-c);
  width: auto;
}
.tool-content table tr { border-bottom: var(--border-light-c); }
.tool-content table td { padding: .6rem 2rem .6rem 0; font-weight: 500; }
.tool-content table td:first-child { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ─── Pixel test ─────────────────────────────── */
.pixel-surface { position: absolute; inset: 0; }

/* Stuck pixel fixer */
.fixer-stage { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.fixer-box {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #222;
  outline: 1px dashed rgba(255,255,255,.4);
  outline-offset: 3px;
  cursor: move;
}
#fixer-time { color: #fff; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: center; }
.fixer-hint {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 90vw);
  text-align: center;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.7;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9a9a9a;
  pointer-events: none;
}

.pixel-progress {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  padding: .375rem 1rem;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  display: flex;
  gap: .75rem;
  align-items: center;
  z-index: 10;
  color: var(--white);
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.15);
}

.pixel-dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,.25);
}
.pixel-dot.active { background: var(--white); }

/* ─── Resolution / stat readout ──────────────── */
.stat-readout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid rgba(var(--ink-rgb),.15);
  border-left: 1px solid rgba(var(--ink-rgb),.15);
  max-width: 900px;
  width: min(900px, 92vw);
}
.stat-cell {
  background: var(--muted-bg);
  border-right: 1px solid rgba(var(--ink-rgb),.15);
  border-bottom: 1px solid rgba(var(--ink-rgb),.15);
  padding: 1.5rem;
  color: var(--ink);
}
.stat-cell .stat-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(var(--ink-rgb),.62);
  margin-bottom: .5rem;
}
.stat-cell .stat-value {
  font-family: 'Space Grotesk', monospace;
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ─── Uniformity test ─────────────────────────── */
.uniformity-value {
  position: absolute;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #000; /* flipped to #fff on dark greys from uniformity-test.html */
}

/* ─── Refresh rate test ──────────────────────── */
.refresh-marker {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 24px 6px rgba(255,255,255,.5);
  transform: translateY(-50%);
  will-change: left;
}
.refresh-readout {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  padding: .5rem 1.25rem;
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.15);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── Burn-in test ────────────────────────────── */
.burnin-pattern {
  position: absolute;
  width: 46vmin;
  height: 46vmin;
  max-width: 480px;
  max-height: 480px;
  animation: burnin-drift 22s ease-in-out infinite alternate;
}
@keyframes burnin-drift {
  0%   { transform: translate(-18vmin, -14vmin) rotate(0deg); }
  25%  { transform: translate(16vmin, -10vmin) rotate(2deg); }
  50%  { transform: translate(10vmin, 15vmin) rotate(-2deg); }
  75%  { transform: translate(-16vmin, 12vmin) rotate(1deg); }
  100% { transform: translate(-6vmin, -16vmin) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .burnin-pattern { animation: none; }
}

/* ─── Contrast / black-level test ─────────────── */
.contrast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 2px;
  width: min(760px, 92vw);
}
.contrast-step {
  aspect-ratio: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: .4rem;
  font-size: .5625rem;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  font-variant-numeric: tabular-nums;
}

/* ─── Banding / gradient test ─────────────────── */
.banding-surface { position: absolute; inset: 0; transition: background .2s ease; }

/* ─── Focus Timer ────────────────────────────── */
.timer-surface {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  user-select: none;
  transition: background .6s ease;
}

.timer-surface.work-mode { background: var(--paper); color: var(--ink); }
.timer-surface.break-mode { background: var(--muted-bg); color: var(--ink); }

/* Scenes — optional ambient backdrops layered on the same surface. Mono (no
   scene-* class) is the unchanged default; grain is near-invisible on it. */
.timer-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.timer-surface::after {
  content: '';
  position: absolute;
  inset: -20%;
  opacity: .55;
  pointer-events: none;
  z-index: 0;
  animation: timer-scene-drift 46s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .timer-surface::after { animation: none; }
}
@keyframes timer-scene-drift {
  0%   { transform: translate(-3%, -2%) scale(1); }
  100% { transform: translate(3%, 3%) scale(1.06); }
}

.timer-surface.scene-dawn   { background: linear-gradient(165deg, #1c0f12 0%, #4a2620 55%, #7a3b28 100%); }
.timer-surface.scene-dawn::after   { background: radial-gradient(circle at 72% 28%, rgba(232,140,74,.5), transparent 60%); }

.timer-surface.scene-forest { background: linear-gradient(165deg, #050f0b 0%, #0d2419 55%, #1c3b28 100%); }
.timer-surface.scene-forest::after { background: radial-gradient(circle at 26% 74%, rgba(94,168,120,.4), transparent 60%); }

.timer-surface.scene-sea    { background: linear-gradient(165deg, #030d13 0%, #0a2733 55%, #123f4f 100%); }
.timer-surface.scene-sea::after    { background: radial-gradient(circle at 70% 78%, rgba(64,166,190,.4), transparent 60%); }

.timer-surface.scene-night  { background: linear-gradient(165deg, #05060d 0%, #0c0e22 60%, #14173a 100%); }
.timer-surface.scene-night::after  { background: radial-gradient(circle at 50% 15%, rgba(120,130,200,.28), transparent 55%); }

.timer-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}
.timer-surface.scene-night .timer-stars { opacity: 1; }

.timer-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: timer-star-twinkle 4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .timer-star { animation: none; opacity: .5; }
}
@keyframes timer-star-twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .95; } }

/* Breathing guide — independent of scene; a soft halo behind the ring */
.timer-halo {
  position: absolute;
  width: 315px;
  height: 315px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--ink-rgb),.4), transparent 68%);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}
.timer-surface.breathing .timer-halo {
  opacity: .55;
  animation: timer-breathe 4.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .timer-surface.breathing .timer-halo { animation: none; opacity: .55; }
}
@keyframes timer-breathe {
  0%, 100% { transform: scale(.85); opacity: .3; }
  50%      { transform: scale(1.3); opacity: .9; }
}

.mode-badge {
  position: relative;
  z-index: 1;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  border: 1px solid rgba(var(--ink-rgb),.2);
  padding: .35rem 1rem;
  color: rgba(var(--ink-rgb),.5);
}
.mode-badge.work { color: rgba(var(--ink-rgb),.9); }
.mode-badge.break { color: rgba(var(--ink-rgb),.5); }
.mode-badge.long {
  color: rgba(var(--ink-rgb),.95);
  border-color: rgba(var(--ink-rgb),.45);
  background: rgba(var(--ink-rgb),.08);
}

.meeting-name-input {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(var(--ink-rgb),.2);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: .25rem .5rem .5rem;
  width: min(320px, 80vw);
}
.meeting-name-input:focus { outline: none; border-bottom-color: rgba(var(--ink-rgb),.6); }
.meeting-name-input::placeholder { color: rgba(var(--ink-rgb),.35); font-weight: 500; text-transform: none; }

.history-item { flex-direction: column; align-items: stretch; gap: .15rem; }
.history-item-top { display: flex; align-items: center; gap: .5rem; }
.history-item-name { flex: 1; font-weight: 700; word-break: break-word; }
.history-item-meta { font-size: .6875rem; color: rgba(var(--ink-rgb),.4); }

.history-item-segments { list-style: none; margin-top: .3rem; display: flex; flex-direction: column; gap: .15rem; }
.history-item-segments li { font-size: .6875rem; color: rgba(var(--ink-rgb),.5); }
.history-segment-over { margin-left: .3rem; color: var(--warn); font-weight: 700; }

.phase-row.segment-row { grid-template-columns: 1fr 60px 22px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.meeting-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: -330px;
}

.meeting-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.eyerest-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: -219px;
}

.agenda-panel {
  width: min(220px, 70vw);
  max-height: min(70vh, 70dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-left: 1px solid rgba(var(--ink-rgb),.15);
  padding-left: 1.5rem;
}
.agenda-panel-title {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(var(--ink-rgb),.45);
  margin-bottom: .875rem;
}
.agenda-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.agenda-item {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(var(--ink-rgb),.08);
  font-size: .75rem;
  font-weight: 700;
  color: rgba(var(--ink-rgb),.4);
  transition: color .2s;
}
.agenda-item-name { word-break: break-word; }
.agenda-item-mins { flex-shrink: 0; color: rgba(var(--ink-rgb),.3); }
.agenda-item.current { color: var(--ink); }
.agenda-item.current .agenda-item-mins { color: rgba(var(--ink-rgb),.6); }
.agenda-item.done { opacity: .35; text-decoration: line-through; }
.agenda-item-overrun { margin-left: .35rem; color: var(--warn); }

@media (max-width: 860px) {
  .meeting-layout { flex-direction: column; gap: 1.5rem; margin-top: 0; }
  .eyerest-layout { margin-top: 0; }
  .agenda-panel {
    width: min(320px, 86vw);
    max-height: 26vh;
    border-left: none;
    border-top: 1px solid rgba(var(--ink-rgb),.15);
    padding-left: 0;
    padding-top: 1rem;
  }
}

.timer-ring-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-ring-wrap svg { transform: rotate(-90deg); position: relative; z-index: 2; }

.timer-ring-track { fill: none; stroke: rgba(var(--ink-rgb),.07); stroke-width: 2; }

.timer-ring-progress {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: butt;
  transition: stroke-dashoffset .9s linear;
}

.timer-display {
  position: absolute;
  text-align: center;
  z-index: 3;
}

.timer-time {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
}

.timer-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  opacity: .65;
  margin-top: .375rem;
}

.timer-controls { position: relative; z-index: 1; display: flex; gap: 0; }

.quick-add-row { position: relative; z-index: 1; display: flex; gap: 0; }

.timer-btn {
  background: none;
  border: 1px solid rgba(var(--ink-rgb),.2);
  color: var(--ink);
  border-left: none;
  padding: .625rem 1.25rem;
  font-size: .6875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .1s;
  display: flex;
  align-items: center;
  gap: .4rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-family: inherit;
}

.timer-btn:first-child { border-left: 1px solid rgba(var(--ink-rgb),.2); }
.timer-btn:hover { background: rgba(var(--ink-rgb),.1); }
.timer-btn.primary-btn { background: var(--ink); color: var(--paper); }
.timer-btn.primary-btn:hover { background: rgba(var(--ink-rgb),.85); }

.timer-sessions-block {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .625rem;
}
.timer-sessions-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(var(--ink-rgb),.45);
}
.timer-sessions { display: flex; gap: .375rem; }
.session-dot { width: 6px; height: 6px; background: rgba(var(--ink-rgb),.15); }
.session-dot.done { background: var(--ink); }

.timer-stats {
  position: relative;
  z-index: 1;
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(var(--ink-rgb),.35);
}

.timer-stats-week { margin-top: .25rem; color: rgba(var(--ink-rgb),.25); }

.goal-bar {
  position: relative;
  z-index: 1;
  width: 140px;
  height: 3px;
  background: rgba(var(--ink-rgb),.1);
  margin-top: .5rem;
}
.goal-bar-fill { height: 100%; background: var(--ink); width: 0%; transition: width .4s ease; }

.week-chart {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  margin-top: .5rem;
}
.week-bar { width: 6px; background: rgba(var(--ink-rgb),.12); }
.week-bar.has-data { background: rgba(var(--ink-rgb),.4); }

/* Preset selector */
.preset-row {
  display: flex;
  gap: .4rem;
  margin-bottom: .75rem;
}
.preset-row select {
  flex: 1;
  background: rgba(var(--ink-rgb),.05);
  border: 1px solid rgba(var(--ink-rgb),.15);
  color: var(--ink);
  padding: .4rem .5rem;
  font-size: .75rem;
  font-family: inherit;
  font-weight: 700;
  min-width: 0;
}
.preset-row .timer-btn { border-left: 1px solid rgba(var(--ink-rgb),.2); padding: .4rem .75rem; font-size: .625rem; }

/* Task list */
.task-panel {
  position: relative;
  z-index: 1;
  width: min(320px, 86vw);
  display: none;
  flex-direction: column;
  gap: .5rem;
}
.task-panel.open { display: flex; }
.task-input-row { display: flex; gap: 0; }
.task-input {
  flex: 1;
  background: rgba(var(--ink-rgb),.06);
  border: 1px solid rgba(var(--ink-rgb),.2);
  border-right: none;
  color: var(--ink);
  font-family: inherit;
  font-size: .75rem;
  padding: .5rem .75rem;
}
.task-input::placeholder { color: rgba(var(--ink-rgb),.35); }
.task-add-btn {
  background: rgba(var(--ink-rgb),.1);
  border: 1px solid rgba(var(--ink-rgb),.2);
  color: var(--ink);
  font-weight: 700;
  font-size: .75rem;
  padding: .5rem .875rem;
  cursor: pointer;
}
.task-add-btn:hover { background: rgba(var(--ink-rgb),.18); }
.task-list { list-style: none; display: flex; flex-direction: column; gap: 0; max-height: 160px; overflow-y: auto; }
.task-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 0;
  border-bottom: 1px solid rgba(var(--ink-rgb),.08);
  font-size: .75rem;
}
.settings-panel input[type=checkbox] { accent-color: var(--ink); }
.task-item input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--ink); flex-shrink: 0; }
.task-item span { flex: 1; word-break: break-word; }
.task-item.done span { text-decoration: line-through; opacity: .4; }
.task-remove {
  background: none;
  border: none;
  color: rgba(var(--ink-rgb),.4);
  cursor: pointer;
  font-size: .875rem;
  line-height: 1;
  padding: .2rem .3rem;
  flex-shrink: 0;
}
.task-remove:hover { color: var(--ink); }

/* Sound picker (ambient noise) */
.sound-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: rgba(var(--ink-rgb),.08);
  color: rgba(var(--ink-rgb),.75);
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.sound-btn:hover { background: rgba(var(--ink-rgb),.18); }
.sound-btn.active { border-color: var(--ink); background: rgba(var(--ink-rgb),.2); color: var(--ink); }

.settings-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--muted-bg);
  border: 1px solid rgba(var(--ink-rgb),.15);
  padding: 2rem;
  width: min(400px, 90vw);
  max-height: min(85vh, 85dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--ink);
  z-index: 20;
  display: none;
}

.settings-panel.open { display: block; }

/* While Settings is open, fade the timer behind it so the ring doesn't peek out above the panel */
.timer-surface:has(> .settings-panel.open) > :not(.settings-panel):not(.info-popover) {
  opacity: .08;
  pointer-events: none;
  transition: opacity .2s ease;
}

.settings-panel h3 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 1.75rem;
  color: rgba(var(--ink-rgb),.85);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(var(--ink-rgb),.07);
  padding-bottom: 1.25rem;
}

.setting-row label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(var(--ink-rgb),.85);
}

.setting-hint {
  font-size: .6875rem;
  color: rgba(var(--ink-rgb),.4);
  line-height: 1.5;
  margin-top: -.75rem;
  margin-bottom: 1.25rem;
}

.setting-row input[type=number] {
  width: 65px;
  background: rgba(var(--ink-rgb),.05);
  border: 1px solid rgba(var(--ink-rgb),.15);
  color: var(--ink);
  padding: .4rem .6rem;
  font-size: .875rem;
  text-align: center;
  font-family: inherit;
  font-weight: 700;
}

.setting-row input[type=text] {
  width: 160px;
  background: rgba(var(--ink-rgb),.05);
  border: 1px solid rgba(var(--ink-rgb),.15);
  color: var(--ink);
  padding: .4rem .6rem;
  font-size: .875rem;
  text-align: right;
  text-transform: none;
  font-family: inherit;
  font-weight: 700;
}

.setting-control { display: flex; align-items: center; }

.settings-actions { display: flex; gap: 0; margin-top: .5rem; }

/* Timer (phase) list editor */
.setting-section-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(var(--ink-rgb),.85);
  margin-bottom: .75rem;
}

.phase-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; }

.phase-row {
  display: grid;
  grid-template-columns: 1fr 52px 72px 22px;
  gap: .4rem;
  align-items: center;
}

.phase-name-input,
.phase-mins-input,
.phase-type-select {
  background: rgba(var(--ink-rgb),.05);
  border: 1px solid rgba(var(--ink-rgb),.15);
  color: var(--ink);
  padding: .4rem .5rem;
  font-size: .75rem;
  font-family: inherit;
  font-weight: 700;
  min-width: 0;
}

.phase-name-input { text-transform: none; letter-spacing: normal; }
.phase-mins-input { text-align: center; }
.phase-type-select { cursor: pointer; }

.phase-remove-btn {
  background: none;
  border: none;
  color: rgba(var(--ink-rgb),.4);
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  padding: .2rem;
  justify-self: center;
}
.phase-remove-btn:hover:not(:disabled) { color: var(--ink); }
.phase-remove-btn:disabled { opacity: .25; cursor: not-allowed; }

.phase-add-btn {
  display: block;
  width: 100%;
  background: none;
  border: 1px dashed rgba(var(--ink-rgb),.25);
  color: rgba(var(--ink-rgb),.7);
  padding: .5rem;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  margin-bottom: .75rem;
  font-family: inherit;
}
.phase-add-btn:hover { background: rgba(var(--ink-rgb),.06); color: var(--ink); }
.phase-add-btn + .setting-hint { margin-top: 0; }
.phase-btn-row { display: flex; gap: .5rem; }
.phase-btn-row .phase-add-btn { flex: 1; width: auto; }
.phase-btn-row + .setting-hint, .phase-btn-row ~ .setting-hint { margin-top: 0; }

/* Feature info ("?") popovers */
.info-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(var(--ink-rgb),.3);
  background: none;
  color: rgba(var(--ink-rgb),.6);
  font-size: .625rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
}
/* inside the toolbar the "?" sits between a label/button and the next control */
.floating-bar .info-btn { margin: 0 .4rem 0 .15rem; }
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--ink); border-color: rgba(var(--ink-rgb),.7); }

.info-popover {
  position: fixed;
  max-width: 260px;
  background: var(--muted-bg);
  border: 1px solid rgba(var(--ink-rgb),.2);
  color: var(--ink);
  font-size: .6875rem;
  line-height: 1.5;
  padding: .75rem .875rem;
  z-index: 60;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.info-popover.open { display: block; }

/* Custom prompt/confirm modal (replaces native prompt()/confirm()) */
.prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.prompt-overlay.open { display: flex; }
.prompt-box {
  background: var(--muted-bg);
  border: 1px solid rgba(var(--ink-rgb),.15);
  padding: 1.75rem;
  width: min(360px, 100%);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.prompt-box h4 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1rem;
  color: rgba(var(--ink-rgb),.9);
}
.prompt-box p {
  font-size: .8125rem;
  line-height: 1.55;
  color: rgba(var(--ink-rgb),.65);
  margin-bottom: 1.25rem;
}
.prompt-box input[type=text] {
  display: block;
  width: 100%;
  background: rgba(var(--ink-rgb),.05);
  border: 1px solid rgba(var(--ink-rgb),.2);
  color: var(--ink);
  padding: .625rem .75rem;
  font-size: .875rem;
  font-family: inherit;
  margin-bottom: 1.5rem;
}
.prompt-box input[type=text]:focus { outline: none; border-color: rgba(var(--ink-rgb),.5); }
.prompt-box textarea {
  display: block;
  width: 100%;
  background: rgba(var(--ink-rgb),.05);
  border: 1px solid rgba(var(--ink-rgb),.2);
  color: var(--ink);
  padding: .625rem .75rem;
  font-size: .8125rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 1rem;
}
.prompt-box textarea:focus { outline: none; border-color: rgba(var(--ink-rgb),.5); }
.import-box { width: min(460px, 100%); }
.import-file-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.import-file-row .timer-btn { border-left: 1px solid rgba(var(--ink-rgb),.2); }
#import-msg { font-size: .75rem; color: var(--warn); }
.prompt-actions { display: flex; gap: 0; justify-content: flex-end; }

/* ─── Page header (about / privacy) ─────────── */
.page-header {
  padding: 4rem 0 2rem;
  border-bottom: var(--border-c);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1;
  margin-bottom: .5rem;
}

.page-header p {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ─── Prose ──────────────────────────────────── */
.prose {
  max-width: 720px;
  font-weight: 500;
}

.prose h2 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--muted);
  margin: 2.5rem 0 1rem;
  padding-top: 2.5rem;
  border-top: var(--border-light-c);
}

.prose p { font-size: .9375rem; line-height: 1.8; color: var(--prose-text); margin-bottom: 1rem; }
.prose ul { padding-left: 0; margin-bottom: 1rem; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.prose ul li { padding-left: 1.5rem; position: relative; font-size: .9375rem; line-height: 1.7; color: var(--prose-text); }
.prose ul li::before { content: '—'; position: absolute; left: 0; color: var(--muted); }
.prose a { color: var(--ink); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose code { font-family: monospace; background: var(--code-bg); padding: .1em .35em; }

/* ─── Ad slots ───────────────────────────────── */
.ad-slot {
  width: 100%;
  overflow: hidden;
  margin: 2.5rem 0;
  border-top: var(--border-light-c);
  border-bottom: var(--border-light-c);
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.ad-slot:empty,
.ad-slot--leaderboard:empty,
.ad-slot--rectangle:empty {
  display: none;
}

/* ─── Skip Navigation ────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--black);
  color: var(--white);
  padding: .5rem 1.25rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
  white-space: nowrap;
}
.skip-link:focus { top: .5rem; outline: 2px solid var(--white); outline-offset: 2px; }

/* ─── Focus styles ───────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.floating-bar :focus-visible,
.timer-surface :focus-visible,
.settings-panel :focus-visible {
  outline-color: rgba(255,255,255,.85);
}
/* Remove default outline when focus-visible is supported */
:focus:not(:focus-visible) { outline: none; }

/* ─── Cookie Consent Banner ──────────────────────── */

#st-cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  width: min(440px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: rgba(13,13,13,.96);
  color: #e0e0e0;
  z-index: 2000;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 1rem;
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  transform: translateY(calc(100% + 2rem));
  transition: transform .35s ease;
  font-size: .8125rem;
  line-height: 1.6;
}
#st-cookie-banner.visible { transform: translateY(0); }

.st-cookie-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1.25rem;
}

.st-cookie-info { flex: 1; min-width: 220px; }

.st-cookie-title {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #fff;
  margin-bottom: .35rem;
}

.st-cookie-desc {
  font-size: .75rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  letter-spacing: .01em;
}
.st-cookie-desc strong { color: #e0e0e0; }
.st-cookie-desc a { color: rgba(255,255,255,.55); text-decoration: underline; }
.st-cookie-desc a:hover { color: #fff; }

/* Reject All and Accept All: identical size and visual weight — no nudge */
.st-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .5rem;
}
.st-cookie-actions .st-btn--outline { flex: 1 1 0; border-radius: 999px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.st-cookie-actions .st-btn--ghost { order: 3; flex: 1 1 100%; min-height: 44px; }

.st-btn {
  cursor: pointer;
  font-family: inherit;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .625rem 1.125rem;
  min-height: 40px;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}

.st-btn--outline {
  background: none;
  border: 1px solid rgba(255,255,255,.35);
  color: #e0e0e0;
}
.st-btn--outline:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.6); }

.st-btn--ghost {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  text-decoration: underline;
  padding-left: .5rem;
  padding-right: .5rem;
}
.st-btn--ghost:hover { color: #fff; }

/* Granular settings panel */
.st-cookie-panel {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem;
}

.st-cookie-cat { margin-bottom: 1.25rem; }
.st-cookie-cat:last-of-type { margin-bottom: 0; }

.st-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .4rem;
}

.st-cat-name {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
}

.st-cat-desc {
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  line-height: 1.65;
  max-width: 680px;
}
.st-cat-desc a { color: rgba(255,255,255,.45); text-decoration: underline; }
.st-cat-desc a:hover { color: #fff; }
.st-cat-desc code { font-family: monospace; font-size: .9em; color: rgba(255,255,255,.6); }

.st-always-on {
  flex-shrink: 0;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #4ade80;
  border: 1px solid rgba(74,222,128,.35);
  padding: .2rem .55rem;
  border-radius: 20px;
}

/* Toggle switch */
.st-toggle-wrap {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.st-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.st-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.18);
  border-radius: 24px;
  transition: background .2s;
}
.st-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.st-toggle-input:checked ~ .st-toggle-track { background: #4ade80; }
.st-toggle-input:checked ~ .st-toggle-track .st-toggle-thumb { transform: translateX(18px); }
.st-toggle-input:focus-visible ~ .st-toggle-track { outline: 2px solid rgba(255,255,255,.8); outline-offset: 2px; }

.st-panel-footer {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1rem;
}

/* Persistent "Cookie Settings" link injected into every footer */
.st-cookie-footer-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  padding: 0;
  margin-left: 1rem;
}
.st-cookie-footer-btn:hover { color: var(--ink); }

/* ─── Mobile improvements ────────────────────────── */
/* Minimum touch targets */
.bar-btn { min-height: 44px; }
.timer-btn { min-height: 44px; }
.faq-question { min-height: 48px; padding: 1rem 0; }
.lang-toggle, .more-tools-toggle, .theme-toggle { min-height: 36px; min-width: 44px; }
.nav-toggle { min-height: 36px; min-width: 44px; }

/* Target size (WCAG 2.2 SC 2.5.8 needs 24px; touch guidance is 44px).
   Small visuals keep their size; an invisible ::after widens the hit area. */
.info-btn { position: relative; }
.info-btn::after { content: ""; position: absolute; inset: -7px; }
.color-swatch, .color-picker-btn { position: relative; width: 24px; height: 24px; }
.color-swatch::after, .color-picker-btn::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; }
.st-cookie-footer-btn { padding: .625rem .25rem; margin-left: .75rem; }
.footer-col a { display: inline-block; padding: .35rem 0; }

@media (max-width: 860px), (pointer: coarse) {
  .nav-brand { min-height: 44px; }
  .nav-toggle, .lang-toggle, .more-tools-toggle, .theme-toggle, .install-btn { min-height: 44px; min-width: 44px; }
  .skip-link { min-height: 44px; display: inline-flex; align-items: center; }
  .info-btn { width: 24px; height: 24px; font-size: .75rem; }
  .info-btn::after { inset: -10px; }
  .color-swatch, .color-picker-btn { width: 32px; height: 32px; }
  .color-swatch::after, .color-picker-btn::after { inset: -6px; }
  .swatch-row { gap: .75rem; }
  .sound-btn { width: 44px; height: 44px; font-size: .875rem; }
  .bar-range { height: 44px; }
  .meeting-name-input { min-height: 44px; }
  .bar-input { min-height: 44px; }
  .footer-col a { padding: .8rem 0; min-width: 44px; }
  .st-cookie-footer-btn { padding: .5rem; min-height: 44px; display: inline-flex; align-items: center; }
  #btn-manual, #btn-auto, #btn-fixer, #fixer-warn-ok { min-height: 44px; }
  .tool-hint-fs, .tool-hint-x { min-height: 44px; }
  .tool-hint-x { width: 44px; }
}

@media (max-width: 600px) {
  /* the stacked toolbar is ~115px tall on phones: keep timer content clear of it */
  .timer-surface { padding-bottom: 9.25rem; gap: .75rem; }
  .timer-ring-wrap svg { width: min(270px, 72vw); height: auto; }
  .timer-time { font-size: 3.5rem; }
  .container { padding: 0 1rem; }
  .hero { padding: 1.5rem 1rem 0; }
  .hero-meta { padding-bottom: 1.25rem; gap: 1.25rem; }
  .hero-cta { width: 100%; }
  .btn { padding: .875rem 1.25rem; min-height: 48px; display: inline-flex; align-items: center; }
  .section { padding: 2.5rem 0; }
  .section-header { flex-wrap: wrap; gap: .5rem; }
  .use-cases { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .footer-cols { flex-direction: column; gap: 2rem; }
  .tool-index-row:hover { padding-left: .5rem; padding-right: .5rem; margin-left: -.5rem; margin-right: -.5rem; }
  .floating-bar {
    flex-wrap: wrap;
    bottom: .5rem;
    left: .5rem;
    right: .5rem;
    transform: none;
    border-radius: 1.25rem;
    padding: .35rem;
    width: auto;
    justify-content: center;
    row-gap: .25rem;
  }
  /* on a phone there is no room for both: the choice comes first, the toolbar returns right after */
  html.st-cookie-open .floating-bar { visibility: hidden; }
  #st-cookie-banner { left: .5rem; right: .5rem; bottom: .5rem; width: auto; }
  .st-cookie-main { padding: 1rem; gap: .75rem; }
  .st-cookie-desc { font-size: .6875rem; line-height: 1.5; }
  .bar-divider { display: none; }
  .bar-label { display: none; }
  .st-cat-header { flex-wrap: wrap; gap: .5rem; }
}

/* ─── Dark mode ──────────────────────────────────── */
/* Theme tokens are defined at the top of this file (:root, prefers-color-scheme,
   [data-theme]). Tool OUTPUT surfaces are intentionally excluded from theming —
   see the comment above .floating-bar. */

/* ─── Print ──────────────────────────────────────
   Guides and FAQs print as plain black-on-white text; the interactive tool, nav,
   toolbar, banners and ads are left out. */
@media print {
  html:root:not(.st-print) {
    --ink: #000; --paper: #fff; --ink-rgb: 0,0,0; --paper-rgb: 255,255,255;
    --muted: #444; --muted-bg: #fff; --prose-text: #000; --code-bg: #fff;
    --border-c: 1px solid #000; --border-light-c: 1px solid #999;
  }
  body { background: #fff; color: #000; }
  .site-nav, .skip-link, .tool-viewport, .floating-bar, .tool-hint, .scroll-cue, .ad-slot,
  #st-cookie-banner, .st-cookie-footer-btn, .related, .footer-bottom { display: none !important; }
  .tool-content, .container { padding: 0; max-width: none; }
  .faq-answer { display: block !important; max-height: none !important; height: auto !important; opacity: 1 !important; }
  .tip-card, .faq-item, .tool-index-row { break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
