:root {
  color-scheme: light;
  --ink: #102a25;
  --ink-soft: #536862;
  --paper: #f5f2e9;
  --card: rgba(255, 255, 252, 0.91);
  --line: #d9ddd2;
  --green: #146b55;
  --green-dark: #0b493c;
  --mint: #a8e0c2;
  --lime: #d6ef8c;
  --orange: #e97442;
  --red: #a63f35;
  --shadow: 0 28px 80px rgba(29, 55, 46, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 42, 37, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 37, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.page-glow { position: fixed; z-index: -1; border-radius: 999px; filter: blur(2px); pointer-events: none; }
.page-glow-one { width: 38rem; height: 38rem; right: -16rem; top: -15rem; background: radial-gradient(circle, rgba(168, 224, 194, .55), transparent 68%); }
.page-glow-two { width: 32rem; height: 32rem; left: -17rem; top: 38rem; background: radial-gradient(circle, rgba(214, 239, 140, .31), transparent 68%); }

.site-header, main, footer { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }
.site-header { height: 88px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 780; letter-spacing: -.04em; font-size: 1.22rem; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: var(--green); background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 7px 20px rgba(30, 70, 57, .1); }
.brand-mark svg { width: 30px; height: 30px; }
.brand-arrow { color: var(--orange); margin-inline: 2px; }
.header-note { color: var(--ink-soft); font-size: .77rem; letter-spacing: .02em; }

.hero { padding: 92px 0 46px; max-width: 900px; }
.eyebrow, .step-label { margin: 0 0 15px; text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; font-weight: 800; color: var(--green); }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 28px; height: 2px; background: var(--orange); }
h1, h2, p { text-wrap: pretty; }
h1 { margin: 0; max-width: 900px; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(3.2rem, 8vw, 6.9rem); letter-spacing: -.065em; line-height: .91; }
h1 em { color: var(--green); font-weight: 500; }
.hero-copy { color: var(--ink-soft); max-width: 690px; margin: 32px 0 0; font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.7; }

.converter-card, .results { background: var(--card); border: 1px solid rgba(155, 174, 163, .45); border-radius: 28px; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.converter-card { padding: clamp(24px, 5vw, 52px); margin-top: 36px; position: relative; overflow: hidden; }
.converter-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -70px; top: -85px; border: 26px solid rgba(168, 224, 194, .22); pointer-events: none; }
.card-heading, .results-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.card-heading h2, .results-heading h2, .how-it-works h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; font-size: clamp(1.8rem, 4vw, 2.65rem); }
.text-button { color: var(--green); border: 0; border-bottom: 1px solid currentColor; padding: 2px 0; background: transparent; font-size: .85rem; font-weight: 700; }

