:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #15171a;
  --muted: #667085;
  --line: #d9dee7;
  --soft: #edf1f6;
  --primary: #15171a;
  --primary-text: #ffffff;
  --accent: #18794e;
  --shadow: 0 12px 32px rgba(20, 24, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px 14px 30px;
}

.topbar,
.section-head,
.summary,
.brand-switch {
  display: grid;
  gap: 12px;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: start;
  padding: 6px 2px 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.05;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.muted,
.hint,
.note li,
button small {
  color: var(--muted);
}

.status {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.summary {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.brand-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
  margin-top: 12px;
}

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

.section-head .muted {
  grid-column: 1 / -1;
  font-size: 13px;
  line-height: 1.35;
}

.grid,
.form-grid {
  display: grid;
  gap: 9px;
}

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

.form-grid {
  grid-template-columns: 1fr;
  margin-bottom: 10px;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
  text-align: left;
  padding: 13px 14px;
}

.brand-tab {
  min-height: 72px;
  background: var(--surface);
}

.brand-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-text);
}

.brand-tab.active small {
  color: rgba(255, 255, 255, .72);
}

[hidden] {
  display: none !important;
}

button:active {
  transform: translateY(1px);
}

button small,
button span {
  display: block;
}

button small {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}

.primary small {
  color: rgba(255, 255, 255, .72);
}

.action-xl {
  min-height: 82px;
  box-shadow: var(--shadow);
}

.ghost {
  min-height: 38px;
  background: var(--soft);
  padding: 8px 10px;
  font-size: 13px;
}

.full {
  width: 100%;
  text-align: center;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
}

.hint {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.35;
}

.note {
  box-shadow: none;
}

.note ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

.note li {
  margin: 6px 0;
  line-height: 1.35;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: none;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-text);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.toast.visible {
  display: block;
}

@media (min-width: 620px) {
  .summary {
    grid-template-columns: 1.2fr .8fr;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid label:last-child {
    grid-column: 1 / -1;
  }
}
