:root {
  --paper: #F5F1E7;
  --paper-alt: #EFE9DA;
  --card: #FCFAF4;
  --ink: #211C15;
  --ink-soft: #5B5346;
  --ink-faint: #8C8372;
  --border: #DED4BC;
  --rust: #D5511F;
  --rust-dark: #A8380F;
  --rust-glow: rgba(213, 81, 31, 0.38);
  --teal: #2E5C50;
  --teal-soft: #E4ECE7;
  --rust-soft: #FBE1CE;
  --shadow: 0 16px 36px -16px rgba(33, 28, 21, 0.28);
  --r-pill: 999px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
}
.code { font-family: 'IBM Plex Mono', monospace; font-weight: 600; }
p { color: var(--ink-soft); }
a { color: inherit; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 32px; }

/* icon system */
.ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; display: block; }
.ic-sm { width: 17px; height: 17px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn .ic { width: 18px; height: 18px; transition: transform .18s ease; }
.btn--primary {
  background: var(--rust);
  color: #FFFBF4;
  box-shadow: 0 14px 28px -10px var(--rust-glow), 0 2px 6px rgba(33,28,21,0.12);
}
.btn--primary:hover { background: var(--rust-dark); transform: translateY(-3px); box-shadow: 0 20px 34px -10px var(--rust-glow); }
.btn--primary:hover .ic { transform: translate(3px,-3px); }
.btn--ghost { color: var(--ink); border-color: var(--border); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--on-dark { background: var(--rust); color: #FFFBF4; box-shadow: 0 18px 40px -12px rgba(0,0,0,0.55); }
.btn--on-dark:hover { background: #E8622C; transform: translateY(-3px); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-pill);
}
.tag--free { background: var(--teal-soft); color: var(--teal); }
.tag--paid { background: var(--rust-soft); color: var(--rust-dark); }

/* ---------- header ---------- */
header { position: sticky; top: 0; z-index: 50; background: rgba(245, 241, 231, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo { font-family: 'Fraunces', serif; font-weight: 600; font-size: 21px; }
.logo span { color: var(--rust); }
.nav-links { display: flex; gap: 32px; font-size: 14.5px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 88px 0 96px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.15rem); margin: 18px 0 22px; }
.hero p.lead { font-size: 18px; max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero-actions .secondary-link { font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--ink-faint); }

.catalog-stack { position: relative; height: 400px; }
.hero-deco { position: absolute; top: -54px; right: -70px; width: 440px; height: 440px; color: var(--rust); opacity: 0.10; stroke-width: 0.55; z-index: 0; }
.hero-deco-key { position: absolute; bottom: -20px; left: -30px; width: 150px; height: 150px; color: var(--teal); opacity: 0.16; stroke-width: 0.9; z-index: 0; transform: rotate(-18deg); }

.index-card { position: absolute; width: 288px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px 24px 22px; }
.index-card::before {
  content: ""; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 18px; background: var(--paper); border: 1px solid var(--border); border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.index-card--back-1 { top: 40px; left: 50px; transform: rotate(8deg); opacity: 0.5; }
.index-card--back-2 { top: 18px; left: 10px; transform: rotate(-6deg); opacity: 0.78; }
.index-card--front { top: 50px; left: 26px; transform: rotate(-2deg); }
.index-card--front .card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.index-card--front .code { color: var(--rust); font-size: 13px; }
.card-icon { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--rust-soft); color: var(--rust-dark); display: flex; align-items: center; justify-content: center; }
.index-card--front h3 { font-size: 20px; margin: 4px 0 4px; }
.index-card .meta { font-size: 13px; color: var(--ink-faint); margin-bottom: 14px; }
.index-card .checklist { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13.5px; }
.index-card .checklist li { display: flex; gap: 8px; padding: 4px 0; color: var(--ink-soft); }
.index-card .checklist li::before { content: "—"; color: var(--ink-faint); }
.index-card .card-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- section shell ---------- */
section { padding: 84px 0; }
section.alt { background: var(--paper-alt); }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head .eyebrow { display: block; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.7rem, 2.8vw, 2.35rem); }
.section-head p { font-size: 16.5px; margin-top: 14px; }

/* ---------- walkthrough ---------- */
.walk { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
.walk-steps { list-style: none; margin: 0; padding: 0; }
.walk-steps li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--border); }
.walk-steps li:first-child { border-top: none; }
.step-icon { width: 52px; height: 52px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; }
.step-icon--free { background: var(--teal-soft); color: var(--teal); }
.step-icon--paid { background: var(--rust-soft); color: var(--rust-dark); }
.step-icon--extra { background: var(--paper-alt); color: var(--ink-soft); border: 1px solid var(--border); }
.walk-steps h4 { font-family: 'Inter'; font-size: 16.5px; font-weight: 700; margin: 4px 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.walk-steps p { font-size: 14.5px; margin: 0; }

.demo-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 34px; box-shadow: var(--shadow); overflow: hidden; }
.demo-card .demo-label { font-size: 13px; color: var(--ink-faint); margin-bottom: 6px; }
.demo-card h3 { font-size: 24px; margin-bottom: 18px; }
.demo-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.demo-tab { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--ink-faint); text-decoration: none; }
.demo-tab.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.demo-body { font-size: 14.5px; color: var(--ink-soft); }
.demo-body ul { padding-left: 18px; margin: 10px 0; }
.demo-body li { margin: 5px 0; }
.demo-price { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px dashed var(--border); }
.demo-price strong { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 600; color: var(--rust-dark); }

/* ---------- catalog grid ---------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; font-weight: 600; padding: 10px 16px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--card); color: var(--ink-soft); cursor: pointer; }
.filter-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sit-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.sit-card:hover { border-color: var(--ink-faint); transform: translateY(-3px); box-shadow: 0 14px 24px -16px rgba(33,28,21,0.35); }
.sit-card-head { display: flex; align-items: center; justify-content: space-between; }
.sit-icon { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--paper-alt); color: var(--rust); display: flex; align-items: center; justify-content: center; }
.sit-card .row { display: flex; align-items: center; gap: 8px; }
.sit-card .code { font-size: 12.5px; color: var(--rust); }
.sit-card h4 { font-family: 'Inter'; font-weight: 700; font-size: 15px; margin: 0; line-height: 1.3; }
.sit-card p { font-size: 13.5px; margin: 0; flex-grow: 1; }
.sit-card .cat-tag { font-size: 11px; color: var(--ink-faint); font-family: 'IBM Plex Mono', monospace; }
.star { color: var(--rust); font-size: 13px; }

/* ---------- tools ---------- */
.tools-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tool-row { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; display: flex; gap: 18px; align-items: flex-start; text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.tool-row.is-live { cursor: pointer; }
.tool-row.is-live:hover { border-color: var(--rust); transform: translateY(-3px); box-shadow: 0 14px 24px -16px rgba(33,28,21,0.35); }
.tool-row.is-disabled { opacity: 0.55; }
.tool-icon { width: 50px; height: 50px; border-radius: var(--r-md); background: var(--teal-soft); color: var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tool-num { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink-faint); font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tool-row h4 { font-family: 'Inter'; font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.tool-row p { font-size: 13.5px; margin: 0; }
.tool-live-badge { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); background: var(--teal-soft); padding: 3px 8px; border-radius: var(--r-pill); }

/* ---------- compare ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.compare-col { padding: 40px; }
.compare-col.old { background: var(--card); }
.compare-col.new { background: var(--ink); color: var(--paper); }
.compare-col h3 { font-size: 15px; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 22px; }
.compare-col.old h3 { color: var(--ink-faint); }
.compare-col.new h3 { color: #E8A374; }
.compare-col ul { list-style: none; padding: 0; margin: 0; }
.compare-col li { padding: 13px 0; border-top: 1px solid var(--border); font-size: 15px; }
.compare-col.new li { border-top-color: rgba(245,241,231,0.15); color: #EFE9DA; }
.compare-col li:first-child { border-top: none; }

/* ---------- cta banner ---------- */
.cta-banner { position: relative; background: var(--ink); color: var(--paper); border-radius: var(--r-lg); overflow: hidden; padding: 64px 56px; margin: 0 auto; max-width: 1140px; }
.cta-banner-deco { position: absolute; top: -60px; right: -50px; width: 340px; height: 340px; color: #3A3226; opacity: 0.6; stroke-width: 0.5; }
.cta-banner-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-banner h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: #FFFBF4; max-width: 20ch; }
.cta-banner p { color: #C9BFA9; margin-top: 12px; font-size: 15px; }

/* ---------- footer ---------- */
footer { padding: 56px 0 40px; border-top: 1px solid var(--border); }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 40px; }
.footer-note { font-size: 13.5px; color: var(--ink-faint); max-width: 40ch; }
.footer-cats { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-cats div { font-size: 13.5px; }
.footer-cats strong { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 10px; }
.footer-cats a { display: block; text-decoration: none; color: var(--ink-soft); padding: 3px 0; }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink-faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- interior page header ---------- */
.page-header { padding: 52px 0 40px; }
.breadcrumb { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink-faint); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
.breadcrumb a { text-decoration: none; color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--ink); }
.page-header h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.page-header p.lead { font-size: 16.5px; max-width: 62ch; margin-top: 14px; }

/* ---------- calculator ---------- */
.calc-wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: start; padding-bottom: 90px; }
.calc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 36px; }
.calc-card h2 { font-size: 19px; margin-bottom: 28px; }
.field { margin-bottom: 30px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; font-weight: 600; margin-bottom: 12px; }
.field-label .field-value { font-family: 'IBM Plex Mono', monospace; color: var(--rust-dark); font-weight: 600; font-size: 14px; }
.field input[type="range"] {
  width: 100%; height: 6px; border-radius: var(--r-pill);
  accent-color: var(--rust); cursor: pointer;
}
.field-hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; }

.result-card { background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 36px; position: sticky; top: 100px; }
.result-label { font-family: 'IBM Plex Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #C9BFA9; margin-bottom: 8px; }
.result-value { font-family: 'Fraunces', serif; font-size: clamp(2.1rem, 3.6vw, 2.9rem); font-weight: 600; color: #FFFBF4; }
.result-sub { font-size: 13.5px; color: #C9BFA9; margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(245,241,231,0.15); }
.result-stat .result-label { margin-bottom: 6px; }
.result-stat strong { font-family: 'Fraunces', serif; font-size: 19px; color: #FFFBF4; font-weight: 600; display: block; }
.split-bar { display: flex; height: 14px; border-radius: var(--r-pill); overflow: hidden; margin-top: 26px; background: rgba(245,241,231,0.12); }
.split-bar span { height: 100%; transition: width .2s ease; }
.split-bar .principal { background: #E8A374; }
.split-bar .interest { background: var(--rust); }
.split-legend { display: flex; gap: 20px; margin-top: 12px; font-size: 12.5px; color: #C9BFA9; }
.split-legend .dot { display: inline-flex; align-items: center; gap: 6px; }
.split-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.result-note { margin-top: 26px; font-size: 12.5px; color: #A79C87; line-height: 1.5; }

.field-group-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin: 0 0 20px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.field-group-title:first-child { padding-top: 0; border-top: none; }

.segmented { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.segmented button {
  font-family: 'Inter'; font-size: 13.5px; font-weight: 600;
  padding: 10px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--paper);
  color: var(--ink-soft); cursor: pointer;
}
.segmented button.active { background: var(--rust); color: #FFFBF4; border-color: var(--rust); }

.meter { margin-top: 4px; }
.meter-row { margin-bottom: 14px; }
.meter-row:last-child { margin-bottom: 0; }
.meter-label { display: flex; justify-content: space-between; font-size: 13px; color: #C9BFA9; margin-bottom: 6px; }
.meter-label strong { color: #FFFBF4; font-weight: 600; }
.meter-track { height: 10px; border-radius: var(--r-pill); background: rgba(245,241,231,0.12); overflow: hidden; }
.meter-fill { height: 100%; border-radius: var(--r-pill); }
.meter-fill.a { background: #E8A374; }
.meter-fill.b { background: var(--rust); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .catalog-stack { height: 320px; margin-top: 20px; }
  .walk { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-list { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .cta-banner { padding: 48px 30px; }
  .calc-wrap { grid-template-columns: 1fr; }
  .result-card { position: static; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 20px; }
  .nav-links { display: none; }
  .catalog-grid { grid-template-columns: 1fr; }
  .cta-banner-inner { flex-direction: column; align-items: flex-start; }
}
