:root {
  --bg: #e9eef5;
  --paper: rgba(255, 255, 255, 0.82);
  --ink: #102033;
  --muted: #4d6074;
  --line: rgba(16, 32, 51, 0.12);
  --blue: #0f4c81;
  --blue-dark: #0b3559;
  --amber: #c78b2a;
  --shadow: 0 22px 54px rgba(16, 32, 51, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 76, 129, 0.16), transparent 28%),
    linear-gradient(180deg, #f5f8fc 0%, var(--bg) 100%);
}

.shell {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

.hero,
.panel,
.log {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero,
.panel {
  padding: 1.4rem;
  margin-bottom: 1.2rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.unsupported {
  max-width: 760px;
}

.install-steps {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  color: var(--blue-dark);
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
  max-width: 10ch;
}

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

.status-row,
.button-row,
.meta-grid,
.watch-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.button-row,
.meta-grid {
  margin-top: 1rem;
  flex-wrap: wrap;
}

.meta-grid {
  justify-content: flex-start;
}

.meta-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 76, 129, 0.1);
  color: var(--blue-dark);
}

.form,
.field {
  display: grid;
  gap: 0.65rem;
}

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

input,
select {
  border: 1px solid rgba(16, 32, 51, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.85rem 1rem;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button.primary {
  background: var(--blue);
  color: white;
}

.button.secondary {
  background: rgba(16, 32, 51, 0.08);
  color: var(--ink);
}

.button.compact {
  padding: 0.45rem 0.75rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(16, 32, 51, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--blue-dark);
}

.watch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.watch-group {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 32, 51, 0.08);
}

.watch-station {
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.watch-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.watch-pill {
  border: 1px solid rgba(16, 32, 51, 0.12);
  border-radius: 999px;
  background: rgba(15, 76, 129, 0.08);
  color: var(--blue-dark);
  padding: 0.4rem 0.75rem;
  font-size: 0.86rem;
}

.report-grid {
  display: grid;
  gap: 0.9rem;
}

.report-card,
.empty {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 32, 51, 0.08);
}

.report-card h3 {
  margin: 0;
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.report-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.report-toggle-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.report-toggle-track {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(16, 32, 51, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.18rem;
}

.report-toggle-option {
  color: var(--muted);
  padding: 0.35rem 0.72rem;
  font-size: 0.82rem;
  border-radius: 999px;
  text-align: center;
}

.report-toggle-option.active {
  background: rgba(15, 76, 129, 0.12);
  color: var(--ink);
}

.report-summary {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.report-raw {
  margin: 0;
  white-space: pre-wrap;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
}

.watch-row,
.empty {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 32, 51, 0.08);
}

.confirm-modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.confirm-modal::backdrop {
  background: rgba(16, 32, 51, 0.32);
}

.confirm-modal-card {
  width: min(420px, calc(100vw - 2rem));
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.log {
  margin: 0;
  padding: 1.25rem;
  min-height: 150px;
  white-space: pre-wrap;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
}

.debug-row {
  display: flex;
  justify-content: center;
  padding: 0.4rem 0 0;
}

.debug-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(16, 32, 51, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.debug-icon {
  display: block;
}

.debug-toggle[aria-pressed="true"] {
  color: var(--ink);
  border-color: rgba(16, 32, 51, 0.2);
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 1rem, 960px);
    padding-top: 1rem;
  }

  .status-row,
  .watch-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
