:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #111a2f;
  --panel-2: #17233d;
  --text: #edf4ff;
  --muted: #9fb0c9;
  --line: #263854;
  --accent: #76e4f7;
  --accent-2: #b7f776;
  --danger: #ff7a90;
  --warning: #ffd166;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(118, 228, 247, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(183, 247, 118, 0.10), transparent 32rem),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06111d;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition:
    transform 120ms ease,
    filter 120ms ease,
    box-shadow 120ms ease;
  box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.22);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  filter: brightness(1.06);
}

button:active {
  transform: translateY(2px) scale(0.97);
  filter: brightness(0.94);
  box-shadow: 0 0.12rem 0.35rem rgba(0, 0, 0, 0.28);
}

button:focus-visible {
  outline: 3px solid rgba(118, 228, 247, 0.65);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

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

button.ghost,
.tab {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  background: #0d1528;
}

textarea {
  resize: vertical;
}

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

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 0.4rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

h2 {
  margin-bottom: 1rem;
}

.subtitle,
.muted,
.session-label {
  color: var(--muted);
}

.session-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: rgba(17, 26, 47, 0.86);
  box-shadow: var(--shadow);
}

.session-card {
  min-width: 16rem;
  padding: 1rem;
  text-align: right;
}

.panel {
  padding: 1.2rem;
}

.narrow {
  max-width: 30rem;
}

.hidden {
  display: none !important;
}

.message {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.message.error {
  border-color: rgba(255, 122, 144, 0.7);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.tab.active {
  border-color: transparent;
  background: var(--text);
  color: #07111f;
}

.cards,
.two-column {
  display: grid;
  gap: 1rem;
}

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

.two-column {
  grid-template-columns: minmax(0, 1.35fr) minmax(22rem, 0.65fr);
}

.grid-form {
  display: grid;
  gap: 0.85rem;
}

label,
legend {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
}

.check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check input {
  width: auto;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
}

.list {
  display: grid;
  gap: 0.8rem;
}

.item {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(13, 21, 40, 0.72);
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.actions button {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: #07111f;
  background: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.good {
  background: var(--accent-2);
}

.badge.warn {
  background: var(--warning);
}

.badge.bad {
  background: var(--danger);
}

.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 1rem;
}

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

.kv dd {
  margin: 0;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.8rem;
  background: #0d1528;
}

.summary-card strong {
  display: block;
  font-size: 1.7rem;
}

.choices {
  display: grid;
  gap: 0.5rem;
}

.choice-row {
  display: grid;
  grid-template-columns: auto 1fr max-content;
  align-items: center;
  gap: 0.6rem;
}

.choice-row input {
  width: auto;
}

.generated-link {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  background: #0d1528;
}

.generated-link input {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

@media (max-width: 980px) {
  .hero,
  .two-column,
  .cards {
    grid-template-columns: 1fr;
    display: grid;
  }

  .session-card {
    text-align: left;
  }
}
