/* Nooklite Fairbook — mobile-first, paper ledger on a quiet forest desk */

:root {
  --paper: #f3eee4;
  --paper-2: #eae3d6;
  --paper-3: #dfd6c6;
  --card: #fbf8f2;
  --ink: #1e2a24;
  --ink-soft: #3a4740;
  --muted: #6a736c;
  --line: #d4cbb8;
  --line-strong: #c3b8a2;
  --forest: #2f5d4a;
  --forest-deep: #1e3d31;
  --forest-soft: #e4eee8;
  --brass: #c4622d;
  --brass-deep: #9a4a20;
  --brass-soft: #f8e6d8;
  --gold: #b8893b;
  --good: #2f5d4a;
  --good-bg: #e5f0ea;
  --warn: #8a5a16;
  --warn-bg: #f6ead2;
  --bad: #8f3a2a;
  --bad-bg: #f6e4df;
  --ready: #3a4740;
  --ready-bg: #ece7dc;
  --shadow: 0 1px 2px rgba(30, 42, 36, 0.06), 0 12px 32px rgba(30, 42, 36, 0.07);
  --shadow-sm: 0 1px 2px rgba(30, 42, 36, 0.05), 0 4px 14px rgba(30, 42, 36, 0.05);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --space: 1.25rem;
  --narrow: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(196, 98, 45, 0.05), transparent 42%),
    radial-gradient(ellipse at 100% 0%, rgba(47, 93, 74, 0.07), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.16  0 0 0 0 0.14  0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  min-height: 100vh;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--forest);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--forest-deep);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header
   ------------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(243, 238, 228, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, var(--narrow));
  margin: 0 auto;
  padding: 0 1.15rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 560;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-sub {
  display: none;
  margin-left: 0.85rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--line-strong);
  font-size: 0.92rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
}

.nav a:not(.btn) {
  display: none;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav a:not(.btn):hover {
  color: var(--ink);
}

.nav a.btn {
  display: inline-flex;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  background: var(--forest);
  color: #f7f3ec;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--forest-deep);
  color: #fff;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.linkish:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.segmented button:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

.btn-brass {
  background: var(--brass);
  color: #fffaf5;
}

.btn-brass:hover {
  background: var(--brass-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.88rem;
}

/* Layout
   ------------------------------------------------------------------------ */
.wrap {
  width: min(100%, var(--narrow));
  margin: 0 auto;
  padding: 0 1.15rem;
}

.hero {
  padding: 2.25rem 0 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(2.05rem, 6vw, 3.35rem);
  font-weight: 560;
  max-width: 14ch;
  margin-bottom: 0.9rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin-bottom: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  background: rgba(251, 248, 242, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-serif);
  font-weight: 560;
  font-size: 0.95rem;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--forest-soft);
  color: var(--forest-deep);
  margin-top: 0.1rem;
}

.steps strong {
  display: block;
  font-weight: 650;
  font-size: 0.98rem;
}

.steps span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Calculator
   ------------------------------------------------------------------------ */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.calc-section {
  padding: 0.5rem 0 2.5rem;
}

.calc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.calc-head h2 {
  font-size: 1.7rem;
  margin: 0;
}

.calc-head p {
  color: var(--muted);
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.calc-grid {
  display: grid;
  gap: 1.15rem;
}

.inputs {
  padding: 1.15rem 1.05rem 1.3rem;
}

.fieldset {
  border: 0;
  margin: 0 0 1.35rem;
  padding: 0;
}

.fieldset:last-child {
  margin-bottom: 0;
}

.fieldset > legend {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 560;
  padding: 0;
  margin: 0 0 0.85rem;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.hint {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.7rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.field.span-2 {
  grid-column: 1 / -1;
}

.field label,
.field .label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field .help {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="password"],
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 72px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: #b5aa94;
}

.prefix-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  min-height: 44px;
}

.prefix-input:focus-within {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

.prefix-input span {
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.9rem;
}

.prefix-input input {
  border: 0 !important;
  min-height: 42px !important;
  outline: none !important;
  box-shadow: none !important;
  padding-left: 0.35rem;
  width: 100%;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper-2);
  gap: 2px;
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.input-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

/* Results
   ------------------------------------------------------------------------ */
.results {
  padding: 1.15rem 1.05rem 1.2rem;
}

.results-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.result-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.85rem 0.75rem;
}

.stat .k {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stat .v {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 1.55rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: 0.15rem;
}

.stat.primary {
  grid-column: 1 / -1;
  background: var(--forest-deep);
  color: #f4efe6;
  border-color: transparent;
}

.stat.primary .k {
  color: rgba(243, 238, 228, 0.72);
}

.stat.primary .v {
  font-size: 2rem;
  color: #fff;
}

.stat.primary.neg {
  background: #6f2e24;
}

.stat.sub .v {
  font-size: 1.25rem;
}

.verdict {
  border-radius: 12px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  margin-top: 0.25rem;
}

.verdict .title {
  font-family: var(--font-serif);
  font-weight: 560;
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.verdict .body {
  font-size: 0.92rem;
  line-height: 1.5;
}

.verdict.rebook {
  background: var(--good-bg);
  border-color: #c5d9cc;
  color: var(--forest-deep);
}

.verdict.borderline {
  background: var(--warn-bg);
  border-color: #e4d2a8;
  color: #5c3d0e;
}

.verdict.skip {
  background: var(--bad-bg);
  border-color: #e4c4bc;
  color: #6a2b20;
}

.verdict.ready {
  background: var(--ready-bg);
  border-color: var(--line);
  color: var(--ink-soft);
}

.breakdown {
  margin-top: 0.9rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.75rem;
}

.breakdown h3 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.rows {
  display: grid;
  gap: 0.28rem;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.rows div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
}

.rows .total {
  margin-top: 0.25rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
  color: var(--ink);
}

.fine {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Pro log
   ------------------------------------------------------------------------ */
.pro-section {
  padding: 0 0 3rem;
}

.pro-panel {
  position: relative;
  overflow: hidden;
}

.pro-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 0.75rem;
  padding: 1.15rem 1.05rem 0.5rem;
}

.pro-head h2 {
  font-size: 1.5rem;
  margin: 0;
}

.pro-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding: 0.75rem 1.05rem 0.25rem;
}

.totals .stat .v {
  font-size: 1.2rem;
}

.table-wrap {
  overflow-x: auto;
  padding: 0.5rem 0 0.4rem;
}

table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  min-width: 36rem;
}

table.ledger th,
table.ledger td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.ledger th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

table.ledger th.num,
table.ledger td.num {
  text-align: right;
}

table.ledger tbody tr {
  cursor: pointer;
}

table.ledger tbody tr:hover {
  background: var(--paper);
}

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

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.pill.rebook { background: var(--good-bg); color: var(--forest-deep); }
.pill.borderline { background: var(--warn-bg); color: var(--warn); }
.pill.skip { background: var(--bad-bg); color: var(--bad); }
.pill.ready { background: var(--ready-bg); color: var(--muted); }

.row-actions {
  display: flex;
  justify-content: flex-end;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 650;
}

.icon-btn:hover {
  color: var(--bad);
  background: var(--bad-bg);
}

.empty-log {
  padding: 1.5rem 1.05rem 1.6rem;
  color: var(--muted);
  text-align: center;
}

.pro-lock {
  position: absolute;
  inset: 0;
  background: rgba(251, 248, 242, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
}

.pro-lock .lock-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.2rem 1.3rem;
  max-width: 22rem;
}

.pro-lock h3 {
  font-size: 1.3rem;
}

.preview-banner {
  display: none;
  background: var(--forest-deep);
  color: #f3eee4;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.4rem 1rem;
}

.preview-banner.is-on {
  display: block;
}

.preview-banner button {
  background: transparent;
  border: 0;
  color: #e8c99b;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

body.is-pro .pro-lock {
  display: none;
}

.save-bar {
  display: grid;
  gap: 0.7rem;
  padding: 0 0 0.2rem;
}

/* Pricing
   ------------------------------------------------------------------------ */
.pricing {
  padding: 0.5rem 0 3.5rem;
}

.pricing h2 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  margin-bottom: 0.4rem;
}

.pricing > .wrap > .lede {
  margin-bottom: 1.4rem;
}

.price-grid {
  display: grid;
  gap: 1rem;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border-color: var(--forest);
  box-shadow: var(--shadow);
  position: relative;
}

.price-card .tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--forest-soft);
  color: var(--forest-deep);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}

.price-card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.2rem;
}

