/* RentDemand — interface and document typography. */

:root {
  --ink: #0d141b;
  --ink-2: #16202a;
  --ink-3: #1e2b37;
  --line: #2a3a48;
  --text: #e8eef4;
  --muted: #97a8b8;
  --accent: #5eead4;
  --accent-ink: #04231f;
  --warn: #ffb454;
  --danger: #ff7b72;
  --paper: #ffffff;
  --paper-ink: #14181d;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 34px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-top: 0; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.tag {
  display: inline-block; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,180,84,.14); color: var(--warn); border: 1px solid rgba(255,180,84,.3);
  padding: 1px 6px; border-radius: 20px; vertical-align: middle; font-family: var(--sans);
}
.link-sm { font-size: .85rem; }

/* ------------------------------------------------------------------ top -- */

.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13,20,27,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--serif); font-size: 1.12rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; font-family: var(--serif); font-size: 1.05rem;
}
.brand-foot { margin-bottom: 10px; }
.top-nav { display: flex; align-items: center; gap: 20px; font-size: .92rem; }
.top-nav a { color: var(--muted); }
.top-nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 720px) { .top-nav a:not(.btn) { display: none; } }

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: .94rem; font-weight: 600;
  padding: 10px 18px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--ink-3); color: var(--text); cursor: pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: #3d5265; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 13px; font-size: .85rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn-primary:hover { background: #7ff2de; border-color: #7ff2de; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ----------------------------------------------------------------- hero -- */

