:root { color-scheme: light; --ink: #2b332d; --soft: #64675b; --line: #d6d6c9; --green: #4e5d2e; --paper: #f8f6ef; --warn: #8a4a10; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--green); text-underline-offset: 2px; }
[hidden] { display: none !important; }
header, main, footer { max-width: 1000px; margin: 0 auto; padding: 0 28px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand { font-size: 20px; font-weight: 750; text-decoration: none; letter-spacing: -0.5px; color: var(--ink); }
nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.1; letter-spacing: -1.2px; margin: 0 0 16px; }
h2 { font-size: 22px; letter-spacing: -0.3px; margin: 0 0 6px; }
h3 { font-size: 17px; margin: 0; }
p { margin: 0 0 12px; }
.lead { font-size: 19px; color: #414b3b; max-width: 34em; }
.hint, .fine { color: var(--soft); font-size: 14px; }
.fine { margin-top: 12px; }

/* Hero: the job on the left, an example result on the right. */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 44px; align-items: center; padding: 48px 0 40px; }
.sample { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; }
.sample figcaption { font-size: 13px; color: var(--soft); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.sample ul { list-style: none; margin: 0; padding: 0; }
.sample li { padding: 9px 0; border-top: 1px solid #e6ebe6; font-size: 15px; }
.sample li:first-child { border-top: 0; }
.sample b { display: inline-block; min-width: 1.6em; font-size: 18px; }
.flag b { color: var(--warn); }

button { border: 1px solid #9fb2a5; border-radius: 4px; padding: 9px 14px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
button:hover { background: #eef3ed; }
button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; padding: 11px 20px; }
button.primary:hover { background: #1b4c3b; }
button.big { font-size: 17px; padding: 14px 26px; margin-top: 8px; }
:focus-visible { outline: 3px solid #c48430; outline-offset: 3px; }

/* The tool */
.tool { border-top: 1px solid var(--line); padding-top: 36px; }
.inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0 8px; }
.side { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 18px 6px; }
.side .hint { margin: 2px 0 10px; }
label { display: block; font-size: 14px; margin: 10px 0; font-weight: 500; }
input, textarea, select { display: block; width: 100%; border: 1px solid #b4c3b8; padding: 9px 10px; margin-top: 6px; background: #fff; border-radius: 4px; color: var(--ink); font: inherit; font-size: 15px; }
input[type=file] { padding: 8px; background: #fbfcfa; font-size: 14px; }
textarea, pre { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; margin: 0; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding-top: 6px; }
.opts .check, .opts > details, .opts > label:nth-of-type(4) { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0; }
details { padding: 12px 0; border-top: 1px solid var(--line); }
details details { border-top: 0; padding-bottom: 0; }
summary { cursor: pointer; font-size: 15px; color: var(--green); font-weight: 500; }
#status { min-height: 24px; font-weight: 600; }

/* Results */
#results { padding: 28px 0 12px; border-top: 2px solid var(--green); scroll-margin-top: 12px; }
.counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.counts p { margin: 0; font-size: 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; color: var(--soft); }
.counts b { display: block; font-size: 28px; color: var(--ink); line-height: 1.2; }
.counts .flag b { color: var(--warn); }
#warnings { color: var(--warn); }
#warnings:empty { display: none; }
.rowhead { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.rowhead .inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.rowhead select { width: auto; margin: 0; }
#results h3 { margin-top: 24px; }
.rowhead h3 { margin-top: 0 !important; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: #fff; margin-top: 10px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e3e9e3; white-space: nowrap; }
th { font-size: 13px; color: var(--soft); font-weight: 600; background: #f1f4ef; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.scroll table { margin: 0; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 14px; color: var(--soft); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 300px; overflow: auto; color: var(--soft); }
#saved-box { margin-top: 12px; }
#saved-box select { max-width: 360px; }

.how { border-top: 1px solid var(--line); padding: 20px 0 8px; margin-top: 12px; }
.how p:first-child { font-size: 15px; }

/* Plain reading pages (connect, privacy, thanks) */
.page { max-width: 680px; padding-top: 40px; padding-bottom: 24px; }
.page h1 { font-size: clamp(28px, 4vw, 40px); }
.page h2 { margin-top: 28px; font-size: 19px; }
.page code { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; font-size: 14px; overflow-wrap: anywhere; }
.page blockquote { margin: 0 0 12px; padding: 12px 16px; background: #fff; border-left: 3px solid var(--green); }
.addr { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }

dialog { border: 1px solid #9fb2a5; border-radius: 6px; padding: 24px; width: min(460px, 92vw); max-height: 90vh; overflow: auto; color: var(--ink); }
dialog h2 { margin-top: 6px; }
dialog .close { float: right; font-size: 14px; padding: 6px 10px; }
dialog::backdrop { background: #163b2c66; }
footer { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; padding-bottom: 28px; color: var(--soft); font-size: 14px; }

@media (max-width: 760px) {
  header, main, footer { padding-left: 16px; padding-right: 16px; }
  header { padding-top: 14px; padding-bottom: 14px; }
  nav { gap: 12px; font-size: 14px; }
  .hero { grid-template-columns: 1fr; gap: 26px; padding: 28px 0 32px; }
  .lead { font-size: 17px; }
  button.big { width: 100%; }
  .inputs, .opts { grid-template-columns: 1fr; gap: 14px; }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counts p:first-child { grid-column: 1 / -1; }
  .tool { padding-top: 28px; }
  .page code { font-size: 12px; padding: 6px; }
  th, td { white-space: normal; padding: 8px 10px; overflow-wrap: anywhere; }
}

.drop { border: 2px dashed var(--green); padding: 20px; background: white; }
#pairs section { border-bottom: 1px solid var(--line); padding: 16px 0; }
.sample td, .sample th { padding: 8px; }
#counts { font: 17px/1.6 ui-monospace, monospace; }
#rows td { white-space: normal; overflow-wrap: anywhere; max-width: 300px; }
#rows { table-layout: fixed; }
.opts p { align-self: center; }

@media(max-width:480px) { header { flex-wrap:wrap; } nav { flex-wrap:wrap; gap:10px; } .sample { padding:12px; } }
