/* Shared layout for every micro-tool page. Uses tokens from theme.css only. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); line-height: 1.5; }
h1, h2 { font-family: var(--font-heading); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; }
h2 { font-size: 1.5rem; }
a { color: var(--cobalt-text); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

.site-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 14px 16px; }
.site-bar a.brand { color: var(--foreground); font-weight: 800; text-decoration: none; letter-spacing: 0.02em; text-transform: uppercase; font-size: 0.85rem; }
.site-bar a.brand span { color: var(--cobalt-text); }
.theme-btn { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--input); background: transparent; color: var(--foreground); cursor: pointer; font: inherit; font-size: 0.9rem; }

.page { max-width: 760px; margin: 0 auto; padding: 8px 16px 72px; }
.eyebrow { color: var(--cobalt-text); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.lede { color: var(--muted-foreground); margin: 10px 0 24px; max-width: 60ch; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-tile); padding: 20px; margin-bottom: 16px; }
.card > h2 { margin-bottom: 14px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted-foreground); }
input[type="number"], input[type="text"] { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--input); background: var(--background); color: var(--foreground); font: inherit; font-size: 1rem; }
button { font: inherit; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--input); background: transparent; color: var(--foreground); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--background); border-color: var(--ink); }
:root[data-theme="dark"] .pill[aria-pressed="true"] { background: var(--acid-lime); color: var(--ink); border-color: var(--acid-lime); }
.linkbtn { background: none; border: 0; padding: 8px 4px; min-height: 44px; color: var(--cobalt-text); text-decoration: underline; cursor: pointer; }

.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: var(--ink); }
.badge.safe { background: var(--acid-lime); }
.badge.borderline { background: var(--sun); }
.badge.short { background: var(--coral); }

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

/* Author display rules (e.g. label { display: flex }) would otherwise override the hidden attribute. */
[hidden] { display: none !important; }
