@font-face {
  font-family:Mizan;
  src:url('fonts/nunito-sans.woff2') format('woff2');
  font-weight:400 800;
  font-display:swap
}

@font-face {
  font-family:'Mizan Mono';
  src:url('fonts/red-hat-mono.woff2') format('woff2');
  font-weight:400 600;
  font-display:swap
}

:root {
  color-scheme:light dark;
  --bg:#f5f5f2;
  --card:#ffffff;
  --panel:#eaeae7;
  --ink:#191919;
  --text:#424242;
  --muted:#62625e;
  --line:#d8d8d3;
  --deep:#191919;
  --hover:#424242;
  --on-deep:#ffffff;
  --accent:#a1793d;
  --warn-bg:#fbf5e7;
  --warn-ink:#795b24;
  --bad:#a33930;
  --good:#3e739c;
  --font:Mizan,'Avenir Next',system-ui,sans-serif;
  --mono:'Mizan Mono',ui-monospace,monospace
}

@media(prefers-color-scheme:dark) {
  :root {
    --bg:#17191d;
    --card:#22252a;
    --panel:#30343a;
    --ink:#f7f7f5;
    --text:#dededb;
    --muted:#bcbcb8;
    --line:#4c4e50;
    --deep:#f4f4f1;
    --hover:#d4d4d0;
    --on-deep:#1a1b1c;
    --accent:#d8c19a;
    --warn-bg:#332e20;
    --warn-ink:#e6d29f;
    --bad:#f3aaa1;
    --good:#87b9de
  }
}

* {
  box-sizing:border-box
}

html {
  scroll-padding-top:28px
}

body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:16px/1.65 var(--font)
}

[hidden] {
  display:none!important
}

h1,h2,h3,h4 {
  color:var(--ink);
  line-height:1.25
}

h1 {
  font:800 clamp(40px,5.7vw,72px)/1.04 var(--font);
  letter-spacing:-.055em;
  margin:0 0 24px
}

h2 {
  font-size:23px;
  letter-spacing:-.02em;
  margin:0 0 14px
}

h3 {
  font-size:18px;
  margin:24px 0 10px
}

p {
  margin:0 0 18px
}

a {
  color:var(--deep);
  text-underline-offset:4px;
  text-decoration-thickness:1px
}

a:hover {
  text-decoration-thickness:2px
}

strong,b {
  color:var(--ink);
  font-weight:700
}

button,input,select {
  font:inherit
}

button,a.button {
  cursor:pointer
}

button:disabled {
  opacity:.55;
  cursor:wait
}

button,.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:10px 20px;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--card);
  color:var(--ink);
  font-weight:700;
  line-height:1.4;
  text-decoration:none
}

button:hover,.button:hover {
  background:var(--panel)
}

button.primary,.button.primary {
  background:var(--deep);
  color:var(--on-deep);
  border-color:var(--deep)
}

button.primary:hover,.button.primary:hover {
  background:var(--hover)
}

button.link-button {
  padding:4px 0;
  background:none;
  border:0;
  min-height:36px;
  color:var(--deep);
  text-decoration:underline;
  text-underline-offset:4px
}

.small {
  font-size:14px
}

input[type=text],input[type=password],input[type=number],select {
  border:1px solid var(--line);
  background:var(--card);
  color:var(--ink);
  border-radius:6px;
  padding:10px 12px;
  min-height:44px;
  max-width:100%
}

input[type=number] {
  width:144px;
  text-align:right;
  font-family:var(--mono);
  font-size:14px
}

input[type=checkbox],input[type=radio] {
  accent-color:var(--deep);
  width:18px;
  height:18px;
  flex-shrink:0;
  cursor:pointer
}

::placeholder {
  color:var(--muted);
  opacity:1
}

:focus-visible {
  outline:2px solid var(--deep);
  outline-offset:4px
}

input:focus,select:focus {
  outline:2px solid var(--deep);
  outline-offset:2px
}

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

.skip-link {
  position:absolute;
  left:20px;
  top:-100px;
  background:var(--card);
  padding:12px;
  z-index:10
}

.skip-link:focus {
  top:12px
}

.wrap {
  width:min(1120px,100% - 64px);
  margin:auto
}

.narrow {
  max-width:760px
}

.eyebrow {
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--deep);
  margin-bottom:20px
}

.lead {
  font-size:19px;
  line-height:1.65;
  max-width:38em;
  color:var(--text)
}

.note,.sub {
  font-size:14px;
  color:var(--muted);
  line-height:1.6
}

.error {
  color:var(--bad);
  font-weight:700
}

.top {
  border-bottom:1px solid var(--line)
}

.top-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:92px
}

.brand {
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--ink)
}

.brand-name {
  font:800 30px/1 var(--font);
  letter-spacing:-1px
}

.brand-sub {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-top:6px;
  letter-spacing:.02em
}

.brand svg {
  width:31px;
  height:36px;
  flex-shrink:0
}

.nav {
  display:flex;
  gap:28px;
  align-items:center;
  font-size:14px
}

.nav a {
  text-decoration:none;
  color:var(--muted);
  padding:8px 0
}

.nav a[aria-current=page] {
  color:var(--ink);
  box-shadow:0 2px var(--deep)
}

.nav a:hover {
  color:var(--deep)
}

.foot {
  border-top:1px solid var(--line);
  margin-top:80px;
  padding:30px 0
}

.foot-inner {
  display:flex;
  justify-content:space-between;
  gap:30px;
  align-items:start
}

.foot p {
  margin:0;
  font-size:12px;
  color:var(--muted)
}

.foot nav {
  display:flex;
  gap:22px;
  font-size:13px;
  flex-wrap:wrap
}

.foot a {
  color:var(--muted);
  text-decoration:none
}

.foot a:hover {
  text-decoration:underline
}

/* Connect: one task, one clear action. */
.hero {
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);
  gap:100px;
  align-items:center;
  padding:92px 0 72px
}

.hero-head h1 {
  max-width:10em
}

.hero-head .lead {
  max-width:28em
}

.journey {
  display:flex;
  list-style:none;
  padding:0;
  gap:24px;
  font-size:13px;
  color:var(--muted);
  margin:32px 0 0
}

.journey li {
  display:flex;
  align-items:center;
  gap:9px
}

.journey span {
  font:12px var(--mono);
  color:var(--deep);
  border-bottom:1px solid var(--line);
  padding-bottom:2px
}

.connect-card {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
  padding:34px
}

.connect-card h2 {
  font-size:23px;
  margin-bottom:8px
}

.connect-card>p {
  font-size:14px
}

.connect-card label {
  display:block;
  font-size:14px;
  font-weight:700;
  color:var(--ink);
  margin:26px 0 8px
}

#token {
  width:100%
}

.connect-card .primary {
  width:100%;
  margin-top:12px
}

.connect-help {
  font-size:13px!important;
  margin:12px 0 24px
}

.connect-help a {
  font-weight:700
}

.sample-action {
  margin-top:24px;
  border-top:1px solid var(--line);
  padding-top:20px;
  text-align:center
}

.sample-action p {
  font-size:13px;
  color:var(--muted);
  margin:0
}

.sample-action button {
  padding:6px 0;
  border:0;
  background:none;
  color:var(--deep);
  font-size:14px
}

.token-notice {
  font-size:12px!important;
  color:var(--muted);
  margin:20px 0 0
}

#status {
  font-size:14px;
  margin:12px 0 0
}

#status:empty {
  display:none
}

.quiet-intro {
  display:flex;
  justify-content:space-between;
  gap:32px;
  align-items:center;
  border-top:1px solid var(--line);
  padding:30px 0 0
}

.quiet-intro p {
  margin:0;
  font-size:14px;
  max-width:42em
}

.quiet-intro a {
  flex-shrink:0;
  font-size:14px
}

/* Connected calculator: review first, estimate second. */
.app {
  padding-top:28px
}

.connected {
  display:flex;
  align-items:center;
  gap:20px;
  justify-content:space-between;
  padding-bottom:20px;
  font-size:13px;
  color:var(--muted)
}

#restart {
  font-size:13px;
  padding:6px 12px;
  min-height:34px
}

.progress {
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 44px;
  border-bottom:1px solid var(--line);
  padding-bottom:16px;
  font-size:13px
}

.progress span,.progress button {
  font-size:13px;
  padding:6px 12px;
  min-height:34px;
  border:0;
  background:none;
  color:var(--muted)
}

.progress span:first-child {
  padding-left:0
}

.progress button[aria-current=step] {
  color:var(--ink);
  background:var(--panel)
}

.progress .divider {
  padding:0;
  color:var(--line)
}

.view-head {
  margin-bottom:34px;
  max-width:700px
}

.view-head h1 {
  font-size:42px;
  margin-bottom:12px
}

.view-head p {
  margin:0
}

.review-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 250px;
  gap:64px;
  align-items:start
}

.review-main {
  min-width:0
}

.review-aside {
  position:sticky;
  top:28px;
  padding-top:8px
}

.review-aside h2 {
  font-size:15px
}

.review-aside ol {
  padding-left:18px;
  font-size:14px;
  color:var(--muted)
}

.review-aside li {
  margin-bottom:12px
}

.review-aside .primary {
  width:100%;
  margin-top:12px
}

.section {
  padding:0 0 28px
}

.section h2 {
  font-size:20px
}

.warn {
  padding:14px 18px;
  background:var(--warn-bg);
  color:var(--warn-ink);
  border-left:3px solid var(--accent);
  font-size:14px;
  margin-bottom:22px;
  border-radius:0 6px 6px 0
}

.warn a {
  color:inherit
}

.review-warnings .warn {
  margin:0 0 16px
}

.disclosure {
  border-top:1px solid var(--line);
  padding:20px 0
}

.disclosure:last-child {
  border-bottom:1px solid var(--line)
}

summary {
  cursor:pointer;
  color:var(--ink);
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  font-size:16px;
  font-weight:700
}

summary::-webkit-details-marker {
  display:none
}

summary::after {
  content:'+';
  font:400 23px/1 var(--font);
  color:var(--muted);
  flex-shrink:0
}

details[open]>summary::after {
  content:'−'
}

summary .note {
  display:block;
  font-size:13px;
  font-weight:400;
  margin-top:3px
}