.price-card .amount {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0.85rem;
}

.price-card .amount small {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.price-card ul {
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
  flex: 1;
}

.price-card li {
  position: relative;
  padding: 0.28rem 0 0.28rem 1.3rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 0.7rem;
  height: 0.35rem;
  border-left: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: rotate(-45deg);
}

.price-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Footer
   ------------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: grid;
  gap: 0.85rem;
}

.site-footer strong {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-weight: 560;
}

.privacy {
  max-width: 38rem;
  line-height: 1.5;
}

/* Modal
   ------------------------------------------------------------------------ */
.modal-root[hidden] {
  display: none;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-root .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 42, 36, 0.45);
}

.modal {
  position: relative;
  width: min(100%, 26rem);
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.25rem 1.4rem;
}

.modal h2 {
  font-size: 1.45rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Desktop
   ------------------------------------------------------------------------ */
@media (min-width: 720px) {
  .brand-sub {
    display: inline;
  }

  .nav a:not(.btn) {
    display: inline;
  }

  .hero {
    padding: 3.1rem 0 2rem;
  }

  .hero-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: end;
  }

  .steps {
    gap: 0.65rem;
  }

  .field-grid.thirds {
    grid-template-columns: repeat(3, 1fr);
  }

  .totals {
    grid-template-columns: repeat(4, 1fr);
  }

  .price-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (min-width: 960px) {
  .calc-grid {
    grid-template-columns: 1fr 24.5rem;
    align-items: start;
  }

  .results {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
  }

  .inputs {
    padding: 1.35rem 1.35rem 1.5rem;
  }

  .results {
    padding: 1.25rem 1.2rem 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

.pro-tools select {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.alt-price {
  margin: -0.45rem 0 0.9rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.alt-price strong {
  font-family: var(--font-serif);
  font-weight: 560;
  color: var(--ink);
}

table.ledger .best-tag {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest-deep);
  background: var(--good-bg);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  vertical-align: 0.1em;
}

/* Checkout modal + success / cancel pages
   ------------------------------------------------------------------------ */
.plan-actions {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0 1rem;
}

.plan-actions .btn {
  width: 100%;
}

.modal .divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.4rem 0 0.85rem;
}

.modal .divider::before,
.modal .divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.checkout-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.success-main,
.cancel-main {
  width: min(100%, 36rem);
  margin: 0 auto;
  padding: 2.5rem 1.15rem 3.5rem;
}

.success-card,
.cancel-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.35rem 1.55rem;
}

.unlock-code {
  display: block;
  width: 100%;
  margin: 0.7rem 0 0.9rem;
  padding: 0.8rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: var(--paper);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--ink);
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.status-ok { color: var(--forest); }
.status-bad { color: var(--bad); }
.status-wait { color: var(--muted); }
