#page {
  --ink: #193449;
  --muted: #595f62;
  --paper: #f5f7f8;
  height: calc(100dvh - var(--footer-space));
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
  color: #172127;
  font-size: 1rem;
  line-height: 1.55;
}
#page button, #page input, #page textarea { font: inherit; }
#page button, #page a, #page input { touch-action: manipulation; }
#page button:disabled { opacity: .45; cursor: default; }
#page .decision-shell { max-width: 540px; height: 100%; margin: auto; display: flex; flex-direction: column; }
#page .decision-header { display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; padding: max(14px, env(safe-area-inset-top)) 20px 10px; border-bottom: 1px solid #e4e5df; background: var(--paper); }
#page .wordmark { font-family: Montserrat, sans-serif; font-size: 1.15rem; font-weight: 500; letter-spacing: -.06em; }
#page .header-links { display: flex; gap: 14px; }
#page .text-button { background: none; border: 0; padding: 5px 0; font-size: .875rem; color: var(--ink); text-decoration: none; }
#page .decision-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; scrollbar-width: thin; }
#page .decision-action { padding: 10px 20px 13px; background: var(--paper); border-top: 1px solid #e4e5df; flex-shrink: 0; }
#page .primary, #page .secondary { display: block; width: 100%; min-height: 48px; border-radius: 12px; padding: 10px 16px; font-weight: 600; border: 1px solid var(--ink); }
#page .primary { color: #fff; background: var(--ink); }
#page .secondary { background: transparent; color: var(--ink); margin-top: 9px; }
#page .eyebrow { color: var(--muted); margin: 0 0 5px; font-size: .875rem; }
#page h1 { font-size: 1.45rem; line-height: 1.4; margin: 5px 0 12px; font-weight: 600; letter-spacing: -.02em; }
#page h2 { font-size: 1.125rem; line-height: 1.5; margin: 0 0 10px; font-weight: 600; }
#page h3 { font-size: 1rem; margin: 14px 0 7px; font-weight: 600; }
#page p { margin: 0 0 12px; }
#page .intro { padding-top: 2px; }
#page .intro .lede { max-width: 30ch; color: #39464d; }
#page .story-emblem { width: 54px; height: 54px; border-radius: 17px; border: 1px solid #cbd3d4; display: grid; place-items: center; margin: 0 0 23px; color: var(--ink); font-family: Montserrat,sans-serif; font-size: 1.45rem; background: #eef1ec; }
#page .small { font-size: .875rem; color: var(--muted); }
#page .fine { font-size: .8125rem; color: var(--muted); }
#page .notice { background: #eef1ec; border: 1px solid #dce3da; border-radius: 12px; padding: 10px 12px; font-size: .875rem; margin: 14px 0; }
#page .field { display: block; margin: 21px 0 7px; }
#page .name-field, #page .reason-field { width: 100%; background: #fff; color: #172127; border: 1px solid #c8cfce; border-radius: 11px; padding: 11px 12px; font-size: 1rem; }
#page .reason-field { min-height: 80px; resize: vertical; }
#page .consent { display: flex; gap: 10px; align-items: flex-start; margin: 17px 0 8px; font-size: .875rem; }
#page .consent input { width: 19px; height: 19px; flex: 0 0 19px; margin: 5px 0 0; accent-color: var(--ink); }
#page .round-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .8125rem; color: var(--muted); margin-bottom: 13px; }
#page .balance { padding: 4px 0 12px; }
#page .balance-number { font-family: Montserrat,sans-serif; font-size: clamp(1.8rem,7vw,2.25rem); font-weight: 600; line-height: 1.4; letter-spacing: -.06em; }
#page .currency { font-family: Tajawal,sans-serif; font-size: .875rem; font-weight: 400; margin-inline-start: 8px; letter-spacing: 0; }
#page .stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-block: 1px solid #dfE3de; padding: 12px 0; margin: 0 0 18px; }
#page .stat { padding-inline: 8px; border-inline-start: 1px solid #dfe3de; }
#page .stat:first-child { padding-inline-start: 0; border: 0; }
#page .stat span { display: block; color: var(--muted); font-size: .8125rem; }
#page .stat bdi { display: block; font-family: Montserrat,sans-serif; font-weight: 500; font-size: .9rem; }
#page .market { background: #fff; border: 1px solid #e2e5df; border-radius: 15px; padding: 14px; margin-bottom: 18px; }
#page .market-heading { display: flex; justify-content: space-between; align-items: flex-start; }
#page .market-heading h2 { font-size: 1rem; margin: 0; }
#page .quote { font-family: Montserrat,sans-serif; font-size: 1.25rem; font-weight: 600; }
#page .down { color: #9e4d42; }
#page .up { color: #267257; }
#page .chart { display: block; width: 100%; height: 82px; margin: 10px 0 3px; }
#page .chart-labels, #page .source-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#page .chart-labels { color: var(--muted); font-size: .8125rem; }
#page .source-row { border-top: 1px solid #eee; margin-top: 10px; padding-top: 5px; }
#page .scenario { margin-bottom: 14px; }
#page .scenario p { color: #39464d; font-size: .9375rem; }
#page .goal { font-size: .875rem; border-inline-start: 3px solid #a9b8aa; padding-inline-start: 10px; margin-bottom: 20px; }
#page fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#page legend { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; }
#page .choice { position: relative; display: flex; align-items: center; gap: 12px; border: 1px solid #d3dad7; border-radius: 13px; padding: 11px 12px; background: #fff; margin-bottom: 8px; cursor: pointer; }
#page .choice:has(input:checked) { border-color: var(--ink); background: #edf2f4; box-shadow: inset 0 0 0 1px var(--ink); }
#page .choice input { margin: 0; width: 19px; height: 19px; accent-color: var(--ink); flex: 0 0 19px; }
#page .choice strong { display: block; font-size: 1rem; font-weight: 600; }
#page .choice small { display: block; font-size: .875rem; color: var(--muted); }
#page .impact { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; font-size: .875rem; padding: 11px 0 4px; }
#page .optional { margin-top: 18px; }
#page .optional summary { cursor: pointer; color: var(--ink); font-size: .875rem; }
#page .confidence { display: flex; gap: 8px; margin: 8px 0 14px; }
#page .confidence label { border: 1px solid #d3dad7; border-radius: 9px; padding: 6px 10px; font-size: .875rem; background: white; }
#page .confidence label:has(input:checked) { border-color: var(--ink); background: #edf2f4; }
#page .confidence input { accent-color: var(--ink); }
#page .review-box, #page .result-box { background: #fff; border: 1px solid #dce3de; padding: 17px; border-radius: 16px; margin: 17px 0; }
#page .rows { margin: 0; }
#page .rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eceee9; }
#page .rows > div:last-child { border: 0; }
#page .rows dt { color: var(--muted); font-size: .875rem; }
#page .rows dd { margin: 0; font-size: .9375rem; text-align: left; }
#page .waiting { text-align: center; padding-top: 24px; }
#page .waiting .story-emblem { margin-inline: auto; }
#page .timer { font-family: Montserrat,sans-serif; font-size: 2.6rem; color: var(--ink); margin: 12px 0; font-variant-numeric: tabular-nums; }
#page .status-message { min-height: 0; font-size: .875rem; color: var(--ink); }
#page .comparison { width: 100%; border-collapse: collapse; font-size: .875rem; margin: 12px 0; }
#page .comparison th, #page .comparison td { text-align: right; border-bottom: 1px solid #e0e4df; padding: 10px 5px; }
#page .comparison th { color: var(--muted); font-weight: 400; }
#page .comparison tr.selected { background: #edf2f4; }
#page .return-note { margin-top: 15px; }
#page .sheet {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  width: min(100%, 540px);
  max-width: 100%;
  max-height: 82dvh;
  margin: 0 auto;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  border: 0;
  border-radius: 24px 24px 0 0;
  background: #fff;
  color: #172127;
  overflow: hidden;
  outline: none;
  box-shadow: 0 -10px 50px #10283318;
}
#page .sheet[open] { display: flex; flex-direction: column; }
#page .sheet::backdrop { background: #14293566; backdrop-filter: blur(4px); }
#page .sheet-grip { width: 34px; height: 4px; border-radius: 5px; margin: 9px auto 2px; background: #d5dade; flex-shrink: 0; }
#page .sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 12px; background: #fff; border-bottom: 1px solid #edf0f1; flex-shrink: 0; }
#page .sheet-header h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
#page .sheet-close {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 50%;
  background: #f0f3f5;
  color: #485a65;
  outline: none;
  box-shadow: none;
  display: grid;
  place-items: center;
  font-family: Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}
