/* CalcMojo — site design system (light). Palette: ivory / deep teal / light gold.
   Tool widgets live inside .cm-tool and carry their own scoped styles. */
:root {
  --ground: #f3eee8;
  --ground-2: #ebe4db;
  --panel: #fffdfa;
  --ink: #10302d;
  --ink-2: #3e5552;
  --muted: #64746f;
  --line: #e0d8cd;
  --line-2: #cfc5b8;
  --teal: #17645f;
  --teal-ink: #f3eee8;
  --teal-soft: #dcebe6;
  --teal-hover: #11524e;
  --accent: #e6c46e;
  --accent-ink: #10302d;
  --accent-soft: #f6ead0;
  --shadow: rgba(16, 48, 45, 0.08);
  --shadow-2: rgba(16, 48, 45, 0.16);
  --scrim: rgba(16, 48, 45, 0.42);
  --radius: 14px;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.cm-wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.cm-display { font-family: "Archivo", "Arial Narrow", system-ui, sans-serif; font-stretch: 72%; font-weight: 850; letter-spacing: -0.015em; line-height: 0.98; }
.cm-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cm-skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--ground); padding: 0.6rem 1rem; border-radius: 8px; z-index: 100; }
.cm-skip:focus { top: 12px; }

/* ---------- header ---------- */
.cm-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--ground) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.cm-header > .cm-wrap { display: flex; align-items: center; gap: 1rem; height: 64px; }
.cm-logo { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); flex: none; }
.cm-logo svg { width: 32px; height: 32px; flex: none; }
.cm-logo span { font-family: "Archivo", sans-serif; font-stretch: 88%; font-weight: 850; font-size: 1.35rem; letter-spacing: -0.03em; }
.cm-nav { display: flex; align-items: center; gap: 0.15rem; margin-left: 0.5rem; }
.cm-nav-btn { background: transparent; border: 0; border-radius: 8px; padding: 0.5rem 0.75rem; font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.cm-nav-btn:hover { background: var(--ground-2); }
.cm-nav-btn[aria-expanded="true"] { background: var(--teal-soft); color: var(--teal); }
.cm-nav-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.cm-nav-btn[aria-expanded="true"] .cm-chev { transform: rotate(180deg); }
.cm-search-trigger { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; width: min(340px, 40vw); min-width: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 0.5rem 0.7rem; color: var(--muted); font-size: 0.92rem; text-align: left; }
.cm-search-trigger:hover { border-color: var(--teal); }
.cm-search-trigger svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.2; flex: none; }
.cm-search-trigger span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font-family: inherit; font-size: 0.72rem; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0.05rem 0.4rem; background: var(--ground); }
.cm-menu-toggle { display: none; }

/* all-tools menu: categories on the left, the chosen category's tools on the right.
   Its height always fits the screen below the header (--cm-menu-h is set by site.js on open). */
.cm-mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 30px 50px -20px var(--shadow-2); }
.cm-mega-inner { display: grid; grid-template-columns: 250px minmax(0, 1fr); padding-inline: 0; }
.cm-mega-cats, .cm-mpanel { max-height: var(--cm-menu-h, min(560px, 70vh)); }
.cm-mega-cats { overflow-y: auto; border-right: 1px solid var(--line); padding: 0.9rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; overscroll-behavior: contain; }
.cm-mtab { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.7rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.cm-mtab svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--teal); }
.cm-mtab span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.cm-mtab small { color: var(--muted); font-weight: 600; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.cm-mtab:hover { background: var(--ground-2); }
.cm-mtab[aria-selected="true"] { background: var(--teal-soft); color: var(--teal); }
.cm-mpanel { overflow-y: auto; padding: 1.1rem 1.6rem 1.6rem; overscroll-behavior: contain; }
.cm-mpanel[hidden] { display: none; }
.cm-mpanel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.cm-mpanel-head h2 { margin: 0; font-size: 1.05rem; }
.cm-mpanel-head a { font-weight: 600; font-size: 0.9rem; color: var(--teal); text-decoration: none; white-space: nowrap; }
.cm-mpanel-head a:hover { text-decoration: underline; }
.cm-mpanel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 0.15rem 1rem; }
.cm-mpanel li a { display: block; text-decoration: none; padding: 0.42rem 0.6rem; border-radius: 8px; font-size: 0.93rem; color: var(--ink); line-height: 1.3; }
.cm-mpanel li a:hover, .cm-mpanel li a:focus-visible { background: var(--teal-soft); }
.cm-mpanel li a[aria-current="page"] { font-weight: 700; color: var(--teal); }

