/* FreeMicroTools — one stylesheet for the whole site.
   Structure follows the tool-marketplace pattern: search-first hero, colour-coded
   category cards, icon-led tool cards, and tool pages that stay almost empty above
   the fold so the tool itself is the first thing you meet. */

:root {
  --bg:        #f7f9fc;
  --bg-tint:   #eef4fd;
  --surface:   #ffffff;
  --ink:       #101828;
  --ink-soft:  #475467;
  --ink-faint: #8a94a6;
  --line:      #e4e9f0;
  --line-soft: #eef1f6;
  --brand:     #1d6fe0;
  --accent:    #0f766e;
  --radius:    14px;
  --shadow:    0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg: 0 2px 4px rgba(16,24,40,.05), 0 16px 40px rgba(16,24,40,.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0e1116;
    --bg-tint:   #121822;
    --surface:   #161b23;
    --ink:       #e9edf3;
    --ink-soft:  #a2adbd;
    --ink-faint: #6d7889;
    --line:      #242b36;
    --line-soft: #1d232c;
    --brand:     #5da2f5;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.28);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.35), 0 16px 40px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

.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;
}
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- header */

.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-bar {
  display: flex; align-items: center; gap: 12px 24px;
  min-height: 64px;
}

/* No flex gap here: the wordmark is three inline spans and a gap would push
   "Free | Micro | Tools" apart. The logo carries its own right margin. */
.brand {
  display: inline-flex; align-items: center;
  font-size: 17px; font-weight: 800; letter-spacing: -.02em;
  color: var(--ink); white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--brand); }
.logo {
  display: grid; place-items: center;
  width: 30px; height: 30px; margin-right: 9px;
  border-radius: 9px;
  background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 800;
}

/* Main menu. Wide screens: a row of category dropdowns. Up to 960px: a Menu
   button opens a full-width panel where each category expands in place.
   Category colours are dark, so text uses --accent-ink, lifted in dark mode. */
