:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #61706b;
  --line: #dce5e1;
  --panel: #ffffff;
  --wash: #f5f8f6;
  --brand: #126b58;
  --brand-strong: #0c4f42;
  --accent: #e3a72f;
  --danger: #a43d3d;
  --danger-bg: #fff0f0;
  --shadow: 0 18px 54px rgba(20, 34, 30, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f7faf8 0%, #eef5f1 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button,
.primary-btn,
.secondary-btn {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

button,
.primary-btn {
  background: var(--brand);
  color: white;
}

button:hover,
.primary-btn:hover {
  background: var(--brand-strong);
}

a {
  color: var(--brand-strong);
  font-weight: 850;
  overflow-wrap: anywhere;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(38px, 6vw, 68px);
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 0;
}

h2 {
  font-size: 24px;
  margin-bottom: 0;
}

h3 {
  font-size: 20px;
  margin: 8px 0 6px;
}

.app-shell {
  margin: 0 auto;
  padding: 28px 0 48px;
  width: min(1280px, calc(100% - 32px));
}

.topbar,
.workspace,
.panel-head,
.metric-grid,
.link-card-head,
.mini-metrics,
.button-row,
.choice-actions {
  display: grid;
  gap: 16px;
}

.topbar {
  align-items: center;
  grid-template-columns: 1fr auto;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.status-pill,
.tag {
  align-items: center;
  background: #e5f3ec;
  border: 1px solid #b8dbc9;
  border-radius: 999px;
  color: var(--brand-strong);
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  justify-self: start;
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.tag-muted {
  background: #edf0ef;
  border-color: #d3dcda;
  color: var(--muted);
}

.panel,
.metric-card,
.link-card,
.choice-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel,
.choice-shell {
  padding: 22px;
}

.login-panel {
  max-width: 460px;
}

.metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.metric-card strong {
  font-size: 32px;
}

.metric-card span,
.destinations,
label,
.empty-state,
.result,
td {
  color: var(--muted);
}

.workspace {
  align-items: start;
  grid-template-columns: 390px 1fr;
  margin-bottom: 18px;
}

.panel-head {
  align-items: center;
  grid-template-columns: 1fr auto;
  margin-bottom: 18px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  font-size: 13px;
  font-weight: 850;
  gap: 7px;
}

input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(18, 107, 88, 0.13);
}

.check-row {
  align-items: center;
  display: flex;
}

.check-row input {
  min-height: 18px;
  width: 18px;
}

.result,
.empty-state {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  min-height: 54px;
  padding: 14px;
}

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

.link-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.link-card-head {
  align-items: start;
  grid-template-columns: 1fr auto;
}

.button-row {
  grid-auto-flow: column;
}

.secondary-btn,
.ghost-btn {
  background: #eef5f1;
  color: var(--brand-strong);
}

.danger-btn {
  background: var(--danger-bg);
  color: var(--danger);
}

.mini-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-metrics span {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 2px;
  padding: 12px;
}

.mini-metrics strong {
  color: var(--ink);
  font-size: 22px;
}

.destinations {
  display: grid;
  font-size: 13px;
  gap: 5px;
}

.activity-panel {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.choice-body {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 24px;
}

.choice-shell {
  max-width: 620px;
  text-align: center;
}

.choice-shell h1 {
  font-size: clamp(30px, 8vw, 52px);
  margin-bottom: 24px;
}

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

@media (max-width: 920px) {
  .topbar,
  .workspace,
  .link-card-head,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .button-row {
    grid-auto-flow: row;
  }

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

@media (max-width: 560px) {
  .choice-actions,
  .mini-metrics {
    grid-template-columns: 1fr;
  }
}
