@font-face {
  font-family:Vazirmatn;
  src:url('/assets/fonts/Vazirmatn.4e3fa217d38f.woff2') format('woff2');
  font-weight:100 900;
  font-style:normal;
  font-display:swap
}

:root {
  font-family:Vazirmatn,sans-serif;
  font-synthesis:none;
  -webkit-tap-highlight-color:transparent;
  color-scheme:light;
  --brand-purple:#551756;
  --brand-gold:#c6a56c;
  --paper:#fff;
  --base:#faf8fb;
  --ink:#321833;
  --muted:#756776;
  --accent:var(--brand-purple);
  --gold:var(--brand-gold);
  --soft:#f1e9f2;
  --gold-soft:#f8f1e5;
  --line:#e6dfe7;
  --on-brand:#f1dfe8;
  --gutter:20px
}

* { box-sizing:border-box }
html {
  background:var(--soft);
  scroll-behavior:smooth;
  scroll-padding-bottom:calc(124px + env(safe-area-inset-bottom));
  scroll-padding-block-start:calc(76px + env(safe-area-inset-top))
}
body { margin:0; color:var(--ink); font-size:14px; line-height:1.85 }
button,input,select { font:inherit }
button,a { touch-action:manipulation }
button { cursor:pointer; color:inherit; border:0 }
button:disabled { cursor:wait; opacity:.7 }
a { color:inherit; text-underline-offset:4px }
:focus { outline:none }
h1,h2,h3,p { margin:0 }
svg { display:block; flex-shrink:0 }
button svg,a svg { pointer-events:none }
[hidden] { display:none!important }

.app {
  position:relative;
  max-width:480px;
  min-height:100svh;
  margin:0 auto;
  background:var(--base);
  overflow:clip;
  padding-bottom:calc(122px + env(safe-area-inset-bottom))
}

/* The logo palette owns the masthead on every public page. */
.app-header {
  position:sticky;
  top:0;
  z-index:25;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:calc(64px + env(safe-area-inset-top));
  padding:env(safe-area-inset-top) var(--gutter) 0;
  padding-right:max(var(--gutter),env(safe-area-inset-right));
  padding-left:max(var(--gutter),env(safe-area-inset-left));
  border-bottom:1px solid var(--line);
  color:var(--brand-purple);
  background:var(--paper)
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  font-size:18px;
  font-weight:800;
  letter-spacing:normal;
  text-decoration:none
}
.brand-mark {
  width:34px;
  height:34px;
  padding:0;
  border-radius:0;
  background:transparent;
  object-fit:contain
}

.app-notices { padding-inline:var(--gutter) }
.notice {
  margin-top:16px;
  padding:12px 14px;
  border:1px solid var(--brand-gold);
  border-radius:12px;
  background:var(--gold-soft);
  font-size:12px;
  color:var(--ink)
}
.update-notice { display:flex; align-items:center; gap:12px }
.update-notice button {
  flex-shrink:0;
  min-height:44px;
  margin-inline-start:auto;
  padding:8px 12px;
  background:var(--brand-purple);
  border-radius:9px;
  color:var(--paper);
  font-size:12px;
  font-weight:650
}

