/* Mộc (wood) palette — forest greens on warm paper, matched with a soft
   wood-brown secondary accent. Chosen for a calm, natural, professional feel. */
:root {
  color-scheme: light;
  /* Warm paper (mộc) — nền ấm, không lệch xanh. Accent xanh chỉ dùng cho nút/link. */
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-soft: #f3efe8;
  --surface-alt: #f6f2e6;
  --ink: #202b21;
  --muted: #5c6a57;
  --line: #e6e2d8;
  --accent: #3f7d54;
  --accent-strong: #2b5c3d;
  --accent-soft: #e8f1e8;
  --wood: #9c6b3f;
  --wood-soft: #f5e9d8;
  --wood-line: #e2c9a0;
  --danger: #b3261e;
  --danger-bg: #fbe9e6;
  --shadow: 0 10px 28px rgba(28, 38, 27, 0.10);

  /* Spacing scale (4px base) — use for gap/padding/margin on new or touched
     components so density stays consistent instead of ad-hoc pixel values. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;

  /* Type scale — matches sizes already used across the dashboard. */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 22px;
  --text-3xl: 28px;
  --text-4xl: 32px;

  /* Content stays fluid but never edge-to-edge on wide screens. Sidebar +
     workspace are capped and centered together as one unit. */
  --content-max: 1180px;
  --shell-max: 1440px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Sidebar and workspace live in one shell so they read as a single unit
   that stays centered and fluid — not a full-bleed navbar on one side and a
   separately capped content column on the other. */
.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  max-width: var(--shell-max);
  margin-inline: auto;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  overflow-y: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

.brand-text strong {
  font-size: var(--text-lg);
  font-weight: 850;
}

.brand-text span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #f4faf4;
  background: linear-gradient(160deg, var(--accent), var(--accent-strong));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark-assistant {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.side-nav {
  display: grid;
  gap: 4px;
  flex: 1;
  align-content: start;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.side-nav a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #64748b;
}

.side-nav a:hover {
  color: var(--ink);
  background: #f3f4f6;
}

.side-nav a:hover svg {
  color: var(--ink);
}

.side-nav a[aria-current="page"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.side-nav a[aria-current="page"] svg {
  color: var(--accent-strong);
}

.side-nav-divider {
  height: 1px;
  margin: 10px 4px;
  background: var(--line);
}

.side-nav-label {
  margin: 0 0 2px;
  padding: 0 12px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sidebar-user {
  display: grid;
  gap: 2px;
  margin-bottom: 4px;
  padding: 0 2px;
}

.sidebar-user strong {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--ink);
}

.sidebar-user span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  font-size: var(--text-sm);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-footer-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-footer-btn-dark {
  color: #86efac;
  background: #0f172a;
}

.sidebar-footer-btn-dark:hover {
  background: #1e293b;
}

.sidebar-footer-btn-soft {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.sidebar-footer-btn-soft:hover {
  filter: brightness(0.97);
}

.sidebar-footer-btn-soft[aria-current="page"] {
  outline: 1px solid var(--accent);
}

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

.sidebar-footer-btn-danger:hover {
  filter: brightness(0.98);
}

.workspace {
  position: relative;
  padding: var(--space-7) clamp(var(--space-5), 4vw, 46px) var(--space-8);
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.page-kicker {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
}

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

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.15;
  text-wrap: balance;
}

h2 {
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 1.25;
}

.account-box {
  display: none;
}

.panel {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.panel-lead {
  margin-top: var(--space-2);
  max-width: 62ch;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* --- Login screen ---------------------------------------------------- */
/* Full-bleed split screen: a focused sign-in card on the left, a calm
   wood/forest hero panel on the right. No sidebar/topbar distraction while
   signed out (see body.is-guest rules further down). */
.auth-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  min-height: 100vh;
}

.auth-card-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.auth-brand .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.auth-brand strong {
  display: block;
  font-size: 16px;
}

.auth-brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.auth-card h2 {
  margin: 0;
  font-size: 25px;
}

.auth-card > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 48px;
  color: #eaf3ea;
  background: linear-gradient(165deg, var(--accent-strong) 0%, #1c3826 75%);
}

.auth-hero-kicker {
  display: block;
  margin-bottom: 18px;
  color: #b9e0c2;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-hero h3 {
  margin: 0 0 22px;
  color: #fff;
  font-size: 30px;
  line-height: 1.3;
  text-wrap: balance;
}

.auth-hero-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-hero-list li {
  position: relative;
  padding-left: 22px;
  color: #d7ecd9;
  font-size: 15px;
  line-height: 1.5;
}

.auth-hero-list li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #8fd6a2;
}

.api-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
  justify-self: start;
}

.api-status.ready {
  border-color: #b8ddc5;
  color: #1f6847;
  background: #ecf8ef;
}

.api-status.warn {
  border-color: #ead9ad;
  color: #7a5400;
  background: var(--wood-soft);
}

.api-status.error {
  border-color: #f2b8b2;
  color: var(--danger);
  background: var(--danger-bg);
}

/* body.is-guest: hide the authenticated app chrome so login is the only
   focus. Toggled in JS via renderLoggedIn()/renderLoggedOut(). */
body.is-guest .sidebar,
body.is-guest .app-topbar {
  display: none;
}

body.is-guest .app-shell {
  grid-template-columns: 1fr;
  max-width: none;
  margin-inline: 0;
}

body.is-guest .workspace {
  padding: 0;
}

.login-form,
.key-form,
.install-builder {
  display: grid;
  gap: 14px;
}

.key-form {
  grid-template-columns: minmax(220px, 1fr) 120px auto;
  align-items: end;
}

.admin-create-key-form {
  grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 0.8fr) minmax(180px, 1fr) auto;
  padding: 0 20px 8px;
}

.install-builder {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
}

.install-guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.install-guide-cards article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf7;
}

.install-guide-cards strong {
  display: block;
  margin-bottom: 6px;
}

.install-guide-cards p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd8cd;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd8cd;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
}

