:root {
  color-scheme: dark;
  --background: #14181b;
  --surface: #1d2226;
  --surface-strong: #292f34;
  --ink: #f2f3f1;
  --muted: #b3babf;
  --line: #46505a;
  --accent: #ece9df;
  --accent-hover: #fffdf6;
  --accent-ink: #24282b;
  --danger: #f4ba9f;
  --danger-bg: #4b2d23;
  --paper: #eeeae0;
  --paper-ink: #25282b;
  --radius: 14px;
  --sans: 'Segoe UI', system-ui, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  scrollbar-gutter: stable;
  font-family: var(--sans);
  background: var(--background);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--accent-ink); }
body { margin: 0; display: flex; flex-direction: column; min-height: 100svh; }
main { flex: 1; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
a:not(.button):hover { color: var(--accent); }
button, input { font: inherit; }
button:not(:disabled) { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip { position: fixed; top: 12px; left: 12px; clip-path: inset(50%); background: var(--accent); color: #111314; padding: 8px 12px; z-index: 2; }
.skip:focus { clip-path: none; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 27px; font-weight: 700; letter-spacing: -.035em; }
.brand::before { content: ''; width: 26px; height: 26px; background: url('/assets/pally-mark.svg') center / contain no-repeat; }
nav, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
nav { gap: 23px; font-size: 14px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 17px; border: 1px solid transparent; border-radius: 5px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; text-decoration: none; transition: background-color .18s ease, color .18s ease; }
.button:hover { background: var(--accent-hover); color: var(--accent-ink); }
.button:active { background: #d6d2c8; }
.button:disabled { opacity: .55; }
.button.small { min-height: 38px; padding: 7px 12px; }
.button.secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--surface-strong); }
.quiet-link { display: inline-flex; align-items: center; min-height: 44px; padding: 3px 0; font-size: 14px; font-weight: 650; color: var(--muted); }
.quiet-link:hover { color: var(--ink); }
h1, h2, h3, p { margin: 0; }
h1 { font-family: var(--serif); font-size: clamp(47px, 7.4vw, 96px); font-weight: 700; line-height: .99; letter-spacing: -.04em; }
h2 { font-size: 24px; font-weight: 680; letter-spacing: -.04em; line-height: 1.18; overflow-wrap: anywhere; }
p { line-height: 1.55; color: var(--muted); }
.hero { padding: 18px 0 clamp(44px, 7vw, 104px); }
.hero-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: stretch; min-height: clamp(410px, 44vw, 580px); }
.hero-copy { align-self: center; padding: clamp(28px, 4vw, 54px) clamp(24px, 4vw, 60px) clamp(40px, 5vw, 68px) 0; }
.hero h1 { font-size: clamp(44px, 6.2vw, 92px); }
.hero h1 span { display: block; }
.hero p { margin: 22px 0 29px; font-size: clamp(16px, 2vw, 20px); max-width: 385px; }
.hero-photo { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 50% 48%; }
.sample { display: grid; align-items: center; grid-template-columns: 1fr 1.2fr; gap: 40px; padding: clamp(20px, 4.2vw, 47px); border-radius: var(--radius); background: var(--surface); scroll-margin: 22px; }
.sample h2 { font-family: var(--serif); font-size: clamp(27px, 4.1vw, 54px); }
.sample-intro p { margin-top: 8px; }
.sample-intro p { max-width: 40ch; }
.sample-pair p { font-size: 13px; }
.sample-pair p:not(:first-child) { margin-top: 10px; }
.example-controls { display: flex; width: max-content; max-width: 100%; padding: 3px; margin-bottom: 14px; border-radius: 7px; background: var(--background); }
.example-controls button { min-height: 36px; min-width: 94px; background: transparent; color: var(--muted); border: 0; border-radius: 4px; font-size: 13px; font-weight: 650; padding: 4px 12px; }
.example-controls button:hover { color: var(--ink); }
.example-controls button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.sample-pair .example-result { color: var(--ink); min-height: 2.5em; }
.sample-bytes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; margin-top: 5px; }
.sample-bytes span, .comparison-bytes span { display: grid; place-items: center; min-height: 32px; background: var(--surface-strong); border-radius: 4px; font-size: 13px; }
.sample-bytes .changed, .comparison-bytes .changed { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.workflow, .faq { display: grid; grid-template-columns: .85fr 1fr; gap: clamp(38px, 10vw, 160px); padding: clamp(64px, 9vw, 136px) 0; }
.workflow h2, .privacy h2, .faq h2, .closeout h2 { font-family: var(--serif); font-size: clamp(33px, 4.2vw, 58px); }
.workflow-intro p, .privacy p { max-width: 41ch; margin-top: 15px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: steps; display: grid; gap: 30px; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px 16px; counter-increment: steps; }
.steps li::before { content: counter(steps, decimal-leading-zero); grid-row: 1 / 3; color: var(--muted); font-family: var(--mono); font-size: 13px; line-height: 25px; }
.steps h3 { font-weight: 690; font-size: 20px; letter-spacing: -.02em; }
.steps p { grid-column: 2; }
.privacy { background: var(--paper); color: var(--paper-ink); }
.privacy-inner { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); align-items: center; gap: clamp(24px, 8vw, 108px); padding: clamp(28px, 5vw, 74px) 0; }
.privacy img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.privacy p, .privacy .quiet-link { color: #464a4c; }
.privacy .quiet-link:hover { color: #121618; }
.privacy :focus-visible { outline-color: var(--paper-ink); }
.privacy .quiet-link { margin-top: 13px; }
.faq details + details { margin-top: 6px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; flex: 0 0 14px; height: 14px; margin-right: 4px; background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat; }
details[open] > summary::after { background-size: 12px 1.5px, 0 0; }
.faq summary, .backup summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 50px; }
.faq summary { font-weight: 650; }
.faq p { margin: 1px 23px 16px 0; }
.closeout { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 0 clamp(48px, 8vw, 104px); }
.closeout h2 { max-width: 18ch; }
.closeout .button { flex: 0 0 auto; }
footer { background: #000; }
.footer-inner { min-height: 105px; display: flex; justify-content: space-between; align-items: center; }
.footer-inner > a:last-child { color: var(--muted); }
.footer-inner > a:last-child:hover { color: var(--accent); }
.workspace, .guide { padding: 64px 0 84px; }
.workspace h1, .guide h1 { font-size: clamp(43px, 6.3vw, 78px); }
.intro { margin: 12px 0 32px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.workspace-heading .quiet-link { margin-bottom: 26px; }
.workspace-grid { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 2.4fr); gap: 20px; align-items: start; }
.book, .inspection { min-width: 0; border-radius: var(--radius); background: var(--surface); padding: clamp(15px, 3vw, 29px); }
.book-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 13px; }
.book-header h2 { font-size: 19px; }
.book-filter { margin-top: 18px; }
.book-filter label { display: block; margin-bottom: 5px; font-size: 13px; color: var(--muted); }
.backup { margin-top: 20px; }
.backup summary, .backup p { font-size: 13px; color: var(--muted); }
.backup .actions { margin-top: 10px; }
.backup #merge-book { margin-top: 7px; }
.contacts { margin: 13px 0 0; padding: 0; list-style: none; }
.contacts:empty { display: none; }
.contact-choice { width: 100%; display: grid; gap: 3px; text-align: left; padding: 10px; margin-top: 5px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); overflow-wrap: anywhere; }
.contact-choice:hover { background: var(--surface-strong); }
.contact-choice[aria-pressed="true"] { background: var(--surface-strong); border-color: var(--line); }
.address { font-family: var(--mono); }
.abbreviated { font-size: 12px; color: var(--muted); }
.full-address { color: var(--accent); font-size: clamp(12px, 2.5vw, 16px); overflow-wrap: anywhere; margin: 10px 0 14px; }
.inspection { min-height: 218px; }
.empty p { margin-top: 10px; max-width: 49ch; }
.empty .quiet-link { margin-top: 10px; }
.editor { padding: 0 0 18px; }
.editor h2, .reference h2 { margin-bottom: 12px; }
.editor label:not(.check-line), .compare label { display: block; font-size: 14px; font-weight: 650; }
.editor label:not(.check-line) { margin: 12px 0 5px; }
.compare label { margin: 0 0 5px; }
input:not([type="checkbox"]) { width: 100%; min-height: 43px; padding: 8px 11px; color: var(--ink); background: var(--background); border: 1px solid var(--line); border-radius: 7px; font-size: 16px; }
.check-line { margin: 14px 0; display: flex; align-items: start; gap: 8px; color: var(--muted); font-size: 14px; }
.check-line input { appearance: none; display: grid; place-content: center; width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; border: 1px solid #a1a8ad; border-radius: 4px; color: var(--accent-ink); background: var(--background); cursor: pointer; }
.check-line input:checked { background: var(--accent); border-color: var(--accent); }
.check-line input:checked::after { content: ''; width: 5px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check-line:has(input:hover) span { color: var(--ink); }
.compare { padding-top: 23px; }
.compare button { margin-top: 11px; }
.status { margin-top: 8px; font-size: 13px; }
.status:empty { display: none; }
.error { color: var(--danger); }
#remove-form { margin-top: 14px; }
#remove-form .actions { margin-top: 6px; }
.result { margin-top: 18px; padding: 16px; border-radius: 10px; background: var(--background); }
.result h3 { color: var(--accent); font-size: 22px; }
.result[data-match="false"] h3 { color: var(--danger); }
.result p { font-size: 14px; margin-top: 5px; }
.result .comparison-label { margin-top: 13px; }
.comparison-bytes { margin-top: 5px; display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; font-family: var(--mono); }
.comparison-bytes span { min-height: 26px; font-size: clamp(11px, 1.2vw, 13px); }
.guide-grid { display: grid; grid-template-columns: minmax(176px, .58fr) minmax(0, 1.8fr); gap: clamp(22px, 7vw, 98px); align-items: start; margin-top: 48px; }
.guide-nav { position: sticky; top: 24px; display: grid; gap: 4px; }
.guide-nav a { display: block; padding: 9px 12px; color: var(--muted); border-radius: 5px; }
.guide-nav a:hover { color: var(--ink); background: var(--surface); }
.guide-body { max-width: 690px; display: grid; gap: 45px; }
.guide-body section { scroll-margin-top: 26px; }
.guide-body h2 { font-family: var(--serif); font-size: clamp(27px, 3.3vw, 41px); }
.guide-body p, .guide-body ol { margin-top: 11px; }
.guide-body ol { line-height: 1.65; color: var(--muted); padding-left: 23px; }
.guide-body a, .guide-body strong { color: var(--accent); }
.guide-body a:hover { color: var(--accent-hover); }
.guide-results { padding: 15px 19px; background: var(--surface); border-radius: 8px; }
.guide-results div + div { margin-top: 15px; }
.guide-results dt { font-weight: 650; }
.guide-results dd { color: var(--muted); margin: 4px 0 0; line-height: 1.55; }
.photo-credit { font-size: 13px; }
@media (max-width: 950px) { .comparison-bytes { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
@media (max-width: 670px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { min-height: 64px; }
  nav { gap: 12px; }
  .hero { padding: 16px 0 38px; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 30px 0 26px; }
  .hero h1 { font-size: clamp(43px, 11vw, 68px); }
  .hero-photo { height: clamp(210px, 65vw, 390px); object-position: 50% 68%; }
  .sample, .workflow, .workspace-grid, .privacy-inner, .faq, .guide-grid { grid-template-columns: 1fr; }
  .sample { gap: 18px; }
  .workflow, .faq { padding: 56px 0; gap: 24px; }
  .workspace, .guide { padding: 41px 0 58px; }
  .workspace-heading, .closeout { align-items: start; flex-direction: column; }
  .workspace-heading .intro { margin-bottom: 0; }
  .workspace-heading .quiet-link { margin-bottom: 12px; }
  .privacy img { aspect-ratio: 16 / 9; }
  .guide-grid { margin-top: 26px; }
  .guide-nav { position: static; display: flex; gap: 1px 6px; padding-bottom: 15px; }
  .guide-nav a { padding: 6px; }
  .guide-body { gap: 36px; }
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
