/* Eranos: one column, phone first. Argo tokens, three themes (Sailcloth, Night watch, Canopus). */
@font-face{font-family:"Newsreader";src:url(fonts/newsreader-variable.woff2) format("woff2");font-weight:200 800;font-style:normal;font-display:swap}
@font-face{font-family:"Marcellus";src:url(fonts/marcellus-400.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Rufiyaa Sign";src:url(fonts/rufiyaa-sign.woff2) format("woff2");unicode-range:U+20C2;font-display:block}
:root{
  --oxblood:#8c363f; --sailcloth:#f0ede6;
  --ground:#f0ede6; --raised:#f7f5f0; --sunk:#e6e0d4; --wash:#ebddd8;
  --ink:#3b1a1e; --soft:#6b4447; --accent:#8c363f; --rule:#d8ccbf; --rule-strong:#a0807c;
  --fill:#8c363f; --on-fill:#f0ede6; --focus:#5e2329; --bad:#8c363f; --good:#3d6b4a; --tint:rgba(140,54,63,.14);
  --show-ox:block; --show-cr:none;
  --display:"Marcellus","Trajan Pro","Times New Roman",serif;
  --text:"Rufiyaa Sign","Newsreader",Georgia,"Times New Roman",serif;
}
@media (prefers-color-scheme:dark){:root:not([data-app]){
  --ground:#2a1416; --raised:#341b1e; --sunk:#211012; --wash:#43242a;
  --ink:#f0ede6; --soft:#cdb9b4; --accent:#e09a9f; --rule:#4a2c30; --rule-strong:#8a6266;
  --fill:#f0ede6; --on-fill:#5e2329; --focus:#f0ede6; --bad:#e09a9f; --good:#8fc19c; --tint:rgba(224,154,159,.2);
  --show-ox:none; --show-cr:block; color-scheme:dark}}
:root[data-app="sailcloth"]{color-scheme:light}
:root[data-app="night"]{
  --ground:#2a1416; --raised:#341b1e; --sunk:#211012; --wash:#43242a;
  --ink:#f0ede6; --soft:#cdb9b4; --accent:#e09a9f; --rule:#4a2c30; --rule-strong:#8a6266;
  --fill:#f0ede6; --on-fill:#5e2329; --focus:#f0ede6; --bad:#e09a9f; --good:#8fc19c; --tint:rgba(224,154,159,.2);
  --show-ox:none; --show-cr:block; color-scheme:dark}
:root[data-app="canopus"]{
  --ground:#000; --raised:#0f0809; --sunk:#000; --wash:#2a1416;
  --ink:#f0ede6; --soft:#c4b2ae; --accent:#e09a9f; --rule:#2b1c1e; --rule-strong:#7a5f63;
  --fill:#f0ede6; --on-fill:#5e2329; --focus:#f0ede6; --bad:#e09a9f; --good:#8fc19c; --tint:rgba(240,237,230,.13);
  --show-ox:none; --show-cr:block; color-scheme:dark}

*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--text);font-size:17px;line-height:26px;font-variant-numeric:lining-nums tabular-nums;font-feature-settings:"lnum" 1,"tnum" 1;min-height:100vh;min-height:100dvh;overflow-x:hidden}
button,select,input,textarea{font:inherit;color:inherit;font-variant-numeric:lining-nums tabular-nums;font-feature-settings:"lnum" 1,"tnum" 1}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#sky{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;display:none;z-index:0}
:root[data-app="canopus"] #sky{display:block}
.app{position:relative;z-index:1;max-width:680px;margin:0 auto;padding:0 16px calc(24px + env(safe-area-inset-bottom));min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}

