:root {
  --ink: #17211e;
  --muted: #5d6965;
  --paper: #f5f7f6;
  --surface: #ffffff;
  --line: #cbd4d0;
  --line-dark: #99a6a1;
  --green: #087a5a;
  --green-soft: #dff3eb;
  --amber: #a75c06;
  --amber-soft: #fff0d5;
  --red: #b53b32;
  --red-soft: #fbe7e4;
  --blue: #315bb3;
  --shadow: 0 18px 48px rgba(23, 33, 30, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", Aptos, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

:focus-visible {
  outline: 3px solid rgba(49, 91, 179, 0.36);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 10px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.05;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-family: Bahnschrift, sans-serif;
  font-size: 23px;
  font-weight: 700;
  border-radius: 4px;
}

.brand strong { display: block; font-family: Bahnschrift, sans-serif; letter-spacing: 0; }
.brand small { color: var(--muted); font-size: 12px; }

nav { display: flex; gap: 24px; margin-right: auto; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
nav a:hover { color: var(--ink); }

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}
.privacy-chip span { font-size: 10px; }

main { overflow: hidden; }

.intro {
  width: min(1380px, 100%);
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  padding: clamp(48px, 8vh, 94px) clamp(20px, 6vw, 90px) 48px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
  align-items: center;
  gap: clamp(46px, 7vw, 100px);
}

.intro-copy { max-width: 610px; }
.eyebrow, .step-label {
  margin: 0 0 12px;
  color: var(--green);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: 0; }
h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 5.3vw, 76px);
  line-height: 0.98;
  font-weight: 720;
}
.intro-copy > p:not(.eyebrow) { max-width: 590px; margin: 28px 0; color: var(--muted); font-size: 19px; }

.trust-line { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; font-weight: 700; }
.trust-line span::before { content: "✓"; margin-right: 7px; color: var(--green); }