/* The approved light sheet joins the form to its gold result footer. */
.calculator-area {
  margin-inline:var(--gutter);
  padding:18px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:24px
}
.calculator-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:20px
}
.calculator-header h2 { color:var(--brand-purple); font-size:20px; font-weight:750; line-height:1.5; letter-spacing:-.3px }
.calculator-header p { font-size:12px; color:var(--muted); margin-top:3px; line-height:1.8 }
.field { display:block; min-width:0 }
.field-label { display:block; color:var(--muted); font-size:12px; line-height:1.65; font-weight:600; margin-bottom:7px }
.field-input {
  display:flex;
  align-items:center;
  min-height:56px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:13px;
  transition:border-color .15s,box-shadow .15s
}
.field[data-invalid=true] .field-input { border-color:var(--brand-purple); box-shadow:inset 0 0 0 1px var(--brand-purple) }
.field-input input {
  width:100%;
  min-width:0;
  direction:ltr;
  text-align:right;
  background:transparent;
  border:0;
  padding:10px 12px;
  font-size:23px;
  font-weight:650;
  line-height:1.4;
  color:var(--brand-purple);
  font-variant-numeric:tabular-nums
}
.field-input input::placeholder { color:var(--muted); opacity:1; font-size:14px; font-weight:400 }
.field-input:has(select) { position:relative }
.field-input select { appearance:none; width:100%; min-width:0; min-height:54px; padding:10px 12px; padding-inline-end:36px; border:0; border-radius:13px; background:transparent; color:var(--brand-purple); font-size:14px }
.field-input select + svg { position:absolute; inset-inline-end:12px; width:18px; height:18px; color:var(--brand-purple); pointer-events:none }
.invoice-costs { min-width:0; margin:18px 0 0; padding:0; border:0 }
.invoice-costs legend { padding:0; color:var(--brand-purple); font-size:14px; font-weight:700 }
.invoice-costs>.field-hint { margin-bottom:12px }
.invoice-breakdown { margin:16px 0 0; padding:0; border-top:1px solid var(--line); font-variant-numeric:tabular-nums }
.invoice-breakdown>div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:9px 0; border-bottom:1px solid var(--line) }
.invoice-breakdown dt { color:var(--muted); font-size:12px }
.invoice-breakdown dd { min-width:0; margin:0; color:var(--brand-purple); font-size:13px; text-align:left; overflow-wrap:anywhere }
.field-input .unit { padding-inline-end:12px; color:var(--muted); font-size:12px; white-space:nowrap }
.field-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px }
.calculator-header+.field-row { margin-top:0 }
.field+.field,.field-row+.field { margin-top:16px }
.field-row .field { display:flex; flex-direction:column }
.field-row .field-input { margin-top:auto }
.field-row .field+.field { margin-top:0 }
.field-hint { margin-top:8px; font-size:10.5px; line-height:1.8; color:var(--muted) }
.calculate-btn {
  width:100%;
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:16px;
  padding:10px 12px;
  border-radius:12px;
  background:var(--brand-purple);
  color:var(--paper);
  font-size:15px;
  font-weight:650;
  line-height:1.8
}
.calculate-btn:active { background:var(--ink) }
[data-calculator] .calculate-btn { margin-top:18px; border-radius:14px; font-size:14px; font-weight:700 }
.result {
  margin:18px -18px -18px;
  padding:16px 18px 18px;
  min-height:142px;
  border-top:1px solid rgba(198,165,108,.35);
  border-radius:0 0 24px 24px;
  background:var(--gold-soft)
}
.result-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
  color:var(--brand-purple);
  font-size:12px;
  line-height:1.6;
  font-weight:550
}
.result [role=status] { font-size:14px; font-weight:500; line-height:1.8; overflow-wrap:anywhere }
.result-value-line { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; direction:rtl }
.result-number { display:block; max-width:100%; font-size:34px; font-weight:800; line-height:1.2; letter-spacing:-.8px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; color:var(--brand-purple) }
.result-unit { font-size:14px; font-weight:500; line-height:1.5; white-space:nowrap; color:var(--brand-purple) }
.result[data-value-size=long] .result-number { font-size:24px; letter-spacing:-.3px }
.result-context { margin-top:10px; font-size:11px; font-weight:400; line-height:1.8; color:var(--muted) }
.result[data-state=empty] .result-number { font-weight:500; opacity:.6 }
.result[data-state=invalid] { background:var(--soft); border-top-color:var(--brand-purple) }
.result[data-state=invalid] .result-context { display:none }

/* A continuous list is easier to scan than a second grid of cards. */
.reading-content { padding-inline:var(--gutter) }
.method-section { padding:22px 0; border-top:1px solid var(--line) }
.method-section h2 { margin-bottom:10px; color:var(--brand-purple); font-size:18px; font-weight:750; line-height:1.8 }
.method-section p { color:var(--muted); font-size:13px; line-height:2.1 }
.method-section p+p { margin-top:12px }
.method-section a { color:var(--brand-purple) }