.hero { padding: 58px 0 30px; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 380px at 12% -10%, rgba(94,234,212,.09), transparent 60%); }
.hero .lede { font-size: 1.12rem; color: #c4d2de; max-width: 780px; }
.kicker {
  font-family: var(--sans); font-size: .74rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; font-weight: 700;
}
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.fact {
  font-size: .84rem; color: var(--muted); background: var(--ink-2);
  border: 1px solid var(--line); border-radius: 20px; padding: 5px 13px;
}
.fact strong { color: var(--text); }

/* ------------------------------------------------------------------ app -- */

.app { padding: 30px 0 48px; }
.app-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: 22px; align-items: start; }
@media (max-width: 1000px) { .app-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.form { padding: 6px 0 18px; }
.preview { position: sticky; top: 78px; padding: 16px; }
@media (max-width: 1000px) { .preview { position: static; } }

.step { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid rgba(42,58,72,.7); }
.step.last { border-bottom: 0; }
.step-n {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink-3); color: var(--accent); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; font-family: var(--sans);
}
.step-body { flex: 1 1 auto; min-width: 0; }
.step-body h3 { margin: 2px 0 10px; font-size: 1rem; font-family: var(--sans); font-weight: 700; color: #cdd9e5; }

label { display: block; margin-bottom: 11px; font-size: .84rem; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 8px; margin-top: 26px; }
label.check input { width: auto; margin: 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px;
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; font: inherit; font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(94,234,212,.4); outline-offset: 0; border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.5; font-family: var(--sans); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }
.hint { font-size: .8rem; color: var(--muted); margin: -4px 0 10px; line-height: 1.5; }
.hint strong { color: #cdd9e5; }
.callout { font-size: .84rem; line-height: 1.55; border-radius: 8px; padding: 11px 13px; margin: 4px 0 12px; border: 1px solid; }
.callout.warn { background: rgba(255,180,84,.08); border-color: rgba(255,180,84,.3); color: #f0cd9a; }
.charge-row, .ded-row { display: grid; grid-template-columns: 1fr 110px 34px; gap: 8px; margin-bottom: 8px; align-items: start; }
.charge-row button, .ded-row button {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; height: 38px; cursor: pointer; font-size: 1rem; line-height: 1;
}
.charge-row button:hover, .ded-row button:hover { color: var(--danger); border-color: var(--danger); }

/* -------------------------------------------------------------- preview -- */

.preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.preview-kicker { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.preview-title { font-family: var(--serif); font-size: 1.02rem; line-height: 1.3; }
.preview-badge {
  flex: 0 0 auto; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px; background: rgba(255,180,84,.15); color: var(--warn); border: 1px solid rgba(255,180,84,.32);
}
.preview-badge.ok { background: rgba(94,234,212,.15); color: var(--accent); border-color: rgba(94,234,212,.35); }
.deadline {
  font-size: .88rem; background: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.5;
}
.deadline strong { color: var(--accent); }
.deadline .sub { color: var(--muted); font-size: .8rem; display: block; margin-top: 3px; }
.doc-scroll { max-height: 560px; overflow: auto; border-radius: 8px; background: #6b7785; padding: 12px; }
@media (max-width: 1000px) { .doc-scroll { max-height: 440px; } }
.buy { margin-top: 14px; display: grid; gap: 8px; }
.code-row { margin-top: 4px; }
.code-row .hidden { margin-top: 8px; }
#code-wrap { display: flex; gap: 8px; }
#code-input { margin-top: 0; font-family: var(--mono); text-transform: uppercase; }

/* ------------------------------------------------------------ document -- */

.doc-host .doc { font-size: 11.5px; }
.doc {
  background: var(--paper); color: var(--paper-ink);
  font-family: var(--serif); font-size: 12.4px; line-height: 1.55;
  padding: 34px 40px; border-radius: 3px;
  box-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.doc p { margin: 0 0 .72em; }
.doc-head { text-align: center; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 2px solid #1b2430; }
.doc-title { font-family: var(--serif); font-size: 1.34em; font-weight: 700; letter-spacing: .03em; margin: 0 0 6px; text-transform: uppercase; line-height: 1.25; }
.doc-cite { font-size: .8em; color: #4a5766; letter-spacing: .02em; }
.doc-deadline { margin-top: 8px; font-size: .84em; background: #eef7f5; border: 1px solid #cfe9e3; color: #12463d; border-radius: 4px; padding: 5px 9px; display: inline-block; }
.doc-parties { margin-bottom: 20px; }
.doc-to { border-left: 3px solid #1b2430; padding-left: 12px; }
.doc-lbl { font-size: .72em; letter-spacing: .18em; font-weight: 700; color: #5a6a7a; margin-bottom: 3px; }
.doc-strong { font-weight: 700; }
.doc-table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: .94em; }
.doc-table th, .doc-table td { border-bottom: 1px solid #cfd6dd; padding: 7px 6px; text-align: left; vertical-align: top; }
.doc-table th { font-size: .78em; letter-spacing: .06em; text-transform: uppercase; color: #5a6a7a; border-bottom: 2px solid #1b2430; }
.doc-amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc-total td { font-weight: 700; border-top: 2px solid #1b2430; border-bottom: 0; }
.doc-quote { margin: 12px 0 16px; padding: 11px 14px; background: #f4f6f8; border-left: 3px solid #1b2430; font-style: italic; }
.doc-auth { font-size: .92em; }
.doc-emph { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.doc-date { margin-top: 22px; }
.doc-sign { margin-top: 26px; }
.doc-sigline { margin-bottom: 6px; }
.doc-rule { display: block; width: 280px; max-width: 100%; border-top: 1px solid #1b2430; }
.doc-rule.short { width: 210px; }
.doc-small { font-size: .82em; color: #4a5766; }
.doc-proof { margin-top: 30px; padding-top: 16px; border-top: 1px dashed #a9b4bf; font-size: .93em; }
.doc-proof-title { font-weight: 700; letter-spacing: .1em; font-size: .85em; margin-bottom: 8px; }
.doc-check { margin: 5px 0 5px 2px; }
.doc-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.doc-note { margin-top: 24px; background: #fff8e8; border: 1px solid #f0dcae; border-radius: 4px; padding: 12px 14px; font-size: .9em; }
.doc-note-title { font-weight: 700; font-size: .84em; text-transform: uppercase; letter-spacing: .07em; color: #7a5a12; margin-bottom: 5px; }
.doc-note p { margin: 0; }
.doc-foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid #cfd6dd; font-family: var(--sans); font-size: .68em; line-height: 1.5; color: #6b7785; }

/* Locked preview: visible enough to prove it works, unusable as a served notice. */
.doc-host.locked { position: relative; }
.doc-host.locked .doc { position: relative; }
.doc-host.locked .doc::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 3px;
  background-image:
    repeating-linear-gradient(-38deg, rgba(255,255,255,0) 0 34px, rgba(255,120,80,.055) 34px 68px),
    radial-gradient(circle at 50% 40%, rgba(255,255,255,.5), rgba(255,255,255,.06) 70%);
}
.doc-host.locked .doc::before {
  content: "PREVIEW · NOT PAID · PREVIEW · NOT PAID";
  position: absolute; top: 42%; left: 50%; z-index: 3; pointer-events: none;
  transform: translate(-50%,-50%) rotate(-19deg);
  font-family: var(--sans); font-size: 1.5em; font-weight: 800; letter-spacing: .12em;
  color: rgba(210,60,30,.30); white-space: nowrap; text-align: center;
}
.doc-host.unlocked .doc { box-shadow: none; border-radius: 0; }
.doc-host.unlocked .doc::before, .doc-host.unlocked .doc::after { display: none; }

/* ---------------------------------------------------------------- bands -- */

.band { padding: 54px 22px; border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card-feature { border-color: rgba(94,234,212,.45); background: linear-gradient(180deg, rgba(94,234,212,.06), transparent 60%), var(--ink-2); }
.card-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.card-price { font-family: var(--serif); font-size: 2.3rem; line-height: 1; }
.card-name { font-weight: 700; margin: 4px 0 10px; }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.card li { margin-bottom: 5px; }

.qa { border-bottom: 1px solid var(--line); padding: 14px 0; }
.qa summary { cursor: pointer; font-weight: 600; font-family: var(--serif); font-size: 1.06rem; }
.qa summary::marker { color: var(--accent); }
.qa div { color: var(--muted); padding-top: 9px; font-size: .94rem; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
@media (max-width: 620px) { .stat-grid { grid-template-columns: 1fr; } }
.stat { background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat-n { font-family: var(--serif); font-size: 1.9rem; color: var(--accent); line-height: 1; }
.stat-l { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.cite-line { font-size: .9rem; color: var(--muted); }
.pitfalls { color: #c4d2de; }
.pitfalls li { margin-bottom: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { font-size: .84rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 13px; color: var(--text); }
.chip:hover { border-color: var(--accent); text-decoration: none; }
.doc-frame { background: #6b7785; padding: 16px; border-radius: 12px; margin: 18px 0 30px; overflow: auto; }
.doc-frame .doc { max-width: 7.6in; margin: 0 auto; }

.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.matrix { width: 100%; border-collapse: collapse; font-size: .84rem; }
.matrix th, .matrix td { padding: 8px 11px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix thead th { background: var(--ink-3); position: sticky; top: 0; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.matrix tbody th { font-weight: 600; }
.matrix tbody tr:hover { background: rgba(94,234,212,.04); }
.matrix td a { color: var(--text); }
.matrix td a:hover { color: var(--accent); }

/* ----------------------------------------------------------------- foot -- */

.foot { border-top: 1px solid var(--line); padding: 42px 0 30px; margin-top: 30px; background: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; font-size: .88rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot-grid a { display: block; color: var(--muted); margin-bottom: 6px; font-size: .86rem; }
.foot-grid a:hover { color: var(--text); }
.foot-legal { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); max-width: 900px; }

/* ----------------------------------------------------------- print page -- */

.print-body { background: #4c5764; }
.print-bar { background: var(--ink-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.print-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 22px; flex-wrap: wrap; }
.print-bar strong { font-family: var(--serif); }
.print-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-ref { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.paper-wrap { padding: 26px 16px 60px; }
.paper-wrap .doc { max-width: 8.5in; margin: 0 auto; padding: 0.85in 0.8in; font-size: 12.5px; border-radius: 2px; }