/* header */
.bar{display:flex;align-items:center;justify-content:space-between;padding:calc(10px + env(safe-area-inset-top)) 0 10px;gap:12px}
.brand{margin:0;line-height:0}
.logo{height:54px;width:auto}
.logo.ox{display:var(--show-ox)} .logo.cr{display:var(--show-cr)}
@keyframes swell{0%,100%{transform:translate3d(0,0,0) rotate(0)}50%{transform:translate3d(0,-2px,0) rotate(-.8deg)}}
.logo{transform-origin:18% 70%;animation:swell 7s ease-in-out infinite}
.bar-end{display:flex;gap:8px;align-items:center}
.icon-btn{width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--rule);background:var(--raised);border-radius:999px;cursor:pointer;color:var(--ink);flex:none;padding:0}
.icon-btn:hover{border-color:var(--rule-strong)}
.icon-btn svg{display:block}

/* screens and cards */
.main{flex:1;display:flex;flex-direction:column;gap:14px;padding-bottom:12px}
.screen{display:flex;flex-direction:column;gap:14px}
.card{background:var(--raised);border:1px solid var(--rule);border-radius:12px;padding:18px 16px;display:flex;flex-direction:column;gap:14px;min-width:0}
.card h2,.head-row h2{font:400 26px/32px var(--display);margin:0;color:var(--accent);letter-spacing:.02em}
.lede{margin:0;color:var(--soft)}
.fine{margin:0;font-size:14px;line-height:20px;color:var(--soft)}
.head-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.start{align-items:center;text-align:center;padding:26px 16px 20px}
.start-loaf{border-radius:16px;display:block}
.start .lede{max-width:34ch}
.row-actions{display:flex;gap:10px;align-items:stretch}
.row-actions .btn{flex:1 1 0;min-width:0}
.row-actions.one{justify-content:center}
.start .row-actions{width:100%}

/* buttons: the main one sits on the right, under a right thumb */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:6px 16px;border:1px solid var(--rule-strong);background:var(--ground);border-radius:8px;cursor:pointer;font-size:17px;line-height:22px;text-align:center}
.btn:hover{border-color:var(--accent)}
.btn:active{transform:scale(.98)}
.btn.primary{background:var(--fill);color:var(--on-fill);border-color:var(--fill);font-weight:600}
.btn.danger{background:var(--bad);border-color:var(--bad);color:var(--ground)}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.ghost{border:1px solid var(--rule);background:var(--ground);border-radius:999px;min-height:44px;padding:4px 16px;cursor:pointer;font-size:16px}
.ghost:hover{border-color:var(--rule-strong)}
.ghost.danger{color:var(--bad);border-color:var(--bad)}
.linkish{border:0;background:none;padding:0 4px;color:var(--accent);text-decoration:underline;text-underline-offset:3px;cursor:pointer;font-size:inherit;min-height:44px}

/* reading */
.reading{align-items:center;text-align:center;padding:30px 16px}
.ring{position:relative;width:132px;height:132px;display:grid;place-items:center}
.ring svg{position:absolute;inset:0;transform:rotate(-90deg)}
.ring circle{fill:none;stroke-width:6}
.ring .trk{stroke:var(--rule)}
.ring .bar{stroke:var(--accent);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100;transition:stroke-dashoffset .25s linear}
.ring span{font:400 26px/30px var(--display);color:var(--accent)}

