/* uuutil — privacy-first tools. Zero external requests: system fonts only.
   %%IMPLEMENT_RULE%% tools_form(pwa) */
/* FORM-INPUT CONVENTION (company-wide): every input/select/textarea on this
   site — shell pages and tool components alike — must render at >=16px on
   smartphones (scope via @media (hover: none) and (pointer: coarse)); below
   16px iOS Safari auto-zooms on focus. Desktop sizing stays as designed.
   Shell pages have no form controls today; the tool components carry the
   floor in their own styles.
   %%IMPLEMENT_RULE%% decision(mobile_input_font) */
:root {
  --bg: #eef1f3;
  --surface: #ffffff;
  --ink: #17242e;
  --muted: #5c6b76;
  --line: #d7dee4;
  --accent: #2455d6;
  --u1: #2455d6; /* upper / cobalt */
  --u2: #b25e09; /* digit / amber  */
  --u3: #a62bb5; /* symbol / violet */
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --body: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101820;
    --surface: #18222c;
    --ink: #e6ecf1;
    --muted: #91a1ac;
    --line: #31404c;
    --u1: #7da2ff;
    --u2: #e8a44e;
    --u3: #d97ce8;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
}
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

/* Header: the wordmark's three u's carry the three character-class tints —
   the site's signature "entropy made visible". */
header.site {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 0.3rem 1rem;
  padding: 1.4rem 0 0;
}
.wordmark {
  font-family: var(--mono); font-weight: 700; font-size: 1.25rem;
  letter-spacing: 0.04em; text-decoration: none; color: var(--ink);
}
.wordmark b:nth-child(1) { color: var(--u1); }
.wordmark b:nth-child(2) { color: var(--u2); }
.wordmark b:nth-child(3) { color: var(--u3); }
.tagline {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}
h1 {
  font-family: var(--mono); font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  letter-spacing: -0.01em; margin: 2.2rem 0 0.3rem;
}
.lede { color: var(--muted); margin: 0 0 2rem; max-width: 36rem; }

main.tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1.4rem;
}

/* Tool cards on the index */
ul.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
/* Grouped index: category sections with small mono headings.
   %%IMPLEMENT_RULE%% decision(tools_index_groups) */
section.toolgroup { margin-top: 1.8rem; }
section.toolgroup h2 {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 0.6rem;
}
ul.tools a {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0.9rem; padding: 1.1rem 1.3rem;
  transition: border-color 120ms ease;
}
ul.tools a:hover, ul.tools a:focus-visible { border-color: var(--accent); }
ul.tools .tname { font-family: var(--mono); font-weight: 700; }
ul.tools .tdesc { color: var(--muted); font-size: 0.92rem; margin-top: 0.15rem; }

/* Privacy ledger — the per-tool disclosure datasheet (send-destination row
   restored per decision(tools_ledger_restore)).
   %%IMPLEMENT_RULE%% tools_disclosure(data_acquisition)
   %%IMPLEMENT_RULE%% tools_disclosure(libraries_used)
   %%IMPLEMENT_RULE%% tools_disclosure(data_storage)
   %%IMPLEMENT_RULE%% tools_disclosure(send_destination) */
section.ledger { margin-top: 2.2rem; }
section.ledger h2 {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 0.6rem;
}
.ledger table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0.9rem; overflow: hidden; font-size: 0.92rem;
}
.ledger th, .ledger td {
  text-align: left; vertical-align: top;
  padding: 0.65rem 0.9rem; border-top: 1px solid var(--line);
}
.ledger td { overflow-wrap: anywhere; }
.ledger tr:first-child th, .ledger tr:first-child td { border-top: none; }
.ledger th {
  font-family: var(--mono); font-weight: 400; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
  width: 9.5rem; white-space: nowrap;
}
.ledger .none { color: var(--muted); }

/* Embed block */
section.embed { margin-top: 2.2rem; }
section.embed h2 {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 0.6rem;
}
pre.snippet {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0.9rem; padding: 1rem 1.2rem; overflow-x: auto;
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.7; margin: 0;
}
.snipbtns { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.7rem; }
.snipbtns .copybtn, .snipbtns a.dl {
  font: inherit; font-size: 0.85rem; color: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 0.5rem;
  background: transparent; padding: 0.45rem 0.9rem; text-decoration: none;
}
.snipbtns .copybtn:hover, .snipbtns a.dl:hover,
.snipbtns .copybtn:focus-visible, .snipbtns a.dl:focus-visible { border-color: var(--accent); color: var(--accent); }
p.license { margin: 0.7rem 0 0; font-size: 0.85rem; color: var(--muted); }
p.license a { color: inherit; }
p.license a:hover, p.license a:focus-visible { color: var(--accent); }
footer.site {
  margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem 1.5rem;
}
footer.site a { color: inherit; }

/* Language nav (footer) and the redirector/404 language list.
   %%IMPLEMENT_RULE%% decision(tools_i18n) */
nav.langs { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; }
nav.langs a { text-decoration: none; }
nav.langs a:hover, nav.langs a:focus-visible { color: var(--accent); text-decoration: underline; }
nav.langs .cur { color: var(--ink); font-weight: 700; }
ul.langlist { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0.8rem; }
ul.langlist a {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0.9rem; padding: 0.9rem 1.3rem;
  font-family: var(--mono);
}
ul.langlist a:hover, ul.langlist a:focus-visible { border-color: var(--accent); }
a.back { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); text-decoration: none; }
a.back:hover { color: var(--accent); }
@media (max-width: 480px) {
  /* stack each ledger row: label above value */
  .ledger table, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; width: auto; }
  .ledger td { border-top: none; padding-top: 0.15rem; }
  main.tool { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
