@font-face {
  font-family: "Familjen Grotesk";
  src: url("fonts/familjen-grotesk-latin.7eb7ec31a3a1.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("fonts/familjen-grotesk-latin-ext.f2c82a825501.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --raised: #f4f4f5;
  --ink: #171717;
  --ink-2: #525252;
  --muted: #737373;
  --line: rgb(23 23 23 / 0.09);
  --edge: rgb(23 23 23 / 0.46);
  --rev: #2f3fc0;
  --error: #c42121;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header: 56px;
  color-scheme: light dark;
  accent-color: var(--rev);
  scrollbar-color: var(--edge) transparent;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141415;
    --raised: #232325;
    --ink: #ededed;
    --ink-2: #a1a1a6;
    --muted: #85858b;
    --line: rgb(237 237 237 / 0.09);
    --edge: rgb(237 237 237 / 0.4);
    --rev: #a3adff;
    --error: #ff8a8a;
  }
}

* { box-sizing: border-box; }
::selection { background: color-mix(in srgb, var(--rev) 22%, transparent); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/22px "Familjen Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--edge); }
:focus-visible { outline: 2px solid var(--rev); outline-offset: 2px; border-radius: 4px; }
h1, h2 { text-wrap: balance; }
.icon { flex: none; fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

header.site {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header);
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 500; font-size: 16px; text-decoration: none; white-space: nowrap; }
header nav { display: flex; gap: 24px; }
header nav a, .files-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms var(--ease);
}
header nav a:hover, .files-link:hover { color: var(--ink); }
header nav a[aria-current="page"], .files-link[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline 2px var(--rev);
  text-underline-offset: 8px;
}
.files-link { margin-left: auto; }

.tool-page {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  min-height: calc(100dvh - var(--header) - 1px);
}
.side { padding: 40px 40px 40px 32px; border-right: 1px solid var(--line); }
.work { padding: 40px 48px; }
.work > * { max-width: 720px; }

h1 { font-weight: 500; font-size: 34px; line-height: 40px; letter-spacing: -0.01em; margin: 0; }
.lead { margin: 12px 0 0; max-width: 36ch; color: var(--ink-2); font-size: 17px; line-height: 26px; }
.note { margin: 16px 0 0; max-width: 36ch; color: var(--ink-2); }

.facts { margin: 32px 0 0; display: grid; gap: 12px; }
.facts:empty { display: none; }
.facts dt { color: var(--muted); font-size: 13px; line-height: 20px; }
.facts dd { margin: 0; }

form.tool { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; align-items: start; }
form.tool > * { grid-column: 1 / -1; }
form.tool > .field { grid-column: auto; }

.error { display: flex; gap: 8px; margin: 0; font-weight: 500; }
.error .icon { margin-top: 2px; stroke: var(--error); }
.field-error { margin: 8px 0 0; color: var(--error); font-size: 14px; line-height: 20px; }
form.tool > .field-error { margin-top: -12px; }

.field { display: grid; gap: 8px; }
.field label, .drop label { font-weight: 500; }
.field label { font-size: 14px; line-height: 20px; }
.field small { color: var(--muted); font-size: 13px; line-height: 20px; }
input[type="text"] {
  font: inherit;
  height: 44px;
  padding: 0 12px;
  width: 100%;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 8px;
  transition: border-color 150ms var(--ease);
}
input[type="text"]:hover { border-color: var(--ink-2); }
input[type="text"]:focus-visible { outline: 2px solid var(--rev); outline-offset: -1px; border-color: transparent; }
input[type="text"]:user-invalid, .field:has(.field-error) input { border-color: var(--error); }

.drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 20px 20px 20px 24px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop:hover, .drop[data-over] { border-color: var(--ink-2); background: color-mix(in srgb, var(--raised) 60%, transparent); }
.drop:has(input:focus-visible) { outline: 2px solid var(--rev); outline-offset: 2px; }
.drop.is-invalid { border-color: var(--error); }
.drop-small { min-height: 64px; padding: 12px 12px 12px 24px; }
.drop-text { flex: 1; display: grid; min-width: 0; }
.drop-hint, .drop-chosen { color: var(--ink-2); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.drop-hint[data-filled] { color: var(--ink); }
.drop:has([data-filled]), .drop:has(input[required]:valid) { border-color: var(--ink); }
.tap { display: none; }
@media (pointer: coarse) { .drag { display: none; } .tap { display: inline; } }
.drop-chosen { display: none; }
.drop:has(input[required]:valid):not(:has([data-filled])) .drop-chosen { display: block; }
.drop:has(input[required]:valid) .drop-hint:not([data-filled]) { display: none; }
.pick {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
.status { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  font: 500 15px/1 "Familjen Grotesk", system-ui, sans-serif;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 150ms var(--ease), transform 120ms var(--ease);
}
button:hover, .button:hover { opacity: 0.86; }
button:active, .button:active { transform: scale(0.98); }
button:disabled { opacity: 0.55; cursor: progress; }
.warnings { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.warnings[hidden] { display: none; }
.warnings li { display: flex; gap: 8px; align-items: baseline; }
.warnings li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 3px; background: var(--rev); transform: translateY(-2px); }

.report { display: grid; gap: 20px; }
.report h2 { margin: 0; font-weight: 500; font-size: 20px; line-height: 28px; overflow-wrap: anywhere; }
.report .meta { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.fixes { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.fixes li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 12px 0; border-top: 1px solid var(--line); }
.fixes .count { font-size: 17px; font-weight: 500; color: var(--rev); white-space: nowrap; font-variant-numeric: tabular-nums; }
.verify { margin-top: 4px; }
.verify h3 { margin: 0; font-weight: 500; font-size: 15px; line-height: 22px; }
.verify ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.verify li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.verify .icon { stroke: var(--rev); stroke-width: 2; }
.quiet { color: var(--ink-2); }

.tool-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.tool-list li { border-top: 1px solid var(--line); }
.tool-list a {
  display: grid;
  gap: 4px;
  padding: 20px 16px;
  margin: 0 -16px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 150ms var(--ease);
}
.tool-list a:hover { background: var(--raised); }
.tool-list strong { font-weight: 500; font-size: 20px; line-height: 28px; }
.tool-list span { color: var(--ink-2); }

.prose { max-width: 65ch; }
.prose p { margin: 0 0 16px; font-size: 17px; line-height: 28px; }

@media (max-width: 900px) {
  :root { --header: auto; }
  header.site { flex-wrap: wrap; gap: 0 20px; padding: 8px 16px 4px; }
  header nav { order: 3; width: 100%; gap: 20px; }
  header nav a { min-height: 44px; font-size: 14px; }
  .files-link { font-size: 14px; }
  .tool-page { display: block; min-height: 0; }
  .side { padding: 24px 16px; border-right: 0; }
  .work { padding: 8px 16px 40px; }
  h1 { font-size: 28px; line-height: 34px; }
  .lead { font-size: 16px; line-height: 24px; }
  .facts { margin-top: 24px; }
  form.tool { grid-template-columns: 1fr; }
  .drop { flex-wrap: wrap; padding: 16px; }
  .drop .pick { width: 100%; justify-content: center; }
  .fixes li { flex-direction: column; gap: 4px; }
  .prose p { font-size: 16px; line-height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
}