/* ---------- buttons, chips ---------- */
.cm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 0; border-radius: 10px; padding: 0.75rem 1.15rem; font-weight: 700; font-size: 0.95rem; white-space: nowrap; text-decoration: none; }
.cm-btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -2px 0 rgba(16, 48, 45, 0.14); }
.cm-btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.cm-btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.cm-btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.cm-chip { display: inline-block; border: 1px solid var(--line-2); border-radius: 999px; padding: 0.28rem 0.8rem; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); text-decoration: none; background: transparent; }
.cm-chip:hover { border-color: var(--teal); color: var(--teal); background: var(--panel); }

/* ---------- home ---------- */
.cm-hero { padding-block: clamp(2.4rem, 6vw, 4.4rem) 2.6rem; }
.cm-hero-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 3rem; align-items: center; }
.cm-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.cm-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.cm-hero h1 { font-size: clamp(3.3rem, 9vw, 6.4rem); margin: 0 0 1rem; color: var(--teal); text-wrap: balance; }
.cm-hero h1 em { font-style: normal; color: var(--ink); }
.cm-lede { font-size: 1.12rem; color: var(--ink-2); max-width: 46ch; margin: 0 0 1.5rem; }
.cm-big-search { display: flex; align-items: center; gap: 0.75rem; background: var(--panel); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 0.5rem 0.5rem 0.5rem 1.1rem; max-width: 560px; box-shadow: 0 10px 30px -14px var(--shadow-2); }
.cm-big-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft), 0 10px 30px -14px var(--shadow-2); }
.cm-big-search svg { width: 20px; height: 20px; stroke: var(--muted); fill: none; stroke-width: 2.2; flex: none; }
.cm-big-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; padding: 0.55rem 0; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; align-items: center; }
.cm-trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin-top: 1.8rem; color: var(--ink-2); font-size: 0.92rem; }
.cm-trust span { display: inline-flex; align-items: center; gap: 0.45rem; }
.cm-trust svg { width: 18px; height: 18px; stroke: var(--teal); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cm-hero-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; min-width: 0; box-shadow: 0 30px 60px -30px var(--shadow-2); }
.cm-hero-card h2 { margin: 0 0 0.9rem; font-size: 1rem; }
.cm-hero-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.cm-hero-card li a { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); background: var(--ground); border-radius: 10px; padding: 0.6rem 0.75rem; font-weight: 600; font-size: 0.95rem; }
.cm-hero-card li a:hover { background: var(--teal-soft); }
.cm-section { padding-block: 2.4rem; }
.cm-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.cm-section-head h2 { font-size: clamp(2rem, 4vw, 2.7rem); margin: 0; }

/* cards */
.cm-cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cm-cat-card { display: flex; flex-direction: column; gap: 0.25rem; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.15rem 1.1rem; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.cm-cat-card:hover { transform: translateY(-3px); border-color: var(--teal); box-shadow: 0 18px 30px -18px var(--shadow-2); }
.cm-cat-card h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.cm-cat-card h3 small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.cm-cat-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.cm-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); flex: none; }
.cm-cat-card .cm-icon { margin-bottom: 0.65rem; }
.cm-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cm-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.cm-tool-card { display: flex; gap: 0.85rem; align-items: flex-start; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0.95rem 1.05rem; transition: border-color .2s, transform .2s; }
.cm-tool-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.cm-tool-card .cm-icon { width: 36px; height: 36px; border-radius: 10px; }
.cm-tool-card .cm-icon svg { width: 18px; height: 18px; }
.cm-tool-card h3 { margin: 0 0 0.1rem; font-size: 0.98rem; }
.cm-tool-card p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.45; }

