:root {
  color-scheme: light;
  --paper: #f2efe7;
  --paper-deep: #e6e0d3;
  --ink: #172838;
  --ink-soft: #53606b;
  --line: rgba(23, 40, 56, 0.2);
  --orange: #ed5a2a;
  --green: #1f8a62;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.site-header {
  min-height: 76px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: .12em; font-size: 12px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--ink); color: var(--paper); letter-spacing: -.04em; }
nav { display: flex; gap: clamp(18px, 3vw, 42px); }
nav a { text-decoration: none; font-size: 13px; position: relative; }
nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 1px; background: var(--orange); transition: right .25s ease; }
nav a:hover::after, nav a:focus-visible::after { right: 0; }
.edge-badge { justify-self: end; display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-soft); }
.edge-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(237,90,42,.12); }

main { overflow: hidden; }
.hero {
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr);
  gap: clamp(44px, 7vw, 120px);
  align-items: center;
  padding: clamp(72px, 10vw, 150px) clamp(20px, 7vw, 112px) clamp(88px, 10vw, 150px);
  position: relative;
}

.hero::before { content: ""; position: absolute; width: min(42vw, 660px); aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; right: -18vw; top: -24vw; }
.hero::after { content: "CF"; position: absolute; right: clamp(20px, 3vw, 50px); bottom: 20px; font-family: var(--display); font-size: clamp(90px, 16vw, 240px); line-height: .7; color: rgba(23,40,56,.035); pointer-events: none; }
.eyebrow { margin: 0 0 22px; text-transform: uppercase; letter-spacing: .17em; font-size: 10px; font-weight: 700; color: var(--orange); }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.04em; }
h1 { margin: 0; font-size: clamp(50px, 6.2vw, 96px); line-height: .96; }
h1 em { font-weight: 400; color: var(--orange); }
.hero-intro { max-width: 570px; margin: 32px 0; font-size: clamp(16px, 1.35vw, 20px); line-height: 1.8; color: var(--ink-soft); }
.test-controls { display: flex; align-items: center; gap: 14px; }
.start-button { min-width: 240px; height: 64px; border: 0; padding: 0 18px 0 26px; display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: var(--paper); cursor: pointer; transition: transform .25s cubic-bezier(.22,1,.36,1), background .2s; }
.start-button:hover { transform: translateY(-3px); background: #263b4d; }
.start-button:disabled { cursor: progress; opacity: .7; transform: none; }
.button-label { font-weight: 600; }
.button-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); font-size: 19px; }
.stop-button { height: 64px; padding: 0 20px; background: transparent; border: 1px solid var(--line); cursor: pointer; }
.test-note { margin: 14px 0 0; font-size: 11px; color: var(--ink-soft); }

.instrument { background: var(--ink); color: var(--paper); padding: clamp(28px, 4vw, 54px); position: relative; min-height: 470px; box-shadow: 20px 24px 0 var(--paper-deep); }
.instrument::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(242,239,231,.12); pointer-events: none; }
.instrument-topline { display: flex; justify-content: space-between; color: rgba(242,239,231,.56); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.speed-readout { margin: 55px 0 35px; display: flex; align-items: end; gap: 14px; }
.speed-readout span { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: clamp(74px, 10vw, 150px); line-height: .72; letter-spacing: -.07em; }
.speed-readout small { color: rgba(242,239,231,.5); font-size: 11px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .1em; }
.meter { height: 46px; position: relative; overflow: hidden; border-left: 1px solid rgba(242,239,231,.5); border-right: 1px solid rgba(242,239,231,.5); }
.meter::before { content: ""; position: absolute; inset: 21px 0 auto; height: 3px; background: rgba(242,239,231,.12); }
.meter-fill { position: absolute; left: 0; top: 21px; width: 0; height: 3px; background: var(--orange); transition: transform .35s cubic-bezier(.22,1,.36,1); transform-origin: left; }
.meter-ticks { height: 100%; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(242,239,231,.18) calc(10% - 1px) 10%); }
.metric-strip { margin-top: 38px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(242,239,231,.16); }
.metric-strip > div { padding: 20px 12px 0 0; border-right: 1px solid rgba(242,239,231,.12); }
.metric-strip > div:not(:first-child) { padding-left: 16px; }
.metric-strip > div:last-child { border-right: 0; }
.metric-strip span { display: block; color: rgba(242,239,231,.45); font-size: 10px; }
.metric-strip strong { display: inline-block; margin-top: 8px; font-family: var(--display); font-size: clamp(22px, 2.4vw, 34px); font-weight: 400; font-variant-numeric: tabular-nums; }
.metric-strip small { margin-left: 3px; color: rgba(242,239,231,.4); font-size: 8px; }
.progress-track { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(242,239,231,.08); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--orange); transition: width .4s cubic-bezier(.22,1,.36,1); }