.link-input-wrap { position: relative; }
textarea { display: block; width: 100%; min-height: 112px; resize: vertical; color: var(--ink); background: #fbfbf6; border: 1.5px solid #b9c5bc; border-radius: 17px; padding: 19px 116px 19px 19px; line-height: 1.5; outline: none; transition: border .2s, box-shadow .2s; }
textarea:focus, input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(20, 107, 85, .12); outline: none; }
.paste-button { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 7px; color: var(--green-dark); background: #e6f1e8; border: 0; border-radius: 10px; padding: 9px 12px; font-size: .78rem; font-weight: 750; }
.paste-button svg { width: 17px; }
.quick-row { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.quick-row label { color: var(--ink-soft); font-size: .84rem; font-weight: 700; }
select, input[type="text"] { color: var(--ink); background: #fbfbf6; border: 1px solid #bdc8c0; border-radius: 10px; padding: 10px 12px; outline: none; }
select { min-width: 205px; }

.route-controls { margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route-controls summary { display: flex; align-items: baseline; gap: 10px; padding: 16px 2px; cursor: pointer; color: var(--green-dark); font-size: .86rem; font-weight: 750; }
.route-controls summary span { color: var(--ink-soft); font-weight: 450; font-size: .76rem; }
.controls-body { padding: 4px 0 20px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field-grid label { display: grid; gap: 7px; color: var(--ink-soft); font-size: .76rem; font-weight: 700; }
.check-grid { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 18px; color: var(--ink-soft); font-size: .78rem; }
.check-grid label { display: flex; align-items: center; gap: 7px; }
input[type="checkbox"] { accent-color: var(--green); width: 16px; height: 16px; }

.convert-button { margin-top: 24px; width: 100%; min-height: 57px; display: flex; align-items: center; justify-content: center; gap: 11px; color: white; background: var(--green); border: 0; border-radius: 14px; font-weight: 800; letter-spacing: .01em; box-shadow: 0 12px 28px rgba(20, 107, 85, .23); transition: transform .18s, background .18s; }
.convert-button:hover { transform: translateY(-1px); background: var(--green-dark); }
.convert-button:disabled { opacity: .72; cursor: wait; transform: none; }
.convert-button svg { width: 21px; }
.button-loader { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: white; animation: spin .7s linear infinite; }
.is-loading .button-loader { display: block; }
.is-loading .convert-button svg { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-note, .expiry-note { text-align: center; color: var(--ink-soft); font-size: .72rem; line-height: 1.5; margin: 13px 0 0; }
.message { padding: 13px 15px; margin-top: 18px; border-radius: 10px; font-size: .84rem; line-height: 1.5; }
.error-message { color: #7f2d26; background: #fae8e2; border: 1px solid #efc5bc; }

.results { margin-top: 28px; padding: clamp(24px, 5vw, 46px); }
.mode-badge { color: var(--green-dark); background: var(--mint); border-radius: 999px; padding: 8px 13px; font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.result-badges { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.google-attribution { color: #3c4043; background: #fff; border: 1px solid #dadce0; border-radius: 999px; padding: 7px 12px; font-size: .72rem; font-weight: 700; }
.route-title-row { display: grid; grid-template-columns: 18px 1fr 18px; align-items: center; gap: 14px; padding: 19px; border-radius: 15px; background: #f1f4eb; margin-bottom: 18px; }
.route-pin { width: 12px; height: 12px; border-radius: 50%; justify-self: center; }
.start-pin { background: var(--green); box-shadow: 0 0 0 4px rgba(20,107,85,.15); }
.finish-pin { background: var(--orange); box-shadow: 0 0 0 4px rgba(233,116,66,.15); }
.route-names { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-size: .84rem; }
.route-names strong:last-child { text-align: right; }
.route-names span { color: var(--ink-soft); font-size: .7rem; }
.route-list { display: grid; gap: 11px; }
.route-option { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.route-option:first-child { border-color: rgba(20,107,85,.55); box-shadow: inset 4px 0 var(--green); }
.route-option h3 { margin: 0 0 7px; font-size: .94rem; }
.route-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-soft); font-size: .78rem; }
.download-button { display: inline-flex; align-items: center; gap: 7px; color: #fff; background: var(--green-dark); border-radius: 10px; padding: 10px 13px; text-decoration: none; font-weight: 800; font-size: .78rem; white-space: nowrap; }
.download-button svg { width: 16px; }

.how-it-works { display: grid; grid-template-columns: .78fr 1.22fr; gap: 80px; padding: 130px 0 115px; }
.how-it-works ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 26px; }
.how-it-works li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.how-it-works li > span { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #aebcb2; border-radius: 50%; color: var(--green); font-weight: 800; font-size: .76rem; }
.how-it-works strong { font-size: .95rem; }
.how-it-works li p { margin: 6px 0 0; color: var(--ink-soft); line-height: 1.55; font-size: .82rem; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 26px 0 36px; border-top: 1px solid rgba(131,151,141,.5); color: var(--ink-soft); font-size: .68rem; }
footer p { margin: 0; }
footer a { color: var(--green); }

.legal-page { max-width: 780px; padding: 80px 0 110px; }
.legal-page h1 { font-size: clamp(3rem, 8vw, 5.5rem); margin-bottom: 28px; }
.legal-lead { color: var(--ink-soft); font-size: 1.18rem; line-height: 1.65; margin: 0 0 55px; }
.legal-page section { padding: 24px 0; border-top: 1px solid var(--line); }
.legal-page section h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 1.55rem; margin: 0 0 10px; }
.legal-page section p { color: var(--ink-soft); line-height: 1.75; margin: 0; }
.legal-page a { color: var(--green); }
.legal-back { margin-top: 36px; font-weight: 750; }

@media (max-width: 720px) {
  .site-header, main, footer { width: min(100% - 24px, 1080px); }
  .header-note { display: none; }
  .hero { padding-top: 62px; }
  .hero-copy { line-height: 1.55; }
  .converter-card { border-radius: 21px; }
  .card-heading, .results-heading { align-items: start; }
  .field-grid { grid-template-columns: 1fr; }
  .quick-row { align-items: stretch; flex-direction: column; gap: 7px; }
  .quick-row select { width: 100%; }
  .route-controls summary { display: block; }
  .route-controls summary span { display: block; margin-top: 5px; }
  .route-names { grid-template-columns: 1fr; gap: 3px; }
  .route-names strong:last-child { text-align: left; }
  .route-option { grid-template-columns: 1fr; }
  .download-button { justify-content: center; }
  .how-it-works { grid-template-columns: 1fr; gap: 42px; padding: 90px 0 80px; }
  footer { flex-direction: column; }
}

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