details[open]>summary {
  margin-bottom:22px
}

.fields {
  display:grid;
  gap:16px
}

.field {
  display:flex;
  gap:24px;
  align-items:center;
  justify-content:space-between
}

.field label {
  font-size:14px;
  color:var(--text);
  min-width:0
}

.field input,.field select {
  flex-shrink:0
}

.two-columns {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px
}

.fields .note {
  margin:0
}

.inline-note {
  font-size:13px;
  color:var(--muted);
  margin:20px 0 0
}

.view-actions {
  display:flex;
  justify-content:space-between;
  gap:20px;
  margin-top:32px
}

.view-actions .primary {
  min-width:180px
}

.mobile-next {
  display:none
}

.estimate-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 350px;
  gap:64px;
  align-items:start
}

.estimate-main {
  min-width:0
}

.result {
  background:var(--panel);
  padding:30px;
  border-radius:12px;
  position:sticky;
  top:28px
}

.due-label {
  font-size:13px;
  font-weight:700;
  margin:0 0 14px
}

.due {
  font:600 clamp(34px,3.8vw,48px)/1.1 var(--mono);
  color:var(--ink);
  letter-spacing:-.03em;
  overflow-wrap:anywhere;
  margin-bottom:16px
}

.due.incomplete {
  font-size:34px
}

.due-hint {
  font-size:12px;
  color:var(--muted);
  margin:0 0 24px
}

.lines {
  font-size:13px
}

.lines p {
  margin:0 0 14px
}

.lines p:nth-child(3) {
  padding-top:14px;
  border-top:1px solid var(--line)
}

.lines p:last-child {
  margin:0
}

.estimate-choice {
  margin-bottom:0;
  padding-bottom:28px
}

fieldset {
  margin:0;
  padding:0;
  border:0;
  min-width:0
}

legend {
  font-size:16px;
  font-weight:700;
  color:var(--ink);
  padding:0;
  margin-bottom:8px
}

.choice-options {
  display:flex;
  gap:12px;
  margin-top:18px
}

.opt {
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 18px;
  border:1px solid var(--line);
  border-radius:7px;
  cursor:pointer;
  font-size:14px;
  background:var(--card)
}

.opt:has(input:checked) {
  border-color:var(--deep);
  background:var(--panel)
}

.stacked-options {
  display:grid;
  gap:9px;
  margin:18px 0
}

.stacked-options .opt {
  padding:8px 14px
}

.mortgage-fields {
  margin-top:24px
}

.price-info {
  margin:20px 0 0
}

.scroll {
  overflow-x:auto;
  max-width:100%;
  margin:16px 0
}

.scroll:focus-visible {
  outline-offset:2px
}

table {
  border-collapse:collapse;
  width:100%;
  font-size:14px;
  font-variant-numeric:tabular-nums
}

th,td {
  text-align:left;
  padding:14px 8px;
  border-bottom:1px solid var(--line);
  vertical-align:top
}

th {
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.06em;
  white-space:nowrap
}

th:first-child,td:first-child {
  padding-left:0
}

th:last-child,td:last-child {
  padding-right:0
}

tbody tr:last-child td {
  border-bottom:0
}

td.num,th.num,td.n {
  text-align:right
}

td.num,td.n {
  font-family:var(--mono);
  font-size:13px;
  white-space:nowrap
}

.list input[type=number] {
  width:124px;
  min-height:38px;
  padding:7px 9px
}

.list td:first-child {
  width:32px
}

.list td:first-child input {
  margin:0
}

.include-target {
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  min-height:44px;
  cursor:pointer
}

.name {
  color:var(--ink);
  font-weight:600
}

td .note {
  font-size:12px;
  line-height:1.5;
  margin-top:4px
}

.badge {
  color:var(--warn-ink);
  font-size:11px;
  background:var(--warn-bg);
  border-radius:3px;
  padding:2px 5px;
  display:inline-block
}

tr.off .name {
  color:var(--muted);
  text-decoration:line-through
}

tr.off input[type=number] {
  opacity:.6
}

tr.selected td {
  background:var(--panel)
}

#methodRows td {
  min-width:95px
}

#methodRows td:nth-child(2) {
  min-width:130px
}

.barcell {
  width:25%;
  vertical-align:middle
}

.bar {
  height:6px;
  min-width:3px;
  border-radius:3px;
  background:var(--good)
}

.bar.below {
  background:var(--accent)
}

.legend {
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  font-size:12px;
  color:var(--muted)
}

.legend span {
  display:flex;
  align-items:center;
  gap:6px
}

.legend i {
  width:16px;
  height:6px;
  border-radius:3px;
  background:var(--good)
}

.legend i.below {
  background:var(--accent)
}

#hawlSummary {
  font-size:14px
}

#metalValue:empty,#mortgageInfo:empty {
  display:none
}

.reset-row {
  padding-top:28px;
  margin-top:30px;
  border-top:1px solid var(--line)
}

/* Guides share a calm reading layout and reveal detail by topic. */
.page-head {
  padding:64px 0 48px;
  max-width:760px
}

.page-head h1 {
  font-size:clamp(36px,4.5vw,54px);
  max-width:13em
}

.page-head .lead {
  font-size:18px
}

.page-head .note {
  margin:24px 0 0
}

.layout {
  display:grid;
  grid-template-columns:200px minmax(0,1fr);
  gap:72px;
  align-items:start
}

.toc {
  position:sticky;
  top:28px;
  font-size:13px
}

.toc p {
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:700;
  margin-bottom:16px
}

.toc ul {
  list-style:none;
  padding:0;
  margin:0
}

.toc li {
  margin-bottom:10px
}

.toc a {
  color:var(--muted);
  text-decoration:none
}

.toc a:hover {
  color:var(--deep)
}

.doc {
  min-width:0
}

.doc h2 {
  font-size:23px
}

.doc h3 {
  font-size:16px
}

.doc p,.doc li {
  font-size:15px;
  line-height:1.8
}

.doc ul,.doc ol {
  padding-left:22px
}

.doc li {
  margin-bottom:8px
}

.quick-start {
  padding:0 0 32px
}

.article-group {
  margin:32px 0 46px
}

.article-group>h2 {
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:700;
  margin-bottom:18px
}

.article-topic {
  padding:22px 0;
  border-top:1px solid var(--line);
  scroll-margin-top:30px
}

.article-topic:last-child {
  border-bottom:1px solid var(--line)
}

.article-topic>summary {
  font-size:18px;
  font-weight:600
}

.article-topic>summary h3 {
  font-size:18px;
  margin:0;
  font-weight:600
}

.topic-content>p:first-child {
  margin-top:0
}

.callout {
  padding:18px 22px;
  background:var(--panel);
  border-radius:6px;
  margin:22px 0
}

.callout p {
  margin:0
}

.checks {
  padding-left:20px
}

.checks li {
  padding:0;
  margin-bottom:12px
}

.formula {
  font:12px/1.9 var(--mono);
  overflow-x:auto;
  white-space:pre;
  background:var(--panel);
  padding:22px;
  border-radius:7px;
  margin:22px 0
}

code {
  font:.88em var(--mono);
  overflow-wrap:anywhere
}

.tag {
  font-size:11px;
  color:var(--muted)
}

.flow {
  display:flex;
  flex-direction:column;
  gap:16px;
  margin:24px 0
}

.stack {
  display:flex;
  gap:16px
}

.node {
  flex:1;
  border:1px solid var(--line);
  padding:18px;
  border-radius:7px;
  min-width:0
}

.node h3 {
  margin:0 0 8px
}

.node .host {
  font:11px var(--mono);
  overflow-wrap:anywhere
}

.node p {
  font-size:13px;
  margin:0
}

.node.center {
  background:var(--panel)
}

.node.no {
  border-style:dashed
}

.arrow {
  display:none
}

.flow-caption {
  color:var(--muted);
  font-size:12px!important
}

.doc table {
  font-size:13px
}

.doc td {
  line-height:1.75
}

.doc .n {
  white-space:nowrap
}

.doc section,.doc details {
  scroll-margin-top:30px
}

.token-layout {
  display:grid;
  grid-template-columns:minmax(0,700px) 260px;
  gap:90px;
  align-items:start
}

.token-steps {
  list-style:none;
  padding:0;
  margin:0;
  counter-reset:token-step
}

.token-steps>li {
  position:relative;
  padding:0 0 38px 58px;
  border-bottom:1px solid var(--line);
  margin-bottom:32px;
  counter-increment:token-step
}

.token-steps>li::before {
  content:counter(token-step);
  position:absolute;
  left:0;
  top:1px;
  border:1px solid var(--line);
  border-radius:50%;
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  font:13px var(--mono);
  color:var(--deep)
}

.token-steps h2 {
  font-size:21px;
  margin:0 0 12px
}

.token-steps p {
  font-size:15px
}

.token-steps .button {
  font-size:14px
}

.ui-example {
  background:var(--panel);
  padding:16px 20px;
  border-radius:6px;
  margin:18px 0;
  font-size:13px;
  color:var(--ink)
}

.ui-example span {
  color:var(--muted);
  padding:0 10px
}

.token-aside {
  position:sticky;
  top:28px;
  border-left:1px solid var(--line);
  padding-left:24px
}

.token-aside h2 {
  font-size:17px
}

.token-aside p {
  font-size:14px
}

.token-aside .button {
  width:100%;
  font-size:14px
}

.token-trouble {
  margin:36px 0 0
}

.source-note {
  font-size:12px!important;
  color:var(--muted)
}

@media(max-width:1000px) {
  .hero {
    gap:50px;
    padding-top:64px
  }
  .review-layout {
    grid-template-columns:minmax(0,1fr) 220px;
    gap:32px
  }
  .estimate-layout {
    grid-template-columns:minmax(0,1fr) 310px;
    gap:32px
  }
  .layout {
    gap:40px;
    grid-template-columns:170px minmax(0,1fr)
  }
  .token-layout {
    gap:42px;
    grid-template-columns:minmax(0,1fr) 230px
  }
  .two-columns {
    grid-template-columns:1fr;
    gap:20px
  }
}

