:root {
  --ink: #10120f;
  --paper: #f2eee4;
  --paper-deep: #e5dfd1;
  --acid: #d8ff55;
  --cobalt: #5962ff;
  --coral: #ff735f;
  --line: rgba(16, 18, 15, 0.2);
  --muted: rgba(16, 18, 15, 0.62);
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 16px/1.5 var(--sans); }
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link { position: fixed; z-index: 99; left: 16px; top: 12px; padding: 10px 14px; color: var(--paper); background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.site-header, main > section, footer { width: min(1440px, calc(100% - 64px)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; min-height: 84px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.brand > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.brand small { color: var(--muted); font-size: .52rem; font-weight: 650; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; color: var(--paper); background: var(--cobalt); font: 800 .78rem var(--mono); }
.header-tools { display: flex; align-items: center; gap: 24px; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a, .footer-links a { font-size: .72rem; font-weight: 750; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.site-header nav a:hover, .footer-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.language-picker select { min-height: 38px; padding: 0 32px 0 11px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--paper); font: 750 .64rem var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.language-picker select:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(330px, .6fr); min-height: 610px; padding: 82px 0 66px; }
.hero-copy { display: flex; flex-direction: column; justify-content: space-between; padding-right: 7vw; }
.eyebrow, .section-index { margin: 0; font: 750 .68rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: var(--coral); }
h1, h2 { margin: 0; letter-spacing: -.055em; }
h1 { margin: 50px 0 36px; font: 800 clamp(4.1rem, 9vw, 9.2rem)/.82 var(--display); text-transform: uppercase; }
h1 em { color: var(--cobalt); font-style: normal; }
.lede { max-width: 660px; margin: 0; font-size: clamp(1.05rem, 1.5vw, 1.4rem); line-height: 1.5; }
.hero-proof { display: grid; align-self: end; border: 1px solid var(--ink); }
.hero-proof div { display: flex; justify-content: space-between; align-items: end; gap: 20px; min-height: 130px; padding: 24px; border-bottom: 1px solid var(--ink); }
.hero-proof div:last-child { border-bottom: 0; background: var(--acid); }
.hero-proof strong { font: 800 3.5rem/.8 var(--display); letter-spacing: -.06em; }
.hero-proof span { max-width: 90px; font-size: .66rem; font-weight: 750; letter-spacing: .1em; text-align: right; text-transform: uppercase; }

.process { display: flex; align-items: center; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.process span { flex: 0 0 auto; font: 750 .66rem var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.process i { flex: 1; min-width: 30px; height: 1px; background: var(--line); }

.workspace { padding: 110px 0 130px; }
.workspace-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; margin-bottom: 42px; }
.workspace-heading h2, .meaning h2, .bob-note h2 { margin-top: 12px; font: 800 clamp(2.8rem, 5.5vw, 6.3rem)/.9 var(--display); text-transform: uppercase; }
.workspace-heading > p { max-width: 520px; margin: 0 0 4px auto; font-size: 1.05rem; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); border: 1px solid var(--ink); }
.editor-panel, .results-panel { min-width: 0; }
.editor-panel { padding: 0 24px 24px; border-right: 1px solid var(--ink); }
.results-panel { min-height: 690px; color: var(--paper); background: var(--ink); }
.panel-bar { display: flex; justify-content: space-between; align-items: center; min-height: 54px; margin: 0 -24px 18px; padding: 0 24px; border-bottom: 1px solid var(--ink); font: 750 .66rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.panel-bar.dark { margin: 0; border-color: rgba(242, 238, 228, .22); }
.local-badge { padding: 5px 8px; color: var(--ink); background: var(--acid); }
.editor-label { display: block; margin-bottom: 9px; font-size: .68rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
textarea { display: block; width: 100%; min-height: 460px; resize: vertical; padding: 20px; border: 1px solid var(--ink); border-radius: 0; outline: 0; color: #d9ff72; background: #161915; font: 400 .83rem/1.65 var(--mono); tab-size: 2; }
textarea:focus { box-shadow: 0 0 0 4px var(--cobalt); }
.file-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; margin: 16px 0 20px; }
.file-label { display: inline-flex; align-items: center; justify-content: center; min-height: 35px; padding: 0 12px; border: 1px solid var(--ink); font-size: .66rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.file-label:hover { background: var(--paper-deep); }
#file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#file-status { color: var(--muted); font-size: .72rem; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button { min-height: 48px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 0; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.button.primary { display: inline-flex; justify-content: space-between; align-items: center; min-width: 190px; color: var(--ink); background: var(--acid); }
.button.secondary { color: var(--paper); background: var(--cobalt); }
.button:disabled { opacity: .36; cursor: not-allowed; }
.button:not(:disabled):hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.text-button, .download-button { padding: 7px 0; border: 0; border-bottom: 1px solid currentColor; color: inherit; background: transparent; font-size: .67rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }

.empty-state { display: grid; place-items: center; align-content: center; min-height: 610px; padding: 36px; text-align: center; }
.empty-number { color: rgba(242, 238, 228, .12); font: 800 clamp(8rem, 18vw, 15rem)/.8 var(--display); letter-spacing: -.08em; }
.empty-state p { max-width: 330px; margin: -4px auto 0; color: rgba(242, 238, 228, .72); }
.results-content { padding: 24px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(242, 238, 228, .28); }
.metric-grid div { min-height: 110px; padding: 14px; border-right: 1px solid rgba(242, 238, 228, .28); }
.metric-grid div:last-child { border-right: 0; }
.metric-grid strong { display: block; color: var(--acid); font: 800 3rem/.95 var(--display); letter-spacing: -.05em; }
.metric-grid span { font-size: .62rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.result-meta { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; color: rgba(242, 238, 228, .65); font: 400 .65rem var(--mono); }
.finding { margin-top: 10px; border: 1px solid rgba(242, 238, 228, .28); }
.finding-header { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 13px 14px; border-bottom: 1px solid rgba(242, 238, 228, .2); }
.finding-id { color: var(--acid); font: 750 .67rem var(--mono); }
.finding h3 { margin: 0; font-size: .84rem; line-height: 1.25; }
.severity { padding: 4px 7px; color: var(--ink); background: var(--coral); font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.severity.medium { background: #f6c851; }
.finding-body { padding: 14px; }
.finding-body dl { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; margin: 0; }
.finding-body dt { color: rgba(242, 238, 228, .52); font-size: .58rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.finding-body dd { margin: 0; color: rgba(242, 238, 228, .84); font-size: .74rem; line-height: 1.45; word-break: break-word; }
.finding.fixed { border-color: var(--acid); }
.finding.fixed .finding-header { background: rgba(216, 255, 85, .1); }
.finding.fixed .severity { background: var(--acid); }

.meaning { display: grid; grid-template-columns: .38fr 1fr 1fr; gap: 48px; padding: 110px 0; border-top: 1px solid var(--line); }
.meaning h2 { font-size: clamp(2.8rem, 5vw, 5.7rem); }
.meaning > div p { max-width: 650px; margin: 30px 0 0; font-size: 1.05rem; }
.meaning ol { margin: 6px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.meaning li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--ink); font-size: .9rem; }
.meaning li span { font: 750 .66rem var(--mono); }
.bob-note { display: grid; grid-template-columns: 1.3fr .7fr; align-items: end; gap: 64px; margin-bottom: 64px; padding: 52px; color: var(--paper); background: var(--cobalt); }
.bob-note h2 { font-size: clamp(2.5rem, 4.6vw, 5.3rem); }
.bob-note > p { margin: 0; font-size: 1.05rem; }

footer { display: flex; justify-content: space-between; align-items: center; min-height: 180px; padding: 40px 44px; color: var(--paper); background: var(--ink); }
.figueira-signature { display: flex; align-items: center; gap: 16px; }
.figueira-signature img { display: block; width: 64px; height: 64px; padding: 5px; object-fit: contain; object-position: center; }
.figueira-signature span, .footer-links { font-size: .67rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.figueira-signature a { text-decoration-color: var(--acid); text-underline-offset: 4px; }
.footer-links { display: flex; align-items: flex-end; gap: 20px; flex-direction: column; }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.social-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; border: 1px solid rgba(242, 238, 228, .24); text-decoration: none; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.social-links a:hover { border-color: var(--acid); color: var(--ink); background: var(--acid); }
.social-links svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social-links .icon-fill { fill: currentColor; stroke: none; }
.footer-location { color: rgba(242, 238, 228, .68); }

@media (max-width: 980px) {
  .site-header { align-items: flex-start; gap: 20px; padding-block: 18px; }
  .header-tools { align-items: flex-end; flex-direction: column-reverse; gap: 12px; }
  .site-header nav { gap: 16px; }
  .hero { grid-template-columns: 1fr; gap: 50px; min-height: auto; }
  .hero-copy { padding-right: 0; }
  .hero-proof { grid-template-columns: repeat(3, 1fr); }
  .hero-proof div { min-height: 120px; border-right: 1px solid var(--ink); border-bottom: 0; flex-direction: column; align-items: flex-start; }
  .hero-proof div:last-child { border-right: 0; }
  .hero-proof span { text-align: left; }
  .work-grid { grid-template-columns: 1fr; }
  .editor-panel { border-right: 0; border-bottom: 1px solid var(--ink); }
  .meaning { grid-template-columns: 1fr; }
  .bob-note { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header, main > section, footer { width: min(100% - 30px, 1440px); }
  .site-header { min-height: 70px; }
  .brand small { display: none; }
  .header-tools { gap: 9px; }
  .site-header nav { gap: 12px; }
  .site-header nav a { font-size: .58rem; }
  .site-header nav a:nth-child(2) { display: none; }
  .language-picker select { min-height: 34px; font-size: .58rem; }
  .hero { padding: 58px 0 48px; }
  h1 { margin-top: 42px; font-size: clamp(3.35rem, 17vw, 5.4rem); }
  .hero-proof { grid-template-columns: 1fr; }
  .hero-proof div { min-height: 95px; border-right: 0; border-bottom: 1px solid var(--ink); flex-direction: row; align-items: end; }
  .process i { display: none; }
  .process { justify-content: space-between; gap: 8px; }
  .process span { font-size: .56rem; }
  .workspace { padding: 78px 0 90px; }
  .workspace-heading { grid-template-columns: 1fr; gap: 22px; }
  .workspace-heading > p { margin-left: 0; }
  .editor-panel { padding-inline: 14px; }
  .panel-bar { margin-inline: -14px; padding-inline: 14px; }
  textarea { min-height: 410px; padding: 14px; font-size: .75rem; }
  .file-row { grid-template-columns: 1fr; }
  .file-label { width: fit-content; }
  .results-content { padding: 14px; }
  .metric-grid strong { font-size: 2.2rem; }
  .finding-header { grid-template-columns: 60px 1fr; }
  .severity { grid-column: 2; width: fit-content; }
  .finding-body dl { grid-template-columns: 1fr; }
  .meaning { padding: 78px 0; }
  .bob-note { padding: 28px; }
  footer { align-items: flex-start; gap: 40px; flex-direction: column; }
  .footer-links { align-items: flex-start; }
  .social-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
