:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --ink: #172026;
  --muted: #60707a;
  --line: #d8e0e4;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --warn-bg: #fff7ed;
  --warn-line: #fdba74;
  --danger: #b91c1c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.app-header nav {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.page {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 16px 14px 48px;
}

.today-hero,
.current-card,
.next-card,
.detail-panel,
.warning,
.alternatives,
.timeline-item,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
}

.today-hero {
  padding-top: 22px;
}

.today-hero.compact {
  padding-top: 16px;
}

.eyebrow,
.label {
  margin: 0 0 6px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 11vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: 0;
}

p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.muted {
  color: var(--muted);
}

.warning {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.status-grid > div {
  min-height: 86px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.action-row,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.button,
button {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.button.danger {
  color: var(--danger);
}

.leave-time {
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.document-list {
  display: grid;
  gap: 8px;
}

.document-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.document-link span,
.pill {
  color: var(--muted);
  font-size: 0.8rem;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.timeline-item.essential {
  border-left: 5px solid var(--primary);
}

.timeline-item.optional {
  border-left: 5px solid #94a3b8;
}

.timeline-time {
  color: var(--muted);
  font-weight: 800;
}

.timeline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pill {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.pill.essential {
  color: var(--primary-dark);
}

.status-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.status-label {
  min-width: 82px;
  color: var(--muted);
  font-weight: 800;
}

.alternative-group,
.alternative-card {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.local-address {
  font-weight: 800;
}

@media (min-width: 720px) {
  .page {
    padding-top: 28px;
  }
}
