:root {
  font-size: 93.75%;
  --ink: #17211f;
  --muted: #66706d;
  --paper: #f5f4ef;
  --card: #fffef9;
  --line: #dfe2dc;
  --brand: #173f3a;
  --brand-soft: #e2efeb;
  --accent: #d99a2b;
  --danger: #a63434;
  --shadow: 0 16px 40px rgba(20, 41, 37, .08);
  --radius: 10px;
}

* { box-sizing: border-box; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 10; top: 12px; left: 12px; transform: translateY(-200%); padding: 12px 18px; color: #17211f; background: #fffef9; border: 2px solid #17211f; border-radius: 4px; font-weight: 700; }
.skip-link:focus { transform: translateY(0); outline: 3px solid #d99a2b; outline-offset: 3px; }
.site-header { min-height: 64px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav > a, .text-button { font: inherit; font-weight: 650; color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--brand); font-size: .78rem; letter-spacing: .05em; }
.brand-name { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: .25em; }
.brand-name [lang="bn"] { font-family: "Nirmala UI", "Bangla Sangam MN", system-ui, sans-serif; line-height: 1.5; letter-spacing: normal; white-space: nowrap; }
.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 40px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 14px; }
.page-heading.compact { align-items: center; }
.page-heading h1 { margin: 2px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1; letter-spacing: -.035em; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lede { margin: 13px 0 0; color: var(--muted); }
.heading-actions, .form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 36px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--card); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.button.primary { color: white; border-color: var(--brand); background: var(--brand); }
.button.quiet { background: transparent; }
.button.small { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.trip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.trip-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.trip-card-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.trip-card h2 { margin: 20px 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1.15; }
.trip-card h2 a { text-decoration: none; }
.trip-card > p { margin: 0; color: var(--muted); }
.status-pill, .query-state { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.monitoring { color: var(--muted); font-size: .82rem; font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.facts div { display: grid; gap: 2px; }
.facts dt, .summary-strip span { color: var(--muted); font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; font-weight: 700; }
.latest-update { display: flex; justify-content: space-between; gap: 14px; padding: 13px 14px; border-left: 4px solid var(--brand); background: var(--brand-soft); font-size: .86rem; }
.latest-update span { white-space: nowrap; color: var(--muted); }
.latest-update.empty { border-color: var(--line); color: var(--muted); background: #f4f4f0; }
.severity-watch { border-left-color: #d18b15 !important; }
.severity-action, .severity-urgent { border-left-color: var(--danger) !important; }
.empty-state { padding: 32px; text-align: center; }
.empty-state h2 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); padding: 20px 24px; margin-bottom: 22px; }
.summary-strip > div { display: grid; gap: 3px; padding: 0 18px; border-right: 1px solid var(--line); }
.summary-strip > div:first-child { padding-left: 0; }
.summary-strip > div:last-child { padding-right: 0; border-right: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .85fr); gap: 22px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 22px; }
.section-card { padding: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; }
.flight-list, .answer-list, .update-list { display: grid; gap: 12px; }
.flight-row { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.flight-row:first-child { border-top: 0; }
.flight-number { display: grid; }
.flight-number span { color: var(--muted); font-size: .73rem; font-weight: 700; text-transform: uppercase; }
.route { display: grid; grid-template-columns: 1fr minmax(70px, .8fr) 1fr; align-items: center; gap: 10px; }
.route > div { display: grid; }
.route > div:last-child { text-align: right; }
.route strong { font-size: 1.35rem; }
.route span { color: var(--muted); font-size: .83rem; }
.route-line span { display: block; height: 1px; background: var(--line); position: relative; }
.route-line span::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); transform: rotate(45deg); }
.text-link { color: var(--brand); font-weight: 750; }
.question-form { display: grid; gap: 12px; }
.question-form .button { justify-self: start; }
.answer-list { margin-top: 20px; }
.answer-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fafaf6; }
.answer-card h3, .update-item h3 { margin: 8px 0; font-size: 1rem; }
.answer-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .76rem; }
.answer-body > :first-child, .report-text > :first-child { margin-top: 8px; }
.answer-body > :last-child, .report-text > :last-child { margin-bottom: 0; }
.state-failed { color: var(--danger); background: #f7dfdf; }
.update-item { padding: 14px 0 14px 14px; border-left: 4px solid var(--brand); border-bottom: 1px solid var(--line); }
.update-item:last-child { border-bottom: 0; }
.update-item p { margin: 6px 0; }
.update-item details { margin-top: 10px; }
.update-item summary { color: var(--brand); font-weight: 750; cursor: pointer; }
.sources { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 12px; font-size: .82rem; }
.sources strong { width: 100%; }
.sources a { color: var(--brand); }
.form-card { max-width: 720px; padding: 20px; }
.form-card.wide { max-width: 900px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { display: grid; gap: 7px; }
.form-field.span-2 { grid-column: 1 / -1; }
label { font-size: .84rem; font-weight: 800; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid #cdd2cc; border-radius: 10px; color: var(--ink); background: white; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(23, 63, 58, .13); border-color: var(--brand); }
textarea { height: 96px; min-height: 76px; resize: vertical; }
.form-actions { margin-top: 18px; }
.field-error, .error-text { color: var(--danger); font-size: .84rem; }
.notice { padding: 12px 14px; margin-bottom: 14px; border: 1px solid #ead7ac; border-radius: 12px; background: #fff7e5; }
.privacy-note { margin: 0; }
.privacy-note p { margin: 5px 0 0; }
.trip-travellers { margin-top: 24px; }
.traveller-list { list-style: none; padding: 0; margin: 18px 0 0; }
.traveller-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.traveller-list li > div { display: grid; gap: 4px; overflow-wrap: anywhere; }
.invitation-list { display: grid; gap: 20px; max-width: 940px; }
.invitation-list h2 { margin-top: 0; overflow-wrap: anywhere; }
.muted, small { color: var(--muted); }
.messages { display: grid; gap: 8px; margin-bottom: 20px; }
.message { padding: 12px 15px; border: 1px solid #bdd6cc; border-radius: 10px; background: #e9f4ef; }
.message.error { border-color: #e1b1b1; background: #f9e8e8; }
.login-shell { min-height: calc(100vh - 170px); display: grid; place-items: center; }
.login-card { width: min(440px, 100%); padding: 34px; }
.login-card h1 { margin: 4px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 2.5rem; }
.login-card form { display: grid; gap: 16px; margin-top: 24px; }
.auth-panel { min-height: calc(100vh - 170px); display: grid; grid-template-columns: 1.15fr minmax(320px, .7fr); align-items: center; gap: clamp(40px, 8vw, 110px); }
.auth-panel > div h1 { max-width: 720px; margin: 4px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 7vw, 5.8rem); line-height: .96; letter-spacing: -.05em; }
.auth-panel .form-card { display: grid; gap: 10px; width: 100%; }
.auth-panel .form-card h2 { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.auth-panel .form-card .button { margin-top: 8px; }

@media (max-width: 820px) {
  .trip-grid, .detail-grid, .auth-panel { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .page-heading { align-items: flex-start; flex-direction: column; }
}

/* Keep compact controls comfortable on touch screens and avoid input zoom. */
@media (max-width: 760px), (pointer: coarse) {
  body .button, body .button.small,
  body.home-page .button, body.home-page .button.small { min-height: 44px; }
  body input, body select, body textarea,
  body.home-page input, body.home-page select, body.home-page textarea { font-size: 16px; }
  body input:not([type="checkbox"]):not([type="hidden"]), body select,
  body.home-page input:not([type="checkbox"]):not([type="hidden"]), body.home-page select { min-height: 44px; }
}

@media (max-width: 580px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; padding: 16px 20px; }
  .site-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; }
  .page-shell { width: min(100% - 24px, 1180px); padding-top: 30px; }
  .page-heading h1 { font-size: 1.9rem; }
  .facts, .form-grid { grid-template-columns: 1fr; }
  .form-field.span-2 { grid-column: auto; }
  .flight-row { grid-template-columns: 76px 1fr; }
  .flight-row > .text-link { grid-column: 2; }
  .route { grid-template-columns: 1fr 34px 1fr; }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-strip > div { padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .summary-strip > div:last-child { padding-bottom: 0; border-bottom: 0; }
}

/* Let short pages fill the viewport without pinning the footer over content. */
body > .site-header { flex-shrink: 0; }
body > .page-shell { flex: 1; display: flex; flex-direction: column; }
.page-shell > * { flex-shrink: 0; }
.page-shell > .home-footer { margin-top: auto; }