/* category toolbar filter */
.cm-filter-bar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0 0 1.1rem; }
.cm-filter { flex: 1 1 260px; min-width: 0; padding: 0.7rem 0.95rem; font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; }
.cm-filter:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.cm-filter-count { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cm-empty { padding: 1.2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 10px; }

/* ---------- inner pages ---------- */
.cm-crumbs { font-size: 0.86rem; color: var(--muted); padding-top: 1.5rem; }
.cm-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cm-crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line-2); }
.cm-crumbs a { color: var(--ink-2); text-decoration: none; }
.cm-crumbs a:hover { color: var(--teal); text-decoration: underline; }
.cm-page-head { padding-block: 0.7rem 1.4rem; }
.cm-page-head h1 { font-size: clamp(2.6rem, 6.5vw, 4.4rem); margin: 0 0 0.6rem; color: var(--teal); text-wrap: balance; }
.cm-page-head .cm-intro { margin: 0; max-width: 66ch; color: var(--ink-2); font-size: 1.05rem; }
.cm-page-head .cm-intro p { margin: 0 0 0.6rem; }
.cm-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.9rem; font-size: 0.85rem; color: var(--muted); }
/* Tool pages: compact header so the tool itself sits near the top of the screen. */
.cm-page-head-tool { padding-block: 0.4rem 1rem; }
.cm-page-head-tool h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin-bottom: 0.4rem; }
.cm-lede-sm { margin: 0; max-width: 80ch; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.cm-page-head-tool .cm-meta { margin-top: 0.55rem; }
.cm-tool-box { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1rem, 3vw, 1.75rem); box-shadow: 0 20px 40px -30px var(--shadow-2); }
/* Wider tool boxes break out of the 1180px column (no transform: it would break position:fixed full-screen modes) */
.cm-tool-box-wide, .cm-tool-box-app { --tw: 1400px; width: min(var(--tw), calc(100vw - 48px)); margin-left: calc(50% - min(var(--tw) / 2, 50vw - 24px)); }
.cm-tool-box-app { --tw: 1720px; padding: clamp(0.75rem, 1.6vw, 1.1rem); }
.cm-tool-box-app .cm-tool textarea { min-height: clamp(300px, 48vh, 680px) !important; }
.cm-tool-box-wide .cm-tool textarea { min-height: 240px !important; }
@media (max-width: 720px) {
  .cm-tool-box-wide, .cm-tool-box-app { width: auto; margin-left: 0; }
  .cm-tool-box-app .cm-tool textarea { min-height: 260px !important; }
  .cm-tool-box-wide .cm-tool textarea { min-height: 200px !important; }
}
.cm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 3rem; padding-block: 2.6rem 1rem; align-items: start; }
.cm-aside { position: sticky; top: 84px; display: grid; gap: 1.4rem; }
.cm-aside h2 { margin: 0 0 0.7rem; font-size: 1rem; }
.cm-aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.cm-aside li a { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem 0.75rem; font-weight: 600; font-size: 0.92rem; }
.cm-aside li a:hover { border-color: var(--teal); }
.cm-aside .cm-icon { width: 30px; height: 30px; border-radius: 8px; }
.cm-aside .cm-icon svg { width: 16px; height: 16px; }

/* editorial content */
.cm-prose { max-width: 70ch; min-width: 0; color: var(--ink-2); overflow-wrap: break-word; }
.cm-prose code { overflow-wrap: anywhere; }
.cm-prose > :first-child { margin-top: 0; }
.cm-prose h2 { font-family: "Archivo", sans-serif; font-stretch: 80%; font-weight: 800; color: var(--ink); font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.15; margin: 2.2rem 0 0.7rem; letter-spacing: -0.01em; text-wrap: balance; }
.cm-prose h3 { color: var(--ink); font-size: 1.12rem; margin: 1.6rem 0 0.45rem; }
.cm-prose h4 { color: var(--ink); font-size: 1rem; margin: 1.3rem 0 0.4rem; }
.cm-prose p { margin: 0 0 1rem; }
.cm-prose ul, .cm-prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.cm-prose li { margin-bottom: 0.35rem; }
.cm-prose strong { color: var(--ink); }
.cm-prose a { color: var(--teal); text-underline-offset: 3px; }
.cm-prose blockquote { margin: 1.2rem 0; padding: 0.9rem 1.1rem; border-left: 4px solid var(--accent); background: var(--panel); border-radius: 0 10px 10px 0; }
.cm-prose code { font-size: 0.9em; background: var(--ground-2); padding: 0.1em 0.35em; border-radius: 4px; }
.cm-prose pre { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; }
.cm-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; font-size: 0.93rem; display: block; overflow-x: auto; }
.cm-prose th, .cm-prose td { text-align: left; padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line); }
.cm-prose th { color: var(--ink); background: var(--ground-2); font-weight: 700; }
.cm-prose td { font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.cm-footer { margin-top: 3.5rem; border-top: 1px solid var(--line); background: var(--panel); padding-block: 2.6rem 2rem; font-size: 0.9rem; color: var(--muted); }
.cm-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.cm-footer h2 { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); margin: 0 0 0.7rem; }
.cm-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.cm-footer a { color: var(--ink-2); text-decoration: none; }
.cm-footer a:hover { color: var(--teal); text-decoration: underline; }
.cm-footer p { margin: 0.7rem 0 0; max-width: 34ch; }
.cm-footer-base { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.cm-linkbtn { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: inherit; text-decoration: underline; }

/* ---------- search palette ---------- */
.cm-palette { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding: 12vh 16px 16px; background: var(--scrim); }
.cm-palette-box { width: min(620px, 100%); background: var(--panel); border-radius: 16px; box-shadow: 0 40px 80px -20px var(--shadow-2); overflow: hidden; border: 1px solid var(--line); }
.cm-palette-input { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
.cm-palette-input svg { width: 20px; height: 20px; stroke: var(--teal); fill: none; stroke-width: 2.3; flex: none; }
.cm-palette-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.1rem; }
.cm-palette-list { list-style: none; margin: 0; padding: 0.4rem; max-height: 52vh; overflow-y: auto; }
.cm-palette-list a { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--ink); border-radius: 10px; padding: 0.55rem 0.75rem; }
.cm-palette-list a[aria-selected="true"] { background: var(--teal-soft); }
.cm-palette-list .cm-icon { width: 30px; height: 30px; border-radius: 8px; }
.cm-palette-list .cm-icon svg { width: 16px; height: 16px; }
.cm-palette-list b { font-weight: 600; }
.cm-palette-list mark { background: var(--accent-soft); color: inherit; border-radius: 3px; }
.cm-palette-list small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.cm-palette-foot { display: flex; gap: 1rem; padding: 0.55rem 1.1rem; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); flex-wrap: wrap; }