.checker {
  width: 100%;
  padding: clamp(22px, 3vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-top: 5px solid var(--green);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.checker-head, .section-heading, .dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

h2 { margin: 0; font-size: clamp(28px, 3.2vw, 46px); line-height: 1.08; }
.checker h2, dialog h2 { font-size: 27px; }
.step-label { color: var(--muted); margin-bottom: 5px; }
.link-button { padding: 4px 0; border: 0; background: none; color: var(--blue); cursor: pointer; font-size: 13px; font-weight: 700; border-bottom: 1px solid currentColor; }

.drop-zone {
  min-height: 190px;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  border: 2px dashed var(--line-dark);
  border-radius: 4px;
  background: #f8faf9;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.holiday-selection { margin-top: 24px; }
.holiday-selection label { display: block; margin-bottom: 7px; font-weight: 750; }
.holiday-selection select {
  width: 100%;
  min-height: 46px;
  padding: 9px 38px 9px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}
.holiday-selection p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.holiday-status { min-height: 28px; padding-top: 7px; color: var(--muted); font-size: 12px; }
.holiday-status.ready { color: var(--green); font-weight: 700; }
.holiday-status.loading { color: var(--blue); }
.holiday-status.error { color: var(--red); font-weight: 700; }
.holiday-status.warning {
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px solid var(--red);
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); background: var(--green-soft); }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-zone strong { margin: 9px 0 4px; font-size: 18px; }
.drop-zone > span:last-child { color: var(--muted); font-size: 13px; }
.upload-symbol { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-size: 23px; line-height: 1; }

.file-status { min-height: 46px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.status-dot { width: 8px; height: 8px; background: var(--line-dark); border-radius: 50%; }
.file-status.ready { color: var(--ink); }
.file-status.ready .status-dot { background: var(--green); }
.file-status.error { color: var(--red); }
.file-status.error .status-dot { background: var(--red); }

.checker-actions { display: flex; gap: 10px; margin-top: 18px; }
.button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 750;
  cursor: pointer;
}
.button.primary { flex: 1; background: var(--ink); color: white; }
.button.primary:hover { background: var(--green); border-color: var(--green); }
.button.secondary { background: white; color: var(--ink); }
.button:disabled { cursor: not-allowed; opacity: 0.42; }
.legal-short { margin: 14px 0 0; color: var(--muted); font-size: 11px; }

.results {
  padding: 72px clamp(20px, 6vw, 90px) 84px;
  background: var(--ink);
  color: white;
}
.results > * { width: min(1220px, 100%); margin-left: auto; margin-right: auto; }
.results .step-label { color: #98b3aa; }
.download { background: transparent; color: white; border-color: #80918b; }
.download:hover { background: white; color: var(--ink); }

.summary { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 34px; border: 1px solid #53635e; }
.summary-item { min-height: 118px; padding: 20px; border-right: 1px solid #53635e; }
.summary-item:last-child { border-right: 0; }
.summary-item strong { display: block; font-family: Bahnschrift, sans-serif; font-size: 40px; line-height: 1; }
.summary-item span { color: #bdc8c4; font-size: 13px; }
.summary-sub { display: block; margin-top: 4px; color: #8fa09a; font-size: 11px; }
.summary-item.warning strong { color: #ffc665; }
.summary-item.holiday strong { color: #92b8ff; }

.result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; }
.segments { display: inline-flex; border: 1px solid #687973; border-radius: 4px; overflow: hidden; }
.segments button { min-height: 38px; padding: 8px 14px; border: 0; border-right: 1px solid #687973; background: transparent; color: #c4ceca; cursor: pointer; }
.segments button:last-child { border-right: 0; }
.segments button.active { background: white; color: var(--ink); }
#result-count { color: #aab8b3; font-size: 13px; }

.table-wrap { position: relative; margin-top: 16px; overflow-x: auto; border: 1px solid #53635e; }
table { width: 100%; min-width: 1040px; border-collapse: collapse; }
th { padding: 13px 15px; color: #aebbb7; background: #202c28; text-align: left; font-size: 11px; text-transform: uppercase; }
td { padding: 16px 15px; border-top: 1px solid #44534e; font-size: 14px; vertical-align: middle; }
tbody tr.data-row:hover { background: #202c28; }
.time-value { font-family: "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; }
.status-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #50c99d; }
.status-badge.warning { color: #ffd287; }
.status-badge.warning::before { background: #ffb23e; }
.holiday-badge { display: inline-block; max-width: 190px; color: #b8ceff; font-size: 12px; font-weight: 700; line-height: 1.3; }
.muted-value { color: #7f918a; }
.detail-toggle { width: 32px; height: 32px; border: 1px solid #687973; border-radius: 50%; background: transparent; color: white; cursor: pointer; }
.detail-toggle[aria-expanded="true"] { background: white; color: var(--ink); transform: rotate(45deg); }
.detail-row td { padding: 0; background: #111a17; }
.detail-content { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; padding: 24px; }
.warning-list { margin: 0; padding: 0; list-style: none; }
.warning-list li { margin-bottom: 8px; padding-left: 16px; border-left: 3px solid #ffb23e; }
.warning-list .ok-note { border-color: #50c99d; color: #b8e8d6; }
.warning-list .holiday-note { border-color: #6995f0; color: #c8d8ff; }

.timeline { position: relative; height: 52px; margin: 22px 0 4px; border-top: 1px solid #53635e; border-bottom: 1px solid #53635e; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(12.5% - 1px), #33413c calc(12.5% - 1px), #33413c 12.5%); }
.timeline-bar { position: absolute; top: 12px; height: 26px; min-width: 2px; background: #54cda0; border-radius: 2px; }
.timeline-labels { display: flex; justify-content: space-between; color: #7f918a; font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; }
.detail-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #3a4944; border: 1px solid #3a4944; }
.detail-metrics div { padding: 13px; background: #19231f; }
.detail-metrics span { display: block; color: #99aaa4; font-size: 11px; }
.detail-metrics strong { font-family: "Cascadia Mono", Consolas, monospace; font-size: 15px; }

.process { padding: 92px clamp(20px, 6vw, 90px); background: var(--surface); }
.process > * { width: min(1220px, 100%); margin-left: auto; margin-right: auto; }
.section-heading.narrow { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: end; }
.section-heading.narrow > p { margin: 0; color: var(--muted); max-width: 480px; }
.process-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 52px auto 0; padding: 0; list-style: none; border-top: 1px solid var(--line-dark); }
.process-steps li { padding: 24px 34px 0 0; border-right: 1px solid var(--line); }
.process-steps li + li { padding-left: 34px; }
.process-steps li:last-child { border-right: 0; }
.process-steps span { display: block; margin-bottom: 32px; color: var(--green); font-family: "Cascadia Mono", Consolas, monospace; font-weight: 700; }
.process-steps strong { font-family: Bahnschrift, sans-serif; font-size: 22px; }
.process-steps p { color: var(--muted); }

.logic-story { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: stretch; background: #e9eeeb; }
.logic-image { min-height: 500px; overflow: hidden; }
.logic-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.logic-copy { padding: clamp(48px, 7vw, 96px); align-self: center; }
.logic-copy p:not(.eyebrow), .logic-copy li { color: var(--muted); }
.logic-copy ul { margin: 26px 0; padding: 0; list-style: none; }
.logic-copy li { margin: 10px 0; padding-left: 23px; position: relative; }
.logic-copy li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.inline-button { display: inline-flex; margin-top: 8px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 26px clamp(20px, 6vw, 90px); background: #101714; color: #aebbb7; font-size: 12px; }

dialog { width: min(720px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--line-dark); border-radius: 6px; color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 18, 15, 0.72); backdrop-filter: blur(4px); }
.close-button { position: relative; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; flex-shrink: 0; }
.close-button:hover { background: var(--surface); border-color: var(--ink); }
.close-button::before,
.close-button::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; background: var(--ink); border-radius: 1px; }
.close-button::before { transform: translate(-50%, -50%) rotate(45deg); }
.close-button::after { transform: translate(-50%, -50%) rotate(-45deg); }
.format-list { margin-top: 24px; border-top: 1px solid var(--line); }
.format-list section { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.format-list section > span { color: var(--green); font-family: "Cascadia Mono", Consolas, monospace; font-weight: 700; }
.format-list h3 { margin: 0 0 7px; font-size: 18px; }
.format-list p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.format-list .format-header { margin: 0 0 5px; color: var(--ink); font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; font-weight: 750; }
.format-list code { display: block; overflow-x: auto; color: var(--blue); font-size: 11px; white-space: nowrap; }
.dialog-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 960px) {
  nav { display: none; }
  .privacy-chip { margin-left: auto; }
  .intro { min-height: auto; grid-template-columns: 1fr; padding-top: 60px; }
  .intro-copy { max-width: 760px; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .summary-item { border-bottom: 1px solid #53635e; }
  .summary-item:nth-child(even) { border-right: 0; }
  .summary-item:last-child { border-bottom: 0; }
  .section-heading.narrow, .logic-story { grid-template-columns: 1fr; }
  .logic-image { min-height: 360px; max-height: 560px; }
}

@media (max-width: 650px) {
  .site-header { min-height: 62px; padding: 8px 16px; }
  .brand-mark { width: 36px; height: 36px; }
  .privacy-chip { font-size: 0; }
  .privacy-chip span { font-size: 11px; }
  .intro { padding: 44px 16px 34px; gap: 34px; }
  h1 { font-size: 43px; }
  .intro-copy > p:not(.eyebrow) { font-size: 17px; }
  .checker { padding: 20px; }
  .checker-head { display: block; }
  .checker-head .link-button { margin-top: 10px; }
  .drop-zone { min-height: 160px; }
  .checker-actions { flex-direction: column-reverse; }
  .results, .process { padding: 56px 16px; }
  .section-heading { display: block; }
  .section-heading .download { width: 100%; margin-top: 22px; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary-item { min-height: 96px; padding: 16px; }
  .summary-item strong { font-size: 31px; }
  .result-toolbar { align-items: flex-end; }
  .segments button { padding: 8px 10px; font-size: 12px; }
  .detail-content { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; border-top: 0; }
  .process-steps li, .process-steps li + li { padding: 22px 0; border-right: 0; border-top: 1px solid var(--line); }
  .process-steps span { margin-bottom: 12px; }
  .logic-image { min-height: 250px; }
  .logic-copy { padding: 46px 20px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