input::placeholder {
  color: #657267;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(63, 125, 84, 0.35);
  outline-offset: 2px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 850;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.primary-button {
  border: 1px solid var(--accent-strong);
  color: #f4faf4;
  background: var(--accent);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.secondary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.danger-button {
  border: 1px solid #f2b8b2;
  color: var(--danger);
  background: var(--danger-bg);
}

.notice {
  grid-column: 1 / -1;
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.dashboard {
  display: grid;
  gap: var(--space-5);
}

.page-view {
  display: grid;
  gap: var(--space-5);
}

.page-view[hidden] {
  display: none !important;
}

.home-intro h2 {
  margin: var(--space-1) 0 var(--space-3);
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1.2;
}

.home-lead {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.55;
}

.home-steps {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: home-step;
}

.home-steps li {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  counter-increment: home-step;
}

.home-steps li::before {
  content: "Bước " counter(home-step);
  color: var(--accent-strong);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.home-steps strong {
  font-size: var(--text-md);
}

.home-steps span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.home-steps a {
  margin-top: var(--space-1);
  color: var(--accent-strong);
  font-size: var(--text-sm);
  font-weight: 800;
  text-decoration: none;
  width: fit-content;
}

.home-steps a:hover {
  text-decoration: underline;
}

.home-shortcut-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}

.home-shortcut-list a {
  display: grid;
  gap: 4px;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.home-shortcut-list a:hover {
  border-color: var(--wood-line);
  background: var(--wood-soft);
}

.home-shortcut-list strong {
  font-size: var(--text-md);
}

.home-shortcut-list span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.trial-banner {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid #cfe5d4;
  border-radius: var(--radius-md);
  background: #eef7f0;
  color: var(--accent-strong);
}

.trial-banner strong {
  font-size: var(--text-base);
}

.trial-banner span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.promo-box {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--wood-line);
  border-radius: var(--radius-md);
  background: var(--wood-soft);
}

.promo-head {
  display: grid;
  gap: 2px;
}

.promo-head span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.promo-list {
  display: grid;
  gap: var(--space-2);
}

.promo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--wood-line);
  border-radius: var(--radius-md);
  background: #fff;
}

.promo-card strong {
  display: block;
  font-size: var(--text-md);
}

.promo-card span,
.promo-card small {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
}

.plans-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.plan-select-card {
  position: relative;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.plan-select-card.is-selected {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(63, 125, 84, 0.08), transparent 48%),
    var(--surface);
}

.plan-select-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.plan-select-name {
  font-size: var(--text-xl);
}

.plan-select-price {
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.plan-select-sub,
.plan-select-meta {
  color: var(--muted);
  font-size: var(--text-sm);
}

.checkout-panel {
  border-color: var(--accent);
}

.checkout-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.checkout-body {
  display: grid;
  gap: var(--space-4);
}

.checkout-kicker {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: var(--text-xs);
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.checkout-top h2 {
  margin: 0;
}

.checkout-total-inline {
  color: var(--accent-strong);
  font-size: var(--text-2xl);
  white-space: nowrap;
}

.checkout-fields {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: var(--space-3);
}

.qty-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: var(--space-2);
}

.qty-row input {
  text-align: center;
}

.checkout-totals {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.checkout-totals > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--muted);
  font-size: var(--text-base);
}

.checkout-pay-row {
  padding-top: var(--space-2);
  border-top: 1px dashed var(--line);
  color: var(--ink) !important;
  font-weight: 800;
}

.checkout-pay-row strong {
  color: var(--accent-strong);
  font-size: var(--text-xl);
}

.checkout-hint {
  margin: 0;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--wood-soft);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.checkout-qr-btn {
  width: 100%;
  min-height: 48px;
}

.qr-result {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.qr-result-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

.qr-result-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.qr-result img {
  justify-self: center;
  width: 280px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.qr-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.qr-details div:last-child {
  grid-column: 1 / -1;
}

.qr-details > div {
  display: grid;
  gap: 2px;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.qr-details dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.qr-details dd {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  word-break: break-word;
}

@media (max-width: 720px) {
  .plans-select-grid,
  .checkout-fields,
  .qr-details {
    grid-template-columns: 1fr;
  }
}


.plan-card {
  display: grid;
  gap: 14px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.plan-card.is-featured {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(63, 125, 84, 0.08), transparent 42%),
    var(--surface);
  box-shadow: 0 14px 32px rgba(43, 92, 61, 0.14);
}

.plan-card-head {
  display: grid;
  gap: 4px;
}

.plan-card-head .plan-badge {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-card h3 {
  margin: 0;
  font-size: 20px;
}

.plan-card .plan-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-price strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.plan-price span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.plan-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.plan-features li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.plan-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.coupon-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

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

.plan-card input,
.plan-card textarea,
.plan-card select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.plan-card textarea {
  min-height: 96px;
  resize: vertical;
}


.checkout-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkout-summary div,
.bank-box dl > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.checkout-summary span,
.bank-box dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.checkout-summary strong,
.bank-box dd {
  margin: 0;
  font-size: 15px;
}

.bank-box {
  display: grid;
  gap: 10px;
}

.bank-kicker {
  margin: 0;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
}

.bank-box dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

@media (max-width: 720px) {
  .checkout-summary {
    grid-template-columns: 1fr;
  }
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.summary-strip div {
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-strip span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-strip strong {
  font-size: 28px;
  line-height: 1;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.key-reveal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--wood-line);
  border-radius: 8px;
  background: var(--wood-soft);
}

.key-reveal > div {
  min-width: 0;
}

.key-reveal span {
  display: block;
  margin-bottom: 6px;
  color: #6b4b26;
  font-size: 12px;
  font-weight: 850;
}

.table-empty {
  display: grid;
  gap: 4px;
  padding: 8px 0;
}

.table-empty strong {
  color: var(--ink);
}

.table-empty span {
  color: var(--muted);
}

/* --- Keys page: License-vault style card list ------------------------ */
.keys-head-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.keys-total-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 6px var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.keys-total-pill strong {
  font-size: var(--text-lg);
  line-height: 1;
}

.keys-total-pill span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.keys-toolbar {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.keys-search {
  position: relative;
  flex: 1;
}

.keys-search input {
  padding-left: 38px;
}

.keys-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.keys-filter-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.keys-filter-button svg {
  width: 15px;
  height: 15px;
}

.keys-meta {
  margin: 0 0 var(--space-1);
  color: var(--muted);
  font-size: var(--text-sm);
}

.key-card-list {
  display: grid;
  gap: var(--space-3);
}

.key-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.key-card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.key-card-icon svg {
  width: 20px;
  height: 20px;
}

.key-card-main {
  min-width: 0;
}

.key-card-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 4px;
}

.key-card-title-row strong {
  font-size: var(--text-md);
}

.key-card-main code {
  display: inline;
  color: var(--muted);
  font-size: var(--text-sm);
}

.key-card-stats {
  display: flex;
  gap: var(--space-5);
}

.key-card-stats div {
  display: grid;
  gap: 2px;
}

.key-card-stats span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.key-card-stats strong {
  font-size: var(--text-sm);
  font-weight: 800;
  white-space: nowrap;
}

.key-card-menu {
  position: relative;
}

.menu-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 var(--space-3);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-strong);
  background: #fff;
  font-size: var(--text-sm);
  font-weight: 800;
}

.menu-toggle-button:hover {
  background: var(--accent-soft);
}

.menu-toggle-button svg {
  width: 14px;
  height: 14px;
}

.key-card-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  display: grid;
  min-width: 168px;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 var(--space-3);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: left;
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}

.dropdown-item:hover {
  background: var(--surface-soft);
}

.dropdown-item-danger {
  color: var(--danger);
}

.dropdown-item-danger:hover {
  background: var(--danger-bg);
}

.key-card-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--line);
}

.key-card-install {
  grid-column: 1 / -1;
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--line);
}

