:root {
  color-scheme: light;
  --bg: #f4f5f3;
  --panel: #ffffff;
  --ink: #172124;
  --muted: #6d7a86;
  --subtle: #eef3f0;
  --line: #dde4e1;
  --line-strong: #cfd8d5;
  --accent: #126453;
  --accent-dark: #0e5145;
  --accent-soft: #e6f1ed;
  --warning-bg: #fff0c8;
  --warning-line: #f0cf75;
  --warning-ink: #b35f00;
  --danger: #cf3f3f;
  --danger-soft: #fde7e7;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

* {
  box-sizing: border-box;
}

body.alpha-shell {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(18, 100, 83, .25);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 26px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 14px;
  font-size: 17px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

h4 {
  margin: 22px 0 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

.muted,
.fineprint {
  color: var(--muted);
}

.fineprint {
  margin-top: 18px;
  font-size: 14px;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 24px;
}

.auth-brand,
.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-brand {
  width: 490px;
  max-width: calc(100vw - 40px);
  margin-bottom: 34px;
}

.auth-brand span,
.sidebar-brand span,
.sidebar-user small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.logo-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.auth-card {
  width: 490px;
  max-width: calc(100vw - 40px);
  padding: 38px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.success-box,
.info-box,
.warning-box,
.consent-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-radius: 7px;
}

.success-box,
.info-box {
  border: 1px solid #cce3dc;
  background: var(--accent-soft);
  color: var(--accent);
}

.success-box {
  margin: 24px 0;
  padding: 14px;
}

.success-box small {
  display: block;
  color: var(--muted);
}

.auth-notes {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.auth-notes p {
  position: relative;
  margin: 0 0 12px;
  padding-left: 18px;
}

.auth-notes p::before {
  position: absolute;
  left: 0;
  content: "○";
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf9;
  color: var(--ink);
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 130px;
  padding: 14px;
  resize: vertical;
}

.primary,
.secondary,
.ghost,
.danger,
.text-button,
.run-pill {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 7px;
  font-weight: 800;
}

.primary {
  border: 0;
  background: var(--accent);
  color: white;
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  border: 1px solid #bdd8d0;
  background: var(--accent-soft);
  color: var(--accent);
}

.ghost,
.run-pill {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.danger {
  border: 1px solid #f4b9b9;
  background: var(--danger-soft);
  color: var(--danger);
}

.text-button {
  min-height: auto;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.full {
  width: 100%;
}

.compact {
  min-height: 36px;
  padding: 0 14px;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.sidebar-brand {
  padding: 26px 22px;
  border-bottom: 1px solid var(--line);
}

.side-nav {
  display: grid;
  gap: 2px;
  padding: 16px 0;
}

.nav-item {
  display: flex;
  position: relative;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.nav-item.active::after {
  position: absolute;
  right: 20px;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

.sidebar-user {
  margin-top: auto;
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}

.content-shell {
  min-width: 0;
}

.mobile-tabbar {
  display: none;
}

.page-header {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.page-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.content-narrow {
  width: min(1040px, calc(100vw - 300px));
  padding: 26px;
}

.drop-zone {
  display: grid;
  width: 620px;
  max-width: 100%;
  min-height: 190px;
  place-content: center;
  gap: 12px;
  border: 2px dashed var(--line-strong);
  border-radius: 4px;
  background: white;
  text-align: center;
}

.drop-zone input {
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-symbol {
  color: var(--muted);
  font-size: 42px;
  line-height: 1;
}

.warning-box {
  width: 620px;
  max-width: 100%;
  margin: 22px 0;
  padding: 16px;
  border: 1px solid var(--warning-line);
  background: var(--warning-bg);
  color: var(--warning-ink);
}

.warning-box p,
.info-box p,
.consent-card span {
  margin-bottom: 0;
}

.consent-card {
  width: 620px;
  max-width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 16px;
}

.consent-card input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.panel {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.info-box {
  margin-bottom: 22px;
  padding: 16px;
}

.value-card {
  border-left: 5px solid var(--accent);
}

.two-col,
.path-columns {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.path-columns {
  align-items: start;
}

.column-title {
  margin: 6px 0 18px;
}

.column-title small {
  color: var(--muted);
  font-weight: 400;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
}

.green {
  background: var(--accent);
}

.gray {
  background: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.tag,
.meta-row span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.tag {
  border-radius: 4px;
}

.removable {
  border: 1px solid #bdd8d0;
}

.path-card,
.compare-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.score-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.score div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  overflow: hidden;
  height: 6px;
  margin-top: 8px;
  border-radius: 6px;
  background: #edf0ee;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

details {
  color: var(--accent);
  font-weight: 700;
}

details p {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 400;
}

.stack {
  display: grid;
  gap: 16px;
}

.mini-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.mini-row span {
  color: var(--muted);
  font-size: 13px;
}

.step-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.step-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.step-list span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.live-steps div {
  padding: 10px;
  border-radius: 7px;
}

.live-steps div.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.live-steps div.done {
  color: var(--accent);
}

.analyzing-panel {
  display: grid;
  width: min(620px, 100%);
  justify-items: start;
}

.loading-spinner {
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.quiet-list,
.strength-list,
.question-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.quiet-list li::before {
  margin-right: 10px;
  color: var(--accent);
  content: "⊙";
}

.strength-list div {
  display: grid;
  gap: 2px;
}

.strength-list span,
.question-list p {
  margin: 0;
  color: var(--muted);
}

.question-list p {
  color: var(--warning-ink);
}

.feedback-form {
  width: min(560px, calc(100vw - 300px));
}

.star-rating {
  display: flex;
  gap: 8px;
}

.star {
  min-width: 28px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d6dde0;
  font-size: 26px;
  line-height: 1;
}

.star.active,
.star:hover {
  color: var(--accent);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
}

.pill.active {
  border-color: #bdd8d0;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.confirm-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #f4b9b9;
  border-radius: 7px;
  background: var(--danger-soft);
}

.confirm-panel p {
  margin-bottom: 0;
}

.compare-table {
  display: grid;
  width: min(1040px, 100%);
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

.compare-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.4fr .6fr .8fr 1.4fr 1fr;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.compare-row:first-child {
  border-top: 0;
}

.compare-head {
  background: #f8faf9;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.compare-row span {
  min-width: 0;
}

.compare-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.char-counter {
  margin-top: 8px;
  color: var(--muted);
  text-align: right;
}

.muted-panel {
  background: #f0f2f1;
}

.export {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: 440px;
  padding: 14px 18px;
  border: 1px solid #cce3dc;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}

.toast.error {
  border-color: #f4b9b9;
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state {
  color: var(--muted);
}

.feature-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-state {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf9;
}

.feature-state span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.feature-state p {
  margin: 0;
  color: var(--muted);
}

.feature-state.partial {
  border-color: #cce3dc;
}

.remove-link {
  float: right;
  border: 0;
  background: transparent;
  color: var(--danger);
}

.low,
.gering {
  color: var(--accent);
}

.hoch {
  color: var(--danger);
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    display: none;
  }

  .mobile-tabbar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  }

  .mobile-tabbar .nav-item {
    justify-content: center;
    min-height: 54px;
    padding: 0 6px;
    font-size: 12px;
  }

  .nav-item.active::after,
  .mobile-tabbar .nav-item.active::after {
    display: none;
  }

  .content-narrow,
  .feedback-form {
    width: 100%;
    padding: 18px 18px 96px;
  }

  .page-header,
  .page-header.split,
  .two-col,
  .path-columns,
  .feature-grid,
  .score-row {
    display: block;
  }

  .page-header {
    padding: 18px;
  }

  .sidebar-user {
    display: none;
  }

  .compare-table {
    display: block;
    border: 0;
    background: transparent;
  }

  .compare-row,
  .compare-head {
    display: none;
  }
}