.connection-section, .official-section, .file-section { padding: clamp(80px, 11vw, 165px) clamp(20px, 7vw, 112px); border-top: 1px solid var(--line); position: relative; }
.section-index { position: absolute; top: 30px; left: clamp(20px, 4vw, 64px); font-family: var(--display); font-size: 15px; color: var(--orange); }
.section-heading h2 { margin: 0; font-size: clamp(46px, 5.5vw, 82px); line-height: 1; }
.section-heading > p:not(.eyebrow) { max-width: 620px; margin: 24px 0 0; color: var(--ink-soft); line-height: 1.7; }
.connection-section { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(40px, 10vw, 160px); background: var(--paper-deep); }
.connection-grid { align-self: end; }
.connection-primary { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.connection-primary span { font-size: 11px; color: var(--ink-soft); }
.connection-primary strong { display: block; margin-top: 5px; font-family: var(--display); font-size: clamp(28px, 3.6vw, 54px); font-weight: 400; overflow-wrap: anywhere; }
.connection-primary p { margin: 8px 0 0; color: var(--ink-soft); }
dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
dl div { padding: 20px 10px 20px 0; border-bottom: 1px solid var(--line); }
dl div:nth-child(even) { padding-left: 26px; border-left: 1px solid var(--line); }
dt { color: var(--ink-soft); font-size: 10px; margin-bottom: 8px; }
dd { margin: 0; font-size: 14px; font-weight: 600; }

.official-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(50px, 8vw, 120px); }
.official-list { border-top: 1px solid var(--ink); }
.official-file { width: 100%; min-height: 92px; display: grid; grid-template-columns: 42px 110px 1fr auto; gap: 14px; align-items: center; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: padding .25s cubic-bezier(.22,1,.36,1), background .2s; }
.official-file:hover, .official-file:focus-visible { padding: 0 14px; background: var(--paper-deep); }
.official-file span { color: var(--orange); font-size: 10px; }
.official-file strong { font-family: var(--display); font-size: 29px; font-weight: 400; }
.official-file small { color: var(--ink-soft); }
.official-file b { font-size: 12px; }
.official-file:disabled { opacity: .5; cursor: progress; }
.inline-result { grid-column: 2; border: 1px solid var(--line); padding: 18px 22px; font-size: 13px; }
.inline-result strong { color: var(--orange); }