@media(max-width:760px) {
  .wrap {
    width:calc(100% - 40px)
  }
  .top-inner {
    min-height:80px;
    flex-wrap:wrap;
    gap:14px;
    padding:20px 0
  }
  .nav {
    gap:22px;
    font-size:13px
  }
  .brand-sub {
    display:none
  }
  .brand svg {
    width:26px;
    height:29px
  }
  .brand-name {
    font-size:27px
  }
  .hero {
    grid-template-columns:1fr;
    gap:34px;
    padding:52px 0 40px
  }
  .hero-head h1 {
    max-width:13em;
    font-size:44px;
    margin-bottom:20px
  }
  .hero .lead {
    font-size:17px;
    max-width:34em
  }
  .journey {
    margin-top:24px;
    gap:22px
  }
  .connect-card {
    padding:26px
  }
  .quiet-intro {
    align-items:start;
    flex-direction:column;
    gap:16px;
    padding-top:26px
  }
  .foot {
    margin-top:56px
  }
  .foot-inner {
    flex-direction:column;
    gap:18px
  }
  .foot nav {
    gap:20px
  }
  .review-layout,.estimate-layout,.layout,.token-layout {
    grid-template-columns:1fr;
    gap:32px
  }
  .review-aside,.result,.token-aside,.toc {
    position:static
  }
  .review-aside {
    border-top:1px solid var(--line);
    padding-top:24px
  }
  .review-aside ol {
    display:none
  }
  .review-aside h2 {
    display:none
  }
  .review-aside .primary {
    width:auto;
    margin:0
  }
  .view-head h1 {
    font-size:36px
  }
  .progress {
    margin-bottom:32px;
    gap:5px;
    font-size:12px
  }
  .progress button,.progress span {
    font-size:12px;
    padding:6px 9px
  }
  .connected {
    gap:14px;
    font-size:12px
  }
  .view-head {
    margin-bottom:28px
  }
  .result {
    grid-row:1;
    padding:26px
  }
  .estimate-main {
    grid-row:2
  }
  .due {
    font-size:48px
  }
  .due-hint {
    max-width:36em
  }
  .field {
    gap:16px
  }
  .field label {
    font-size:13px
  }
  .field input,.field select {
    width:124px;
    font-size:13px
  }
  .list td {
    padding:14px 5px
  }
  .list input[type=number] {
    width:102px;
    font-size:12px
  }
  .list .name {
    font-size:13px;
    overflow-wrap:anywhere
  }
  td .note {
    font-size:11px
  }
  .list th {
    font-size:10px
  }
  .list th:first-child {
    font-size:0
  }
  .list th:first-child::after {
    content:'Use';
    font-size:10px
  }
  .scroll {
    margin-top:12px
  }
  .page-head {
    padding:46px 0 30px
  }
  .page-head h1 {
    font-size:40px
  }
  .page-head .lead {
    font-size:17px
  }
  .toc {
    border-bottom:1px solid var(--line);
    padding-bottom:20px
  }
  .toc p {
    margin-bottom:10px
  }
  .toc ul {
    display:flex;
    flex-wrap:wrap;
    gap:8px 20px
  }
  .toc li {
    margin:0
  }
  .token-aside {
    padding:24px 0 0;
    border-left:0;
    border-top:1px solid var(--line)
  }
  .token-aside .button {
    width:auto
  }
  .token-steps>li {
    padding-left:45px
  }
  .stack {
    flex-direction:column
  }
  .doc table {
    min-width:430px
  }
  .doc .scroll {
    border:1px solid var(--line);
    border-radius:6px;
    padding:0 12px
  }
  .formula {
    font-size:11px;
    padding:16px
  }
  .choice-options {
    flex-wrap:wrap
  }
  .opt {
    flex:1;
    justify-content:center
  }
  .stacked-options .opt {
    justify-content:start
  }
  .view-actions {
    margin-top:24px
  }
}

@media(max-width:380px) {
  .wrap {
    width:calc(100% - 32px)
  }
  .nav {
    gap:17px;
    font-size:12px
  }
  .hero-head h1 {
    font-size:38px
  }
  .connect-card {
    padding:22px
  }
  .journey {
    gap:18px;
    font-size:12px
  }
  .progress {
    gap:2px
  }
  .progress span,.progress button {
    padding-left:6px;
    padding-right:6px
  }
  .connected #sub {
    max-width:190px
  }
  .barcell {
    display:none
  }
  .view-head h1 {
    font-size:33px
  }
}

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

.estimate-summary {
  font-size:14px;
  margin:0 0 20px;
  color:var(--ink)
}

.result-breakdown {
  border-top:1px solid var(--line);
  padding-top:18px
}

.result-breakdown>summary {
  font-size:13px;
  font-weight:600
}

.result-breakdown>summary::after {
  font-size:18px
}

