/* Earnly design system. Matches the Claude Design mocks: warm off-white canvas, forest
   green primary, white rounded cards, heavy DM Sans display headlines, tier/law/caution badges. */

:root {
  --bg: #EAE8E3;
  --surface: #ffffff;
  --surface-2: #F3F1EB;
  --panel-green: #E4EDE6;
  --ink: #1B1A17;
  --ink-2: #6D6A63;
  --ink-3: #918C84;
  --green: #4E7C5A;
  --green-press: #446B4F;
  --green-ink: #3C6347;
  --green-tint: #D9E6DC;
  --amber: #B07D2B;
  --amber-ink: #7C5618;
  --amber-tint: #F0E6CF;
  --line: #E2DFD8;
  --line-2: #EDEAE3;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(20, 18, 14, .04), 0 10px 26px rgba(20, 18, 14, .05);
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --maxw: 460px;
}
.dark {
  --bg: #14130F;
  --surface: #201E18;
  --surface-2: #1B1A14;
  --panel-green: #1E2A21;
  --ink: #F3F1EA;
  --ink-2: #A8A399;
  --ink-3: #837E75;
  --green: #6FA77E;
  --green-press: #5E9069;
  --green-ink: #9CC8A8;
  --green-tint: #25342A;
  --amber: #D8A84E;
  --amber-ink: #E6C485;
  --amber-tint: #322a18;
  --line: #2E2C24;
  --line-2: #262419;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 10px 26px rgba(0,0,0,.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}
#app { max-width: var(--maxw); margin: 0 auto; min-height: 100%; overflow-x: clip; }

/* screen scaffold */
.screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 0 24px calc(24px + env(safe-area-inset-bottom)); }
.screen.pad-top { padding-top: 8px; }

/* top bar */
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px 6px; font-weight: 600; font-size: 15px; }
.statusbar .offline { color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.statusbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); display: inline-block; }
.topnav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 0 4px; min-height: 44px; }
.topnav .back { justify-self: start; background: none; border: 0; font: inherit; font-size: 18px; font-weight: 600; color: var(--ink); cursor: pointer; padding: 6px 4px; }
.topnav .title { justify-self: center; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.iconbtn { justify-self: end; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); display: grid; place-items: center; cursor: pointer; }

/* progress */
.progress { display: flex; gap: 8px; margin: 8px 0 18px; }
.progress span { height: 5px; border-radius: 3px; background: var(--line); flex: 1; }
.progress span.on { background: var(--green); }

/* typography */
h1.display { font-size: 40px; line-height: 1.04; font-weight: 800; letter-spacing: -0.02em; margin: 12px 0 14px; }
.lead { font-size: 18px; color: var(--ink-2); margin-bottom: 26px; }
.section-label { font-size: 18px; font-weight: 700; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.field-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 18px 0 8px; }

/* primary cta card (home) */
.cta-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: var(--green); color: #fff; border-radius: var(--radius); padding: 22px 22px; box-shadow: var(--shadow); }
.cta-card:active { background: var(--green-press); }
.cta-card .grow { flex: 1; }
.cta-card .t { font-size: 22px; font-weight: 700; }
.cta-card .s { font-size: 15.5px; opacity: .92; margin-top: 3px; }
.cta-card .arrow { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; }

/* buttons */
.btn { display: block; width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 18px;
  border-radius: 18px; padding: 19px; text-align: center; }
