:root {
  color-scheme: light;
  --navy: #0d1e36;
  --navy-2: #162f52;
  --navy-soft: #eef4fc;
  --ink: #141c26;
  --slate: #52637a;
  --slate-2: #8093ad;
  --line: #d3dfed;
  --line-2: #e5eef7;
  --bg: #f4f7fb;
  --paper: #ffffff;
  --red: #cf3a2e;
  --red-hover: #b02e24;
  --green: #117a43;
  --green-bg: #e6f6ee;
  --amber: #a3660c;
  --amber-bg: #fdf5e6;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --shadow: 0 4px 18px -4px rgba(13, 30, 54, 0.08), 0 1px 3px rgba(13, 30, 54, 0.04);
  --shadow-hover: 0 8px 24px -4px rgba(13, 30, 54, 0.12), 0 2px 6px rgba(13, 30, 54, 0.06);
  --radius: 8px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode {
  color-scheme: dark;
  --navy: #15304f;
  --navy-2: #8db5e2;
  --navy-soft: #10243d;
  --ink: #f3f4f6;
  --slate: #9ca3af;
  --slate-2: #6b7280;
  --line: #2e2e36;
  --line-2: #1e1e24;
  --bg: #0d0d11;
  --paper: #1e1e24; /* Slightly lighter gray (#1e1e24 instead of #16161a) for premium input fields/cards depth */
  --shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
  --green: #1ebd72;
  --green-bg: #0c2b1a;
  --amber: #f2c98d;
  --amber-bg: #2d200c;
  --red: #ff5247;
  --red-hover: #cf3a2e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Dynamic theme smooth transitions */
.card, header, footer, .btn, .chip, .station-item, .time-picker-bar, .dep-item, .recip, .letter, .tabs, .tab {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-theme {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-theme:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}
  a { color: var(--navy-2); text-decoration: none; }
  a:hover { text-decoration: underline; }
  button { font-family: inherit; cursor: pointer; border: none; background: none; }
  input, textarea { font-family: inherit; }
  
  header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--red);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  .hbar {
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .brand .emblem {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .brand .wm {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 21px;
    color: #fff;
    letter-spacing: .1px;
    line-height: 1;
  }
  .brand .wm em {
    font-style: normal;
    color: #8db5e2;
  }
  .brand .sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 2px;
  }
  .pill {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .green-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: #12b886;
    border-radius: 50%;
    box-shadow: 0 0 8px #12b886;
  }
  
  main {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px 60px;
  }
  
  .card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
  }
  .card.accent { border-top: 4px solid var(--navy); }
  .card.ok { border-top: 4px solid var(--green); }
  .card.warn { border-top: 4px solid var(--amber); }
  .card.interactive:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--slate-2);
  }
  
  .kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--navy-2);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .kicker .ln {
    height: 1px;
    flex: 1;
    background: var(--line-2);
  }
  
  h1.display {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -.4px;
    color: var(--navy);
    margin-bottom: 14px;
  }
  h2.display {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -.2px;
    color: var(--navy);
    margin-bottom: 12px;
  }
  
  .accent-red { color: var(--red); }
  .lead {
    color: var(--slate);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 22px;
  }
  
  .field-container {
    margin-bottom: 16px;
  }
  .field {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
  }
  .field:focus {
    border-color: var(--navy-2);
    box-shadow: 0 0 0 3px rgba(22, 47, 82, 0.15);
    background: var(--paper);
  }
  .field::placeholder, .picker-input::placeholder {
    color: var(--slate);
    opacity: 0.65;
  }
  textarea.field { resize: vertical; line-height: 1.5; }

  /* Autocomplete Suggestions Box */
  .suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border: 1.5px solid var(--navy-2);
    border-radius: 6px;
    margin-top: 5px;
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    animation: fade-anim 0.15s ease-out;
  }
  .suggestions-box.active {
    display: block;
  }
  .suggestion-item {
    padding: 11px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line-2);
    transition: var(--transition);
    color: var(--ink);
  }
  .suggestion-item:last-child {
    border-bottom: none;
  }
  .suggestion-item:hover {
    background: var(--navy-soft);
    color: var(--navy);
  }
  .suggestion-item .name {
    font-weight: 600;
    font-size: 13.5px;
  }
  
  label.lbl {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 6px;
  }
  label.lbl .opt {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--slate-2);
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    letter-spacing: .1px;
  }
  .btn-primary {
    background: var(--navy);
    color: #fff;
  }
  .btn-primary:hover {
    background: var(--navy-2);
  }
  .btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  .btn-red {
    background: var(--red);
    color: #fff;
  }
  .btn-red:hover {
    background: var(--red-hover);
  }
  .btn-ghost {
    background: transparent;
    color: var(--slate);
    border: 1.5px solid var(--line);
  }
  .btn-ghost:hover {
    border-color: var(--slate-2);
    color: var(--ink);
  }
  .btn-soft {
    background: var(--navy-soft);
    color: var(--navy);
  }
  .btn-soft:hover {
    background: #e0eaf7;
  }
  .btn-full { width: 100%; }
  .btn-row { display: flex; gap: 10px; }
  
  .grid { display: grid; gap: 8px; }
  .g2 { grid-template-columns: 1fr 1fr; }
  .g3 { grid-template-columns: 1fr 1fr 1fr; }
  
  .chip {
    border: 1.5px solid var(--line);
    background: var(--paper);
    color: var(--slate);
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 13.5px;
    text-align: left;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .chip:hover { border-color: var(--slate-2); }
  .chip.on {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
  }
  .chip .ttl { font-weight: 700; }
  .chip .hint { font-size: 11px; opacity: .75; }
  .chip .risk { font-size: 10px; font-weight: 700; color: var(--amber); }
  .chip.on .risk { color: #f2c98d; }
  
  .station-item {
    padding: 12px 16px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    margin-bottom: 8px;
  }
  .station-item:hover {
    border-color: var(--navy);
    background: var(--navy-soft);
  }
  .station-item .name {
    font-weight: 600;
    color: var(--navy);
  }

  /* Date & Time Picker bar styling */
  .time-picker-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--navy-soft);
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    border: 1px solid var(--line-2);
  }
  .time-picker-bar span {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--navy);
  }
  .time-picker-bar .btn-group {
    display: flex;
    gap: 4px;
  }
  .time-picker-bar .preset-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    background: var(--paper);
    color: var(--slate);
    border: 1px solid var(--line);
    transition: var(--transition);
  }
  .time-picker-bar .preset-btn.active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
  }
  .time-picker-bar .custom-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .time-picker-bar input.picker-input {
    border: 1px solid var(--line);
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 4px;
    outline: none;
    height: 30px;
    color: var(--ink);
    background: var(--paper);
  }

  /* Departures List styling */
  .dep-list {
    margin-top: 12px;
  }
  .dep-item {
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition);
    margin-bottom: 8px;
  }
  .dep-item:hover {
    border-color: var(--navy);
    box-shadow: 0 2px 8px rgba(13, 30, 54, 0.05);
  }
  .dep-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dep-train {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .line-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
    background: var(--slate);
  }
  .line-badge.regional { background: #b51a1a; }
  .line-badge.longdistance { background: #4a5568; }
  .dep-dest {
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
  }
  .dep-time-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
  }
  .dep-planned {
    color: var(--slate);
    text-decoration: line-through;
  }
  .dep-actual {
    font-weight: 700;
  }
  .dep-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
  }
  .dep-status.ontime { background: var(--green-bg); color: var(--green); }
  .dep-status.delayed { background: var(--amber-bg); color: var(--amber); }
  .dep-status.severe { background: #fdf0f0; color: var(--red); }
  .dep-status.cancelled { background: var(--red); color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
  
  .dep-remark {
    font-size: 11.5px;
    color: var(--slate);
    background: var(--bg);
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 3px solid var(--slate-2);
    margin-top: 4px;
  }
  
  .step {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-2);
  }
  .step:last-child { border-bottom: none; }
  .num {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
  }
  .num.muted { background: var(--bg); color: var(--slate); }
  .step .st { font-weight: 700; font-size: 13.5px; }
  .step .sd { font-size: 12.5px; color: var(--slate); margin-top: 1px; line-height: 1.45; }
  
  .rr {
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-left: 3px solid;
    background: var(--paper);
  }
  .rr .rh {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .rr .rt {
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .rr .ra { font-weight: 700; font-size: 13px; white-space: nowrap; }
  .rr .rn { font-size: 12px; color: var(--slate); margin-top: 6px; line-height: 1.5; }
  .rr .rl { font-size: 10px; color: var(--slate-2); margin-top: 4px; font-style: italic; }
  
  .badge-ic {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .badge-ic svg { width: 10px; height: 10px; }
  
  .disbox {
    border-radius: 6px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    margin-bottom: 14px;
  }
  .disbox .dl { font-weight: 700; font-size: 13.5px; color: var(--navy); }
  .disbox .dd { font-size: 12.5px; color: var(--slate); margin-top: 3px; line-height: 1.45; }
  .disbox .dm { font-size: 11px; color: var(--slate-2); margin-top: 4px; }
  
  .src {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 13px;
  }
  
  /* Tabs for letters */
  .tabs {
    display: flex;
    overflow-x: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    padding: 12px 14px;
    border-bottom: 2px solid transparent;
    color: var(--slate);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    text-align: left;
    flex: 1;
    transition: var(--transition);
  }
  .tab .tg { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: var(--slate-2); margin-top: 2px; }
  .tab.on {
    color: var(--navy);
    background: var(--navy-soft);
    border-bottom-color: var(--navy);
  }
  .tab.on .tg { color: var(--red); }
  
  .recip {
    background: var(--bg);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.6;
  }
  .recip .rname { font-weight: 700; color: var(--navy); margin-bottom: 3px; }
  .recip .rrow { display: flex; align-items: center; gap: 6px; color: var(--slate); margin-top: 2px; }
  .recip .rrow svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--slate-2); }
  
  .letter {
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.8;
    color: #243040;
    white-space: pre-wrap;
    background: #fbfbfc;
    padding: 20px;
    border: 1px solid var(--line-2);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
  }

  /* Interactive Roadmap / Timeline for next steps */
  .timeline {
    position: relative;
    padding-left: 28px;
    margin-top: 20px;
  }
  .timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 8px;
    width: 2px;
    background-color: var(--line);
  }
  .timeline-item {
    position: relative;
    margin-bottom: 24px;
  }
  .timeline-item:last-child {
    margin-bottom: 0;
  }
  .timeline-dot {
    position: absolute;
    left: -28px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--paper);
    border: 3px solid var(--navy);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }
  .timeline-dot.done {
    border-color: var(--green);
    background-color: var(--green);
  }
  .timeline-dot.done::after {
    content: '✓';
    color: #fff;
    font-size: 9px;
    font-weight: 700;
  }
  .timeline-dot.active {
    border-color: var(--red);
    background-color: var(--red-hover);
  }
  .timeline-content {
    background: var(--paper);
    border: 1px solid var(--line-2);
    border-radius: 6px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  }
  .timeline-title {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--navy);
    margin-bottom: 3px;
  }
  .timeline-text {
    font-size: 12.5px;
    color: var(--slate);
    line-height: 1.5;
  }
  .timeline-date {
    display: inline-block;
    margin-top: 6px;
    font-size: 10px;
    background: var(--navy-soft);
    color: var(--navy);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
  }
  
  .pulse { animation: pulse-anim 1.5s ease-in-out infinite; }
  @keyframes pulse-anim {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
  }
  
  .loc-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--red);
    border-radius: 50%;
    margin-right: 6px;
    animation: loc-pulse-anim 1.2s infinite;
  }
  @keyframes loc-pulse-anim {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
    100% { transform: scale(0.9); opacity: 1; }
  }

  .fade { animation: fade-anim .25s ease-out; }
  @keyframes fade-anim {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
  }
  
  footer {
    border-top: 1px solid var(--line);
    background: var(--paper);
    padding: 24px 16px;
    margin-top: 40px;
  }
  footer .fin {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
    font-size: 11px;
    color: var(--slate-2);
    line-height: 1.6;
  }
  footer .fbrand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  footer .fbrand svg { width: 20px; height: 20px; }
  footer .fbrand span { font-family: var(--serif); font-weight: 700; color: var(--slate); font-size: 13.5px; }
  
  /* Past Departures styling */
  .dep-item.past {
    opacity: 0.7;
    border-style: dashed;
    background: var(--bg);
  }
  .dep-item.past:hover {
    opacity: 1;
    border-style: solid;
  }
  .dep-item.past .line-badge.regional {
    background: #a85252;
  }
  .dep-item.past .line-badge.longdistance {
    background: #6e7a8e;
  }
  .dep-item.past .dep-dest {
    color: var(--slate);
  }

  /* Manual Train Selector */
  .manual-selector-card {
    border-left: 4px solid var(--navy-2);
  }
  .chip-recommendation {
    display: inline-block;
    padding: 6px 12px;
    background: var(--navy-soft);
    color: var(--navy);
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: var(--transition);
  }
  .chip-recommendation:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
  }
  .lookup-status-box {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    animation: fade-anim 0.2s;
  }
  .lookup-status-box.loading {
    background: var(--navy-soft);
    color: var(--navy);
    border: 1px solid var(--line);
  }
  .lookup-status-box.success {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(17, 122, 67, 0.15);
  }
  .lookup-status-box.error {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid rgba(163, 102, 12, 0.15);
  }

  /* Responsive Search & Manual Inputs Grid */
  .search-bar-responsive {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: stretch;
  }
  .search-bar-responsive button {
    height: 48px;
    font-size: 14.5px;
  }
  .search-bar-responsive input.field {
    height: 48px;
  }
  
  .manual-inputs-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .manual-input-col {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
  }
  .manual-input-col input.field {
    height: 48px;
  }

  /* Custom Inline Notification banner styles */
  .notification-banner {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fade-anim 0.2s ease-out;
  }
  
  @media(max-width: 580px) {
    /* Responsive layout stacking */
    .search-bar-responsive {
      flex-direction: column;
      gap: 10px;
    }
    .search-bar-responsive button,
    .search-bar-responsive .input-wrap {
      width: 100% !important;
      height: 48px;
    }
    
    .manual-inputs-grid {
      flex-direction: column;
      gap: 10px;
    }
    .manual-input-col {
      width: 100% !important;
      flex: none;
    }
    
    /* Make input fields larger & mobile-touch optimized */
    .field, input.field, textarea.field, select {
      font-size: 16px !important; /* Prevents auto-zoom in Safari on iOS */
      padding: 14px 16px;
    }
    
    .btn, button.btn {
      font-size: 15.5px !important;
      padding: 14px 20px;
      width: 100%;
    }
    
    h1.display { font-size: 26px; }
    h2.display { font-size: 20px; }
    .card { padding: 20px 16px; }
    .g2 { grid-template-columns: 1fr; }
    .g3 { grid-template-columns: 1fr; }
    .btn-row { flex-direction: column; gap: 8px; }
    .tab { padding: 12px 10px; font-size: 11px; }
  }