:root {
  color-scheme: light;
  --ink: #172b22;
  --muted: #496054;
  --paper: #f5f8f4;
  --line: #d5e1d7;
  --green: #102820;
  --green-hover: #234638;
  --lime: #d4eb9c;
  --white: #fff;
  --danger: #982f2c;
  --caution: #785314;
  --rounded: 1.05rem;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: inherit; }
button, input { font: inherit; }
button, label:has(input) { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, label:has(:focus-visible) { outline: 3px solid #62945b; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.17; letter-spacing: -.035em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.75rem); }
h3 { font-size: 1.13rem; }
.wrap { width: min(70rem, calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: absolute; top: -8rem; left: 1rem; z-index: 10; padding: .7rem; background: var(--white); }
.skip-link:focus { top: .5rem; }
.header { background: var(--green); color: #f5f8f2; border-bottom: 1px solid #2e493c; }
.bar { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 750; letter-spacing: -.025em; font-size: 1.05rem; white-space: nowrap; }
.brand-mark { display: grid; grid-template-columns: 1fr 1fr; padding: .34rem; gap: 2px; width: 1.65rem; height: 1.65rem; border-radius: .37rem; background: var(--lime); }
.brand-mark i { background: #234638; border-radius: 1px; }
.brand-mark i:last-child { opacity: .35; }
nav { display: flex; align-items: center; gap: clamp(.8rem, 4vw, 2.1rem); }
nav a { text-decoration: none; font-size: .9rem; color: #d8e7db; white-space: nowrap; }
nav a:hover { text-decoration: underline; }
.hero { background-color: var(--green); color: #f4faf2; overflow: hidden; }
.hero-layout { padding: 3.8rem 0 4.2rem; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.eyebrow { display: flex; align-items: center; gap: .55rem; color: #cee3a9; font-size: .79rem; font-weight: 750; letter-spacing: .12em; }
.eyebrow span { width: .28rem; height: .28rem; border-radius: 100%; background: #92ac77; }
h1 { font-size: clamp(2.9rem, 6.9vw, 5.2rem); line-height: .99; letter-spacing: -.065em; margin: .8rem 0 1.15rem; font-weight: 760; }
.intro { color: #ccdfd0; max-width: 29rem; font-size: 1.06rem; }
.hero-preview { width: min(100%, 22rem); justify-self: end; border: 1px solid #507362; border-radius: .9rem; background: #1a392e; padding: .85rem; box-shadow: .8rem .8rem 0 #284638; align-self: center; }
.preview-head, .preview-row { display: grid; grid-template-columns: auto 1fr auto; gap: .65rem; align-items: center; }
.preview-head { padding: .36rem .45rem .85rem; font-size: .9rem; font-weight: 700; }
.preview-icon { background: var(--lime); color: var(--green); font-size: 1.15rem; width: 1.75rem; height: 1.7rem; text-align: center; border-radius: .3rem; line-height: 1.7rem; }
.preview-tag { color: #bcd2bd; letter-spacing: .09em; font-size: .68rem; }
.preview-row { font: .83rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; color: #c6d9cb; padding: .55rem .55rem; border-top: 1px solid #476456; }
.preview-row:last-child { padding-bottom: .35rem; }
.preview-row-error { color: #fff2d8; background: #5b4a33; border-radius: .4rem; border-top-color: transparent; }
.preview-row-error + .preview-row { border-top-color: transparent; }
.preview-track { height: 4px; width: 84%; border-radius: 10px; background: #577766; }
.preview-track-short { width: 61%; }
.preview-ok { color: #cef09c; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.2rem; padding-top: 1.45rem; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--rounded); padding: clamp(1.08rem, 3vw, 1.65rem); }
fieldset { min-inline-size: 0; border: none; padding: 0; margin: 1.15rem 0; }
legend { padding: 0; margin-bottom: .55rem; font-size: .9rem; font-weight: 700; }
.modes { display: flex; flex-wrap: wrap; gap: .45rem 1rem; }
.modes label { display: inline-flex; gap: .43rem; align-items: center; font-size: .91rem; }
.modes input { accent-color: #345f4b; width: 1.02rem; height: 1.02rem; margin: 0; }
.drop-zone { padding: 1.2rem .95rem; border-radius: .68rem; background: #f7faf6; border: 1px dashed #8fae96; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; }
.drop-zone.dragging { border-style: solid; background: #e7f2db; }
.file-icon { border: 1px solid #cadacb; background: #eaf0e8; border-radius: .48rem; display: grid; place-items: center; width: 2.55rem; height: 2.55rem; font: 1.55rem/1 system-ui; color: #365846; }
.drop-title { font-weight: 750; }
.hint { font-size: .875rem; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; position: relative; min-height: 2.68rem; padding: .58rem .92rem; border: 1px solid transparent; border-radius: .44rem; font-size: .92rem; font-weight: 700; text-align: center; white-space: nowrap; }
.primary { background: var(--green); color: var(--white); }
.primary:hover { background: var(--green-hover); }
.secondary { background: var(--white); color: var(--green); border-color: #94ab9c; }
.secondary:hover { background: #edf3ed; }
.file-button input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.input-footer { margin-top: 1rem; display: flex; gap: .4rem 1.15rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.text-button { background: none; border: 0; padding: 0; color: #26513e; text-decoration-line: underline; text-underline-offset: .2em; font-size: .92rem; font-weight: 700; }
.local-note { color: var(--muted); display: flex; align-items: center; gap: .4rem; font-size: .86rem; }
.status-dot { background: #4d8559; width: .48rem; height: .48rem; border-radius: 50%; }
.scope { background: #e9f0e7; }
.scope h2 { font-size: 1.25rem; }
.checks { color: #2f493a; list-style: none; margin: .8rem 0; padding: 0; display: grid; gap: .32rem; }
.checks li { display: flex; gap: .5rem; align-items: baseline; font-size: .92rem; }
.checks li span { font-weight: 800; color: #35734d; }
.scope p { border-top: 1px solid #cbd9cb; padding-top: .84rem; color: #3a5546; font-size: .9rem; }
.feedback { padding: .55rem 0; color: var(--muted); }
.feedback:empty { display: none; }
.report { margin-top: 1.2rem; }
.report-head { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .65rem; }
.file-heading { min-width: 0; }
.selected-file { color: var(--muted); margin-top: .32rem; font-size: .9rem; overflow-wrap: anywhere; }
.report-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.metrics { margin: 1.2rem 0 .8rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.metrics div { background: #f2f7f0; border: 1px solid var(--line); border-radius: .5rem; padding: .65rem .75rem; }
.metrics dt { color: var(--muted); font-size: .88rem; }
.metrics dd { margin: .12rem 0 0; font-size: 1.45rem; font-weight: 780; }
#result-message, .action-feedback { color: var(--muted); }
.action-feedback:not(:empty) { margin-top: .85rem; }
#findings { margin-top: 1.25rem; }
.issues { margin: .66rem 0 0; padding: 0; list-style: none; overflow-wrap: anywhere; }
.issues li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.issue-meta { display: flex; gap: .32rem; flex-wrap: wrap; align-items: baseline; color: var(--muted); font-size: .8rem; }
.issue-level { font-weight: 750; }
.issue-level.error { color: var(--danger); }
.issue-level.warning { color: var(--caution); }
.more { margin-top: .85rem; }
.rules { margin: 2.7rem 0 3rem; }
.rules-grid { margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.rules-grid > div { border-top: 1px solid #c9d8ce; padding-top: .85rem; }
.rules-grid p { margin: .45rem 0 .65rem; max-width: 35rem; color: var(--muted); }
.rules-grid a { color: #275740; font-size: .93rem; font-weight: 700; text-underline-offset: .2em; }
.footer { border-top: 1px solid #d0ddd2; }
.footer-content { display: flex; gap: .65rem; align-items: baseline; justify-content: space-between; padding: 1.2rem 0; font-size: .86rem; color: var(--muted); }
.footer a { font-weight: 800; color: var(--green); }
@media (max-width: 48rem) {
  .hero-layout { grid-template-columns: 1fr; padding: 2.9rem 0 3rem; }
  .hero-preview { display: none; }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 34rem) {
  .wrap { width: calc(100% - 2rem); }
  .bar { min-height: 3.8rem; }
  nav { gap: .65rem; }
  nav a { font-size: .82rem; }
  nav a:first-child { display: none; }
  .drop-zone { grid-template-columns: auto minmax(0, 1fr); }
  .file-button { grid-column: 1 / -1; width: 100%; }
  .rules-grid { grid-template-columns: 1fr; }
  .issues li { grid-template-columns: 1fr; gap: .15rem; }
  .footer-content { align-items: flex-start; flex-direction: column; gap: .35rem; }
}