.btn.primary { background: var(--green); color: #fff; box-shadow: var(--shadow); }
.btn.primary:active { background: var(--green-press); }
.btn.primary[disabled] { background: var(--line); color: var(--ink-3); box-shadow: none; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sticky-cta { margin-top: auto; padding-top: 18px; }

/* generic cards + list rows */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.row + .row { margin-top: 14px; }
.row .ico { width: 46px; height: 46px; border-radius: 13px; background: var(--green-tint); color: var(--green-ink); display: grid; place-items: center; flex: none; }
.row .label { flex: 1; font-size: 18px; font-weight: 700; }
.row .chev { color: var(--ink-3); flex: none; }
.row.sel { box-shadow: 0 0 0 2px var(--green), var(--shadow); }
.row.sel .ico { background: var(--green); color: #fff; }

/* badges + pills */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.badge.green { background: var(--green-tint); color: var(--green-ink); }
.badge.amber { background: var(--amber-tint); color: var(--amber-ink); }
.pill { display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.pill.green { background: var(--green-tint); color: var(--green-ink); }
.pill.warn { background: var(--amber-tint); color: var(--amber-ink); }

/* saved-claim card */
.claim { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; padding: 20px; margin-top: 16px; }
.claim .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.claim .date { color: var(--ink-2); font-size: 15px; }
.claim .amt { font-size: 25px; font-weight: 800; letter-spacing: -.01em; }
.claim .bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; }
.claim .route { color: var(--ink-2); font-size: 16px; }

/* footer note */
.footnote { text-align: center; color: var(--ink-2); font-size: 15px; margin: 26px 8px 6px; }

/* form inputs */
.input { width: 100%; min-width: 0; background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-sm); box-shadow: var(--shadow);
  font: inherit; font-size: 17px; color: var(--ink); padding: 17px 16px; }
input.input[type="datetime-local"], input.input[type="date"] { font-size: 15px; padding-right: 8px; }
.btn-lookup { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 16px; border-radius: 14px; padding: 15px; margin-top: 10px; background: var(--green-tint); color: var(--green-ink); }
.btn-lookup[disabled] { background: var(--surface-2); color: var(--ink-3); cursor: default; }
.lookup-msg { font-size: 15px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; line-height: 1.4; }
.lookup-msg.found { background: var(--green-tint); color: var(--green-ink); }
.lookup-msg.error { background: var(--amber-tint); color: var(--amber-ink); }
.lookup-msg.loading { color: var(--ink-2); }
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--green); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two > div { min-width: 0; }
.hint { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 16px; margin-top: 12px; }
.hint .gdot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 8px; flex: none; }
.hint b { color: var(--ink); font-weight: 700; }
.seg-card { padding: 20px; margin-top: 20px; }
.seg-card .q { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg button { font: inherit; font-size: 17px; font-weight: 700; padding: 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.seg button.sel { border-color: var(--green); background: var(--green-tint); color: var(--green-ink); }

/* verdict */
.verdict-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 6px 0 18px; }
.verdict-route { color: var(--ink-2); font-size: 16px; text-align: right; }
.bigpanel { border-radius: var(--radius); padding: 26px 24px; margin-bottom: 22px; }
.bigpanel.green { background: var(--panel-green); }
.bigpanel.plain { background: var(--surface-2); }
.bigpanel .kicker { font-size: 17px; font-weight: 700; color: var(--green-ink); margin-bottom: 6px; }
.bigpanel .amount { font-size: 66px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--green); margin: 4px 0 16px; }
.bigpanel .gap-title { font-size: 38px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 14px; }
.bigpanel .why { font-size: 17.5px; color: var(--ink-2); }
.checklist { padding: 22px 22px 8px; margin-bottom: 22px; }
.checklist .ttl { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.check { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 18px; }
.check .mk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.check .mk.pass { background: var(--green); }
.check .mk.watch { background: var(--amber); }
.check .mk.fail { background: var(--ink-3); }
.check .txt { font-size: 18px; font-weight: 600; padding-top: 3px; }
.notice { background: var(--amber-tint); border-radius: var(--radius); padding: 20px 22px; display: flex; gap: 14px; margin-bottom: 18px; }
.notice .mk { width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: #fff; display: grid; place-items: center; flex: none; }
.notice .h { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.notice .b { color: var(--ink); font-size: 16.5px; }
.notice a { color: var(--amber-ink); font-weight: 700; text-decoration: none; display: inline-block; margin-top: 10px; }
.metarow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 4px; }
.metarow .k { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.metarow .v { font-size: 16px; font-weight: 600; }

/* claim cards in gap "what you can claim" */
.claimable { padding: 20px; margin-top: 14px; }
.claimable .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.claimable .h { font-size: 19px; font-weight: 800; }
.claimable .b { color: var(--ink-2); font-size: 16px; margin-top: 8px; }

/* letter */
.letter { padding: 30px 26px; margin-bottom: 20px; }
.letter h2 { font-size: 24px; font-weight: 800; }
.letter hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.letter .body { white-space: pre-wrap; font-size: 16.5px; line-height: 1.6; color: var(--ink); }
.letter .date { color: var(--ink-2); margin-bottom: 18px; }

.stack-gap { margin-top: 22px; }
.spacer { height: 8px; }

/* add-flight partner note */
.note-card { display: flex; gap: 13px; align-items: flex-start; background: var(--panel-green); color: var(--green-ink); border-radius: var(--radius); padding: 18px 20px; margin-top: 24px; font-size: 16px; line-height: 1.45; }
.note-card .note-ico { flex: none; margin-top: 1px; }

/* tracking screen */
.tracking-status { display: flex; align-items: center; gap: 9px; color: var(--green-ink); font-weight: 700; font-size: 16px; margin: 8px 0 16px; }
.tracking-status .gdot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.flightcard { padding: 0; overflow: hidden; }
.fc-head { display: flex; align-items: center; gap: 13px; padding: 20px 20px 16px; }
.fc-avatar { width: 46px; height: 46px; border-radius: 13px; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.fc-id { flex: 1; min-width: 0; }
.fc-no { font-size: 21px; font-weight: 800; }
.fc-sub { color: var(--ink-2); font-size: 14.5px; margin-top: 1px; }
.fc-badge { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; padding: 7px 11px; border-radius: 9px; white-space: nowrap; }
.fc-badge.warn { background: var(--amber-tint); color: var(--amber-ink); }
.fc-badge.ok { background: var(--green-tint); color: var(--green-ink); }
.fc-route { display: flex; align-items: center; gap: 12px; padding: 4px 20px 20px; }
.fc-end { min-width: 0; }
.fc-end.right { text-align: right; }
.fc-code { font-size: 33px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.fc-city { color: var(--ink-2); font-size: 13.5px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-line { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 7px; min-width: 64px; }
.fc-dur { text-align: center; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.fc-track { position: relative; height: 3px; border-radius: 3px; background: var(--green-tint); margin: 0 4px; }
.fc-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 3px; background: var(--green); transition: width .4s ease; }
.fc-plane { position: absolute; top: 50%; transform: translate(-50%, -50%) rotate(90deg); color: var(--green); background: var(--surface); padding: 0 3px; display: inline-flex; transition: left .4s ease; }
.fc-times { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.fc-col { padding: 15px 20px; min-width: 0; }
.fc-col + .fc-col { border-left: 1px solid var(--line); }
.fc-k { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.fc-v { font-size: 19px; font-weight: 800; }
.fc-v s { color: var(--ink-3); font-weight: 500; font-size: 15px; margin-left: 5px; }
.fc-delay { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 16px; }
.disruption-note { background: var(--panel-green); border-radius: var(--radius); padding: 20px 22px; margin-top: 18px; }
.disruption-note .dn-h { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.disruption-note .dn-b { color: var(--ink); font-size: 16.5px; line-height: 1.45; }
.cause-card { padding: 20px; margin-top: 18px; }
.cause-card .cc-h { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.cause-card .cc-b { color: var(--ink-2); font-size: 16px; margin-bottom: 16px; line-height: 1.45; }

/* tab bar + tab screens */
.tabscreen { padding-bottom: 94px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--maxw); display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border-top: 1px solid var(--line); padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); z-index: 20; }
.tabbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font: inherit; color: var(--ink-3); padding: 7px; border-radius: 14px; }
.tabbtn.on { color: var(--green-ink); }
.tabbtn span { font-size: 12px; font-weight: 700; }
.topnav-tab { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 6px; }
.brandbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 0; }
.brandmark { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: var(--green-ink); }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.tab-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 4px; }
.section-h { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 20px 0 12px; }
.empty { color: var(--ink-2); font-size: 16px; padding: 6px 2px; }
.link { color: var(--green-ink); font-weight: 700; cursor: pointer; }

/* flight rows (home) */
.flightrow { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; padding: 16px 18px; margin-bottom: 12px; }
.fr-av { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.fr-mid { flex: 1; min-width: 0; }
.fr-no { font-size: 17px; font-weight: 800; }
.fr-no .fr-route { font-weight: 600; color: var(--ink-2); font-size: 15px; }
.fr-sub { color: var(--ink-2); font-size: 14px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flightrow .chev { color: var(--ink-3); flex: none; }

/* baggage 4-segment */
.seg4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg4 button { padding: 13px 4px; font-size: 15px; }

/* settings */
.set-group { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 18px; overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; }
.set-row + .set-row { border-top: 1px solid var(--line-2); }
.set-t { font-size: 17px; font-weight: 700; }
.set-s { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.toggle { width: 50px; height: 30px; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; padding: 3px; flex: none; }
.toggle span { display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.on { background: var(--green); }
.toggle.on span { transform: translateX(20px); }
.set-link { width: 100%; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }

/* your details + letter actions */
textarea.input { resize: vertical; line-height: 1.5; min-height: 64px; font-family: var(--font); }
.optional { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.letter-actions { display: flex; flex-direction: column; gap: 10px; }
.letter-actions .btn { margin: 0; }

/* account / auth */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 50px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.btn.social { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.or-divider { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 14px; margin: 22px 0; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.link-row { margin: 14px 2px 4px; text-align: right; }

/* verdict explainers */
.explain { font-size: 15px; color: var(--ink-2); line-height: 1.45; margin: -2px 0 18px; }
.meta-note { font-size: 14px; color: var(--ink-2); line-height: 1.45; margin: 12px 0 2px; }
.redo-link { text-align: center; margin-top: 14px; }
