/* =========================================================================
   DaltonApps — Model pricing
   ========================================================================= */

:root {
  --bg:        #0b0b0e;
  --bg-soft:   #14141a;
  --bg-card:   #15161c;
  --bg-card-2: #1a1b22;
  --fg:        #f4f1ea;
  --fg-muted:  #9aa0a8;
  --fg-dim:    #6b7079;
  --accent:    #ffb454;
  --accent-soft: rgba(255, 180, 84, 0.14);
  --border:    rgba(244, 241, 234, 0.08);
  --border-strong: rgba(244, 241, 234, 0.16);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: ui-serif, Georgia, "Iowan Old Style", "Apple Garamond", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;

  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 220ms;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- topbar (matches dashboard/format) --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-2) clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-weight: 600;
}
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.back {
  font-size: 0.9rem;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}
.back:hover { color: var(--fg); }

/* --- main --- */
.pricing {
  flex: 1;
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) var(--s-4);
}

.pricing-head { margin-bottom: var(--s-4); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 0.35rem;
}
.pricing-head h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.lede {
  margin: 0 0 var(--s-2);
  color: var(--fg-muted);
  font-size: 1.05rem;
}

.updated {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
}
.updated .sep { padding: 0 0.4rem; }
.sources a {
  color: var(--fg-muted);
  border-bottom: 1px dotted var(--fg-dim);
  margin-right: 0.5rem;
}
.sources a:hover { color: var(--accent); border-color: var(--accent); }

.caveat {
  margin: 0;
  color: var(--fg-dim);
  font-size: 0.85rem;
  max-width: 60ch;
}

/* --- section --- */
.section {
  margin-top: var(--s-4);
}
.section h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 0.25rem;
  letter-spacing: -0.005em;
}
.hint {
  margin: 0 0 var(--s-2);
  color: var(--fg-muted);
  font-size: 0.92rem;
}

/* --- table --- */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}
.ptable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.ptable thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 500;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  white-space: nowrap;
  line-height: 1.3;
}
.ptable .th-num { text-align: right; }
.ptable .th-sub {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--fg-dim);
  opacity: 0.85;
  font-weight: 400;
}
.ptable td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.ptable tbody tr:last-child td { border-bottom: none; }

.ptable .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  color: var(--fg);
}
.ptable .num-muted { color: var(--fg-muted); }

.ptable .group-row td {
  background: var(--bg-card-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--border-strong);
}
.ptable .model-name { font-weight: 500; }
.ptable .notes {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.loading {
  text-align: center;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 1.5rem 1rem !important;
}

.ptable .error {
  color: #f3756c;
  text-align: center;
  padding: 1.5rem 1rem !important;
}

/* --- footer --- */
.pricing-footer {
  text-align: center;
  padding: var(--s-3);
  color: var(--fg-dim);
  font-size: 0.85rem;
}

/* --- narrow --- */
@media (max-width: 640px) {
  .ptable { font-size: 0.85rem; }
  .ptable td, .ptable th { padding: 0.6rem 0.7rem; }
  .ptable .notes { font-size: 0.8rem; }
}
