:root {
  --paper: #f1f0e7;
  --white: #fffef7;
  --ink: #171a18;
  --muted: #666b65;
  --line: #b9bdb5;
  --green: #18a36f;
  --coral: #ed674d;
  --yellow: #edc85a;
  --blue: #397fba;
  --brand-red: #ff1745;
  --mono: "Courier New", ui-monospace, monospace;
  --sans: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; }
body { min-height: 100vh; color: var(--ink); background: var(--paper); font-family: var(--sans); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.topline { width: min(1240px, calc(100% - 28px)); min-height: 73px; margin: 14px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 14px; color: var(--white); background: var(--ink); border-bottom: 5px solid var(--brand-red); }
.wordmark { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font: 700 .92rem/1 var(--mono); }
.wordmark small { display: block; margin-top: 5px; color: #9ba39c; font-size: .5rem; }
.wordmark-symbol { display: block; width: 39px; height: 39px; border: 0; border-radius: 9px; background: #030305; box-shadow: 0 0 0 1px rgba(255,23,69,.3), 0 0 16px rgba(255,23,69,.14); }
.system-state { display: grid; grid-template-columns: 8px auto auto; align-items: center; gap: 8px; font: 600 .56rem var(--mono); }
.system-state i { width: 7px; height: 7px; background: var(--green); box-shadow: 0 0 0 3px rgba(24,163,111,.18); }
.system-state span { color: #8f9891; }
.system-state strong { color: var(--green); }
.workspace { width: min(1240px, calc(100% - 28px)); min-height: 720px; margin: 0 auto; display: grid; grid-template-columns: 330px minmax(0, 1fr); background: var(--white); border: 1px solid var(--ink); border-top: 0; }
.route-panel { min-width: 0; border-right: 1px solid var(--ink); }
.panel-head { min-height: 59px; display: flex; align-items: center; gap: 13px; padding: 0 15px; border-bottom: 1px solid var(--ink); }
.panel-head > span { color: var(--coral); font: 700 .62rem var(--mono); }
.panel-head h1, .panel-head h2 { margin: 0; font-size: .92rem; font-weight: 650; }
.route-search { height: 45px; display: flex; align-items: center; gap: 8px; margin: 12px; padding: 0 10px; border: 1px solid var(--line); background: var(--paper); }
.route-search span { font: 700 1.15rem var(--mono); }
.route-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.route-list { max-height: 590px; overflow-y: auto; scrollbar-width: thin; }
.route-group h2 { margin: 0; padding: 10px 12px 5px; color: #858b85; font: 700 .55rem var(--mono); text-transform: uppercase; }
.route-button { width: 100%; min-height: 57px; display: grid; gap: 4px; padding: 9px 12px; border: 0; border-top: 1px solid #dedfd8; background: transparent; text-align: left; cursor: pointer; }
.route-button:hover { background: #ecece3; }
.route-button.is-active { color: #fff; background: var(--green); border-color: var(--green); }
.route-button span { font-size: .78rem; font-weight: 650; }
.route-button small { color: var(--muted); font: 400 .57rem var(--mono); }
.route-button.is-active small { color: #d8f2e7; }
.conversion-bay { min-width: 0; display: flex; flex-direction: column; }
.signal-path { display: grid; grid-template-columns: 1fr 100px 1fr; align-items: center; min-height: 130px; padding: 20px 35px; border-bottom: 1px solid var(--line); }
.signal-path > div { display: grid; justify-items: center; gap: 7px; }
.signal-path span { color: var(--muted); font: 700 .55rem var(--mono); }
.signal-path strong { min-width: 90px; padding: 9px 13px; border: 2px solid var(--ink); text-align: center; font: 700 1.05rem var(--mono); box-shadow: 4px 4px 0 var(--yellow); }
.signal-path > i { position: relative; height: 2px; background: var(--ink); }
.signal-path > i::after { content: ''; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); transform: rotate(45deg); }
#convert-form { padding: 0 35px 28px; }
.drop-zone { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 24px; padding: 25px; border: 2px dashed #8c928c; background: var(--paper); cursor: pointer; text-align: center; transition: background .15s, border-color .15s; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--green); background: #e5eee6; }
.drop-zone.has-file { border-style: solid; border-color: var(--green); background: #e5eee6; }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.file-symbol { position: relative; width: 48px; height: 60px; margin-bottom: 17px; border: 2px solid var(--ink); background: var(--white); box-shadow: 5px 5px 0 var(--coral); }
.file-symbol::before { content: ''; position: absolute; right: -2px; top: -2px; width: 15px; height: 15px; background: var(--paper); border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.file-symbol i { position: absolute; left: 10px; right: 10px; bottom: 13px; height: 2px; background: var(--green); box-shadow: 0 -8px 0 var(--green); }
.drop-zone strong { max-width: 100%; font-size: 1rem; overflow-wrap: anywhere; }
.drop-zone > span:last-of-type { margin-top: 6px; color: var(--muted); font: 400 .62rem var(--mono); }
.route-readout { display: grid; grid-template-columns: 92px 1fr; gap: 10px; min-height: 52px; align-items: center; border-bottom: 1px solid var(--line); }
.route-readout span { color: var(--coral); font: 700 .55rem var(--mono); }
.route-readout p { margin: 0; color: var(--muted); font-size: .72rem; }
.convert-button { width: 100%; min-height: 52px; display: flex; justify-content: space-between; align-items: center; margin-top: 17px; padding: 0 18px; border: 1px solid var(--ink); color: #fff; background: var(--ink); cursor: pointer; font: 700 .68rem var(--mono); }
.convert-button:hover:not(:disabled) { color: var(--ink); background: var(--yellow); }
.convert-button:disabled { cursor: not-allowed; opacity: .38; }
.convert-button i { font-size: 1.25rem; font-style: normal; }
.is-working .convert-button i { animation: travel .7s infinite alternate; }
@keyframes travel { to { transform: translateX(5px); } }
.status-line { margin: 9px 0 0; color: var(--green); text-align: right; font: 700 .55rem var(--mono); }
.limits { display: grid; grid-template-columns: repeat(3, 1fr); margin: auto 35px 28px; border: 1px solid var(--line); }
.limits div { min-width: 0; padding: 11px; border-right: 1px solid var(--line); }
.limits div:last-child { border-right: 0; }
.limits dt { color: var(--muted); font: 600 .52rem var(--mono); text-transform: uppercase; }
.limits dd { margin: 6px 0 0; font-size: .67rem; font-weight: 650; overflow-wrap: anywhere; }
.site-foot { width: min(1240px, calc(100% - 28px)); min-height: 42px; margin: 0 auto 24px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 12px; color: var(--muted); border: 1px solid var(--ink); border-top: 0; font: 600 .52rem var(--mono); }
.site-foot a { color: inherit; }
.flintglade-attribution { color: #d80b35 !important; font-weight: 800; letter-spacing: .05em; text-decoration: none; text-transform: uppercase; }
.policy-page { min-height: 100vh; padding: 28px 14px; background: var(--paper); }
.policy-shell { width: min(720px, 100%); margin: 0 auto; padding: 26px; border: 1px solid var(--ink); background: var(--white); }
.policy-shell .wordmark { width: fit-content; margin-bottom: 70px; color: var(--ink); }
.policy-kicker { color: var(--coral); font: 700 .58rem var(--mono); }
.policy-shell h1 { max-width: 620px; margin: 10px 0 24px; font: 700 clamp(1.8rem, 5vw, 3.4rem)/1 var(--sans); }
.policy-shell p { max-width: 630px; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.policy-back { display: inline-block; margin-top: 24px; color: var(--ink); font: 700 .58rem var(--mono); }
.guide-page { padding: 14px; background: var(--paper); }
.guide-topline { width: min(1040px, 100%); min-height: 73px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px 16px; color: var(--white); background: var(--ink); border-bottom: 5px solid var(--brand-red); }
.guide-topline nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 15px; }
.guide-topline nav a { color: #c4cbc5; font: 700 .55rem var(--mono); letter-spacing: .04em; }
.guide-topline nav a:hover { color: var(--yellow); }
.guide-shell { width: min(1040px, 100%); margin: 0 auto 30px; border: 1px solid var(--ink); border-top: 0; background: var(--white); }
.guide-shell article > section, .guide-contact { padding: clamp(28px, 5vw, 62px) clamp(20px, 7vw, 76px); border-top: 1px solid var(--ink); }
.guide-hero { padding: clamp(34px, 7vw, 78px) clamp(20px, 7vw, 76px); }
.guide-kicker, .guide-number { margin: 0 0 12px; color: var(--coral); font: 700 .58rem var(--mono); letter-spacing: .04em; }
.guide-hero h1 { max-width: 850px; margin: 0; font: 700 clamp(2.2rem, 7vw, 5.2rem)/.96 var(--sans); letter-spacing: -.045em; }
.guide-deck { max-width: 780px; margin: 25px 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.65; }
.guide-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 42px 0 0; border: 1px solid var(--line); }
.guide-facts div { padding: 17px; border-right: 1px solid var(--line); }
.guide-facts div:last-child { border-right: 0; }
.guide-facts dt { color: var(--green); font: 700 clamp(1.5rem, 3vw, 2.3rem) var(--sans); }
.guide-facts dd { margin: 5px 0 0; color: var(--muted); font: 600 .58rem/1.4 var(--mono); text-transform: uppercase; }
.guide-shell h2 { max-width: 760px; margin: 0 0 24px; font: 700 clamp(1.65rem, 4vw, 3rem)/1.05 var(--sans); letter-spacing: -.025em; }
.guide-shell h3 { margin: 0 0 8px; font-size: .9rem; }
.guide-shell section > p:not(.guide-number), .guide-contact p:not(.guide-number) { max-width: 780px; color: var(--muted); font-size: .98rem; line-height: 1.75; }
.guide-shell code { padding: .1em .3em; background: var(--paper); font-family: var(--mono); }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 30px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.guide-grid > div { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.guide-grid p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.guide-callout { display: grid; grid-template-columns: minmax(130px, .35fr) 1fr; gap: 20px; margin: 28px 0 0; padding: 20px; color: var(--white); background: var(--ink); }
.guide-callout strong { color: var(--yellow); }
.guide-callout span { font-size: .9rem; line-height: 1.6; }
.guide-callout-warm { color: var(--ink); background: var(--yellow); }
.guide-callout-warm strong { color: var(--ink); }
.guide-table-wrap { margin: 30px 0; overflow-x: auto; border: 1px solid var(--line); }
.guide-table { min-width: 680px; width: 100%; border-collapse: collapse; }
.guide-table th, .guide-table td { padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.guide-table th:last-child, .guide-table td:last-child { border-right: 0; }
.guide-table tr:last-child td { border-bottom: 0; }
.guide-table th { color: var(--white); background: var(--ink); font: 700 .56rem var(--mono); text-transform: uppercase; }
.guide-table td { color: var(--muted); font-size: .82rem; line-height: 1.55; }
.guide-table td:first-child { color: var(--ink); font-weight: 700; }
.guide-steps { margin: 30px 0 0; padding: 0; list-style: none; counter-reset: guide-step; border-top: 1px solid var(--line); }
.guide-steps li { counter-increment: guide-step; display: grid; grid-template-columns: 36px minmax(130px, .35fr) 1fr; gap: 15px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.guide-steps li::before { content: counter(guide-step, decimal-leading-zero); color: var(--coral); font: 700 .62rem var(--mono); }
.guide-steps span { color: var(--muted); font-size: .86rem; line-height: 1.55; }
.guide-checklist { max-width: 820px; margin: 25px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.guide-checklist li { position: relative; padding: 14px 10px 14px 34px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.55; }
.guide-checklist li::before { content: '\2713'; position: absolute; left: 8px; color: var(--green); font-weight: 800; }
.guide-contact { background: #e8eadf; }
.guide-contact a { color: var(--ink); }
.guide-cta { min-height: 49px; max-width: 370px; display: flex; align-items: center; justify-content: space-between; margin-top: 28px; padding: 0 17px; color: var(--white) !important; background: var(--green); border: 1px solid var(--ink); text-decoration: none; font: 700 .62rem var(--mono); }
.guide-cta:hover { color: var(--ink) !important; background: var(--yellow); }
@media (max-width: 980px) {
  .workspace { grid-template-columns: 280px minmax(0,1fr); }
  .signal-path { padding-left: 24px; padding-right: 24px; }
  #convert-form { padding-left: 24px; padding-right: 24px; }
  .limits { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 700px) {
  .guide-page { padding: 0; }
  .guide-topline { width: 100%; }
  .guide-topline nav { display: none; }
  .guide-grid, .guide-facts { grid-template-columns: 1fr; }
  .guide-grid > div, .guide-facts div { border-right: 0; }
  .guide-facts div { border-bottom: 1px solid var(--line); }
  .guide-facts div:last-child { border-bottom: 0; }
  .guide-callout, .guide-steps li { grid-template-columns: 1fr; }
  .topline, .workspace, .site-foot { width: 100%; margin-left: 0; margin-right: 0; border-left: 0; border-right: 0; }
  .workspace { grid-template-columns: 1fr; }
  .route-panel { border-right: 0; border-bottom: 1px solid var(--ink); }
  .route-list { max-height: 250px; }
  .route-button { min-height: 52px; }
  .conversion-bay > .panel-head { display: none; }
  .signal-path { min-height: 105px; grid-template-columns: 1fr 55px 1fr; }
  .signal-path strong { min-width: 70px; }
  .drop-zone { min-height: 200px; }
}
@media (max-width: 440px) {
  .topline { padding-left: 10px; padding-right: 10px; }
  .system-state span { display: none; }
  .signal-path, #convert-form { padding-left: 14px; padding-right: 14px; }
  .limits { margin-left: 14px; margin-right: 14px; grid-template-columns: 1fr; }
  .limits div { border-right: 0; border-bottom: 1px solid var(--line); }
  .limits div:last-child { border-bottom: 0; }
  .site-foot span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
