:root {
  color-scheme: light;
  --ink: #15202b;
  --muted: #64748b;
  --line: #d8dee8;
  --panel: #ffffff;
  --soft: #f5f7fb;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --warning: #b45309;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef3f8;
}

a {
  color: inherit;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}

.shell {
  max-width: 1180px;
  margin: 32px auto;
  padding: 0 24px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 410px;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section {
  padding: 26px;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

h3 {
  font-size: 15px;
}

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

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

label {
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 118, 110, 0.15);
}

.button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  min-height: 46px;
  padding: 0 16px;
  font-weight: 750;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.button:hover {
  background: var(--accent-dark);
}

.button.secondary {
  width: auto;
  background: #e2e8f0;
  color: #0f172a;
}

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

.summary-item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.product-img {
  width: 82px;
  height: 82px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  border: 1px solid var(--line);
}

.price-line,
.total-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
}

.total-line {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  font-weight: 800;
}

.stripe-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notice {
  padding: 12px 14px;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  color: #7c2d12;
  border-radius: 8px;
  font-size: 14px;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.scenario {
  display: block;
  min-height: 130px;
  padding: 18px;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scenario strong {
  display: block;
  margin-bottom: 8px;
}

.scenario span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.log {
  margin-top: 18px;
  padding: 14px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .checkout-grid,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 18px;
  }

  .nav {
    display: none;
  }
}