.bottom-nav {
  position:fixed;
  z-index:10;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:min(100%,480px);
  display:block;
  padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  border-top:0;
  background:transparent
}
.bottom-nav a {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  min-width:0;
  min-height:56px;
  gap:3px;
  border-radius:18px;
  color:var(--on-brand);
  font-size:11px;
  font-weight:550;
  line-height:1.5;
  white-space:nowrap;
  text-decoration:none;
  transition:background-color .16s ease,color .16s ease
}
.bottom-nav a[aria-current=page] {
  color:var(--brand-purple);
  background:var(--brand-gold);
  font-weight:750
}

html.install-modal-open,html.install-modal-open body { overflow:hidden }
.install-entry { inset:16px 0; margin:auto; padding:0; width:min(calc(100% - 40px),370px); max-width:none; max-height:calc(100svh - 32px); overflow:auto; overscroll-behavior:contain; border:1px solid #9b758a; border-radius:26px; background:var(--brand-purple); color:var(--paper); font:inherit; text-align:center }
.install-entry::backdrop { background:rgba(50,24,51,.47) }
.entry-content { padding:16px 24px 26px }
.entry-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px }
.entry-app-name { font-size:15px; font-weight:650; color:#edd9b1 }
.entry-close { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0; background:transparent; color:#eddfeb; border-radius:50% }
.entry-close svg { width:22px; height:22px }
.install-entry h2 { font-size:25px; font-weight:800; letter-spacing:-.4px; line-height:1.65; color:var(--paper) }
.entry-title-line { display:block }
.entry-content>p { margin-top:8px; font-size:13px; line-height:2; color:#ecdde9 }
.entry-actions { display:flex; gap:8px; margin-top:24px }
.entry-primary,.entry-secondary { display:flex; align-items:center; justify-content:center; min-height:50px; padding:10px 16px; border-radius:14px; font-size:13px; font-weight:650; line-height:1.8; text-align:center }
.entry-primary { flex:1; padding-inline:12px; background:var(--brand-gold); color:var(--brand-purple) }
.entry-secondary { min-width:86px; border:1px solid #b49ab4; background:transparent; color:var(--paper) }
.entry-screen { display:grid; grid-template-columns:repeat(3,40px); grid-template-rows:repeat(2,40px); align-items:center; justify-content:center; gap:11px; width:164px; margin:0 auto 24px; padding:14px 0; border:1px solid #97658b; border-radius:22px; transform:rotate(-5deg) }
.entry-screen>span { width:34px; height:34px; justify-self:center; border:1px solid #b38fa8; border-radius:11px; background:#713b70 }
.entry-screen>img { width:44px; height:44px; justify-self:center; border:1px solid #d8bf95; border-radius:13px; transform:rotate(5deg) }
.install-sheet { position:fixed; inset:auto 0 0; margin:0 auto; width:min(100%,480px); max-width:480px; max-height:calc(100dvh - max(12px,env(safe-area-inset-top))); padding:0; border:1px solid var(--line); border-bottom:0; border-radius:28px 28px 0 0; background:var(--paper); color:var(--ink); font:inherit; overflow:hidden }
.install-sheet[open] { display:flex; flex-direction:column }
.install-sheet::backdrop { background:rgba(50,24,51,.48) }
.sheet-header { flex-shrink:0; display:flex; align-items:flex-start; justify-content:space-between; gap:8px; padding:22px 20px 16px }
.sheet-identity { display:flex; align-items:center; gap:10px; min-width:0 }
.sheet-identity img { flex-shrink:0; border-radius:12px }
.sheet-identity h2 { font-size:18px; line-height:1.65; font-weight:800; letter-spacing:-.4px; color:var(--brand-purple) }
.sheet-identity p { font-size:11px; line-height:1.8; color:var(--muted); margin-top:1px }
.sheet-close { display:grid; place-items:center; flex-shrink:0; width:44px; height:44px; margin-top:-5px; margin-inline-end:-6px; border-radius:50%; background:var(--base); color:var(--brand-purple) }
.sheet-close svg { width:20px; height:20px }
.sheet-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 20px 18px; scrollbar-width:thin }
.platform-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; padding:4px; border:1px solid var(--line); border-radius:14px; background:var(--base) }
.platform-tabs button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; min-width:0; padding:7px 9px; border-radius:10px; background:transparent; color:var(--muted) }
.platform-tabs strong { font-size:12px; line-height:1.5; font-weight:650 }
.platform-tabs span { font-size:10px }
.platform-tabs [aria-selected=true] { background:var(--brand-purple); color:var(--paper) }
.platform-tabs [aria-selected=true] span { color:var(--brand-gold) }
.guide-steps { padding:0; margin:22px 0 0; list-style:none }
.guide-steps li { position:relative; display:flex; align-items:flex-start; gap:14px; padding-bottom:22px }
.guide-steps li:last-child { padding-bottom:0 }
.guide-steps li:not(:last-child)::before { content:""; position:absolute; inset-inline-start:15px; top:34px; bottom:5px; width:1px; background:var(--line) }
.step-number { position:relative; z-index:1; display:grid; place-items:center; flex-shrink:0; width:32px; height:32px; border:1px solid rgba(198,165,108,.5); border-radius:50%; background:var(--gold-soft); color:var(--brand-purple); font-size:13px; font-weight:700; line-height:1 }
.step-copy { flex:1; min-width:0 }
.step-copy h3 { font-size:15px; line-height:1.8; font-weight:750; color:var(--brand-purple) }
.step-copy p { font-size:12px; line-height:1.9; margin-top:2px; color:var(--muted); overflow-wrap:anywhere }
.browser-command { display:inline-flex; align-items:center; gap:7px; max-width:100%; min-height:30px; margin-top:7px; padding:3px 8px; border-radius:7px; background:var(--base); color:var(--brand-purple); font-size:11px; line-height:1.6 }
.browser-command svg { width:17px; height:17px }
.install-help { margin-top:18px; border-top:1px solid var(--line); font-size:11px; color:var(--muted) }
.install-help summary { display:flex; align-items:center; min-height:44px; cursor:pointer; color:var(--brand-purple); font-weight:600; list-style:none }
.install-help summary::-webkit-details-marker { display:none }
.install-help summary svg { margin-inline-start:auto; width:18px; height:18px }
.install-help:not([open]) .collapse-icon,.install-help[open] .expand-icon { display:none }
.install-help p { padding-bottom:6px; line-height:1.9; overflow-wrap:anywhere }
.sheet-footer { flex-shrink:0; display:flex; gap:10px; border-top:1px solid var(--line); padding:14px 20px calc(16px + env(safe-area-inset-bottom)); background:var(--paper) }
.sheet-primary { display:flex; align-items:center; justify-content:center; flex:1; min-width:0; min-height:48px; padding:10px 14px; border-radius:13px; color:var(--paper); background:var(--brand-purple); font-size:13px; font-weight:700; line-height:1.8 }
.sheet-primary:active { background:var(--ink) }
.install-sheet[data-native-install=true] .sheet-dismiss { flex:0 0 auto; min-width:80px; font-size:12px; background:var(--soft); color:var(--brand-purple) }
.install-status { margin-bottom:14px; padding:10px 12px; border:1px solid var(--brand-gold); border-radius:10px; font-size:12px; line-height:1.9; background:var(--gold-soft); color:var(--brand-purple) }
.skip-link {
  position:fixed;
  z-index:100;
  top:-100px;
  left:50%;
  transform:translateX(-50%);
  padding:12px 20px;
  border-radius:0 0 12px 12px;
  background:var(--brand-gold);
  color:var(--brand-purple)
}
.skip-link:focus { top:env(safe-area-inset-top) }
.no-script { max-width:480px; margin:20px auto; padding:20px }

@media (max-width:359px) {
  :root { --gutter:16px }
  .calculator-area { padding:16px }
  .result { margin-inline:-16px; margin-bottom:-16px; padding-inline:16px }
  .result-number { font-size:31px }
  .install-entry { width:calc(100% - 28px) }
  .entry-content { padding-inline:20px }
  .install-entry h2 { font-size:23px }
  .entry-content>p { font-size:12px }
  .entry-actions { gap:7px }
  .entry-primary { padding-inline:9px; font-size:12px }
  .entry-secondary { padding-inline:10px; min-width:70px; font-size:12px }
  .sheet-header,.sheet-body,.sheet-footer { padding-inline:16px }
  .sheet-identity img { width:34px; height:34px }
  .sheet-identity { gap:8px }
  .sheet-identity h2 { font-size:16px }
}
@media (min-width:481px) {
  .app { box-shadow:0 0 0 1px var(--line) }
}
@media (max-height:600px) {
  .entry-content { padding-block:16px }
  .entry-header { margin-bottom:12px }
  .entry-screen { grid-template-columns:repeat(3,28px); grid-template-rows:repeat(2,28px); gap:8px; width:122px; margin-bottom:16px; padding-block:10px }
  .entry-screen>span { width:25px; height:25px; border-radius:8px }
  .entry-screen>img { width:33px; height:33px; border-radius:9px }
  .install-entry h2 { font-size:22px }
  .entry-actions { margin-top:18px }
}
@media (forced-colors:active) {
  .install-entry { border:1px solid CanvasText }
  .entry-primary,.entry-secondary { border:1px solid ButtonText }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto }
  * { transition:none!important }
}

/* Current shared shell and calculator presentation. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.brand-copy strong{display:block;font-size:18px;font-weight:800;line-height:1.5;letter-spacing:-.4px}
.brand-copy small{display:block;font-size:10.5px;font-weight:400;line-height:1.7;color:var(--muted)}
.header-update{display:flex;flex-direction:column;justify-content:center;gap:1px;flex-shrink:0;min-height:44px;text-align:left}
.header-update-label{color:var(--muted);font-size:10.5px;font-weight:450;line-height:1.5;white-space:nowrap}
.header-update-time{color:var(--brand-purple);font-size:12px;font-weight:500;line-height:1.6;white-space:nowrap;font-variant-numeric:tabular-nums}
.breadcrumbs{padding:8px var(--gutter) 0;font-size:12px;color:var(--muted)}
.breadcrumbs ol{display:flex;align-items:center;flex-wrap:wrap;gap:0 7px;margin:0;padding:0;list-style:none}
.breadcrumbs li{display:flex;align-items:center;min-width:0}
.breadcrumbs li>svg{width:12px;height:12px;margin-inline-end:7px;color:var(--brand-purple)}
.breadcrumbs a{display:inline-flex;align-items:center;min-height:44px;color:var(--brand-purple)}
.breadcrumbs [aria-current]{overflow-wrap:anywhere}
.related-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.related-links a{display:inline-flex;align-items:center;min-height:44px;padding:6px 12px;border:1px solid var(--line);border-radius:10px;color:var(--brand-purple);font-size:12px}
input,.result,[role=status]{scroll-margin-bottom:calc(124px + env(safe-area-inset-bottom))}
.bottom-nav::before{content:"";position:absolute;z-index:-1;inset:12px 0 0;background:var(--base)}
.nav-dock{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:7px;background:var(--brand-purple);border:1px solid rgba(198,165,108,.34);border-radius:26px;box-shadow:0 6px 24px rgba(85,23,86,.16)}
.bottom-nav a svg{width:23px;height:23px}
.bottom-nav a:active{background:rgba(255,255,255,.12)}
.bottom-nav a[aria-current=page]:active{background:var(--brand-gold)}
.calculator-view{padding-top:20px}
@media(max-width:359px){.brand{gap:8px}.brand-copy strong{font-size:17px}.brand-copy small{font-size:10px}.bottom-nav{padding-inline:12px}}
@media(prefers-reduced-motion:reduce){.bottom-nav a{transition:none}}