#page .sheet-close:focus-visible { outline: 2px solid #7a99ac; outline-offset: 3px; }
#page .sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 17px 20px 22px; min-height: 0; font-size: .9375rem; }
#page .sheet-body a { color: var(--ink); overflow-wrap: anywhere; }
#page .sheet-body p { margin: 0 0 12px; }
#page .sheet-lede { font-weight: 600; color: var(--ink); }
#page .sheet-feature { padding: 10px 0; border-bottom: 1px solid #edf0f1; }
#page .sheet-feature h3 { margin: 0 0 3px; font-size: .9375rem; }
#page .sheet-feature p { margin: 0; color: #56636b; font-size: .875rem; }
#page .privacy-state { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 12px; background: #f3f6f7; margin: 15px 0; font-size: .875rem; }
#page .privacy-state strong { color: var(--ink); font-weight: 500; }
#page .delete-button { width: 100%; border: 0; border-radius: 11px; color: #9b4d47; background: #fbf5f4; padding: 10px; margin: 10px 0 14px; font-size: .875rem; }
#page .empty-state { padding: 20px 0; color: var(--muted); }
#page .header-history { background: #fff; border: 1px solid #e5eaed; border-radius: 10px; color: #344f60; padding: 5px 12px; font-size: .875rem; min-height: 34px; }
#page .header-info { width: 34px; height: 34px; padding: 0; border: 1px solid #e5eaed; border-radius: 50%; color: #344f60; background: #fff; font-size: 1rem; }
#page .header-links { gap: 8px; align-items: center; }
#page .intro-caption { display: flex; justify-content: space-between; color: #5b6c75; font-size: .8125rem; margin: 0 0 8px; }
#page .intro h1 { font-size: 1.6rem; margin: 0 0 5px; }
#page .intro .lede { max-width: none; font-size: .9375rem; margin-bottom: 16px; }
#page .company-preview { border-radius: 18px; background: #193449; color: white; padding: 15px 17px; margin-bottom: 19px; }
#page .company-preview-head { display: flex; align-items: center; justify-content: space-between; font-size: .875rem; margin-bottom: 14px; }
#page .preview-tag { font-size: .75rem; padding: 2px 8px; border-radius: 7px; background: #ffffff14; color: #e3edf1; }
#page .company-preview-label { display: block; color: #c8d8e1; font-size: .8125rem; }
#page .company-preview-amount { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 13px; }
#page .company-preview-amount bdi { font-size: 1.85rem; font-weight: 500; letter-spacing: -.05em; }
#page .company-preview-amount > span { font-size: .875rem; color: #d4e1e8; }
#page .company-preview-foot { display: flex; gap: 18px; padding-top: 9px; border-top: 1px solid #ffffff24; color: #d4e1e8; font-size: .8125rem; }
#page .entry-form { background: #fff; padding: 14px; border-radius: 16px; border: 1px solid #e4e9ec; }
#page .entry-form .field { margin: 0 0 8px; font-size: .9375rem; }
#page .name-field { border-color: #e0e6e9; background: #f8fafb; border-radius: 10px; padding: 11px; }
#page .name-field::placeholder { color: #71808a; }
#page .name-field:focus { outline: 2px solid #7a99ac; outline-offset: 1px; border-color: transparent; }
#page .entry-form .fine { margin: 6px 0 0; }
#page .entry-form .consent { margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid #edf0f1; line-height: 1.65; }
#page .entry-privacy { display: flex; align-items: center; justify-content: space-between; padding-inline-start: 29px; font-size: .8125rem; color: #626f77; }
#page .entry-privacy .text-button { font-size: .8125rem; padding: 0; }
#page .local-preview-note { color: #64727a; text-align: center; font-size: .8125rem; margin: 12px 0 0; }
#page .decision-action { background: #fff; border-top-color: #e9edf0; }
#page .primary { min-height: 46px; font-size: .9375rem; border-radius: 12px; }
#page .primary:disabled { opacity: 1; color: #6a7c87; background: #e4eaee; border-color: #e4eaee; }
#page .secondary { min-height: 44px; font-size: .9375rem; background: #edf2f5; color: #244759; border: 0; border-radius: 12px; }
#page .waiting { padding-top: 14px; }
#page .waiting .story-emblem { width: 44px; height: 44px; border-radius: 50%; margin-bottom: 14px; }
@media (max-width:350px) { #page .decision-scroll { padding-inline: 14px; } #page .decision-header, #page .decision-action { padding-inline: 14px; } #page .stat bdi { font-size: .8rem; } }
@media (prefers-reduced-motion:no-preference) { #page .decision-scroll > section { animation: decision-enter .22s ease-out; } @keyframes decision-enter { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } } }
#page .market-details { margin: 12px 0 18px; border: 1px solid #e1e7eb; border-radius: 12px; background: #fff; }
#page .market-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; color: #294a5c; cursor: pointer; font-size: .875rem; list-style: none; }
#page .market-details > summary::-webkit-details-marker { display: none; }
#page .market-details > summary bdi { font-size: .8125rem; }
#page .market-details[open] > summary { border-bottom: 1px solid #edf0f1; }
#page .market-details .market { margin: 0; border: 0; }
#page .optional { padding: 10px 12px; border: 1px solid #e1e7eb; background: #fff; border-radius: 12px; }
