/* plan.gravitatech.com: approved look (Project Director, 30 Oct 2026, "Approve the look"), from docs/plan-app/samples/plan.css,
   plus the parts the six tools need. Tokens follow the Gravita design system (GravitaTech_DemoSite/docs/design-system.md).
   Builders do not edit this file; they ask for changes in their report. */
@font-face { font-family: "Carlito"; src: url("fonts/carlito-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Carlito"; src: url("fonts/carlito-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F5F7FB; --surface: #FFFFFF; --surface-2: #EEF2F8; --text: #0C1844; --muted: #46506B;
  --navy: #0C1844; --accent: #E07B00; --accent-text: #B85C00; --line: #D6DCE8;
  --ok: #1E7A4C; --warn: #A34A00; --warn-bg: #FFF4E6;
  --seg-1: #0C1844; --seg-2: #4A5B8C; --seg-3: #8FA0C8; --seg-4: #E07B00;
  /* the result panel is navy in both modes, so its bars keep one light-on-navy set (each 3:1 or more against navy) */
  --bar-1: #DCE5F7; --bar-2: #9DB3E3; --bar-3: #5E78B8; --bar-4: #E07B00;
  --fs-0: 15px; --fs-1: 18px; --fs-2: 22.5px; --fs-3: 28px; --fs-4: 35px; --fs-5: 44px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px;
  --radius: 10px; --radius-lg: 18px; --max: 1200px;
  --shadow: 0 2px 0 rgba(12,24,68,.04), 0 8px 24px -12px rgba(12,24,68,.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1030; --surface: #111A42; --surface-2: #16204D; --text: #EEF1FA; --muted: #B4BED8;
    --navy: #060B24; --accent-text: #F2A54A; --line: #27326A;
    --ok: #6FD3A0; --warn: #F2A54A; --warn-bg: #2A2240;
    --seg-1: #A9C2F0; --seg-2: #6F86BF; --seg-3: #3E4F86; --seg-4: #E07B00;
    --shadow: 0 2px 0 rgba(0,0,0,.2), 0 8px 24px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1030; --surface: #111A42; --surface-2: #16204D; --text: #EEF1FA; --muted: #B4BED8;
  --navy: #060B24; --accent-text: #F2A54A; --line: #27326A;
  --ok: #6FD3A0; --warn: #F2A54A; --warn-bg: #2A2240;
  --seg-1: #A9C2F0; --seg-2: #6F86BF; --seg-3: #3E4F86; --seg-4: #E07B00;
  --shadow: 0 2px 0 rgba(0,0,0,.2), 0 8px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* Two languages in one page: only the active one shows */
html[lang="id"] [data-l="en"], html[lang="en"] [data-l="id"] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-1)/1.55 "Carlito", Calibri, "Segoe UI", Arial, sans-serif; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: var(--fs-5); }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-2); }
p { margin: 0; }
a { color: var(--accent-text); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s3); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Draft notice until the Project Director approves the texts */
.sample-note { background: var(--surface-2); color: var(--muted); font-size: var(--fs-0); text-align: center; padding: 6px var(--s2); border-bottom: 1px solid var(--line); }

/* Header: the Gravita logo always at the top left, 58 px high (54 on phones). Never anywhere else. */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s3); min-height: 82px; }
.logo { display: block; flex: none; }
.logo img { height: 58px; width: auto; display: block; }
.logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo .logo-light { display: none; } :root:not([data-theme="light"]) .logo .logo-dark { display: block; } }
:root[data-theme="dark"] .logo .logo-light { display: none; }
:root[data-theme="dark"] .logo .logo-dark { display: block; }
.nav { display: flex; align-items: center; gap: var(--s3); margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-0); padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }

/* Footer: text links only (the logo never goes in a footer) */
.site-footer { border-top: 1px solid var(--line); padding: var(--s4) 0 var(--s5); font-size: var(--fs-0); color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.site-footer a { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--radius); font-family: inherit; font-weight: 700; font-size: var(--fs-0); line-height: 1; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--accent); color: #0C1844; }
.btn-primary:hover { background: #F08A0A; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--text); }
.btn-small { min-height: 40px; padding: 0 14px; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Tool page */
.tool-head { padding: var(--s5) 0 var(--s4); }
.tool-head .crumb { font-size: var(--fs-0); color: var(--muted); margin-bottom: var(--s2); }
.tool-head .crumb a { color: var(--muted); }
.tool-head p.lead { font-size: var(--fs-2); color: var(--muted); max-width: 52ch; margin-top: var(--s2); line-height: 1.35; }
.privacy-line { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-0); color: var(--muted); max-width: 64ch; margin-top: var(--s3); }
.privacy-line svg { flex: none; margin-top: 3px; }

.tool { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--s5); align-items: start; padding-bottom: var(--s6); }
.inputs { display: grid; gap: var(--s4); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); }
.group legend { float: left; width: 100%; padding: 0; margin-bottom: var(--s1); font-size: var(--fs-2); font-weight: 700; }
.group .group-sub { clear: both; color: var(--muted); font-size: var(--fs-0); margin-bottom: var(--s3); }
.field + .field { margin-top: var(--s3); }
.field > label, .field > .label { display: block; font-weight: 700; }
.field .help { display: block; color: var(--muted); font-size: var(--fs-0); margin: 2px 0 var(--s1); }
.money, .unit { position: relative; }
.money > span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.unit > span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.money input, .unit input, .inp, select.inp { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: 700 var(--fs-1) "Carlito", Calibri, sans-serif; font-variant-numeric: tabular-nums; }
.money input { padding-left: 48px; }
.unit input { padding-right: 76px; }
.money input:hover, .unit input:hover, .inp:hover { border-color: var(--muted); }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.pair + .field, .field + .pair, .trio + .field, .field + .trio, .pair + .pair { margin-top: var(--s3); }
.pair .field + .field, .trio .field + .field { margin-top: 0; }