/* check the total */
.cur-seg,.mini-seg{display:flex;gap:6px;flex-wrap:wrap}
.cur-seg button,.mini-seg button{border:1px solid var(--rule);background:var(--ground);border-radius:999px;min-height:44px;padding:4px 16px;cursor:pointer}
.cur-seg button[aria-pressed="true"],.mini-seg button[aria-checked="true"]{background:var(--fill);color:var(--on-fill);border-color:var(--fill)}
.photo{display:flex;flex-direction:column;gap:8px}
.photo-inner{position:relative;border:1px solid var(--rule);border-radius:10px;overflow:hidden;background:var(--sunk);max-height:42vh;max-height:42dvh;overflow-y:auto;-webkit-overflow-scrolling:touch}
.photo-inner img,.photo-large img{display:block;width:100%;height:auto}
.photo-inner svg,.photo-large svg{position:absolute;left:0;top:0;width:100%;height:100%}
.photo-wrap{position:relative}
.photo-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.hit{fill:transparent;cursor:pointer}
.box-total{fill:rgba(140,54,63,.16);stroke:var(--accent);stroke-width:5}
.box-alt{fill:rgba(140,54,63,.05);stroke:var(--accent);stroke-width:2.5;stroke-dasharray:10 7;opacity:.85}
:root[data-app="night"] .box-total,:root[data-app="canopus"] .box-total{fill:rgba(224,154,159,.2)}
.total-box{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid var(--rule);border-radius:10px;background:var(--ground)}
.total-box .k,.each .k{font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--soft)}
.total-box .v{font-size:clamp(30px,10vw,44px);line-height:1.1;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.v .cur,.big .cur{font-size:.6em;color:var(--soft);font-weight:400;margin-right:.18em}
.rf{font-family:"Rufiyaa Sign","Newsreader",serif}
.verdict{display:flex;align-items:center;gap:8px;font-size:15px;line-height:21px;color:var(--soft)}
.verdict.ok{color:var(--good)} .verdict.warn{color:var(--bad)}
.verdict svg{flex:none}
.compose{display:flex;flex-direction:column;gap:6px}
.cbar{display:flex;height:16px;border-radius:8px;overflow:hidden;background:var(--sunk);border:1px solid var(--rule)}
.cbar i{display:block;height:100%}
.cleg{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:14px;line-height:20px;color:var(--soft)}
.cleg span{display:inline-flex;align-items:center;gap:6px}
.cleg b{width:10px;height:10px;border-radius:3px;display:inline-block}
.field{display:flex;flex-direction:column;gap:6px}
.lab,.field>label{color:var(--soft);font-size:14px;letter-spacing:.03em}
.field input[type=text],.field select,select{width:100%;min-height:48px;padding:6px 12px;border:1px solid var(--rule-strong);background:var(--ground);border-radius:8px;font-size:18px}
.field input[type=text]{font-size:26px;font-weight:600}
.err{margin:0;color:var(--bad);font-size:15px}
.alts{display:flex;flex-wrap:wrap;gap:8px}
.alts button{min-height:44px;padding:4px 14px;border:1px solid var(--rule-strong);background:var(--ground);border-radius:999px;cursor:pointer;font-size:16px}
.alts button[aria-pressed="true"]{background:var(--fill);color:var(--on-fill);border-color:var(--fill)}
.alts .hint{flex-basis:100%;font-size:14px;color:var(--soft)}

/* split */
.sum-line{margin:0;color:var(--soft);font-size:16px}
.stepper{display:flex;align-items:center;gap:12px}
.step{width:52px;height:52px;border:1px solid var(--rule-strong);background:var(--ground);border-radius:50%;font-size:28px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0 0 3px}
.step:active{transform:scale(.94)}
.step[disabled]{opacity:.4;cursor:not-allowed}
.stepper output{min-width:64px;text-align:center;font:400 40px/1 var(--display);color:var(--accent)}
.switch{display:flex;align-items:center;gap:10px;min-height:44px;font-size:16px;cursor:pointer}
.switch input{width:22px;height:22px;accent-color:var(--accent);flex:none}
.result{display:grid;grid-template-columns:96px minmax(0,1fr);gap:6px 16px;align-items:center;border-top:1px solid var(--rule);padding-top:14px}
.pie{grid-row:1 / span 2;width:96px;height:96px}
.pie svg{width:100%;height:100%;display:block;overflow:visible}
.pie path{stroke:var(--accent);stroke-width:3;stroke-linejoin:round;fill:var(--ground)}
.pie path.me{fill:var(--tint)}
@keyframes part{0%{transform:translate(var(--px),var(--py))}100%{transform:translate(0,0)}}
.pie.go path{animation:part .55s cubic-bezier(.2,.8,.3,1) both}
.each{min-width:0}
.big{font-size:clamp(34px,11vw,52px);line-height:1.08;font-weight:600;overflow-wrap:anywhere}
.shares{grid-column:1 / -1;list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.shares li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--rule);border-radius:8px;background:var(--ground);font-size:16px}
.shares li .who{min-width:0;overflow-wrap:anywhere}
.shares li .amt{font-weight:600;white-space:nowrap}
.shares li.payer{border-color:var(--accent)}
.shares li small{color:var(--soft);font-size:13px;display:block;line-height:17px}
.extra{grid-column:1 / -1;margin:0;font-size:15px;color:var(--soft)}