.key-card-install h4 {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.key-install-hint {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
}

.key-install-code {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.45;
}

.key-install-code code {
  white-space: pre-wrap;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.key-install-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.key-install-key {
  font-size: var(--text-sm);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: var(--surface-2, #f1f5f9);
}

.ip-history-list li.is-current strong {
  color: var(--accent, #0f766e);
}

.key-card-details-col h4 {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.key-detail-empty {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.ip-history-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ip-history-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.ip-history-list li span {
  color: var(--muted);
  font-size: var(--text-xs);
}

.reset-ip-desc {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
}

.reset-ip-blocked {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: var(--danger);
  background: var(--danger-bg);
  font-size: var(--text-sm);
  font-weight: 700;
}

.test-connect-result {
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
}

.test-connect-result.test-connect-ok {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.test-connect-result.test-connect-fail {
  color: var(--danger);
  background: var(--danger-bg);
}

@media (max-width: 720px) {
  .key-card-details {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .keys-toolbar {
    flex-direction: column;
  }

  .key-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "icon main"
      "stats stats"
      "menu menu";
  }

  .key-card-icon {
    grid-area: icon;
  }

  .key-card-main {
    grid-area: main;
  }

  .key-card-stats {
    grid-area: stats;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding-top: var(--space-2);
    border-top: 1px dashed var(--line);
  }

  .key-card-menu {
    grid-area: menu;
    justify-self: end;
  }
}

code {
  display: block;
  overflow-wrap: anywhere;
  color: #20242d;
  font: 750 13px/1.55 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

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

thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.status-pill.revoked {
  color: #7a271a;
  background: #ffe7e3;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.risk-pill.confirm {
  color: #6b4a00;
  background: var(--wood-soft);
}

.risk-pill.high {
  color: #7a271a;
  background: #ffe7e3;
}

.status-pill.pending {
  color: #6b4a00;
  background: var(--wood-soft);
}

.status-pill.idle {
  color: #1d4ed8;
  background: #e4ecff;
}

.status-pill.ready {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px;
  gap: 14px;
  margin-bottom: 14px;
}

.action-table {
  min-width: 860px;
}

.action-table td:first-child strong,
.action-table td:first-child span {
  display: block;
}

.action-table td:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.module-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.module-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.module-head strong,
.module-head span,
.module-meta span {
  display: block;
}

.module-head > div > span,
.module-meta span,
.module-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.module-item p {
  margin: 0;
}

.module-meta {
  display: grid;
  gap: 5px;
}

.module-meta code {
  display: inline;
  font-size: 12px;
}

.cap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cap-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #425047;
  background: #eef4ed;
  font-size: 12px;
  font-weight: 800;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.policy-grid div {
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.policy-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.policy-grid strong {
  font-size: 24px;
  line-height: 1;
}

.policy-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.policy-lists h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-item,
.compact-empty,
.audit-note {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.compact-item strong,
.compact-item span,
.audit-note strong,
.audit-note span {
  display: block;
}

.compact-item span,
.compact-empty,
.audit-note span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.audit-note {
  margin-top: 14px;
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 14px;
}

.assistant-form .toggle-row,
.assistant-form .form-actions {
  grid-column: 1 / -1;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.toggle-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent-strong);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.setup-output {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #cbd8cd;
  border-radius: 8px;
  background: #fbfcfa;
}

.setup-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.setup-output-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.setup-output-head strong {
  font-size: 14px;
}

.device-list {
  display: grid;
  gap: 10px;
}

.device-item,
.empty-state {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.device-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.device-item strong {
  display: block;
  margin-bottom: 4px;
}

.device-item span,
.empty-state {
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  gap: 4px;
}

.empty-state strong {
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  min-width: 220px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
  }

  .side-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    display: none;
  }

  .key-form,
  .assistant-form,
  .catalog-tools,
  .policy-grid,
  .policy-lists {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 20px 14px 32px;
  }

  body.is-guest .workspace {
    padding: 0;
  }

  .auth-card {
    padding: 28px 22px;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-card-wrap {
    padding: 0;
    min-height: 100vh;
  }

  .app-topbar,
  .panel-head,
  .checkout-top,
  .device-item,
  .key-reveal,
  .setup-output-head {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .checkout-total-inline {
    white-space: normal;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .account-box {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}

/* --- Landing page (index.html) — same shell as /app ------------------ */
.landing-dashboard {
  display: grid;
  gap: var(--space-5);
}

.landing-hero h2 {
  margin: var(--space-2) 0 var(--space-3);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.15;
  text-wrap: balance;
}

.landing-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
}

.landing-label span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.landing-lede {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.55;
}

.landing-lede code,
.landing-values code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface-soft);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.landing-preview {
  padding: 0;
  overflow: hidden;
}

.landing-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  background: var(--surface-soft);
}

.landing-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: var(--space-4);
  padding: var(--space-4);
}

.landing-preview-chat {
  display: grid;
  gap: var(--space-3);
}

.landing-preview-chat .bubble {
  max-width: 92%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.landing-preview-chat .bubble.user {
  justify-self: end;
  color: var(--ink);
  background: var(--surface-soft);
}

.landing-preview-chat .bubble.bot {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.landing-preview-side {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.landing-preview-side span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.landing-preview-side strong {
  font-size: var(--text-md);
}

.landing-install-grid {
  display: grid;
  gap: var(--space-4);
}

.landing-command {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #1e2420;
}

.landing-command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #c8d4c9;
  font-size: var(--text-sm);
  font-weight: 700;
}

.landing-command pre {
  margin: 0;
  padding: var(--space-4);
  overflow-x: auto;
}

.landing-command code {
  color: #e8f0e9;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.landing-command .copy-button {
  min-height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}

.landing-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  padding: var(--space-5);
}

.landing-values article {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.landing-value-icon {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  width: fit-content;
}

.landing-value-icon-soon {
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
}

.landing-values h3 {
  margin: 0;
  font-size: var(--text-md);
}

.landing-values p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.landing-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.landing-flow-steps div {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.landing-flow-steps strong {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-3);
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: var(--text-md);
}

.landing-flow-steps span {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-md);
  font-weight: 800;
}

.landing-flow-steps p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.landing-pricing-head {
  align-items: center;
}

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
}

.sidebar-footer-guest {
  margin-top: auto;
}

.sidebar-guest-note {
  margin: 0 2px var(--space-1);
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.45;
}

/* --- Guide page tables (guide.html) -------------------------------- */
.guide-dashboard .guide-section .panel-head {
  margin-bottom: var(--space-4);
}

.guide-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-soft);
}

.guide-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(180px, 1.1fr) minmax(180px, 1.2fr);
  gap: var(--space-3);
  align-items: start;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.guide-row:first-child {
  border-top: 0;
}

.guide-head {
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.guide-row > span:first-child {
  font-weight: 600;
  color: var(--ink);
}

.guide-row code {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #1f2933;
  color: #e8eef3;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.guide-row > span:last-child {
  color: var(--muted);
}

.guide-section-link {
  margin: var(--space-4) 0 0;
}

.guide-section-link a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.guide-section-link a:hover {
  text-decoration: underline;
}

@media (max-width: 920px) {
  .guide-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .guide-head {
    display: none;
  }

  .landing-preview-grid,
  .landing-values,
  .landing-flow-steps {
    grid-template-columns: 1fr;
  }

  .landing-pricing-head {
    align-items: stretch;
  }
}
