:root {
  --ink: #142033;
  --muted: #637083;
  --line: #dce3ec;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --navy: #163a63;
  --navy-dark: #0c2949;
  --blue: #2768ad;
  --blue-soft: #eaf3fc;
  --green: #177b57;
  --green-soft: #e7f6ef;
  --amber: #976617;
  --amber-soft: #fff6df;
  --red: #ad3e3e;
  --red-soft: #fff0f0;
  --shadow: 0 18px 50px rgba(23, 43, 70, 0.09);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef2f6;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #eef2f6; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #f8fafc 0, #eef2f6 430px); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.topbar { background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(210,220,232,.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.topbar-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--navy), var(--blue)); color: #fff; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 8px 20px rgba(22,58,99,.22); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.01em; }
.brand small { color: var(--muted); margin-top: 1px; font-size: 12px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 9px; color: #225e49; background: var(--green-soft); border: 1px solid #c9eadb; border-radius: 999px; padding: 9px 13px; font-size: 13px; font-weight: 700; }
.privacy-dot { width: 8px; height: 8px; border-radius: 50%; background: #26a873; box-shadow: 0 0 0 4px rgba(38,168,115,.12); }

.main-layout { padding: 68px 0 54px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: 44px; align-items: end; margin-bottom: 34px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 12px; line-height: 1; font-weight: 800; letter-spacing: .14em; }
h1 { max-width: 780px; margin: 0; font-size: clamp(36px, 5vw, 58px); line-height: 1.04; letter-spacing: -.045em; }
.hero-copy { max-width: 760px; margin: 20px 0 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.privacy-card { display: flex; gap: 15px; align-items: flex-start; padding: 20px; border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid #dfe7ef; box-shadow: 0 12px 35px rgba(31,49,73,.06); }
.privacy-card .privacy-icon { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--green-soft); color: var(--green); font-weight: 900; }
.privacy-card strong { font-size: 14px; }
.privacy-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.workspace-grid { display: grid; grid-template-columns: .86fr 1.14fr; gap: 22px; }
.card { background: var(--surface); border: 1px solid #dce4ed; border-radius: var(--radius); box-shadow: var(--shadow); padding: 25px; }
.card-heading { margin-bottom: 20px; }
.card-heading > div { display: flex; align-items: flex-start; gap: 12px; }
.card-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.card-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.step-number { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 800; }

.drop-zone { min-height: 216px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 26px; border: 2px dashed #b9c7d7; border-radius: 15px; background: var(--surface-soft); transition: .18s ease; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--blue); background: #f0f7ff; transform: translateY(-1px); }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.upload-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 14px; background: var(--blue-soft); color: var(--blue); font-size: 25px; font-weight: 700; }
.drop-zone strong { font-size: 16px; }
.drop-zone span:not(.upload-icon) { color: var(--muted); font-size: 14px; margin-top: 5px; }
.drop-zone small { color: #8793a3; margin-top: 13px; font-size: 12px; }
.file-summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 15px; padding: 14px; border: 1px solid #d4e9df; background: #f2fbf7; border-radius: 13px; }
.file-summary-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--green); color: white; font-weight: 800; }
.file-meta { min-width: 0; }
.file-meta strong, .file-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta strong { font-size: 13px; }
.file-meta span { color: var(--muted); font-size: 12px; margin-top: 3px; }

.field-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 750; }
.lane-input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.text-input, select { width: 100%; color: var(--ink); background: #fff; border: 1px solid #bdc8d6; border-radius: 11px; outline: none; transition: border .15s, box-shadow .15s; }
.text-input { min-height: 48px; padding: 0 14px; }
.text-input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(39,104,173,.12); }
.text-input:disabled, select:disabled { color: #8a96a5; background: #f3f5f7; cursor: not-allowed; }
.button { min-height: 42px; border: 0; border-radius: 10px; padding: 0 16px; font-weight: 750; transition: .15s ease; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button-primary { min-height: 48px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--blue)); box-shadow: 0 8px 18px rgba(22,58,99,.2); }
.button-primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(22,58,99,.25); }
.button-secondary { color: var(--navy); background: var(--blue-soft); border: 1px solid #cfe0f2; }
.button-secondary:hover { background: #dcecfb; }
.button-quiet { min-height: 34px; padding: 0 11px; background: #fff; border: 1px solid #ccd9d2; color: #426152; font-size: 12px; }

.settings-grid { display: grid; grid-template-columns: 1fr 160px; gap: 16px; align-items: end; margin-top: 22px; }
.setting > span { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.setting output { color: var(--blue); }
.setting input[type="range"] { width: 100%; accent-color: var(--blue); }
.compact-setting select { min-height: 39px; padding: 0 10px; }
.check-setting { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-soft); }
.check-setting input { position: absolute; opacity: 0; }
.check-box { position: relative; flex: 0 0 auto; width: 19px; height: 19px; border: 1.5px solid #9eabba; border-radius: 5px; background: #fff; margin-top: 1px; }
.check-setting input:checked + .check-box { background: var(--blue); border-color: var(--blue); }
.check-setting input:checked + .check-box::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check-setting strong, .check-setting small { display: block; }
.check-setting strong { font-size: 13px; }
.check-setting small { color: var(--muted); margin-top: 3px; font-size: 11px; }

.status-panel { display: flex; align-items: flex-start; gap: 13px; margin: 22px 0 0; padding: 16px 18px; border: 1px solid; border-radius: 14px; }
.status-panel.info { color: #285d88; border-color: #c7dff3; background: #eff7fe; }
.status-panel.success { color: #246148; border-color: #c5e5d6; background: #edf9f3; }
.status-panel.warning { color: #72500f; border-color: #ead69d; background: #fff8e7; }
.status-panel.error { color: #8e3030; border-color: #ecc4c4; background: #fff1f1; }
.status-icon { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.65); font-weight: 850; }
.status-panel strong { font-size: 13px; }
.status-panel p { margin: 3px 0 0; font-size: 12px; line-height: 1.5; opacity: .86; }

.results-section { margin-top: 42px; }
.results-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.results-header h2 { margin: 0; font-size: 27px; letter-spacing: -.025em; }
.results-header p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; background: white; border: 1px solid #dce4ed; border-radius: 16px; box-shadow: var(--shadow); }
table { width: 100%; min-width: 1120px; border-collapse: collapse; }
th, td { padding: 14px 13px; border-bottom: 1px solid #e7ecf2; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; background: #f6f8fb; color: #5c6879; font-size: 11px; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; z-index: 1; }
td { font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfe; }
.rank { color: #8290a2; font-weight: 800; }
.score { display: inline-flex; min-width: 60px; justify-content: center; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 800; }
.score.high { color: #176445; background: #dff4e9; }
.score.medium { color: #795313; background: #fff1cd; }
.score.low { color: #8b3b3b; background: #fde6e6; }
.contact-link { color: var(--blue); text-decoration: none; font-weight: 650; }
.contact-link:hover { text-decoration: underline; }
.history-cell strong, .history-cell small { display: block; }
.history-cell small { color: var(--muted); margin-top: 3px; }
.lane-cell { max-width: 250px; line-height: 1.4; }
.direction-tag { display: inline-flex; padding: 5px 8px; border-radius: 8px; background: #edf1f6; color: #596679; font-size: 11px; font-weight: 700; white-space: nowrap; }

.how-it-works { display: grid; grid-template-columns: 270px 1fr; gap: 40px; margin-top: 74px; padding-top: 40px; border-top: 1px solid #d7e0e9; }
.how-it-works h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.process-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.process-list article { padding: 20px; background: rgba(255,255,255,.72); border: 1px solid #dce4ec; border-radius: 15px; }
.process-list article > span { color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.process-list h3 { margin: 16px 0 8px; font-size: 15px; }
.process-list p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

footer { border-top: 1px solid #d5dee7; background: #e8edf3; }
.footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #697687; font-size: 12px; }
.noscript { padding: 12px; text-align: center; color: #7f2929; background: #ffecec; font-weight: 700; }

@media (max-width: 920px) {
  .hero, .workspace-grid, .how-it-works { grid-template-columns: 1fr; }
  .hero { gap: 24px; }
  .workspace-grid { gap: 16px; }
  .how-it-works { gap: 20px; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 1180px); }
  .topbar-inner { height: 66px; }
  .privacy-pill { font-size: 0; padding: 9px; }
  .privacy-pill::after { content: "Private"; font-size: 12px; }
  .main-layout { padding-top: 42px; }
  h1 { font-size: 38px; }
  .hero-copy { font-size: 16px; }
  .card { padding: 19px; }
  .lane-input-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .check-setting { grid-column: auto; }
  .process-list { grid-template-columns: 1fr; }
  .results-header { align-items: flex-start; flex-direction: column; }
  .footer-inner { flex-direction: column; justify-content: center; align-items: flex-start; padding: 18px 0; }
}