/* recent */
.recent{display:flex;flex-direction:column;gap:8px}
.recent h3{font:400 15px/20px var(--display);letter-spacing:.12em;text-transform:uppercase;color:var(--soft);margin:6px 2px 0}
.rec{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;align-items:center;gap:8px;border:1px solid var(--rule);background:var(--raised);border-radius:10px;padding:8px 8px 8px 14px}
.rec .rt{min-width:0}
.rec .rt b{display:block;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rec .rt span{font-size:14px;color:var(--soft)}
.rec .ra{text-align:right;font-weight:600;white-space:nowrap}
.rec .ra small{display:block;font-size:13px;color:var(--soft);font-weight:400}
.rec button.del{width:44px;height:44px;border:0;background:none;border-radius:50%;cursor:pointer;color:var(--soft);display:grid;place-items:center}
.rec button.del:hover{background:var(--wash)}
.rec button.open{all:unset;display:contents;cursor:pointer}

/* footer, dialogs, toast, menus */
.foot{padding:20px 0 0;font-size:15px;color:var(--soft);text-align:center}
.foot p{margin:0}
dialog{border:0;padding:0;background:transparent;max-width:min(520px,calc(100vw - 24px));width:100%;color:var(--ink)}
dialog::backdrop{background:rgba(20,8,10,.55)}
.sheet{background:var(--raised);border:1px solid var(--rule);border-radius:16px;padding:16px 18px 20px;display:flex;flex-direction:column;gap:16px;max-height:calc(100dvh - 40px);overflow:auto}
.sheet.small{gap:12px}
.sheet.wide{max-width:none}
dialog:has(.sheet.wide){max-width:min(900px,calc(100vw - 16px))}
.sheet-head{display:flex;justify-content:space-between;align-items:center}
.sheet h2{font:400 24px/30px var(--display);margin:0;color:var(--accent)}
.saved-note{margin:-6px 0 0;font-size:14px;color:var(--soft)}
.about{margin:0;font-size:13px;line-height:19px;color:var(--soft)}
.inline-actions{display:flex;flex-wrap:wrap;gap:8px}
.keys{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0;font-size:14px}
.keys dt{white-space:nowrap}.keys dd{margin:0;color:var(--soft)}
kbd{font:inherit;font-size:13px;border:1px solid var(--rule-strong);border-radius:5px;padding:0 6px;background:var(--ground)}
@media (pointer:coarse){.desk-only{display:none}}
.photo-large{position:relative;overflow:auto;max-height:70dvh;border:1px solid var(--rule);border-radius:10px;background:var(--sunk)}
.photo-large .photo-wrap{width:max(100%,900px)}
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--fill);color:var(--on-fill);padding:6px 8px 6px 18px;border-radius:999px;font-size:15px;z-index:40;box-shadow:0 6px 20px rgba(0,0,0,.25);display:flex;align-items:center;gap:10px;max-width:calc(100vw - 24px)}
.toast:not(:has(button:not([hidden]))){padding-right:18px}
.toast button{border:0;border-radius:999px;min-height:36px;padding:4px 14px;background:var(--on-fill);color:var(--fill);font-weight:600;cursor:pointer}
.updbar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom));z-index:30;display:flex;align-items:center;gap:12px;background:var(--fill);color:var(--on-fill);padding:8px 8px 8px 18px;border-radius:999px;font-size:15px;box-shadow:0 8px 24px rgba(0,0,0,.25);max-width:calc(100vw - 32px)}
.updbar button{border:0;border-radius:999px;min-height:36px;padding:4px 16px;background:var(--on-fill);color:var(--fill);font-weight:600;cursor:pointer}
.theme-menu{position:relative}
.dd{position:absolute;right:0;top:calc(100% + 6px);z-index:20;list-style:none;margin:0;padding:6px;min-width:210px;background:var(--raised);border:1px solid var(--rule-strong);border-radius:12px;box-shadow:0 10px 30px rgba(20,8,10,.22)}
.dd li,.theme-list button{display:grid;grid-template-columns:24px minmax(0,1fr) 18px;align-items:center;gap:10px;min-height:44px;padding:0 10px;border-radius:8px;cursor:pointer;font-size:16px;color:var(--ink)}
.dd li:hover,.dd li:focus{background:var(--wash);outline:none}
.dd .tk,.theme-list .tk{visibility:hidden;color:var(--accent);display:grid}
.dd [aria-checked="true"] .tk,.theme-list [aria-checked="true"] .tk{visibility:visible}
.ti{display:grid;place-items:center;color:var(--accent)}
.theme-list{display:flex;flex-direction:column;gap:4px}
.theme-list button{width:100%;border:1px solid var(--rule);background:var(--ground);text-align:left}
.theme-list button[aria-checked="true"]{border-color:var(--accent)}
.changes{display:flex;flex-direction:column;gap:18px}
.changes h3{font:400 18px/24px var(--display);margin:0;color:var(--accent)}
.changes .d{font-size:13px;color:var(--soft);margin:0 0 6px}
.changes ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.changes li{display:flex;gap:10px;align-items:baseline;font-size:15px;line-height:22px}
.tag{flex:none;font-size:11px;letter-spacing:.08em;text-transform:uppercase;border:1px solid var(--accent);color:var(--accent);border-radius:4px;padding:0 6px;line-height:18px}