/* ---------- consent ---------- */
.cm-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px -20px var(--shadow-2); padding: 1rem 1.1rem; display: grid; gap: 0.75rem; }
.cm-consent p { margin: 0; font-size: 0.9rem; color: var(--ink-2); }
.cm-consent div { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cm-consent .cm-btn { padding: 0.55rem 0.95rem; font-size: 0.9rem; }

/* ---------- word list browser ---------- */
.cm-wl-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0 1rem; }
.cm-wl-controls select { font: inherit; padding: 0.55rem 0.8rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); }
.cm-wl-words { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.6rem 0 1.2rem; }
.cm-wl-words span { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.2rem 0.5rem; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.cm-wl-words span b { color: var(--teal); font-weight: 700; margin-left: 0.3rem; font-size: 0.78rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cm-mega-inner { grid-template-columns: 210px minmax(0, 1fr); }
  .cm-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .cm-cat-grid, .cm-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .cm-aside { position: static; }
  .cm-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) { .cm-nav .cm-quick { display: none; } }
@media (max-width: 680px) {
  .cm-nav { display: none; }
  .cm-search-trigger { width: auto; flex: 1; }
  .cm-search-trigger kbd { display: none; }
  .cm-menu-toggle { display: inline-flex; }
  /* phone: category chips scroll sideways on top, tools list below */
  .cm-mega-inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: var(--cm-menu-h, calc(100dvh - 64px)); }
  .cm-mega-cats, .cm-mpanel { max-height: none; }
  .cm-mega-cats { flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); padding: 0.6rem 0.75rem; gap: 0.35rem; scrollbar-width: none; }
  .cm-mega-cats::-webkit-scrollbar { display: none; }
  .cm-mtab { padding: 0.45rem 0.75rem; border: 1px solid var(--line); font-size: 0.9rem; }
  .cm-mtab span { overflow: visible; }
  .cm-mpanel { padding: 0.9rem 1rem 1.4rem; }
  .cm-mpanel ul { grid-template-columns: minmax(0, 1fr); }
  .cm-mpanel li a { padding: 0.6rem 0.6rem; font-size: 1rem; }
  .cm-tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .cm-cat-grid { grid-template-columns: 1fr; }
  .cm-footer-grid { grid-template-columns: 1fr; }
  .cm-logo span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .cm-header, .cm-footer, .cm-aside, .cm-consent, .cm-palette { display: none !important; } body { background: #fff; } }

/* ---------- contact form ---------- */
.cm-contact { margin-bottom: 0.5rem; }
.cm-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.cm-full { grid-column: 1 / -1; }
.cm-fld { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.cm-fld label { font-weight: 600; font-size: 0.95rem; }
.cm-fld input, .cm-fld select, .cm-fld textarea { font: inherit; font-size: 1rem; width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink); }
.cm-fld textarea { resize: vertical; min-height: 9.5rem; line-height: 1.5; }
.cm-fld input:focus-visible, .cm-fld select:focus-visible, .cm-fld textarea:focus-visible { outline: 3px solid var(--teal-soft); border-color: var(--teal); }
.cm-err { color: #b42318; font-size: 0.85rem; min-height: 1em; }
.cm-form-about { margin: 0; color: var(--ink-2); }
.cm-form-end { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cm-form-end small { color: var(--ink-2); max-width: 56ch; line-height: 1.45; }
.cm-form-status { margin: 0; padding: 0.75rem 1rem; border-radius: 12px; background: var(--ground); font-weight: 600; }
.cm-form-status.is-ok { background: var(--teal-soft); color: var(--teal); }
.cm-form-status.is-warn { background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 640px) {
  .cm-form { grid-template-columns: minmax(0, 1fr); }
  .cm-form-end { flex-direction: column; align-items: stretch; }
  .cm-form-end .cm-btn { width: 100%; }
}