/* Mizan: a personal calculation notebook, with the source of every number visible. */
:root {
  --chart-blue:#427ca9;
  --chart-teal:#45877c;
  --chart-debt:#bd634b;
  --chart-fill:rgba(66,124,169,.09);
  --card-shadow:0 8px 32px rgba(37,45,58,.035);
}
@media(prefers-color-scheme:dark) {
  :root {
    --chart-blue:#87b9de;
    --chart-teal:#8ac2b5;
    --chart-debt:#f09c81;
    --chart-fill:rgba(135,185,222,.08);
    --card-shadow:0 8px 32px rgba(0,0,0,.08);
  }
}
.brand { gap:12px; }
.brand .brand-mark { width:42px; height:42px; color:var(--deep); }
.brand-name { letter-spacing:-1.4px; }
.brand-sub { font-family:var(--font); font-size:10px; font-weight:500; letter-spacing:.02em; }
.top-inner { min-height:96px; }
.nav { gap:26px; }
.nav a { transition:color .18s ease,box-shadow .18s ease; }
.eyebrow { color:var(--muted); font:500 11px/1.6 var(--mono); letter-spacing:.08em; }
.hero { gap:78px; padding:74px 0 62px; }
.hero-head h1 { max-width:9em; }
.hero-accent { color:var(--deep); }
.hero-head .lead { font-size:17px; line-height:1.8; max-width:31em; }
.personal-link { margin:22px 0 0; font-size:13px; }
.personal-link a { text-decoration:none; border-bottom:1px solid var(--line); padding-bottom:5px; }
.personal-link span { padding-left:7px; }
.journey { margin-top:30px; gap:22px; font-size:12px; }
.journey span { color:var(--deep); }
.connect-card { border-radius:14px; padding:32px; box-shadow:var(--card-shadow); border-top:3px solid var(--deep); }
.connect-card h2 { font-size:22px; font-weight:800; letter-spacing:-.035em; }
button,.button { transition:background .18s ease,border-color .18s ease,transform .18s ease; }
button.primary:hover,.button.primary:hover { transform:translateY(-2px); }
button.primary:active,.button.primary:active { transform:translateY(0); }
.quiet-intro { align-items:start; }
.quiet-intro p { max-width:45em; font-size:13px; }
.progress { font-family:var(--font); }
.progress button[aria-current=step] { box-shadow:inset 0 -2px var(--deep); border-radius:5px; }
.view-head h1 { font-weight:800; letter-spacing:-.04em; }
.source-summary { color:var(--muted); font:11px/1.6 var(--mono); margin-bottom:18px; }
.source-state { display:inline-block; margin-right:6px; color:var(--chart-blue); font-weight:600; }
.source-state.adjusted { color:var(--deep); }
.source-tag { display:inline-block; font:11px/1.5 var(--font); padding:3px 6px; background:var(--panel); color:var(--muted); border-radius:3px; white-space:nowrap; }
.source-tag.local { color:var(--deep); }
.source-tag.imported { color:var(--chart-blue); }
.result { border:1px solid var(--line); border-top:3px solid var(--deep); background:var(--card); box-shadow:var(--card-shadow); padding:28px; border-radius:12px; }
.due { letter-spacing:-.06em; color:var(--ink); margin:18px 0; }
.result-method { font:11px/1.5 var(--mono); color:var(--deep); margin:0 0 12px; }
.due-hint { margin-bottom:18px; }
.estimate-summary { font-size:13px; }
.estimate-layout { gap:42px; grid-template-columns:minmax(0,1fr) 340px; }
.estimate-layout>.result { grid-column:2; grid-row:1; }
.estimate-main { grid-column:1; grid-row:1; }
.calculation-card { margin-bottom:22px; padding:26px; border:1px solid var(--line); background:var(--card); border-radius:12px; box-shadow:var(--card-shadow); }
.chart-heading { display:flex; align-items:start; justify-content:space-between; gap:20px; margin-bottom:12px; }
.chart-heading .eyebrow { margin-bottom:8px; font-size:10px; }
.chart-heading h2 { font-size:21px; letter-spacing:-.035em; margin:0; }
.chart-unit { font:10px/1.7 var(--mono); color:var(--muted); padding-top:2px; flex-shrink:0; }
.calculation-card>.note { font-size:13px; margin-bottom:6px; }
.waterfall-chart { min-width:0; }
.waterfall-chart svg { width:100%; height:auto; display:block; overflow:visible; }
.chart-grid { stroke:var(--line); stroke-width:1; }
.chart-zero { stroke:var(--muted); stroke-width:1; stroke-dasharray:4 5; opacity:.5; }
.chart-connector { fill:none; stroke:var(--muted); stroke-width:1.4; stroke-dasharray:4 5; opacity:.5; }
.waterfall-bar.accounts { fill:var(--chart-blue); }
.waterfall-bar.additions { fill:var(--chart-teal); }
.waterfall-bar.deductions { fill:var(--chart-debt); }
.waterfall-bar.net { fill:var(--ink); }
.waterfall-bar { transform-box:fill-box; transform-origin:50% 100%; animation:bar-arrive .55s cubic-bezier(.2,.7,.3,1) both; }
.waterfall-bar:nth-of-type(2) { animation-delay:.06s; }
.calculation-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 26px; }
.calculation-steps div { min-width:0; border-top:2px solid var(--chart-blue); padding-top:10px; }
.calculation-steps .additions { border-color:var(--chart-teal); }
.calculation-steps .deductions { border-color:var(--chart-debt); }
.calculation-steps .net { border-color:var(--ink); }
.calculation-steps dt { font-size:11px; color:var(--muted); margin-bottom:6px; }
.calculation-steps dd { font:500 12px/1.6 var(--mono); color:var(--ink); margin:0; overflow-wrap:anywhere; }
.ledger-detail { padding-top:18px; border-top:1px solid var(--line); }
.ledger-detail summary { font-size:13px; font-weight:600; }
.ledger-detail summary::after { font-size:18px; }
.ledger-detail table { font-size:12px; }
#calculationItems td:nth-child(2) { font-size:11px; }
.chart-empty { color:var(--muted); font-size:14px; padding:30px 0; }
.method-content { padding:8px 0; }
.method-content .estimate-choice { padding-bottom:20px; }
.method-content .disclosure { border-bottom:0; }
.method-chart { display:grid; gap:10px; margin:12px 0 24px; }
.method-bar { display:block; width:100%; text-align:left; padding:12px 14px; background:var(--card); border:1px solid var(--line); border-radius:7px; }
.method-bar:hover { background:var(--panel); }
.method-bar[aria-pressed=true] { border-color:var(--deep); }
.method-bar-heading { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:9px; font-size:12px; }
.method-bar-value { font:500 12px/1.5 var(--mono); color:var(--ink); }
.method-bar-label { font-weight:600; color:var(--text); }
.method-bar-track { display:block; height:6px; border-radius:3px; background:var(--panel); overflow:hidden; }
.method-bar-fill { display:block; width:var(--bar-size); height:100%; background:var(--chart-blue); border-radius:3px; transform-origin:left; animation:method-arrive .45s ease both; }
.method-bar[aria-pressed=true] .method-bar-fill { background:var(--deep); }
.method-bar-zero { font-size:10px; color:var(--muted); font-weight:400; }
.history-panel { padding:30px; border:1px solid var(--line); border-radius:12px; margin-top:42px; background:var(--card); box-shadow:var(--card-shadow); }
.history-panel>.note { font-size:12px; max-width:70em; }
.history-readout { display:flex; justify-content:space-between; align-items:end; gap:24px; margin:26px 0 12px; min-height:62px; }
.history-date { display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }
.history-readout strong { font:500 26px/1.25 var(--mono); letter-spacing:-.04em; }
.history-state { color:var(--muted); font-size:12px; text-align:right; max-width:280px; }
.history-state.partial { color:var(--warn-ink); }
.history-chart svg { width:100%; height:auto; display:block; overflow:visible; }
.chart-threshold { stroke:var(--deep); stroke-width:1.5; stroke-dasharray:6 6; opacity:.8; }
.chart-trend { fill:none; stroke:var(--chart-blue); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:1; stroke-dashoffset:0; animation:draw-history .9s ease both; }
.chart-area { fill:var(--chart-fill); }
.chart-point { fill:var(--chart-blue); stroke:var(--chart-blue); stroke-width:2; }
.chart-point.partial { fill:var(--card); stroke:var(--muted); stroke-dasharray:2 2; }
.chart-point.selected { fill:var(--deep); stroke:var(--deep); stroke-width:3; }
.chart-point.selected.partial { fill:var(--card); }
.chart-selection { stroke:var(--muted); stroke-width:1; stroke-dasharray:3 6; opacity:.7; }
.history-ticks { display:flex; justify-content:space-between; margin:8px 0 2px; font:10px/1.5 var(--mono); color:var(--muted); }
#historyCursor { width:100%; min-height:44px; accent-color:var(--deep); cursor:ew-resize; margin:0; }
.chart-help { font-size:11px; color:var(--muted); margin:0 0 20px; }
.chart-legend { display:flex; flex-wrap:wrap; gap:10px 24px; margin-bottom:22px; font-size:11px; color:var(--muted); }
.chart-legend span { display:inline-flex; align-items:center; gap:7px; }
.chart-legend i { width:8px; height:8px; display:inline-block; border-radius:50%; background:var(--chart-blue); }
.chart-legend .partial-dot { background:transparent; border:1px dashed var(--muted); }
.chart-legend .threshold-line { width:18px; height:0; border-radius:0; background:transparent; border-top:1px dashed var(--deep); }
.project-head { max-width:800px; }
.project-layout { display:grid; grid-template-columns:minmax(0,690px) 280px; gap:90px; align-items:start; }
.project-story h2 { margin:38px 0 18px; font-size:24px; letter-spacing:-.03em; }
.project-story h2:first-child { margin-top:0; }
.project-story p { font-size:16px; line-height:1.9; }
.project-note { border-left:2px solid var(--deep); padding:4px 0 4px 24px; position:sticky; top:32px; }
.project-note-label { font:11px var(--mono); text-transform:uppercase; color:var(--deep); letter-spacing:.08em; }
.project-note p { font-size:22px; line-height:1.5; margin:18px 0; letter-spacing:-.035em; }
.project-note ol { padding-left:18px; font-size:13px; color:var(--muted); margin-bottom:26px; }
.project-note li { margin-bottom:12px; }
.project-note .primary { font-size:13px; width:100%; }
.project-source { display:inline-block; margin-top:18px; font-size:12px; }
.project-story .project-signature { font-size:23px; font-style:italic; font-family:Georgia,serif; margin-top:38px; color:var(--ink); }
.project-signature span { font:12px var(--font); color:var(--muted); }
.hero-head { animation:page-arrive .6s ease both; }
.connect-card { animation:page-arrive .65s .08s ease both; }
.journey li { animation:page-arrive .5s .18s ease both; }
.journey li:nth-child(2) { animation-delay:.26s; }
.journey li:nth-child(3) { animation-delay:.34s; }
.page-head { animation:page-arrive .55s ease both; }
.flow-view:not([hidden]) .view-head { animation:page-arrive .4s ease both; }
.flow-view:not([hidden]) .result { animation:page-arrive .5s .06s ease both; }
.article-topic[open]>.topic-content { animation:page-arrive .25s ease both; }
@keyframes page-arrive { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes draw-history { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }
@keyframes method-arrive { from { opacity:.4; transform:scaleX(0); } to { opacity:1; transform:scaleX(1); } }
@keyframes bar-arrive { from { opacity:.4; transform:scaleY(.06); } to { opacity:1; transform:scaleY(1); } }
@media(max-width:1000px) {
  .hero { gap:42px; }
  .estimate-layout { grid-template-columns:minmax(0,1fr) 300px; gap:26px; }
  .calculation-card { padding:22px; }
  .calculation-steps { gap:8px; }
  .calculation-steps dd { font-size:11px; }
  .project-layout { grid-template-columns:minmax(0,1fr) 240px; gap:42px; }
}
@media(max-width:760px) {
  .brand .brand-mark { width:36px; height:36px; }
  .brand-sub { display:block; font-size:9px; }
  .top-inner { min-height:92px; }
  .hero { padding:44px 0 38px; gap:34px; }
  .hero-head h1 { font-size:44px; letter-spacing:-.055em; }
  .hero-head .lead { font-size:16px; }
  .journey { gap:17px; font-size:11px; }
  .connect-card { padding:25px; }
  .view-head h1 { font-size:35px; }
  .estimate-layout { grid-template-columns:1fr; gap:24px; }
  .estimate-layout>.result { grid-column:1; grid-row:1; }
  .estimate-main { grid-column:1; grid-row:2; }
  .result { padding:25px; }
  .calculation-card { padding:22px 18px; margin-top:8px; }
  .chart-heading h2 { font-size:20px; }
  .chart-heading { gap:12px; }
  .chart-unit { font-size:9px; }
  .calculation-steps { gap:10px; }
  .calculation-steps dt { font-size:10px; }
  .calculation-steps dd { font-size:10px; }
  .history-panel { padding:23px 19px; margin-top:28px; }
  .history-panel .chart-unit { display:none; }
  .history-readout { align-items:start; gap:16px; }
  .history-readout strong { font-size:23px; }
  .history-state { max-width:140px; font-size:11px; padding-top:4px; }
  .history-chart { margin-top:18px; }
  .chart-legend { gap:9px 16px; font-size:10px; }
  .method-bar-heading { font-size:11px; gap:8px; }
  .method-bar-value { font-size:11px; }
  .project-layout { grid-template-columns:1fr; gap:38px; }
  .project-note { position:static; }
  .project-story p { font-size:15px; }
}
@media(max-width:380px) {
  .hero-head h1 { font-size:43px; }
  .nav { gap:19px; }
  .brand-sub { font-size:8px; }
  .calculation-card { padding:20px 14px; }
  .calculation-steps { grid-template-columns:1fr 1fr; gap:14px; }
  .calculation-steps dd { font-size:12px; }
  .history-readout { flex-direction:column; gap:8px; }
  .history-state { text-align:left; max-width:none; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

/* Keep financial details legible at the sizes people use to review them. */
.brand-sub { font-size:11px; }
.calculation-steps dt, .chart-help, .chart-legend, #calculationItems td:nth-child(2),
.method-bar-zero { font-size:13px; }
.calculation-steps dd, .method-bar-heading, .method-bar-value { font-size:14px; }
.history-ticks { font-size:12px; }
.list th { font-size:12px; }

@media(max-width:760px) {
  .brand-sub { font-size:11px; }
  .list th, .list th:first-child::after { font-size:12px; }
  .list th:first-child { font-size:0; }
  .list input[type=number], .field input, .field select { font-size:16px; }
  .calculation-steps { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .calculation-steps dt, .chart-legend, .chart-help { font-size:13px; }
  .calculation-steps dd, .method-bar-heading, .method-bar-value { font-size:14px; }
  .chart-unit { font-size:12px; }
}

/* The estimate reads in order: result, calculation, then method choices. */
#estimateView .view-head { margin-bottom:24px; }
.estimate-layout { display:block; }
.estimate-layout>.result {
  position:static;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(220px,320px);
  gap:32px 56px;
  align-items:end;
  padding:clamp(28px,4vw,48px);
  margin-bottom:48px;
  background:var(--panel);
  border:0;
  border-top:3px solid var(--deep);
  box-shadow:none;
}
.result-primary,.result-context { min-width:0; }
.result .due-label { font-size:15px; margin:0; }
.result .due { font-size:clamp(42px,6vw,72px); line-height:1.1; letter-spacing:-.04em; margin:16px 0; }
.result .due.incomplete { font-size:clamp(32px,4vw,48px); }
.result .estimate-summary { font-size:15px; margin:0; }
.result .result-method { font:700 14px/1.5 var(--font); color:var(--deep); }
.result .due-hint { font-size:14px; line-height:1.6; margin-bottom:18px; }
.result-breakdown summary { font-size:14px; }
.estimate-main { max-width:850px; margin:0 auto; }
.estimate-main .calculation-card {
  padding:0 0 32px;
  margin:0 0 12px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.estimate-main .chart-heading h2 { font-size:clamp(24px,3vw,32px); }
.estimate-main .calculation-card>.note { font-size:15px; }
.estimate-main #methodSettings>summary,
.estimate-main #comparison>summary { font-size:20px; }
.estimate-main #methodSettings { padding:28px 0; }
.estimate-main .method-content { padding-top:8px; }

@media(max-width:760px) {
  .estimate-layout>.result { grid-template-columns:1fr; gap:24px; padding:26px; margin-bottom:36px; }
  .result-context { border-top:1px solid var(--line); padding-top:20px; }
  .estimate-main .calculation-card { padding-bottom:26px; }
  .estimate-main #methodSettings>summary,
  .estimate-main #comparison>summary { font-size:18px; }
}

/* Mizan's ledger: a calm surface for decisions and their evidence. */
:root {
  --chart-blue:#356f62;
  --chart-teal:#6a8d70;
  --chart-debt:#a47538;
  --chart-fill:rgba(53,111,98,.1);
  --card-shadow:0 12px 36px rgba(23,47,41,.05);
}
@media(prefers-color-scheme:dark) {
  :root {
    --chart-blue:#a6d5b9;
    --chart-teal:#bbd6a8;
    --chart-debt:#e3c580;
    --chart-fill:rgba(166,213,185,.1);
  }
}
::selection { background:var(--deep); color:var(--on-deep); }
input,select { caret-color:var(--deep); }
h1,h2,h3 { text-wrap:balance; }
p { text-wrap:pretty; }
.top { background:var(--card); }
.top-inner { min-height:88px; }
.brand .brand-mark { color:var(--deep); }
.brand-name { letter-spacing:-.04em; }
.nav a[aria-current=page] { box-shadow:0 2px var(--deep); }
.hero { grid-template-columns:minmax(0,1.1fr) minmax(310px,.8fr); align-items:start; gap:clamp(40px,7vw,100px); padding:clamp(52px,7vw,96px) 0 64px; }
.hero-head h1 { max-width:13ch; font-family:Georgia,serif; font-weight:400; font-size:clamp(43px,5vw,68px); line-height:1.06; letter-spacing:-.04em; }
.hero-accent { color:var(--deep); }
.hero-head .lead { max-width:34em; font-size:18px; line-height:1.7; }
.sample-ledger { margin-top:38px; border-top:2px solid var(--deep); }
.sample-ledger-head,.sample-ledger-row { display:flex; justify-content:space-between; align-items:baseline; gap:16px; }
.sample-ledger-head { padding:18px 0; }
.sample-ledger-head strong { font-size:16px; }
.sample-ledger-head span { color:var(--muted); font-size:12px; text-align:right; }
.sample-ledger-row { padding:11px 0; border-top:1px solid var(--line); font-size:14px; }
.sample-ledger-row strong { font:500 14px/1.5 var(--mono); white-space:nowrap; }
.sample-ledger-total { color:var(--ink); font-weight:800; border-top:1px solid var(--ink); }
.sample-ledger-total strong { font-size:17px; font-weight:600; }
.sample-ledger .sample-action { display:flex; justify-content:space-between; align-items:center; gap:12px; border-top:1px solid var(--line); margin:0; padding:12px 0 0; text-align:left; }
.sample-ledger .sample-action p { font-size:13px; }
.sample-ledger .sample-action button { flex-shrink:0; min-height:44px; font-size:14px; }
.connect-card { border:1px solid var(--line); border-top:4px solid var(--deep); border-radius:8px; padding:clamp(24px,3vw,36px); background:var(--card); box-shadow:var(--card-shadow); }
.connect-card h2 { font-size:24px; letter-spacing:-.03em; }
.connect-card .community-note { margin:24px 0 0; padding-top:20px; border-top:1px solid var(--line); font-size:13px; color:var(--muted); }
.quiet-intro { padding-top:24px; }
.quiet-intro p { font-size:14px; }
.result,.history-panel,.calculation-card { border-radius:8px; }
.estimate-layout>.result { background:var(--panel); }
.result .due { color:var(--deep); }
.warn { border-left:1px solid var(--accent); }
.hero-head,.connect-card,.journey li,.page-head,.flow-view:not([hidden]) .view-head,.flow-view:not([hidden]) .result,.article-topic[open]>.topic-content { animation:none; }
@media(max-width:760px) {
  .hero { grid-template-columns:1fr; gap:38px; padding:48px 0; }
  .hero-head h1 { font-size:clamp(40px,10vw,56px); }
  .hero-head .lead { font-size:16px; }
  .sample-ledger { margin-top:30px; }
  .sample-ledger .sample-action { align-items:flex-start; flex-direction:column; gap:0; }
  .connect-card { padding:26px; }
}

/* A working calculation leads the experience, with connection available on demand. */
.calculator-page .opening { padding:clamp(48px,6vw,88px) 0 18px; }
.opening-intro { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(220px,.65fr); align-items:end; gap:40px; margin-bottom:44px; }
.opening-intro h1 { max-width:none; margin:0; font:400 clamp(48px,6vw,84px)/1.02 Georgia,serif; letter-spacing:-.04em; }
.opening-intro h1 em { color:var(--deep); font-weight:400; }
.opening-explanation { max-width:330px; padding-bottom:4px; }
.opening-explanation p { color:var(--text); font-size:16px; line-height:1.7; margin-bottom:16px; }
.opening-explanation a { font-size:14px; font-weight:700; }
.workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,.48fr); background:#ede8d8; color:#193b31; }
.workspace-main { padding:clamp(28px,4vw,52px); min-width:0; }
.workspace-heading { display:flex; justify-content:space-between; align-items:baseline; gap:16px; padding-bottom:24px; border-bottom:1px solid #aab8a6; }
.workspace-heading h2 { margin:0; color:#193b31; font-size:18px; letter-spacing:0; }
.workspace-heading span { color:#4c6659; font-size:12px; text-align:right; }
.workspace-equation { padding:12px 0; }
.equation-line { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:15px 0; color:#415d4e; border-bottom:1px solid #c5cec0; }
.equation-line strong { color:#193b31; font:500 clamp(20px,2.4vw,30px)/1.2 var(--mono); letter-spacing:-.04em; white-space:nowrap; }
.equation-line strong span { font-size:.6em; }
.equation-total { border:0; color:#193b31; font-weight:800; padding-top:24px; }
.equation-total small { display:block; font-size:13px; line-height:1.5; color:#4c6659; font-weight:400; margin-top:5px; }
.equation-total strong { font-size:clamp(28px,3.8vw,48px); }
.workspace-note { max-width:46ch; color:#4c6659; font-size:13px; line-height:1.6; margin:8px 0 0; }
.workspace-action { background:#1c4b3d; color:#eaf0e2; padding:clamp(28px,3.5vw,48px); display:flex; flex-direction:column; justify-content:space-between; gap:32px; }
.workspace-mark { width:92px; height:92px; color:#b7d2af; }
.workspace-mark svg { width:100%; height:100%; stroke:currentColor; stroke-width:1.2; }
.workspace-action h2 { color:#fffdf5; font:400 clamp(28px,3vw,38px)/1.1 Georgia,serif; letter-spacing:-.03em; margin:0 0 14px; }
.workspace-action p { color:#d2e3d4; font-size:15px; line-height:1.65; max-width:30ch; margin-bottom:24px; }
.workspace-action button.primary { width:100%; min-height:52px; background:#e9d9ac; border-color:#e9d9ac; color:#193b31; }
.workspace-action button.primary:hover { background:#f6e9c7; border-color:#f6e9c7; }
.workspace-action button:focus-visible { outline-color:#fffdf5; }
.connect-entry { border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin-top:24px; padding:8px 0; }
.connect-entry>summary { min-height:68px; font-size:18px; }
.connect-entry>summary small { display:block; color:var(--muted); font-size:13px; font-weight:400; margin-top:3px; }
.connect-entry[open]>summary { margin-bottom:0; }
.connect-content { display:grid; grid-template-columns:1fr 1fr; gap:clamp(30px,6vw,80px); padding:28px 0 36px; }
.connect-content h2 { font-size:22px; }
.connect-content p { max-width:45ch; color:var(--text); font-size:14px; }
.connect-form label { display:block; color:var(--ink); font-weight:700; font-size:14px; margin-bottom:8px; }
.connect-form #token,.connect-form #connectBtn { width:100%; }
.connect-form #connectBtn { margin-top:12px; }
.connect-form p { margin:12px 0 0; font-size:13px; }
.connect-form #connectStatus.error { color:var(--bad); }
.connect-form #connectStatus:empty { display:none; }
.independent-note { font-size:13px; color:var(--muted); margin:20px 0 0; }
.calculator-page .foot { margin-top:64px; }
@media(max-width:760px) {
  .calculator-page .opening { padding-top:42px; }
  .opening-intro { grid-template-columns:1fr; gap:22px; margin-bottom:30px; }
  .opening-intro h1 { font-size:clamp(45px,11vw,64px); }
  .opening-explanation { max-width:45ch; }
  .workspace { grid-template-columns:1fr; }
  .workspace-main,.workspace-action { padding:26px; }
  .workspace-action { flex-direction:row-reverse; align-items:flex-start; gap:20px; }
  .workspace-action>div:last-child { flex:1; min-width:0; }
  .workspace-mark { width:58px; height:58px; flex:0 0 58px; }
  .workspace-action h2 { font-size:28px; }
  .connect-content { grid-template-columns:1fr; gap:20px; }
}
@media(max-width:380px) {
  .workspace-main,.workspace-action { padding:20px; }
  .workspace-heading { align-items:start; flex-direction:column; gap:4px; }
  .equation-line { font-size:13px; }
  .equation-line strong { font-size:19px; }
  .equation-total strong { font-size:25px; }
}

.calculator-page .app { padding-top:36px; }
.calculator-page .progress { gap:0; border:1px solid var(--line); padding:0; margin-bottom:48px; }
.calculator-page .progress span:first-child,.calculator-page .progress button { padding:14px 18px; min-height:52px; }
.calculator-page .progress button[aria-current=step] { color:var(--on-deep); background:var(--deep); border-radius:0; box-shadow:none; }
.calculator-page .progress .divider { display:none; }
.calculator-page .view-head h1 { font:400 clamp(38px,4vw,54px)/1.1 Georgia,serif; letter-spacing:-.04em; }
.calculator-page .review-layout { grid-template-columns:minmax(220px,.36fr) minmax(0,1fr); gap:clamp(32px,6vw,80px); }
.calculator-page .review-main { grid-column:2; grid-row:1; }
.calculator-page .review-aside { grid-column:1; grid-row:1; position:sticky; padding:28px; background:var(--panel); border:0; }
.calculator-page .review-aside h2 { font-size:19px; }
.calculator-page .review-aside ol { color:var(--text); }
.calculator-page .review-aside .primary { margin-top:16px; }
.calculator-page .list th { color:var(--text); }
.calculator-page .estimate-layout>.result { border:0; border-radius:0; background:#1c4b3d; color:#eaf0e2; }
.calculator-page .result .due-label,.calculator-page .result .due,.calculator-page .result .estimate-summary { color:#fffdf5; }
.calculator-page .result .result-method,.calculator-page .result .due-hint { color:#d2e3d4; }
.calculator-page .result-breakdown { border-color:#739584; }
.calculator-page .result-breakdown summary,.calculator-page .result-breakdown strong { color:#fffdf5; }
.calculator-page .result-breakdown summary::after { color:#d2e3d4; }
.calculator-page .history-panel { border-radius:0; box-shadow:none; }
@media(max-width:760px) {
  .calculator-page .progress { flex-wrap:wrap; }
  .calculator-page .progress span:first-child,.calculator-page .progress button { flex:1 1 auto; padding:10px; }
  .calculator-page .review-layout { display:flex; flex-direction:column; gap:28px; }
  .calculator-page .review-main { width:100%; }
  .calculator-page .review-aside { position:static; width:100%; }
  .calculator-page .review-aside ol { display:block; }
  .calculator-page .result-context { border-color:#739584; }
}

/* A neutral, confident financial interface with Mizan's own content. */
:root {
  --chart-blue:#4e6c89;
  --chart-teal:#6a8379;
  --chart-debt:#a37d58;
  --chart-fill:rgba(78,108,137,.1);
  --card-shadow:0 12px 36px rgba(0,0,0,.06);
}
@media(prefers-color-scheme:dark) {
  :root { --chart-blue:#a9c5df; --chart-teal:#b1c6bd; --chart-debt:#e0bb93; --chart-fill:rgba(169,197,223,.12); }
}
.top { background:var(--bg); }
.brand .brand-mark { color:var(--deep); }
button,.button { border-radius:999px; }
input[type=text],input[type=password],input[type=number],select { border-radius:10px; }
.calculator-page .opening { padding-top:clamp(52px,7vw,100px); }
.opening-intro { display:block; text-align:center; max-width:780px; margin:0 auto clamp(38px,5vw,68px); }
.opening-intro h1 { font:800 clamp(50px,6.8vw,88px)/1.02 var(--font); letter-spacing:-.04em; }
.opening-explanation { max-width:520px; margin:22px auto 0; padding:0; }
.opening-explanation p { font-size:18px; line-height:1.55; }
.workspace { background:#ededeb; color:#191919; border-radius:24px; overflow:hidden; }
.workspace-main { padding:clamp(28px,4vw,52px); }
.workspace-heading { border-color:#c9c9c5; }
.workspace-heading h2 { color:#191919; }
.workspace-heading span,.workspace-note { color:#555652; }
.equation-line { color:#50514e; border-color:#d1d1ce; }
.equation-line strong { color:#191919; font-family:var(--font); font-weight:700; letter-spacing:-.03em; }
.equation-total { color:#191919; }
.equation-total small { color:#555652; }
.workspace-action { background:#1b1d20; color:#f6f6f3; justify-content:flex-end; }
.workspace-action h2 { color:#fff; font:800 clamp(28px,3vw,38px)/1.1 var(--font); letter-spacing:-.03em; }
.workspace-action p { color:#dededb; }
.workspace-action button.primary { background:#fff; border-color:#fff; color:#191919; }
.workspace-action button.primary:hover { background:#dededb; border-color:#dededb; }
.connect-entry { margin-top:28px; }
.calculator-page .view-head h1 { font:800 clamp(38px,4vw,54px)/1.1 var(--font); letter-spacing:-.04em; }
.calculator-page .review-aside { border-radius:20px; }
.calculator-page .estimate-layout>.result { background:#1b1d20; color:#f6f6f3; border-radius:24px; }
.calculator-page .result .due-label,.calculator-page .result .due,.calculator-page .result .estimate-summary,.calculator-page .result-breakdown summary,.calculator-page .result-breakdown strong { color:#fff; }
.calculator-page .result .result-method,.calculator-page .result .due-hint,.calculator-page .result-breakdown summary::after { color:#dededb; }
.calculator-page .result-breakdown,.calculator-page .result-context { border-color:#626366; }
.calculator-page .result :focus-visible { outline-color:#fff; }
.calculator-page .history-panel { border-radius:20px; }
@media(max-width:760px) {
  .opening-intro { text-align:left; }
  .opening-intro h1 { font-size:clamp(45px,11vw,64px); }
  .opening-explanation { margin:18px 0 0; }
  .opening-explanation p { font-size:16px; }
  .workspace { border-radius:18px; }
  .workspace-action { display:block; }
  .workspace-action h2 { font-size:28px; }
}

.equation-line>span { min-width:0; }
.equation-line>span small { display:block; max-width:38ch; color:#555652; font-size:12px; font-weight:400; line-height:1.5; margin-top:5px; }
.price-preview { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-top:28px; padding:20px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.price-preview strong,.price-preview span { display:block; }
.price-preview strong { font-size:15px; }
.price-preview span { font-size:13px; color:var(--muted); }
.price-preview p { margin:0; font-size:14px; text-align:right; color:var(--text); }
.price-preview p small { display:block; color:var(--muted); font-size:12px; }
.why-mizan { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(36px,7vw,96px); padding:clamp(56px,8vw,100px) 0 48px; border-bottom:1px solid var(--line); }
.why-mizan h2 { font-size:clamp(30px,3.6vw,46px); line-height:1.1; letter-spacing:-.04em; max-width:13ch; }
.why-mizan p { font-size:16px; line-height:1.75; }
.why-mizan a { font-weight:700; }
@media(max-width:760px) {
  .price-preview { align-items:start; flex-direction:column; gap:10px; }
  .price-preview p { text-align:left; }
  .why-mizan { grid-template-columns:1fr; gap:16px; padding:48px 0; }
}

/* ---------------------------------------------------------------------------
   Home page: a marketing page in bands. The hero scrolls normally (nothing sticks).
   --------------------------------------------------------------------------- */
.home { padding-bottom:24px; }
.hero { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:clamp(36px,5vw,72px); align-items:center; padding:clamp(48px,7vw,96px) 0 clamp(56px,7vw,96px); }
.kicker { display:inline-flex; align-items:center; gap:10px; margin:0 0 22px; padding:6px 14px 6px 10px; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--text); font-size:13px; font-weight:700; }
.kicker-dot { width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 22%,transparent); }
.hero-copy h1 { font:800 clamp(50px,6.4vw,84px)/1.02 var(--font); letter-spacing:-.045em; margin:0 0 22px; }
.hero-lead { font-size:clamp(17px,1.6vw,19px); line-height:1.6; max-width:34ch; margin:0 0 30px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.hero-actions .button,.hero-actions button { min-height:52px; padding:12px 26px; font-size:16px; text-decoration:none; }
.hero-status { min-height:0; margin:12px 0 0; font-size:14px; color:var(--muted); }
.hero-status:empty { margin:0; }
.hero-status.error { color:var(--bad); }
.trust-list { display:flex; flex-wrap:wrap; gap:8px 20px; list-style:none; margin:28px 0 0; padding:0; color:var(--muted); font-size:13px; }
.trust-list li { display:flex; align-items:center; gap:7px; }
.trust-list li::before { content:""; width:14px; height:14px; border-radius:50%; background:var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%23a1793d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.hero .workspace { grid-template-columns:1fr; box-shadow:0 30px 80px -40px rgba(0,0,0,.35); transform:rotate(.6deg); }

.home-band { padding:clamp(64px,9vw,120px) 0; border-top:1px solid var(--line); }
.band-head { max-width:640px; margin-bottom:clamp(36px,5vw,56px); }
.band-kicker { margin:0 0 12px; color:var(--accent); font-size:13px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.band-head h2 { font:800 clamp(34px,4.4vw,56px)/1.06 var(--font); letter-spacing:-.04em; margin:0 0 18px; }
.band-head p { font-size:17px; line-height:1.7; margin:0; }
.band-foot { max-width:60ch; margin:40px 0 0; font-size:16px; }
.band-actions { margin-top:44px; }
.band-actions .button { min-height:52px; padding:12px 26px; text-decoration:none; }
.band-link { margin:28px 0 0; }
.band-link a { font-weight:800; }

/* Accounts flowing into one total */
.flow-illo { display:grid; grid-template-columns:minmax(0,1fr) 120px minmax(0,.8fr); align-items:center; padding:clamp(24px,4vw,48px); background:var(--panel); border-radius:28px; }
.account-tiles { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.account-tiles li { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:14px; min-height:68px; padding:10px 18px 10px 12px; background:var(--card); border-radius:16px; box-shadow:0 1px 0 var(--line); }
.tile-icon { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; background:var(--bg); color:var(--ink); }
.tile-icon svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.tile-name { color:var(--ink); font-weight:800; line-height:1.3; }
.tile-name small { display:block; color:var(--muted); font-size:12px; font-weight:400; }
.account-tiles strong { font:600 16px var(--mono); white-space:nowrap; }
.tile-debt .tile-icon { color:var(--accent); }
.tile-debt strong { color:var(--muted); }
.flow-lines { width:100%; height:calc(100% - 40px); }
.flow-lines path { fill:none; stroke:var(--muted); stroke-width:1.5; stroke-dasharray:3 5; vector-effect:non-scaling-stroke; opacity:.7; }
.flow-result { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:clamp(24px,3vw,36px); background:#1b1d20; color:#dededb; border-radius:22px; }
.result-mark { width:56px; height:56px; margin-bottom:10px; color:#e9c879; }
.result-mark svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.flow-result-label { font-size:13px; }
.flow-result strong { color:#fff; font:800 clamp(34px,3.6vw,46px)/1.05 var(--font); letter-spacing:-.04em; }
.flow-result-zakat { margin-top:10px; padding-top:12px; border-top:1px solid #45474b; font-size:14px; width:100%; }
.flow-result-zakat b { color:#e9c879; font-family:var(--mono); margin-left:4px; }

/* Three steps */
.step-cards { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.step-cards li { display:flex; flex-direction:column; padding:20px 20px 28px; background:var(--card); border:1px solid var(--line); border-radius:24px; }
.step-cards h3 { font-size:21px; letter-spacing:-.02em; margin:6px 0 10px; }
.step-cards p { font-size:15px; line-height:1.65; margin:0; }
.step-num { margin-top:26px; color:var(--accent); font:600 13px var(--mono); }
.step-illo { display:flex; flex-direction:column; justify-content:center; gap:10px; height:190px; padding:22px; background:var(--panel); border-radius:16px; color:#191919; }
.mini-label { color:var(--muted); font-size:12px; font-weight:700; }
.mini-field { padding:10px 12px; background:var(--card); border:1px solid var(--line); border-radius:10px; color:var(--ink); font:600 14px var(--mono); letter-spacing:.1em; }
.mini-button { align-self:flex-start; padding:8px 18px; border-radius:999px; background:var(--deep); color:var(--on-deep); font-size:13px; font-weight:800; }
.illo-review { gap:6px; }
.mini-row { display:flex; align-items:center; gap:10px; padding:7px 10px; background:var(--card); border-radius:9px; color:var(--ink); font-size:13px; font-weight:700; }
.mini-row b { margin-left:auto; font:600 12px var(--mono); }
.mini-row.off { color:var(--muted); text-decoration:line-through; text-decoration-color:var(--line); }
.mini-check { width:15px; height:15px; flex:0 0 15px; border:1.5px solid var(--line); border-radius:4px; }
.mini-check.on { background:var(--deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; border-color:var(--deep); }
.illo-estimate { background:#1b1d20; }
.illo-estimate .mini-label { color:#bcbcb8; }
.mini-due { color:#fff; font:800 40px/1 var(--font); letter-spacing:-.04em; }
.mini-due small { font-size:.55em; }
.mini-bars { display:flex; align-items:flex-end; gap:8px; height:56px; margin-top:6px; }
.mini-bars i { flex:1; border-radius:4px 4px 0 0; background:#4e6c89; }
.mini-bars i.neg { background:#a37d58; }
.mini-bars i.tot { background:#e9c879; }

/* Why zakat */
.why-band { border-top:0; padding:0; }
.why-inner { padding:clamp(48px,7vw,96px) clamp(24px,6vw,80px); background:#1b1d20; color:#cfcfcb; border-radius:32px; position:relative; overflow:hidden; }
.why-inner::before { content:""; position:absolute; inset:auto -10% -40% auto; width:520px; height:520px; border-radius:50%; background:radial-gradient(circle,rgba(233,200,121,.14),transparent 65%); pointer-events:none; }
.why-inner .band-head h2 { color:#fff; }
.why-inner .band-head p { color:#cfcfcb; }
.why-inner .band-kicker { color:#e9c879; }
.why-inner a { color:#fff; }
.why-inner :focus-visible { outline-color:#fff; }
.ayah { position:relative; margin:0 0 clamp(40px,5vw,64px); padding:clamp(28px,4vw,44px) 0; border-top:1px solid #3a3c40; border-bottom:1px solid #3a3c40; }
.ayah-ar { margin:0 0 18px; color:#e9c879; font:400 clamp(28px,3.6vw,44px)/1.7 "Geeza Pro","Noto Naskh Arabic","Amiri","Traditional Arabic",serif; text-align:right; }
.ayah blockquote { margin:0; }
.ayah blockquote p { margin:0 0 12px; color:#fff; font:700 clamp(22px,2.6vw,32px)/1.3 var(--font); letter-spacing:-.02em; max-width:30ch; }
.ayah figcaption,.proof figcaption { font-size:13px; font-weight:700; }
.proof-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; position:relative; }
.proof { display:flex; flex-direction:column; margin:0; padding:24px; background:#26292d; border-radius:20px; }
.proof-tag { align-self:flex-start; margin-bottom:16px; padding:4px 10px; border-radius:999px; background:#33363b; color:#e9c879; font-size:12px; font-weight:800; }
.proof blockquote { margin:0 0 16px; flex:1; }
.proof blockquote p { margin:0; color:#ececea; font-size:15px; line-height:1.65; }

/* Basics */
.basics-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.basic { padding:28px; background:var(--card); border:1px solid var(--line); border-radius:24px; }
.basic-figure { display:block; margin-bottom:22px; color:var(--ink); font:800 clamp(38px,4vw,52px)/1 var(--font); letter-spacing:-.04em; }
.basic h3 { margin:0 0 8px; font-size:17px; }
.basic p { margin:0; font-size:15px; line-height:1.65; }
.basics-band .price-preview { margin-top:28px; }

/* Privacy */
.privacy-card { display:grid; grid-template-columns:auto minmax(0,1fr); gap:clamp(20px,4vw,48px); align-items:start; padding:clamp(28px,5vw,56px); background:var(--panel); border-radius:28px; }
.privacy-mark { display:grid; place-items:center; width:84px; height:84px; border-radius:24px; background:var(--card); color:var(--ink); }
.privacy-mark svg { width:46px; height:46px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.privacy-card h2 { font:800 clamp(28px,3vw,40px)/1.1 var(--font); letter-spacing:-.04em; margin:0 0 14px; }
.privacy-card p { max-width:60ch; font-size:16px; }
.privacy-card a { font-weight:800; }

/* Closing call to action */
.final-cta { padding:clamp(56px,8vw,104px) 0 clamp(40px,5vw,64px); text-align:center; }
.final-cta h2 { font:800 clamp(38px,5vw,64px)/1.05 var(--font); letter-spacing:-.045em; margin:0 0 14px; }
.final-cta>p { font-size:17px; margin:0 0 30px; }
.final-cta .hero-actions { justify-content:center; }
.home .independent-note { text-align:center; }

/* Step 01: the connect screen */
.connect-view { padding-top:28px; padding-bottom:64px; }
.connect-view .connected a { font-size:14px; font-weight:700; }
.calculator-page .connect-view .progress span:not(.divider) { display:flex; align-items:center; padding:14px 18px; min-height:52px; }
.calculator-page .connect-view .progress .step-now { color:var(--on-deep); background:var(--deep); }
.connect-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:28px; align-items:start; }
.connect-panel { padding:clamp(24px,4vw,44px); background:var(--card); border:1px solid var(--line); border-radius:24px; }
.connect-steps { list-style:none; margin:0; padding:0; display:grid; gap:30px; }
.connect-steps>li { display:grid; grid-template-columns:36px minmax(0,1fr); gap:16px; }
.connect-steps>li>span { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--panel); color:var(--ink); font:600 14px var(--mono); }
.connect-steps strong { display:block; font-size:18px; margin:4px 0 6px; }
.connect-steps p { margin:0; font-size:15px; }
.connect-steps .connect-form { display:grid; gap:10px; margin-top:12px; }
.connect-steps .connect-form label { font-size:13px; font-weight:700; color:var(--muted); }
.connect-steps .connect-form button { justify-self:start; width:auto; min-height:50px; padding:12px 26px; }
.connect-steps #connectStatus { margin:0; font-size:14px; }
.connect-steps #connectStatus:empty { display:none; }
.connect-aside { padding:28px; background:var(--panel); border-radius:20px; }
.connect-aside h2 { font-size:18px; }
.connect-aside ul { margin:0 0 16px; padding-left:18px; font-size:14px; }
.connect-aside li { margin-bottom:6px; }
.connect-aside>a { font-size:14px; font-weight:700; }
.aside-sample { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.aside-sample p { margin:0 0 10px; font-size:14px; font-weight:700; color:var(--ink); }
.aside-sample button { width:100%; }

@media(max-width:1000px) {
  .hero { grid-template-columns:1fr; }
  .hero .workspace { transform:none; }
  .flow-illo { grid-template-columns:1fr; gap:0; }
  .flow-lines { display:none; }
  .flow-result { margin-top:16px; }
  .step-cards,.proof-grid,.basics-grid { grid-template-columns:1fr; }
  .step-illo { height:170px; }
  .connect-layout { grid-template-columns:1fr; }
}
@media(max-width:760px) {
  .hero { padding-top:36px; }
  .hero-copy h1 { font-size:clamp(45px,12vw,64px); }
  .hero-actions .button,.hero-actions button { flex:1 1 auto; }
  .account-tiles li { grid-template-columns:38px minmax(0,1fr) auto; gap:10px; padding:10px 14px 10px 10px; }
  .tile-icon { width:38px; height:38px; }
  .why-inner { border-radius:22px; }
  .privacy-card { grid-template-columns:1fr; }
  .privacy-mark { width:64px; height:64px; border-radius:18px; }
  .calculator-page .connect-view .progress span:not(.divider) { flex:1 1 auto; padding:10px; }
}
@media(prefers-reduced-motion:reduce) {
  .hero .workspace { transform:none; }
}
@media(prefers-color-scheme:dark) {
  .why-inner,.flow-result { box-shadow:inset 0 0 0 1px #3a3c40; }
}

/* Connect screen: which service the balances come from */
.service-choice { margin:0 0 30px; padding:0 0 26px; border:0; border-bottom:1px solid var(--line); }
.service-choice legend { padding:0; margin-bottom:12px; color:var(--ink); font-size:15px; font-weight:800; }
.service-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-width:420px; }
.service-opt { position:relative; display:flex; }
.service-opt input { position:absolute; opacity:0; pointer-events:none; }
.service-opt span { flex:1; display:flex; align-items:center; justify-content:center; min-height:52px; padding:10px 16px; border:1px solid var(--line); border-radius:14px; background:var(--bg); color:var(--text); font-weight:800; cursor:pointer; transition:border-color .15s,background .15s,color .15s; }
.service-opt span:hover { border-color:var(--muted); }
.service-opt input:checked+span { border-color:var(--deep); background:var(--deep); color:var(--on-deep); }
.service-opt input:focus-visible+span { outline:2px solid var(--deep); outline-offset:3px; }

/* Privacy policy */
.policy { max-width:760px; padding-bottom:64px; }
.policy section { padding:28px 0; border-top:1px solid var(--line); }
.policy h2 { font-size:22px; }
.policy ul { padding-left:20px; margin:0 0 18px; }
.policy li { margin-bottom:10px; }
.policy code { font:13px var(--mono); }
.ynab-connect { display:grid; gap:14px; justify-items:start; }
.ynab-lead { margin:0; font-size:16px; color:var(--text); }
.ynab-connect>button { min-height:52px; padding:12px 28px; }
.ynab-connect .hero-status:empty { display:none; }
.ynab-facts { justify-self:stretch; list-style:none; margin:10px 0 0; padding:18px 0 0; border-top:1px solid var(--line); display:grid; gap:8px; font-size:14px; }
.aside-links { margin:0; font-size:14px; font-weight:700; }

/* ---------------------------------------------------------------------------
   Warm ledger: a paper ground, gold and silver as the two metals, ruled figures.
   This block is last, so its tokens replace the neutral greys above.
   --------------------------------------------------------------------------- */
@font-face {
  font-family:'Mizan Arabic';
  src:url('fonts/arabic.woff2') format('woff2');
  font-display:swap;
  unicode-range:U+0600-06FF
}
:root {
  --bg:#f3eee3; --card:#fffcf5; --panel:#e9e2d3; --ink:#1d1a16; --text:#46413a; --muted:#6b6456; --line:#d8cfbc;
  --deep:#1d1a16; --hover:#46413a; --on-deep:#fffcf5; --accent:#835d1c; --warn-bg:#f8efd8; --warn-ink:#6f5215;
  --inkwell:#1e1b17; --inkwell-2:#2a2621; --inkwell-line:#4a443b; --on-inkwell:#fbf7ee; --on-inkwell-soft:#d8d1c3;
  --gold:#e3c178; --silver:#c5ccd3; --gold-fill:#c79a3e; --silver-fill:#aab3bc;
  --paper:#fbf6e9; --paper-line:#dcd2bc; --paper-ink:#1d1a16; --paper-soft:#5a5448;
}
@media(prefers-color-scheme:dark) {
  :root {
    --bg:#191714; --card:#24211d; --panel:#312d27; --ink:#f8f4eb; --text:#e1dcd1; --muted:#beb7a9; --line:#4d483f;
    --deep:#f5f0e6; --hover:#d6d0c3; --on-deep:#1c1a17; --accent:#dcc391; --warn-bg:#352e1e; --warn-ink:#ead7a6;
    --gold-fill:#e3c178; --silver-fill:#c5ccd3;
  }
}
::selection { background:color-mix(in srgb,var(--gold-fill) 38%,transparent); color:var(--ink); }
input,textarea { caret-color:var(--accent); }
a { text-underline-offset:.18em; }
table,.num,.equation-line strong,.account-tiles strong { font-variant-numeric:tabular-nums; }

/* Wordmark: the name in both scripts */
.brand-ar { margin-left:.24em; color:var(--accent); font:400 1em/1 'Mizan Arabic',serif; letter-spacing:0; }

/* Hero: the example is a page from a ledger */
.hero-copy h1 { max-width:13ch; font-size:clamp(44px,5.4vw,72px); text-wrap:balance; }
.hero-lead { max-width:42ch; }
.band-head h2,.final-cta h2,.privacy-card h2 { text-wrap:balance; }
.workspace,.hero .workspace { background:var(--paper); color:var(--paper-ink); border:1px solid var(--paper-line); box-shadow:0 34px 60px -40px rgba(70,50,15,.45); }
.workspace-heading { border-bottom:2px solid var(--paper-ink); padding-bottom:18px; }
.workspace-heading h2,.equation-total,.equation-line strong { color:var(--paper-ink); }
.workspace-heading span,.workspace-note,.equation-total small,.equation-line>span small { color:var(--paper-soft); }
.equation-line { color:var(--paper-ink); border-color:var(--paper-line); }
.equation-line:nth-last-child(2) { border-bottom:0; }
.equation-total { margin-top:4px; padding-top:20px; border-top:3px double var(--paper-ink); }

/* Dark surfaces share one warm charcoal */
.flow-result,.illo-estimate,.why-inner,.calculator-page .estimate-layout>.result { background:var(--inkwell); }
.flow-result { color:var(--on-inkwell-soft); border-radius:20px; }
.flow-illo { border-radius:24px; }
.result-mark,.why-inner .proof-tag { color:var(--gold); }
.flow-result strong { color:var(--on-inkwell); }
.flow-result-zakat { border-color:var(--inkwell-line); }
.flow-result-zakat b { color:var(--gold); font:800 1em var(--font); font-variant-numeric:tabular-nums; }
.mini-bars i.tot { background:var(--gold); }
.why-inner { color:var(--on-inkwell-soft); border-radius:24px; }
.why-inner::before { background:radial-gradient(circle,color-mix(in srgb,var(--gold) 16%,transparent),transparent 65%); }
.why-inner .band-head h2,.ayah blockquote p { color:var(--on-inkwell); }
.why-inner .band-head p { color:var(--on-inkwell-soft); }
.ayah { border-color:var(--inkwell-line); }
.ayah-ar { color:var(--gold); font-family:'Mizan Arabic',"Geeza Pro","Noto Naskh Arabic",serif; line-height:1.9; }
/* The verse, its translation and its reference sit centred as one block. */
.ayah,.ayah-ar { text-align:center; }
.ayah blockquote p { margin-inline:auto; }
.proof-grid { gap:clamp(20px,3vw,40px); }
.proof { padding:20px 0 0; background:none; border-top:1px solid var(--inkwell-line); border-radius:0; }
.proof-tag { margin-bottom:12px; padding:0; background:none; font-size:13px; }
.proof blockquote p { color:var(--on-inkwell); }
.calculator-page .result-breakdown,.calculator-page .result-context { border-color:var(--inkwell-line); }
@media(prefers-color-scheme:dark) {
  .why-inner,.flow-result,.calculator-page .estimate-layout>.result { box-shadow:inset 0 0 0 1px var(--inkwell-line); }
}

/* The basics, drawn: one fortieth, the two weights to scale, twelve moons */
.basics-ledger { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:2px solid var(--ink); border-bottom:1px solid var(--line); }
.basics-ledger .basic { padding:30px clamp(18px,2.6vw,34px) 34px; background:none; border:0; border-left:1px solid var(--line); border-radius:0; }
.basics-ledger .basic:first-child { padding-left:0; border-left:0; }
.basic-art { display:block; width:208px; max-width:100%; height:128px; margin-bottom:28px; }
.basics-ledger h3 { margin:0 0 8px; font-size:20px; letter-spacing:-.02em; }
.basics-ledger p { margin:0; font-size:15px; line-height:1.65; }
.basics-ledger .basic-today { margin-top:12px; color:var(--ink); font-weight:700; font-variant-numeric:tabular-nums; }
.basic-today:empty { display:none; }
.basic-art .cell { fill:var(--line); }
.basic-art .cell.on,.basic-art .disc-gold { fill:var(--gold-fill); }
.basic-art .disc-silver { fill:var(--silver-fill); }
.basic-art { color:var(--ink); }
.basic-art text { font:700 12px var(--font); }
.basic-art .disc-label { fill:var(--ink); }
.basic-art .disc-on { fill:#1d1a16; }

/* The estimate: one figure, then a proper ending */
.calculator-page .result .due { font:800 clamp(46px,6.4vw,80px)/1.02 var(--font); letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.calculator-page .result .due.incomplete { font-size:clamp(32px,4vw,48px); }
.method-content .reset-row { margin-top:22px; padding-top:20px; }
.estimate-close { max-width:850px; margin-top:clamp(40px,6vw,72px); padding-top:clamp(28px,4vw,44px); border-top:3px double var(--ink); }
.estimate-close h2 { margin:0 0 12px; font:800 clamp(28px,3vw,40px)/1.1 var(--font); letter-spacing:-.04em; }
.estimate-close>p { max-width:58ch; margin:0; font-size:17px; }
.close-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px 16px; margin-top:24px; }
.close-actions button { min-height:50px; padding:12px 24px; }
.close-actions a { margin-left:6px; font-weight:800; }
.estimate-close #copyStatus { min-height:1.6em; margin:12px 0 0; }

@media(max-width:1000px) {
  .basics-ledger { grid-template-columns:1fr; }
  .basics-ledger .basic,.basics-ledger .basic:first-child { padding:26px 0 28px; border-left:0; border-top:1px solid var(--line); }
  .basic-art { width:156px; height:96px; margin-bottom:20px; }
  .basics-ledger .basic:first-child { border-top:0; }
}
@media(max-width:760px) {
  .hero-copy h1 { max-width:none; font-size:clamp(40px,11vw,56px); }
  .close-actions button { flex:1 1 auto; }
  .close-actions a { flex:1 0 100%; margin:4px 0 0; }
}

/* Print: the estimate and its working, without the controls */
@media print {
  :root { --bg:#fff; --card:#fff; --panel:#fff; --ink:#000; --text:#111; --muted:#444; --line:#bbb; }
  .top,.foot,.skip-link,.progress,.connected,.view-actions,.close-actions,.reset-row,#copyStatus,#historyCursor,.chart-help,.warn { display:none!important; }
  .calculator-page .estimate-layout>.result { background:#fff; color:#000; box-shadow:none; border:2px solid #000; }
  .calculator-page .result *,.calculator-page .result .due { color:#000!important; }
  .estimate-close { break-inside:avoid; }
}