@media (max-width:420px){.logo{height:46px;width:auto}.row-actions{flex-wrap:wrap}.row-actions .btn{flex-basis:calc(50% - 5px)}.row-actions .btn.primary{flex-basis:100%;order:3}}
@media (min-width:720px){.app{padding-inline:24px}.card{padding:22px 22px}.result{grid-template-columns:120px minmax(0,1fr)}.pie{width:120px;height:120px}}
@media (prefers-reduced-motion:reduce){.logo,.pie.go path{animation:none}.ring .bar{transition:none}.btn:active,.step:active{transform:none}}

h1[tabindex="-1"]:focus,h2[tabindex="-1"]:focus,[tabindex="-1"]:focus{outline:none}

/* Argo bottom bars (update bar and toasts), October 2026: a calm card centred above the bottom edge.
   It sizes to its words up to 520 px, so the message reads on one or two lines and never squeezes into a column. */
.updbar{left:16px;right:16px;margin:0 auto;width:fit-content;max-width:min(520px,calc(100vw - 32px));transform:none;border-radius:14px;padding:10px 10px 10px 18px;gap:16px;line-height:1.4;align-items:center;box-sizing:border-box}
.updbar>span{flex:1 1 auto;min-width:0;text-wrap:pretty}
.updbar button{flex:none;white-space:nowrap;min-height:44px;border-radius:10px;padding:0 18px;margin:0}
@keyframes argoBarIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:no-preference){.updbar:not([hidden]){animation:argoBarIn .28s cubic-bezier(.2,.7,.2,1)}}
.toast{left:16px;right:16px;margin:0 auto;width:fit-content;max-width:min(520px,calc(100vw - 32px));transform:none;border-radius:14px;line-height:1.4;box-sizing:border-box}
.toast>span{min-width:0;text-wrap:pretty}
.toast button{flex:none;white-space:nowrap}
@media (prefers-reduced-motion:no-preference){.toast:not([hidden]){animation:argoBarIn .28s cubic-bezier(.2,.7,.2,1)}}
.toast button{border-radius:10px}