/* Choice buttons (radio group): <div class="choice" role="radiogroup"><label><input type="radio" name=".."><span>..</span></label>...</div> */
.choice { display: flex; flex-wrap: wrap; gap: var(--s1); }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label > span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-weight: 700; font-size: var(--fs-0); }
.choice label:hover > span { border-color: var(--muted); }
.result a:not(.btn) { color: #F2A54A; }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #EEF1FA; }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .choice input:checked + span { background: #A9C2F0; border-color: #A9C2F0; color: #0C1844; } }
:root[data-theme="dark"] .choice input:checked + span { background: #A9C2F0; border-color: #A9C2F0; color: #0C1844; }

/* Questions (money check): one per row, question text then choices */
.q { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 0; }
.q .q-text { font-weight: 700; margin-bottom: var(--s1); }

/* Repeating rows (months, debts, goals) */
.rows { display: grid; gap: var(--s3); }
.row-item { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); background: var(--bg); }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.row-head .row-title { font-weight: 700; }
.row-remove { background: none; border: 0; color: var(--accent-text); font: 700 var(--fs-0) "Carlito", Calibri, sans-serif; cursor: pointer; min-height: 40px; padding: 0 6px; }
.add-row { width: 100%; min-height: 52px; border: 2px dashed var(--line); border-radius: var(--radius); background: transparent; color: var(--text); font: 700 var(--fs-0) "Carlito", Calibri, sans-serif; cursor: pointer; }
.add-row:hover { border-color: var(--muted); }
.month-table { width: 100%; border-collapse: collapse; }
.month-table th { text-align: left; font-size: var(--fs-0); color: var(--muted); font-weight: 700; padding: 0 var(--s1) var(--s1) 0; }
.month-table td { padding: 0 var(--s1) var(--s1) 0; vertical-align: middle; }
.month-table td:last-child, .month-table th:last-child { padding-right: 0; }
.month-table .money input { min-height: 46px; }

/* Result panel (navy in both modes) */
.result { position: sticky; top: var(--s3); background: var(--navy); color: #EEF1FA; border-radius: var(--radius-lg); padding: var(--s4); box-shadow: var(--shadow); border: 1px solid transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .result { border-color: var(--line); } }
:root[data-theme="dark"] .result { border-color: var(--line); }
.result .label { font-size: var(--fs-0); color: #B4BED8; font-weight: 700; }
.result .big { font-size: 52px; font-weight: 700; line-height: 1.05; margin: 6px 0 4px; letter-spacing: -0.5px; }
.result .big.neg { color: #FFB866; }
.result .per-day, .result .sub { color: #B4BED8; }
.result h3 { font-size: var(--fs-1); margin: var(--s3) 0 var(--s1); color: #EEF1FA; }
.bar { display: flex; gap: 3px; height: 14px; margin: var(--s3) 0 var(--s2); }
.bar i { display: block; height: 100%; border-radius: 3px; min-width: 0; }
.bar i:first-child { border-radius: 7px 3px 3px 7px; }
.bar i:last-child { border-radius: 3px 7px 7px 3px; }
.bar i:only-child { border-radius: 7px; }
.meter { height: 12px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; margin: var(--s2) 0 var(--s1); }
.meter i { display: block; height: 100%; background: var(--bar-1); border-radius: 6px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-0); }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.legend b { width: 12px; height: 12px; border-radius: 3px; display: block; }
.legend span:last-child { font-weight: 700; color: #EEF1FA; }
.legend span { color: #C9D2EA; }
.rlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: var(--fs-0); }
.rlist li { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s2); padding: 10px 0; border-top: 1px solid rgba(255,255,255,.14); }
.rlist li:first-child { border-top: 0; }
.rlist .n { color: #EEF1FA; font-weight: 700; }
.rlist .v { color: #EEF1FA; font-weight: 700; text-align: right; white-space: nowrap; }
.rlist .s { color: #B4BED8; grid-column: 1 / -1; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid rgba(255,255,255,.14); }
.facts .v { font-size: var(--fs-3); font-weight: 700; line-height: 1.1; }
.facts .k { font-size: var(--fs-0); color: #B4BED8; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s2); }
.compare > div { border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: var(--s2); }
.compare > div.best { border-color: var(--accent); }
.compare .t { font-weight: 700; font-size: var(--fs-0); color: #EEF1FA; }
.compare .d { font-size: 14px; color: #B4BED8; margin-top: 2px; }
.compare .v { font-size: var(--fs-2); font-weight: 700; margin-top: var(--s1); }
.compare .k { font-size: 14px; color: #B4BED8; }
.alert { margin-top: var(--s3); padding: 12px 14px; border-radius: var(--radius); background: rgba(224,123,0,.16); border-left: 4px solid var(--accent); font-size: var(--fs-0); color: #FFE2BF; }
.note { margin-top: var(--s2); font-size: 14px; color: #B4BED8; }
.sim { margin-top: var(--s3); font-size: 14px; line-height: 1.45; color: #B4BED8; }
.keep { display: grid; gap: 10px; margin-top: var(--s3); }
.keep .btn { width: 100%; }
.keep .btn-secondary { color: #EEF1FA; border-color: rgba(255,255,255,.28); }
.keep .btn-secondary:hover { border-color: #EEF1FA; }
.keep .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.keep .linkish { background: none; border: 0; color: #B4BED8; font: 400 14px "Carlito", Calibri, sans-serif; text-decoration: underline; cursor: pointer; justify-self: start; padding: 4px 0; min-height: 32px; }
.keep .saved { color: #9FE3BD; font-size: 14px; min-height: 1em; }

details.how { margin-top: var(--s3); border-top: 1px solid rgba(255,255,255,.14); padding-top: var(--s2); }
details.how summary { cursor: pointer; font-weight: 700; color: #F2A54A; font-size: var(--fs-0); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 32px; }
details.how summary::-webkit-details-marker { display: none; }
details.how summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
details.how[open] summary::before { transform: rotate(45deg); }
details.how ol { margin: var(--s1) 0 0; padding-left: 20px; font-size: var(--fs-0); color: #C9D2EA; display: grid; gap: 6px; }
details.how ol b { color: #EEF1FA; }

.next { border-top: 1px solid var(--line); padding: var(--s5) 0 var(--s6); }
.next .wrap { display: grid; grid-template-columns: 1fr auto; gap: var(--s3); align-items: center; }
.next p { color: var(--muted); max-width: 56ch; margin-top: 6px; }

/* Tools hub */
.hub-head { padding: var(--s5) 0 var(--s4); }
.hub-head p.lead { font-size: var(--fs-2); color: var(--muted); max-width: 52ch; margin-top: var(--s2); line-height: 1.35; }
.tool-list { list-style: none; margin: 0 0 var(--s6); padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.tool-list li { border-bottom: 1px solid var(--line); }
.tool-list li:nth-child(odd) { border-right: 1px solid var(--line); }
.tool-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: start; padding: var(--s4) var(--s3); text-decoration: none; color: var(--text); min-height: 100%; }
.tool-list a:hover { background: var(--surface); }
.tool-list .side-tag { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.tool-list .tt { font-size: var(--fs-2); font-weight: 700; line-height: 1.2; }
.tool-list .td { color: var(--muted); font-size: var(--fs-0); margin-top: 6px; max-width: min(46ch, 100%); }
.tool-list .go { align-self: center; width: 10px; height: 10px; border-right: 2px solid var(--accent); border-top: 2px solid var(--accent); transform: rotate(45deg); }
.hub-groups { display: grid; gap: var(--s2); }
.hub-groups h2 { font-size: var(--fs-0); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: var(--s4); }

/* Phone */
.dock { display: none; }
@media (max-width: 960px) {
  .tool { grid-template-columns: 1fr; gap: var(--s4); }
  .result { position: static; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 var(--s2); }
  .site-header .wrap { min-height: 72px; gap: var(--s2); }
  .logo img { height: 54px; }
  .nav { gap: var(--s2); }
  .nav .hide-sm { display: none; }
  h1 { font-size: 35px; }
  .tool-head, .hub-head { padding: var(--s4) 0 var(--s3); }
  .tool-head p.lead, .hub-head p.lead { font-size: var(--fs-1); }
  .group { padding: var(--s3); }
  .pair, .trio { grid-template-columns: 1fr; gap: 0; }
  .pair .field + .field, .trio .field + .field { margin-top: var(--s3); }
  .result .big { font-size: 44px; }
  .facts, .compare { grid-template-columns: 1fr; }
  .facts .v { white-space: nowrap; }
  .next .wrap { grid-template-columns: 1fr; }
  .tool-list { grid-template-columns: 1fr; }
  .tool-list li:nth-child(odd) { border-right: 0; }
  .tool-list a { padding: var(--s3) 6px var(--s3) 0; }
  .dock { display: flex; position: sticky; bottom: 0; z-index: 5; align-items: center; justify-content: space-between; gap: var(--s2); background: var(--navy); color: #EEF1FA; padding: 10px var(--s2) calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.14); }
  .dock .k { font-size: 14px; color: #B4BED8; }
  .dock .v { font-size: var(--fs-2); font-weight: 700; }
  .dock a { color: #F2A54A; font-weight: 700; font-size: var(--fs-0); }
  .month-table thead { display: none; }
  .month-table, .month-table tbody, .month-table tr, .month-table td { display: block; width: 100%; }
  .month-table tr { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2); margin-bottom: var(--s2); }
  .month-table td { padding: 0 0 var(--s1); }
  .month-table td[data-th]::before { content: attr(data-th); display: block; font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