.file-section { background: var(--ink); color: var(--paper); }
.file-page { background: var(--ink); }
.file-page main { overflow: visible; }
.file-page .file-section { min-height: calc(100vh - 76px); padding-top: clamp(80px, 9vw, 140px); }
.file-page .file-section h1 { margin: 0; color: var(--paper); font-size: clamp(48px, 6vw, 88px); line-height: .96; }
.file-page .file-section h1 em { font-weight: 400; color: var(--orange); }
.file-header { background: var(--paper); }
.file-path { justify-self: center; color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.file-section .section-index, .file-section .eyebrow { color: #ff7546; }
.file-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(60px, 10vw, 150px); }
.file-section .section-heading > p:not(.eyebrow) { color: rgba(242,239,231,.62); }
.file-section .section-heading .privacy-note { margin-top: 16px; font-size: 11px; color: #e7a58d; }
.upload-panel { border-top: 1px solid rgba(242,239,231,.3); padding-top: 28px; }
.drop-zone { min-height: 220px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px dashed rgba(242,239,231,.35); cursor: pointer; transition: background .2s, border .2s; text-align: center; }
.drop-zone:hover, .drop-zone.dragging { background: rgba(242,239,231,.05); border-color: var(--orange); }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-icon { font-family: var(--display); font-size: 48px; color: var(--orange); line-height: 1; margin-bottom: 12px; }
.drop-zone strong { font-size: 16px; }
.drop-zone small { margin-top: 8px; color: rgba(242,239,231,.48); }
.token-row { margin: 22px 0; display: grid; grid-template-columns: 180px 1fr; align-items: center; }
.token-row label { font-size: 11px; color: rgba(242,239,231,.65); }
.token-row label span { color: rgba(242,239,231,.35); }
.token-row input { width: 100%; border: 0; border-bottom: 1px solid rgba(242,239,231,.25); padding: 10px 0; outline: 0; background: transparent; color: var(--paper); }
.token-row input:focus { border-color: var(--orange); }
.upload-button { width: 100%; height: 60px; border: 0; background: var(--orange); color: var(--paper); font-weight: 700; cursor: pointer; }
.upload-button:disabled { background: rgba(242,239,231,.12); color: rgba(242,239,231,.35); cursor: not-allowed; }
.upload-progress { height: 26px; margin-top: 12px; background: rgba(242,239,231,.08); position: relative; overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.upload-progress small { position: absolute; inset: 0 10px 0 auto; display: grid; place-items: center; font-size: 10px; }
.form-message { min-height: 20px; margin: 12px 0 0; font-size: 12px; color: #e7a58d; }
.file-table-wrap { margin-top: clamp(70px, 9vw, 130px); }
.file-table-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid rgba(242,239,231,.3); }
.file-table-heading h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 400; }
.file-table-heading button { border: 0; background: transparent; color: rgba(242,239,231,.6); cursor: pointer; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 150px auto; align-items: center; gap: 20px; min-height: 82px; border-bottom: 1px solid rgba(242,239,231,.12); }
.file-name { min-width: 0; }
.file-name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-name small, .file-size, .file-date { color: rgba(242,239,231,.45); font-size: 11px; }
.file-actions { display: flex; gap: 8px; }
.file-actions button, .file-actions a { padding: 10px 13px; border: 1px solid rgba(242,239,231,.22); background: transparent; color: var(--paper); text-decoration: none; font-size: 11px; cursor: pointer; white-space: nowrap; }
.file-actions .download-link { background: var(--paper); color: var(--ink); }
.empty-state { padding: 35px 0; color: rgba(242,239,231,.45); }

footer { min-height: 110px; padding: 25px clamp(20px, 4vw, 64px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; background: #101e2b; color: rgba(242,239,231,.6); font-size: 10px; }
footer > span { color: var(--paper); font-weight: 700; letter-spacing: .18em; }
footer p { text-align: center; }
footer a { justify-self: end; }
.file-footer { border-top: 1px solid rgba(242,239,231,.1); }

.reveal { animation: reveal .8s cubic-bezier(.22,1,.36,1) both; }
.delay-1 { animation-delay: .12s; }
@keyframes reveal { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

button:focus-visible, a:focus-visible, input:focus-visible, label:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 3px; }

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .file-path { display: none; }
  .hero, .connection-section, .official-section, .file-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 70px; }
  .instrument { min-width: 0; }
  .official-section { gap: 55px; }
  .inline-result { grid-column: 1; }
  .file-layout { gap: 55px; }
}

@media (max-width: 620px) {
  .site-header { min-height: 66px; }
  .brand > span:last-child { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-left: 16px; padding-right: 16px; }
  h1 { font-size: clamp(46px, 14vw, 70px); }
  .instrument { min-height: 410px; padding: 28px 22px; box-shadow: 9px 12px 0 var(--paper-deep); }
  .speed-readout { margin-top: 48px; }
  .speed-readout span { font-size: clamp(70px, 25vw, 115px); }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip > div:nth-child(2) { border-right: 0; }
  .metric-strip > div:nth-child(3), .metric-strip > div:nth-child(4) { display: none; }
  .connection-section, .official-section, .file-section { padding-left: 20px; padding-right: 20px; }
  dl { grid-template-columns: 1fr; }
  dl div:nth-child(even) { padding-left: 0; border-left: 0; }
  .official-file { grid-template-columns: 28px 80px 1fr; }
  .official-file small { display: none; }
  .token-row { grid-template-columns: 1fr; gap: 6px; }
  .file-row { grid-template-columns: 1fr auto; padding: 17px 0; gap: 10px; }
  .file-size, .file-date { display: none; }
  .file-actions { grid-column: 1 / -1; }
  footer { grid-template-columns: 1fr; text-align: center; padding: 30px 20px; }
  footer p { margin: 0; }
  footer a { justify-self: center; }
}

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