.nav-menu { --accent: var(--brand); margin-left: auto; }
.nav-item { --accent-ink: var(--accent); position: relative; }
@media (prefers-color-scheme: dark) { .nav-item { --accent-ink: color-mix(in srgb, var(--accent) 45%, #fff); } }
.nav-list { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-trigger, .nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 11px; border: 0; border-radius: 9px; background: none;
  font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--ink-soft);
  cursor: pointer; white-space: nowrap;
}
.nav-trigger:hover, .nav-link:hover, .nav-item.is-open > .nav-trigger {
  text-decoration: none; color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.nav-trigger:focus-visible, .nav-link:focus-visible, .nav-toggle:focus-visible, .nav-tool:focus-visible, .nav-panel-all:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
.nav-trigger.is-current, .nav-link.is-current { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent-ink); border-radius: 9px 9px 2px 2px; }
.nav-caret { width: 15px; height: 15px; opacity: .7; transition: transform .2s ease; }
.nav-item.is-open > .nav-trigger .nav-caret { transform: rotate(180deg); }

.nav-panel {
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 60;
  width: 340px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.nav-panel.is-wide { width: 580px; }
.nav-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-item.is-open > .nav-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .15s ease, transform .15s ease; }
html:not(.js) .nav-item:hover > .nav-panel, html:not(.js) .nav-item:focus-within > .nav-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
/* Menus near the right edge open leftwards so they stay on screen. */
.nav-list > .nav-item:nth-last-child(-n+4) > .nav-panel { left: auto; right: 0; transform: translateY(6px); }
.nav-list > .nav-item.is-open:nth-last-child(-n+4) > .nav-panel,
html:not(.js) .nav-list > .nav-item:nth-last-child(-n+4):hover > .nav-panel { transform: none; }

.nav-panel-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.nav-panel-head strong { display: block; font-size: 15px; color: var(--ink); }
.nav-panel-head span { display: block; font-size: 13px; line-height: 1.4; color: var(--ink-faint); }
.nav-panel-ico {
  flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.nav-panel-ico .ico { width: 20px; height: 20px; }
.nav-tools { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-panel.is-wide .nav-tools { grid-template-columns: 1fr 1fr; }
.nav-tool { display: block; padding: 9px 10px; border-radius: 10px; color: var(--ink); }
.nav-tool:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.nav-tool-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14.5px; font-weight: 650; }
.nav-tool-line {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--ink-faint);
}
.nav-badge, .nav-tool-kind { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.5; }
.nav-badge { color: #fff; background: var(--accent); }
@media (prefers-color-scheme: dark) { .nav-badge { color: var(--bg); background: var(--accent-ink); } }
.nav-tool-kind { color: var(--ink-soft); background: var(--line-soft); }
.nav-cat { display: flex; align-items: center; gap: 12px; }
.nav-panel-all {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px; padding: 11px 10px 7px; border-top: 1px solid var(--line-soft);
  font-size: 14px; font-weight: 700; color: var(--accent-ink);
}
.nav-panel-all:hover { text-decoration: none; }
.nav-panel-all span { transition: transform .15s ease; }
.nav-panel-all:hover span { transform: translateX(3px); }
.nav-more { display: none; }
.nav-list > .nav-more { display: block; }
.nav-list > .nav-item.is-overflow { display: none; }

.nav-toggle {
  display: none; align-items: center; gap: 9px; margin-left: auto;
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.nav-bars { position: relative; display: block; width: 18px; height: 12px; }
.nav-bars i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.nav-bars i:nth-child(1) { top: 0; }
.nav-bars i:nth-child(2) { top: 5px; }
.nav-bars i:nth-child(3) { top: 10px; }
.top.is-open .nav-bars i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.top.is-open .nav-bars i:nth-child(2) { opacity: 0; }
.top.is-open .nav-bars i:nth-child(3) { top: 5px; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain;
    padding: 6px 20px 18px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .top.is-open .nav-menu { display: block; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .nav-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 10px; max-height: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line-soft); }
  .nav-item:last-child { border-bottom: 0; }
  .nav-trigger, .nav-link { width: 100%; justify-content: space-between; padding: 14px 2px; border-radius: 0; font-size: 16px; color: var(--ink); }
  .nav-trigger:hover, .nav-link:hover, .nav-item.is-open > .nav-trigger { background: none; }
  .nav-trigger.is-current, .nav-link.is-current { box-shadow: none; color: var(--accent-ink); }
  .nav-panel, .nav-panel.is-wide, .nav-list > .nav-item:nth-last-child(-n+4) > .nav-panel {
    position: static; display: none; width: auto; padding: 0 0 10px; transform: none;
    opacity: 1; visibility: visible; border: 0; border-radius: 0; box-shadow: none; background: none; transition: none;
  }
  .nav-item.is-open > .nav-panel, html:not(.js) .nav-panel { display: block; }
  /* The wide-screen open state centres panels with a transform; in the
     accordion that would push the list off the left edge. */
  .nav-list .nav-panel { transform: none !important; }
  .nav-panel::before, .nav-panel-head { display: none; }
  .nav-panel.is-wide .nav-tools { grid-template-columns: 1fr; }
  .nav-tool { padding: 9px 10px; }
  .nav-tool-line { -webkit-line-clamp: 1; }
  .nav-panel-all { border-top: 0; padding: 8px 10px 4px; }
  .nav-list > .nav-more { display: none; }
  .nav-list > .nav-item.is-overflow { display: block; }
  html.nav-locked { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-panel, .nav-caret, .nav-bars i, .nav-panel-all span { transition: none; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  text-align: center;
  padding: 56px 0 40px;
  background: radial-gradient(1000px 340px at 50% -60px, var(--bg-tint), transparent 70%);
}
.hero h1 {
  margin: 0 auto 14px;
  max-width: 15ch;
  font-size: clamp(34px, 6.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 800;
}
.hero h1 mark {
  background: var(--brand);
  color: #fff;
  padding: 0 .18em;
  border-radius: 6px;
}
.hero .lead {
  margin: 0 auto;
  max-width: 56ch;
  font-size: clamp(15.5px, 1.8vw, 18px);
  color: var(--ink-soft);
}

.hero-search {
  display: flex; align-items: center; gap: 8px;
  width: min(620px, 100%);
  margin: 30px auto 0;
  padding: 7px 7px 7px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.hero-search:focus-within {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg), 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.hero-search-ico { display: flex; color: var(--ink-faint); }
.hero-search .ico { width: 20px; height: 20px; }
.hero-search input {
  flex: 1; min-width: 0;
  border: 0; background: none; color: inherit;
  font: inherit; font-size: 16px; padding: 8px 0;
}
.hero-search input:focus { outline: none; }
.hero-search button {
  border: 0; border-radius: 999px;
  padding: 11px 22px;
  background: var(--brand); color: #fff;
  font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer;
}
.hero-search button:hover { filter: brightness(1.07); }

/* -------------------------------------------------------- category cards */

.cat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 8px 0 48px;
}
.cat-card {
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.cat-card-top {
  display: block;
  padding: 20px 20px 22px;
  background: var(--accent);
  color: #fff;
}
.cat-card-top:hover { text-decoration: none; }
.cat-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px;
}
.cat-card .count {
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.cat-card-title {
  display: block;
  font-size: 20px; font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 2px;
}
.cat-card-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: 14px; opacity: .92;
}
.cat-card .arrow { font-size: 17px; transition: transform .14s ease; }
.cat-card:hover .arrow { transform: translateX(4px); }

.cat-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 13px 20px;
  font-size: 13px; color: var(--ink-faint);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.cat-card-foot a { color: var(--accent); font-weight: 700; }

/* ------------------------------------------------------------------ tiles */

.tile {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
}
.tile.solid { background: rgba(255,255,255,.2); color: #fff; }
.ico { width: 22px; height: 22px; }

/* ------------------------------------------------------------- tool cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
}

.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow-lg);
}

.tool-card { --accent: var(--brand); gap: 14px; }
.tool-card-body { flex: 1; }
.tool-card h3 {
  margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.015em;
}
.cat-label {
  display: inline-block; margin: 2px 0 7px;
  font-size: 12.5px; font-weight: 700; color: var(--accent);
}
.tool-card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 13px; border-top: 1px solid var(--line-soft);
}

.kicker {
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-faint);
}

.badge {
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--line-soft); color: var(--ink-soft);
}
.badge.live { background: rgba(16,135,96,.13); color: #0d7a56; }
.badge.beta { background: rgba(194,65,12,.13); color: #b4460f; }
@media (prefers-color-scheme: dark) {
  .badge.live { background: rgba(52,199,150,.16); color: #5fc79a; }
  .badge.beta { background: rgba(224,160,106,.16); color: #e0a06a; }
}

/* ------------------------------------------------ tool rows (All tools page) */

/* One tool per row on the All tools page: no boxes, just rules
   between rows, so the details read like a well-set list. */
.tool-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tool-list li { border-bottom: 1px solid var(--line); }
.tool-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 4px 18px; padding: 18px 12px; color: inherit;
  transition: background-color .12s ease;
}
.tool-row:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.tool-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tool-row .tile { align-self: start; margin-top: 2px; }
.tool-row-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-row h3 { margin: 0; font-size: 17.5px; font-weight: 750; letter-spacing: -.015em; color: var(--ink); }
.tool-row-main p { margin: 3px 0 0; font-size: 15px; color: var(--ink-soft); max-width: 70ch; }
.tool-row-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 13px; color: var(--ink-faint); }
.tool-row-facts b { font-weight: 600; color: var(--ink-soft); }
.tool-row-go { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.tool-row-open { font-size: 14.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.tool-row-open span { display: inline-block; transition: transform .14s ease; }
.tool-row:hover .tool-row-open span { transform: translateX(3px); }
@media (max-width: 620px) {
  .tool-row { grid-template-columns: auto minmax(0, 1fr); padding: 16px 4px; }
  .tool-row-go { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .tool-row, .tool-row-open span { transition: none; } }
/* Dark categories (like video's slate) would vanish on the dark ground. */
@media (prefers-color-scheme: dark) {
  .tool-row-open, .tool-row .tile { color: color-mix(in srgb, var(--accent) 55%, var(--ink)); }
}

/* --------------------------------------------------------------- sections */

main { padding-bottom: 64px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin: 40px 0 16px;
}
.section-head h2 {
  margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.025em;
}
.section-head .more { font-size: 14.5px; font-weight: 700; white-space: nowrap; }

.page-head { text-align: center; margin: 40px 0 28px; }
.page-head h1 {
  margin: 0 0 10px; font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 800; letter-spacing: -.03em;
}
.page-head .lead { margin: 0 auto; max-width: 60ch; color: var(--ink-soft); }

.cat-block { margin-bottom: 34px; }

/* ----------------------------------------------------------------- finder */

.finder { width: min(620px, 100%); margin: 0 auto 34px; }
.finder input[type="search"] {
  width: 100%; padding: 13px 18px;
  font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: inherit;
  box-shadow: var(--shadow);
}
.finder input[type="search"]:focus {
  outline: none; border-color: var(--brand);
  box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.finder .small { margin: 8px 2px 0; min-height: 1.2em; text-align: center; }

/* -------------------------------------------------------------- tool page */

.crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 18px 0 0; font-size: 13.5px; color: var(--ink-faint);
}
.crumbs a { color: var(--ink-faint); }
.crumbs .sep { opacity: .5; }

/* --accent is inherited from the <article>, which carries the category colour.
   Do not redeclare it here or the inherited value is overridden. */
.tool-head {
  text-align: center;
  padding: 30px 0 26px;
}
.tool-head .tile { margin: 0 auto 16px; background: var(--accent); color: #fff; }
.tool-head h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.08;
}
.tool-head .lead {
  margin: 0 auto; max-width: 54ch;
  font-size: clamp(15.5px, 1.8vw, 18px); color: var(--ink-soft);
}
.tool-head .actions { margin-top: 22px; }
.assurance { margin: 16px 0 0; font-size: 13.5px; color: var(--ink-faint); }

.btn {
  display: inline-block;
  padding: 13px 26px; border-radius: 999px;
  font-size: 15.5px; font-weight: 700;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.disabled { color: var(--ink-faint); cursor: default; }

.tool-app {
  max-width: 820px; margin: 0 auto 46px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
}

/* ------------------------------------------------------------- long-form */

.prose { max-width: 720px; margin: 0 auto; }
.prose h2 {
  margin: 36px 0 10px; font-size: 22px; font-weight: 800; letter-spacing: -.025em;
}
.prose h3 { margin: 24px 0 6px; font-size: 16.5px; font-weight: 700; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); font-weight: 700; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 14px 0; }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }
.plan {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.plan h3 { margin-top: 0; }
.plan ul { margin: 0; padding-left: 20px; }

/* "At a glance" facts on tool pages */
.facts {
  max-width: 720px; margin: 0 auto 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.facts h2 { margin: 0 0 10px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.facts dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 620px) { .facts dl { grid-template-columns: 1fr; } }
.facts dl > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px;
}
.facts dt { color: var(--ink-faint); flex: 0 0 auto; }
.facts dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }

.home-faq { margin-top: 12px; margin-bottom: 40px; }

/* "Suggest a tool" popup */
.suggest {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  padding: 26px 24px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.suggest::backdrop { background: rgba(10, 14, 20, .55); backdrop-filter: blur(2px); }
.suggest h2 { margin: 0 32px 6px 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.suggest > .muted { margin: 0 0 4px; }
.suggest .cform { background: none; border: 0; padding: 0; box-shadow: none; }
.suggest .cform-note { margin-top: 14px; }
.suggest-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-faint);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.suggest-x:hover { background: var(--line); color: var(--ink); }

.muted { color: var(--ink-faint); }
.small { font-size: 13.5px; }

/* ---------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 0;
  font-size: 13.5px; color: var(--ink-faint);
}
.foot .wrap { display: grid; gap: 7px; }
.foot a { color: var(--ink-soft); }

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- polish */

.logo .ico { width: 17px; height: 17px; }

.hero { padding: 64px 0 36px; }
.hero h1 { max-width: 18ch; }

.trust {
  list-style: none; display: flex; justify-content: center; flex-wrap: wrap;
  gap: 8px 24px; margin: 18px 0 0; padding: 0;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .ico { width: 16px; height: 16px; color: var(--brand); }

.cat-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cat-card.is-empty .cat-card-top {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--ink);
}
.cat-card.is-empty .tile.solid {
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
  color: var(--accent);
}
.cat-card.is-empty .count {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.cat-card.is-empty .cat-card-line { color: var(--ink-soft); }
.cat-card.is-empty .cat-card-foot { color: var(--ink-faint); }
/* Cards in a row stretch to the tallest one; keep the footer on the bottom edge
   and let the coloured top fill the difference instead of a white band. */
.cat-card-top { flex: 1; }
.cat-card-foot { margin-top: auto; }
.cat-card-foot a { text-align: right; }
.cat-card.is-empty:hover { transform: none; box-shadow: var(--shadow); }

.why {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin: 48px 0 8px;
}
.why-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.why-item .tile { --accent: var(--brand); }
.why-item h3 { margin: 2px 0 4px; font-size: 15.5px; font-weight: 700; }
.why-item p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.foot { padding: 44px 0 30px; }
.foot .foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .foot .foot-grid { grid-template-columns: 1fr 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .foot .foot-grid { grid-template-columns: 1fr 1fr; gap: 22px; } }
.foot .brand { font-size: 16px; }
.foot-brand p { margin: 10px 0 0; max-width: 36ch; line-height: 1.55; }
.foot .stats-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  background: color-mix(in srgb, #7c3aed 9%, var(--surface));
  border: 1px solid color-mix(in srgb, #7c3aed 22%, var(--surface));
  transition: border-color .15s, transform .15s;
}
.foot .stats-pill:hover { text-decoration: none; border-color: color-mix(in srgb, #7c3aed 50%, var(--surface)); transform: translateY(-1px); }
.stats-pill-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.stats-pill-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #16a34a; opacity: 0; animation: stats-ping 2.4s ease-out infinite; }
@keyframes stats-ping { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stats-pill-dot::after { animation: none; } .foot .stats-pill:hover { transform: none; } }
.stats-pill-note { font-weight: 500; color: var(--ink-faint); }
.stats-pill-note::before { content: "·"; margin-right: 8px; }
.foot-col h4 {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
}
.foot-col a { display: block; padding: 3px 0; font-size: 14px; color: var(--ink-soft); }
.foot-legal {
  grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-faint);
}

/* ---------------------------------------------------------------- forms */

.cform {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 22px 22px; margin: 18px 0;
}
.cform-row { margin-top: 14px; }
.cform label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.cform input, .cform textarea {
  width: 100%; padding: 11px 13px;
  font: inherit; font-size: 15.5px; color: inherit;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.cform textarea { resize: vertical; min-height: 140px; }
.cform input:focus, .cform textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.cform .btn { margin-top: 18px; border: 0; cursor: pointer; }
.cform .small { margin: 14px 0 0; }
.cform-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform-note {
  padding: 14px 18px; border-radius: 10px; margin: 18px 0;
  background: rgba(16,135,96,.10); color: #0d7a56; font-weight: 600;
}
.cform-note.err { background: rgba(161,45,45,.10); color: #a12d2d; }

/* Progress bar shared by processing tools */
.fmt-progress { margin: 16px 0 0; }
.fmt-progress-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 13.5px; }
.fmt-progress-label { font-weight: 700; color: var(--ink); }
.fmt-progress-meta { color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fmt-progress-track { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.fmt-progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent, var(--brand)); transition: width .25s ease; }
.fmt-progress.is-busy .fmt-progress-fill {
  width: 40% !important; animation: fmt-progress-slide 1.1s ease-in-out infinite;
}
@keyframes fmt-progress-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .fmt-progress-fill { transition: none; } .fmt-progress.is-busy .fmt-progress-fill { animation: none; width: 100% !important; opacity: .5; } }

/* Shared tool interface (.ft-*): drop zones, buttons, fields, choices, lists
   and text areas used by the tools that list "ui" in tool.json. Colours come
   from the theme tokens, so dark mode needs no extra rules. */
.ft { --ft-accent: var(--accent, var(--brand)); margin: 0 0 4px; text-align: left; }
.ft-drop {
  border: 2px dashed var(--line); border-radius: 14px;
  padding: 44px 20px; text-align: center; background: var(--bg);
  transition: border-color .12s, background .12s;
}
.ft-drop.is-over { border-color: var(--ft-accent); background: color-mix(in srgb, var(--ft-accent) 7%, var(--surface)); }
.ft-drop-ico { display: block; width: 40px; height: 40px; margin: 0 auto 14px; color: var(--ft-accent); }
.ft-drop-main { margin: 12px 0 4px; font-size: 15px; color: var(--ink-soft); }
.ft-drop-sub { margin: 0; font-size: 13px; color: var(--ink-faint); }

.ft-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--ft-accent); border-radius: 999px;
  padding: 12px 26px; background: var(--ft-accent); color: #fff;
  font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 18px rgba(16, 24, 40, .12);
}
.ft-btn:hover { filter: brightness(1.08); text-decoration: none; }
.ft-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.ft-btn.is-quiet { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
.ft-btn.is-quiet:hover { border-color: var(--ft-accent); filter: none; }
.ft-btn.is-small { padding: 8px 16px; font-size: 14px; }
.ft-link {
  background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--ft-accent); cursor: pointer;
}
.ft-link:hover { text-decoration: underline; text-underline-offset: 2px; }

.ft-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
.ft-head strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.ft-head span { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.ft-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 16px 0 0; padding: 0; border: 0; }
.ft-choice { position: relative; cursor: pointer; }
.ft-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ft-choice span {
  display: block; height: 100%; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color .12s, background .12s;
}
.ft-choice strong { display: block; font-size: 14.5px; }
.ft-choice small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: var(--ink-faint); }
.ft-choice:hover span { border-color: color-mix(in srgb, var(--ft-accent) 45%, var(--line)); }
.ft-choice input:checked + span {
  border-color: var(--ft-accent); background: color-mix(in srgb, var(--ft-accent) 8%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ft-accent) 14%, transparent);
}
.ft-choice input:focus-visible + span { outline: 2px solid var(--ft-accent); outline-offset: 2px; }

.ft-fields { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 16px; align-items: flex-end; }
.ft-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ft-field.is-wide { flex: 1 1 260px; }
.ft-field > label, .ft-label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ft-input, .ft-select, .ft-text {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.ft-select { padding-right: 32px; }
.ft-input[type="number"] { max-width: 150px; }
.ft-input[type="color"] { width: 64px; height: 46px; padding: 4px; cursor: pointer; }
.ft-input:focus, .ft-select:focus, .ft-text:focus {
  outline: none; border-color: var(--ft-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ft-accent) 16%, transparent);
}
.ft-text { display: block; min-height: 220px; resize: vertical; line-height: 1.55; }
.ft-text.is-code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 14px; tab-size: 2; white-space: pre; overflow-wrap: normal; }
.ft-help { margin: 6px 0 0; font-size: 13px; color: var(--ink-faint); }
.ft-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.ft-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ft-accent); }
.ft-range { width: 100%; accent-color: var(--ft-accent); }

.ft-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.ft-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ft-preview { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.ft-status { margin: 12px 2px 0; min-height: 1.3em; font-size: 14.5px; font-weight: 600; color: var(--ft-accent); }
.ft-status.is-error { color: #b42318; }
@media (prefers-color-scheme: dark) { .ft-status.is-error { color: #f97066; } }

.ft-list { display: grid; gap: 8px; margin-top: 16px; }
.ft-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.ft-thumb {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--line-soft);
  border: 1px solid var(--line);
}
.ft-item-name { font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.ft-item-meta { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.ft-item-meta.is-error { color: #b42318; }
.ft-item-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ft-icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft);
  font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
}
.ft-icon-btn:hover:not(:disabled) { border-color: var(--ft-accent); color: var(--ft-accent); }
.ft-icon-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 560px) {
  .ft-item { grid-template-columns: auto 1fr; }
  .ft-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .ft-actions .ft-btn { flex: 1 1 100%; }
}

.ft-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 14px; }
.ft-stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ft-stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.ft-stat span { font-size: 13px; color: var(--ink-faint); }
.ft-note {
  margin: 14px 0 0; padding: 11px 14px; border-radius: 10px; font-size: 14px;
  background: color-mix(in srgb, var(--ft-accent) 8%, var(--surface)); color: var(--ink);
}
.ft-note.is-warn { background: color-mix(in srgb, #f59e0b 14%, var(--surface)); }

/* "Did this tool do the job?" card, shown after a tool finishes a job */
.fmt-rate {
  position: relative; margin: 18px 0 0; padding: 16px 44px 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 30%, var(--line));
  border-radius: 12px; background: color-mix(in srgb, var(--accent, var(--brand)) 6%, var(--surface));
  text-align: left;
}
.fmt-rate.is-in { animation: fmt-rate-in .35s ease-out; }
@keyframes fmt-rate-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fmt-rate svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fmt-rate-q { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); outline: none; }
.fmt-rate-q strong { font-weight: 800; }
.fmt-rate-q svg { color: var(--accent, var(--brand)); }
.fmt-rate-sub { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
.fmt-rate-btns, .fmt-rate-row, .fmt-rate-reasons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.fmt-rate button:not(.fmt-rate-x) {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.fmt-rate button:not(.fmt-rate-x):hover { border-color: var(--accent, var(--brand)); }
.fmt-rate button:disabled { opacity: .6; cursor: default; }
.fmt-rate .fmt-rate-btn.is-up { background: var(--accent, var(--brand)); border-color: var(--accent, var(--brand)); color: #fff; }
.fmt-rate .fmt-rate-btn.is-up:hover { filter: brightness(1.08); }
.fmt-rate button.fmt-rate-reason { font-weight: 600; font-size: 14px; padding: 7px 13px; }
.fmt-rate button.fmt-rate-reason[aria-pressed="true"] {
  border-color: var(--accent, var(--brand)); color: var(--accent, var(--brand));
  background: color-mix(in srgb, var(--accent, var(--brand)) 12%, var(--surface));
}
.fmt-rate button.fmt-rate-send { background: var(--accent, var(--brand)); border-color: var(--accent, var(--brand)); color: #fff; }
.fmt-rate button.fmt-rate-send:hover { filter: brightness(1.08); }
.fmt-rate button.fmt-rate-more { border-style: dashed; font-weight: 600; }
.fmt-rate-label { display: block; margin: 14px 0 6px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.fmt-rate-c {
  display: block; width: 100%; max-width: 560px; padding: 10px 12px; resize: vertical;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.fmt-rate-c:focus { outline: none; border-color: var(--accent, var(--brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, var(--brand)) 18%, transparent); }
.fmt-rate-fine { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.fmt-rate-row .fmt-rate-fine { margin: 0; }
.fmt-rate-x {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-faint);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.fmt-rate-x:hover { background: var(--line); color: var(--ink); }
.fmt-rate-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .fmt-rate.is-in { animation: none; } }

/* Public score under a tool's name */
.fmt-score {
  display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 0;
  font-size: 14px; color: var(--ink-soft);
}
.fmt-score svg { width: 16px; height: 16px; fill: none; stroke: var(--accent, var(--brand)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fmt-score strong { color: var(--ink); }
.fmt-score span { color: var(--ink-faint); }

/* Related tools at the foot of a tool page */
.related { max-width: 1040px; margin: 48px auto 64px; }
.related .section-head h2 { font-size: 22px; }

/* ------------------------------------------------------------- open stats */

.st { --m: var(--mood, #7c3aed); max-width: 880px; margin: 0 auto 64px; }
@media (prefers-color-scheme: dark) { .st { --m: var(--mood-dark, #a78bfa); } }
.st h2 { margin: 0 0 2px; font-size: 20px; letter-spacing: -.015em; }
.st .muted { margin: 0; font-size: 14.5px; }

.st-mood {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 22px 26px; margin-bottom: 16px; border-radius: 26px;
  background: color-mix(in srgb, var(--m) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--m) 24%, var(--surface));
}
.st-mascot { width: 128px; height: 128px; flex: 0 0 auto; }
.st-mascot svg { display: block; width: 100%; height: 100%; animation: st-bob 3.2s ease-in-out infinite; }
@keyframes st-bob { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .st-mascot svg { animation: none; } }
.st-mood-text { flex: 1; min-width: 220px; }
.st-kicker { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); }
.st-mood-text h2 { font-size: clamp(26px, 4vw, 34px); margin: 2px 0 4px; }
.st-mood-text p { margin: 0; color: var(--ink-soft); }

.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.st-tile {
  --t: #db2777;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 18px; border-radius: 20px; color: var(--ink-soft); font-size: 14.5px;
  background: color-mix(in srgb, var(--t) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--t) 18%, var(--surface));
}
.st-t2 { --t: #7c3aed; } .st-t3 { --t: #0f8a5f; }
.st-emoji { font-size: 22px; line-height: 1; }
.st-tile b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.15; margin-top: 6px; }

.st-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow);
}

.st-chart { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 180px auto; gap: 6px 10px; margin-top: 16px; }
.st-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--ink-faint); text-align: right; font-variant-numeric: tabular-nums; }
.st-cols { display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); }
.st-col { flex: 1 1 0; max-width: 24px; height: 100%; min-width: 0; padding: 0; margin: 0; border: 0; background: none; display: flex; align-items: flex-end; cursor: pointer; }
.st-col i { display: block; width: 100%; background: var(--m); border-radius: 4px 4px 0 0; transition: filter .15s; }
.st-col:hover i, .st-col:focus-visible i { filter: brightness(.82); }
.st-col:focus-visible { outline: 2px solid var(--m); outline-offset: 2px; border-radius: 4px; }
.st-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-faint); }
.st-tip {
  position: absolute; top: -8px; transform: translateX(-50%);
  padding: 5px 10px; border-radius: 10px; white-space: nowrap; pointer-events: none;
  background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 600;
}
.st-table { margin-top: 14px; font-size: 14.5px; }
.st-table summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.st-table table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.st-table th, .st-table td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.st-table .r { text-align: right; font-variant-numeric: tabular-nums; }

.st-top { list-style: none; margin: 14px 0 0; padding: 0; }
.st-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 2px 10px; padding: 10px 6px; border-radius: 14px; color: var(--ink); }
.st-row:hover { text-decoration: none; background: color-mix(in srgb, var(--m) 7%, var(--surface)); }
.st-emo { font-size: 20px; text-align: center; }
.st-name { font-weight: 650; overflow-wrap: anywhere; }
.st-chip {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; vertical-align: 2px;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  background: color-mix(in srgb, var(--c, #1d6fe0) 13%, var(--surface));
}
.st-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.st-meter { grid-column: 2 / 4; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--m) 13%, var(--surface)); }
.st-meter i { display: block; height: 100%; border-radius: 999px; background: var(--m); }
.st-empty { padding: 14px 6px; color: var(--ink-soft); }
.st-how p { margin: 8px 0 0; color: var(--ink-soft); }
.st-error { text-align: center; color: var(--ink-soft); }
@media (max-width: 520px) {
  .st-mood { padding: 18px; gap: 12px; }
  .st-mascot { width: 96px; height: 96px; }
  .st-chart { grid-template-rows: 150px auto; }
}

