/* Night Owl School look for every micro-tool (add class "tt" to <body>).
   Uses the locked palette from theme.css (DECISIONS #63, DESIGN.md). The earlier indigo / violet / teal
   theme is retired: tools now match the main site. Never hardcode colours here; use the tokens. */
:root {
  --t-bg: var(--background); --t-card: var(--card); --t-ink: var(--foreground); --t-muted: var(--muted-foreground);
  --t-line: var(--border); --t-input: var(--input); --t-soft: var(--sand);
  --t-indigo: var(--cobalt-text); --t-violet: var(--cobalt); --t-blue: var(--cobalt); --t-teal: var(--acid-lime);
  --t-ok-bg: var(--acid-lime); --t-ok-fg: var(--ink); --t-warn-bg: var(--sun); --t-warn-fg: var(--ink); --t-bad-bg: var(--coral); --t-bad-fg: var(--ink);
  --t-shadow: none;
}
body.tt { background: var(--t-bg); color: var(--t-ink); position: relative; }
.tt .page { position: relative; z-index: 1; max-width: 900px; }
.tt a { color: var(--t-indigo); }
.tt :focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

.blobs { display: none; }

.hero { text-align: center; padding: 8px 0 24px; }
.free-pill { display: inline-block; padding: 8px 28px; border-radius: 999px; color: var(--ink); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; background: var(--acid-lime); }
.tt h1 { font-family: var(--font-heading); font-weight: 400; letter-spacing: -0.01em; line-height: 1.06; font-size: clamp(2.25rem, 9vw, 3.75rem); margin: 18px 0 12px; }
.h1-a, .h1-b { display: block; }
.h1-a { color: var(--t-ink); }
.h1-b { color: var(--cobalt-text); }
.hero-sub { max-width: 46ch; margin: 0 auto; color: var(--t-muted); font-size: 1.05rem; }
.hero-sub b { color: var(--t-ink); }

.tt .card { background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--radius-tile); padding: 22px 18px; box-shadow: none; }
.tt h2 { font-family: var(--font-heading); font-weight: 400; font-size: 1.5rem; letter-spacing: -0.01em; margin: 0; color: var(--t-ink); }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.card-sub { margin: 2px 0 0; font-size: 0.88rem; color: var(--t-muted); }
.ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--ink); }
.ico svg { stroke: currentColor; }
.ico-indigo { background: var(--periwinkle); } .ico-teal { background: var(--acid-lime); }
.center { text-align: center; }

.tt label { color: var(--t-muted); font-weight: 600; }
.tt input[type="number"], .tt input[type="text"], .tt select { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--t-card); color: var(--t-ink); border: 1px solid var(--t-input); border-radius: var(--radius); font: inherit; font-size: 1rem; }
.tt input:disabled { opacity: .6; }
.tt .check { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.tt .check input { width: 22px; height: 22px; accent-color: var(--cobalt); }
.err { margin: 8px 0 0; font-size: 0.9rem; color: var(--destructive-text); font-weight: 600; }
.hint { margin: 14px 0 0; font-size: 0.85rem; color: var(--t-muted); }

.tt .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 28px; border-radius: 999px; border: 0; background: var(--ink); color: var(--background); font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; }
:root[data-theme="dark"] .tt .btn { background: var(--acid-lime); color: var(--ink); }
.tt .btn:hover { opacity: .9; }
.tt .btn[disabled], .tt .btn:disabled { opacity: 1; background: var(--t-soft); color: var(--muted-foreground); cursor: not-allowed; }
.tt .pill { color: var(--t-ink); border-color: var(--t-input); }
.tt .pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--background); }
:root[data-theme="dark"] .tt .pill[aria-pressed="true"] { background: var(--acid-lime); border-color: var(--acid-lime); color: var(--ink); }
.tt .linkbtn { color: var(--t-indigo); }

.note { margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--t-soft); color: var(--t-ink); }
.note[data-state="ok"] { background: var(--t-ok-bg); color: var(--t-ok-fg); }
.note[data-state="warn"] { background: var(--t-warn-bg); color: var(--t-warn-fg); }
.note[data-state="bad"] { background: var(--t-bad-bg); color: var(--t-bad-fg); }
.msg { margin: 8px 0 0; } .msg:first-child { margin-top: 0; } .strong { font-weight: 800; font-size: 1.05rem; }

.features { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.features li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 12px; background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--radius-tile); }
.features b { font-size: 0.95rem; color: var(--t-ink); } .features li > span:last-child { font-size: 0.8rem; color: var(--t-muted); }
.fi { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; margin-bottom: 4px; color: var(--ink); }
.fi svg { stroke: currentColor; }
.fi-teal { background: var(--acid-lime); } .fi-indigo { background: var(--periwinkle); } .fi-orange { background: var(--coral); } .fi-green { background: var(--khaki); }
@media (min-width: 720px) { .features { grid-template-columns: repeat(4, 1fr); } }

.band { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 480px) { .tt .card { padding: 20px 14px; } }

/* Readable secondary text: placeholders and optional-hints use the palette muted colour, never faded ink. */
.tt label input::placeholder { color: var(--muted-foreground); opacity: 1; }
.tt label em { color: var(--muted-foreground); opacity: 1; font-style: normal; }
