:root {
  --green-950: #11251b;
  --green-900: #173526;
  --green-800: #214c37;
  --green-700: #2f6b4a;
  --green-600: #3d855c;
  --green-100: #e8f1e8;
  --green-075: #edf4ec;
  --green-050: #f5f8f2;
  --clay-100: #f7f3eb;
  --stone-050: #f8f9f6;
  --stone-100: #eef0ea;
  --stone-200: #dde4da;
  --stone-300: #c7d1c5;
  --stone-400: #728072;
  --ink: #1d261f;
  --danger: #8a2c26;
  --shadow: 0 20px 50px rgba(27, 48, 33, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(101, 152, 103, 0.12), transparent 34%),
    linear-gradient(180deg, #f7faf5 0%, #eef3eb 100%);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.acc-shell {
  width: min(1700px, calc(100vw - 32px));
  padding-top: 18px;
  padding-bottom: 72px;
}

.hero {
  background:
    linear-gradient(135deg, rgba(23, 53, 38, 0.98), rgba(33, 76, 55, 0.92)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.08), transparent);
  color: #f8fcf6;
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  opacity: 0.78;
}

.hero h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.98;
  margin: 10px 0 12px;
  max-width: 10ch;
}

.hero p {
  margin: 0;
  max-width: 58ch;
  color: rgba(248, 252, 246, 0.88);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fcf6;
  font-weight: 600;
}

.layout-gap {
  margin-top: 24px;
}

.panel {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(125, 143, 126, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.area-card {
  padding: 20px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.area-card.enabled:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(27, 48, 33, 0.18);
}

.area-card.dimmed {
  opacity: 0.72;
}

.area-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  margin: 8px 0 6px;
}

.area-kicker {
  color: var(--stone-400);
  font-size: 0.95rem;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-tag.future {
  background: var(--clay-100);
  color: #755845;
}

.status-tag.subtle {
  background: rgba(23, 53, 38, 0.06);
  color: var(--green-800);
}

.page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
}

.page-subtitle {
  color: var(--stone-400);
  margin-top: 6px;
}

.station-top {
  align-items: flex-start;
}

.station-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.station-surface {
  padding: 0;
  overflow: hidden;
}

.station-section {
  padding: 22px 24px;
}

.station-section + .station-section {
  border-top: 1px solid rgba(125, 143, 126, 0.16);
}

.station-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 8px;
}

.station-subtitle {
  color: var(--stone-400);
  max-width: 52ch;
}

.station-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.station-body-grid {
  display: grid;
  grid-template-columns: minmax(420px, 560px) minmax(0, 1fr);
  border-top: 1px solid rgba(125, 143, 126, 0.16);
}

.station-panel {
  padding: 22px 24px 24px;
}

.station-panel + .station-panel {
  border-left: 1px solid rgba(125, 143, 126, 0.16);
}

.station-panel-history {
  background: linear-gradient(180deg, rgba(248, 250, 246, 0.7), rgba(245, 248, 242, 0.92));
}

.boom-button,
.link-button,
.primary-button,
.ghost-button,
.filter-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.boom-button:hover,
.primary-button:hover,
.ghost-button:hover,
.link-button:hover,
.filter-button:hover {
  transform: translateY(-1px);
}

.boom-button {
  padding: 10px 16px;
  background: #fff;
  color: var(--green-900);
  border: 1px solid var(--stone-200);
  font-weight: 700;
}

.boom-button.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

.link-button,
.ghost-button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--stone-200);
  padding: 10px 16px;
  font-weight: 600;
}

.primary-button {
  background: var(--green-700);
  color: #fff;
  padding: 12px 18px;
  font-weight: 700;
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.summary-tile {
  background: linear-gradient(180deg, rgba(248, 250, 246, 0.96), rgba(242, 246, 239, 0.98));
  border: 1px solid rgba(125, 143, 126, 0.18);
  border-radius: 18px;
  padding: 16px 18px;
  min-height: 132px;
}

.summary-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-400);
}

.summary-value {
  margin-top: 10px;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--green-950);
}

.summary-meta {
  margin-top: 10px;
  color: var(--stone-400);
  font-size: 0.88rem;
  line-height: 1.45;
}

.composer-shell {
  background: linear-gradient(180deg, #fafcf8, #f4f8f2);
  border: 1px solid rgba(125, 143, 126, 0.18);
  border-radius: 22px;
  padding: 18px;
}

.composer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.composer-title,
.section-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.9rem;
  margin: 0;
}

