:root {
  color-scheme: light;
  --ink: #14202a;
  --muted: #61717e;
  --line: #d9e0e5;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --accent: #087d86;
  --accent-strong: #045f66;
  --sun: #f4b344;
  --gum: #c85c7a;
  --shadow: 0 14px 36px rgba(28, 45, 55, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(160deg, rgba(8, 125, 134, 0.08), transparent 36%),
    linear-gradient(0deg, rgba(244, 179, 68, 0.10), transparent 24%),
    var(--paper);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

a {
  color: var(--accent-strong);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 5vw, 34px) 14px;
  border-bottom: 1px solid rgba(217, 224, 229, 0.82);
  background: rgba(247, 248, 245, 0.92);
  backdrop-filter: blur(18px);
}

.topbar h1,
.hero h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.status.is-ready {
  border-color: rgba(8, 125, 134, 0.28);
  color: var(--accent-strong);
}

.status.is-offline {
  border-color: rgba(200, 92, 122, 0.32);
  color: #9e3858;
}

main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 4vw, 34px) calc(40px + env(safe-area-inset-bottom));
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 154px;
  padding: clamp(20px, 5vw, 34px);
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgba(16, 32, 43, 0.92), rgba(8, 95, 102, 0.84)),
    url("cover.svg");
  background-position: center;
  background-size: cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero .eyebrow,
.hero p {
  color: rgba(255, 255, 255, 0.78);
}

.hero h2 {
  max-width: 760px;
  font-size: clamp(1.45rem, 5vw, 3.1rem);
  line-height: 1.04;
}

.hero p:last-child {
  max-width: 720px;
  margin: 10px 0 0;
  font-size: clamp(0.95rem, 2.4vw, 1.08rem);
}

.iconButton {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  margin: 18px 0 12px;
}

.searchBox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.searchBox span {
  color: var(--muted);
  font-size: 1.25rem;
}

.searchBox input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.tabs {
  display: flex;
  gap: 6px;
  min-height: 46px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tab {
  min-width: 104px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.tab.is-active {
  background: var(--accent);
  color: #fff;
}

.quickActions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.quickActions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(8, 125, 134, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.contentShell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.contentShell.is-single-column {
  grid-template-columns: minmax(0, 1fr);
}

.dayRail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 2px;
}

.dayRail:empty {
  display: none;
}

.dayGroup {
  display: grid;
  gap: 6px;
}

.dayGroupChildren {
  display: grid;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid rgba(8, 125, 134, 0.16);
}

.dayButton,
.dayGroupButton {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: left;
}

.dayGroupButton {
  border-color: rgba(8, 125, 134, 0.22);
  background: #f3fbfa;
  color: var(--accent-strong);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.dayButton.is-child {
  padding-block: 8px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
}

.dayButton.is-current,
.dayGroupButton.is-current {
  border-color: rgba(8, 125, 134, 0.35);
  background: #e9f6f4;
  color: var(--accent-strong);
}

.document {
  min-width: 0;
}

.docSection {
  margin-bottom: 14px;
  padding: clamp(16px, 4vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 24px rgba(28, 45, 55, 0.06);
}

.docSection h2,
.docSection h3,
.docSection h4 {
  margin: 0 0 10px;
  letter-spacing: 0;
}

.docSection h2 {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
}

.docSection h3 {
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  color: #223644;
}

.docSection h4 {
  font-size: 1rem;
  color: #223644;
}

.docSection p {
  margin: 10px 0;
  color: #334551;
  line-height: 1.55;
}

.docSection ul {
  margin: 8px 0 0;
  padding-left: 1.15rem;
}

.docSection li {
  margin: 8px 0;
  color: #334551;
  line-height: 1.45;
}

.docSection strong {
  color: var(--ink);
}

.docSection mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(244, 179, 68, 0.42);
  color: inherit;
}

.metaAction {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e9f6f4;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  vertical-align: baseline;
}

.emptyState {
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
}

.emptyState h2 {
  margin: 0 0 6px;
  color: var(--ink);
}

.emptyState p {
  margin: 0;
}

@media (max-width: 840px) {
  .toolbar,
  .contentShell {
    grid-template-columns: 1fr;
  }

  .tabs,
  .dayRail {
    overflow-x: auto;
  }

  .tabs {
    justify-content: flex-start;
  }

  .tab {
    min-width: max-content;
    padding: 0 12px;
  }

  .dayRail {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: minmax(136px, 168px);
    max-height: none;
    margin: 2px -14px 0;
    padding: 0 14px 4px;
  }

  .quickActions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
  }

  .status {
    min-width: 80px;
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .hero {
    min-height: 184px;
    align-items: flex-end;
  }

  .quickActions {
    grid-template-columns: 1fr 1fr;
  }
}