.section-copy {
  margin: 0 0 18px;
  color: var(--stone-400);
}

.composer-pill {
  background: rgba(23, 53, 38, 0.08);
  border-color: rgba(23, 53, 38, 0.08);
  color: var(--green-800);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-stack {
  margin-top: 14px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--stone-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--stone-200);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.field textarea {
  min-height: 138px;
  resize: vertical;
}

.composer-input {
  min-height: 132px;
}

.hint-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--stone-400);
  font-size: 0.92rem;
  margin-top: 12px;
}

.composer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.history-title {
  font-size: 1.6rem;
}

.history-controls {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-button {
  padding: 10px 14px;
  background: #fff;
  color: var(--stone-400);
  border: 1px solid var(--stone-200);
  font-weight: 700;
}

.filter-button.active {
  background: var(--green-100);
  color: var(--green-800);
  border-color: rgba(47, 107, 74, 0.2);
}

.feed-meta {
  font-size: 0.92rem;
  color: var(--stone-400);
}

.feed-list {
  display: grid;
  gap: 14px;
}

.entry-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdfb, #f7faf5);
  border: 1px solid rgba(125, 143, 126, 0.18);
}

.entry-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.entry-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.entry-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-tag.type-operator {
  background: var(--green-100);
  color: var(--green-800);
}

.entry-tag.type-pm {
  background: rgba(61, 133, 92, 0.14);
  color: var(--green-700);
}

.entry-tag.type-cm {
  background: rgba(122, 90, 54, 0.14);
  color: #7a5a36;
}

.entry-tag.state-upcoming {
  background: #fff2d8;
  color: #7a5a18;
}

.entry-tag.state-completed {
  background: #eef1ed;
  color: #4d5d50;
}

.entry-tag.equipment {
  background: rgba(17, 37, 27, 0.08);
  color: var(--green-800);
}

.due-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ffe9c6;
  color: #6b3f0b;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
}

.entry-date {
  color: var(--stone-400);
  font-size: 0.9rem;
  white-space: nowrap;
}

.entry-title {
  margin-top: 12px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

.entry-message {
  margin-top: 10px;
  color: var(--stone-400);
  line-height: 1.55;
  white-space: pre-wrap;
}

.entry-footer {
  margin-top: 14px;
}

.entry-meta {
  color: var(--stone-400);
  font-size: 0.86rem;
  line-height: 1.45;
}

.future-panel,
.error-banner,
.empty-state {
  padding: 18px 20px;
  border-radius: 18px;
}

.error-banner {
  background: rgba(138, 44, 38, 0.12);
  color: var(--danger);
  border: 1px solid rgba(138, 44, 38, 0.2);
  margin-bottom: 14px;
}

.empty-state {
  background: var(--green-050);
  border: 1px dashed var(--stone-200);
  color: var(--stone-400);
}

.station-dock {
  position: sticky;
  bottom: 14px;
  z-index: 24;
  margin-top: 18px;
}

.station-dock-inner {
  background: linear-gradient(180deg, rgba(17, 37, 27, 0.96), rgba(23, 53, 38, 0.98));
  border: 1px solid rgba(92, 129, 101, 0.26);
  border-radius: 22px;
  box-shadow: 0 24px 50px rgba(17, 37, 27, 0.3);
  padding: 14px 16px;
}

.dock-nav-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.dock-nav-row::-webkit-scrollbar {
  height: 8px;
}

.dock-nav-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.dock-button {
  flex: 0 0 auto;
  min-width: 110px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f8f2;
  border-color: rgba(255, 255, 255, 0.14);
}

.dock-button.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}

.fade-in {
  animation: fade-in 220ms ease-out both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .station-body-grid,
  .summary-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .station-panel + .station-panel {
    border-left: 0;
    border-top: 1px solid rgba(125, 143, 126, 0.16);
  }

  .history-controls {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 12px;
  }

  .acc-shell {
    width: min(100vw - 20px, 1700px);
    padding-bottom: 88px;
  }

  .hero,
  .station-section,
  .station-panel,
  .composer-shell,
  .future-panel {
    padding: 18px;
  }

  .page-top,
  .history-head {
    align-items: flex-start;
  }

  .station-top-actions {
    width: 100%;
  }

  .station-dock {
    bottom: 10px;
  }

  .dock-button {
    min-width: 104px;
  }
}
