:root{
  --paper:#f6f3ec; --paper2:#efebe1; --ink:#191714; --muted:#6b655c; --faint:#9a9388;
  --rule:#d9d3c7; --red:#c62f2f; --blue:#2563eb;
  --serif:"Source Serif 4", Georgia, serif; --black:"UnifrakturMaguntia", serif;
  --sans:Inter, -apple-system, system-ui, sans-serif;
  --ease:cubic-bezier(.215,.61,.355,1);
  --top:env(safe-area-inset-top); --bottom:env(safe-area-inset-bottom);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;background:var(--paper);color:var(--ink);font-family:var(--sans);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
a{color:inherit;text-decoration:none}
#app{height:100dvh;display:flex;flex-direction:column;max-width:600px;margin:0 auto;padding-top:var(--top)}
#app.wide{max-width:1040px}
.pad{padding:0 20px}
.screen{flex:1;display:flex;flex-direction:column;overflow-y:auto;padding:0 20px calc(24px + var(--bottom))}
.grow{flex:1}

/* type */
.mast-big{font-family:var(--black);font-size:42px;line-height:1;text-align:center}
.double{border-top:1px solid var(--ink);border-bottom:3px double var(--ink);height:6px;margin-top:12px}
.lede{font-family:var(--serif);font-size:19px;line-height:1.4;text-align:center}
.h1{font-family:var(--serif);font-size:27px;line-height:1.15;font-weight:700}
.eyebrow{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.muted{color:var(--muted)}
.small{font-size:13px;line-height:1.5}
.center{text-align:center}

/* controls */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:50px;border-radius:14px;background:var(--ink);color:var(--paper);font-weight:600;font-size:16px;transition:transform .12s var(--ease),opacity .2s}
.btn:active{transform:scale(.98)}
.btn[disabled]{opacity:.5}
.btn svg{width:18px;height:18px}
.btn.text{background:transparent;color:var(--muted);height:44px;font-weight:500}
.field{width:100%;height:52px;border-radius:14px;border:1px solid var(--rule);background:#fff;padding:0 16px;font-size:17px;font-family:var(--sans);color:var(--ink);outline:none}
.field:focus{border-color:var(--ink)}
.err{color:var(--red);font-size:13px;min-height:18px;margin-top:8px;text-align:center}
.list{border-top:1px solid var(--rule)}
.li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--rule);font-size:15px;width:100%;text-align:left}
.li .sub{color:var(--muted);font-size:13px;margin-top:1px}
.li svg{width:20px;height:20px;flex:none}
.li.icon-first{justify-content:flex-start}
.steps{counter-reset:s;margin-top:16px}
.steps li{list-style:none;display:flex;gap:12px;align-items:flex-start;padding:10px 0;font-size:16px;line-height:1.4}
.steps li:before{counter-increment:s;content:counter(s);flex:none;width:24px;height:24px;border-radius:50%;background:var(--ink);color:var(--paper);font-size:12px;font-weight:700;display:grid;place-items:center;margin-top:1px}
.kbd{display:inline-flex;align-items:center;gap:4px;background:#fff;border:1px solid var(--rule);border-radius:7px;padding:1px 7px;font-size:14px;font-weight:600;white-space:nowrap}
.kbd svg{width:15px;height:15px;color:#0a64d6}
.toggle{width:46px;height:28px;border-radius:99px;background:var(--rule);position:relative;flex:none;transition:background .2s var(--ease)}
.toggle:after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .2s var(--ease)}
.toggle.on{background:var(--blue)}
.toggle.on:after{transform:translateX(18px)}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--ink);color:var(--paper);font-size:13px;font-weight:600;display:grid;place-items:center;flex:none}
.toast{position:fixed;left:16px;right:16px;top:calc(12px + var(--top));max-width:560px;margin:0 auto;background:var(--ink);color:#fff;border-radius:14px;padding:12px 14px;font-size:14px;font-weight:500;z-index:50;pointer-events:none;box-shadow:0 10px 24px -10px rgba(0,0,0,.5);animation:drop .25s var(--ease)}
.toast.ok{background:var(--blue)}
@keyframes drop{from{transform:translateY(-8px);opacity:0}}

/* main shell */
.main{flex:1;display:flex;flex-direction:column;min-height:0}
.view{flex:1;display:flex;flex-direction:column;min-height:0}
.tabs{flex:none;display:flex;border-top:1px solid var(--rule);background:var(--paper);padding:8px 0 calc(8px + var(--bottom))}
.tabs a{flex:1;text-align:center;font-size:11px;font-weight:500;color:var(--faint);display:flex;flex-direction:column;align-items:center;gap:3px}
.tabs a.on{color:var(--ink)}
.tabs svg{width:24px;height:24px}

/* rant thread */
.chat-head{flex:none;display:flex;align-items:center;justify-content:space-between;padding:8px 16px 8px;border-bottom:1px solid var(--rule)}
.chat-head .sp{width:32px}
.ch-title{text-align:center}
.stack{display:flex;justify-content:center;padding-left:6px;min-height:22px}
.stack i{width:22px;height:22px;border-radius:50%;border:2px solid var(--paper);margin-left:-6px;background:#8b857a;color:#fff;font-size:9.5px;font-style:normal;font-weight:600;display:grid;place-items:center}
.ch-title b{font-family:var(--black);font-weight:400;font-size:21px;display:block;line-height:1.1;margin-top:3px}
.ch-title small{font-size:12px;color:var(--muted)}
.goal{flex:none;margin:10px 14px 0;background:#fff;border:1px solid var(--rule);border-radius:12px;padding:10px 13px 11px;font-size:12px}
.goal .gl{font-weight:600;margin-bottom:6px;font-size:13px}
.goal .g2{display:flex;gap:16px}
.goal .g2>div{flex:1;color:var(--muted);font-size:12px}
.goal .g2 b{color:var(--ink);font-variant-numeric:tabular-nums}
.bar{height:4px;border-radius:4px;background:var(--paper2);overflow:hidden;margin-top:5px}
.bar i{display:block;height:100%;background:var(--ink);border-radius:4px;transition:width .5s var(--ease)}
.bar i.done{background:var(--blue)}
.goal.ok{background:var(--blue);border-color:var(--blue);color:#fff;display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px}
.goal.ok svg{width:17px;height:17px}
.thread{flex:1;overflow-y:auto;padding:12px 14px 10px;display:flex;flex-direction:column;gap:6px;overscroll-behavior:contain}
.sys{align-self:center;max-width:88%;text-align:center;font-size:12.5px;color:var(--muted);line-height:1.45;background:var(--paper2);border-radius:10px;padding:8px 12px;margin:4px 0}
.day{align-self:center;font-size:11.5px;color:var(--faint);font-weight:600;margin:8px 0 2px}
.b{align-self:flex-end;max-width:80%;background:var(--ink);color:var(--paper);border-radius:18px 18px 5px 18px;padding:9px 13px;font-size:16px;line-height:1.38;white-space:pre-wrap;overflow-wrap:anywhere}
.b.voice{display:flex;align-items:center;gap:10px;width:220px;white-space:normal}
.b.voice button{width:22px;height:22px;display:grid;place-items:center;flex:none}
.b.voice svg{width:16px;height:16px}
.wv{flex:1;display:flex;align-items:center;gap:2px;height:22px}
.wv i{flex:1;background:currentColor;opacity:.75;border-radius:2px;min-height:3px}
.b.voice small{font-size:12px;opacity:.75;font-variant-numeric:tabular-nums}
.b.pics{padding:3px;display:grid;grid-template-columns:1fr 1fr;gap:3px;width:200px;white-space:normal}
.b.pics.one{grid-template-columns:1fr}
.b.pics img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:4px;display:block;background:var(--muted)}
.b.pics img:first-child{border-top-left-radius:15px}
.b.pics .cap2{grid-column:1/-1;padding:4px 10px 4px;font-size:15px}
.meta{align-self:flex-end;font-size:11px;color:var(--faint);margin:-2px 4px 2px}
.meta.blue{color:var(--blue);font-weight:600}
.printed{align-self:stretch;border:1px solid var(--ink);border-radius:12px;padding:12px;text-align:center;margin:10px 0;background:#fff;display:block}
.printed b{font-family:var(--black);font-weight:400;font-size:21px;display:block}
.printed span{font-size:12.5px;color:var(--muted)}
.printed .rd{margin-top:8px;font-size:14px;font-weight:600}
.composer{flex:none;display:flex;align-items:flex-end;gap:8px;padding:8px 10px 10px;border-top:1px solid var(--rule);background:var(--paper)}
.round{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;flex:none;transition:transform .12s var(--ease)}
.round:active{transform:scale(.92)}
.round svg{width:19px;height:19px}
.round.soft{background:var(--paper2)}
.round.ink{background:var(--ink);color:var(--paper)}
.round.red{background:var(--red);color:#fff}
.inp{flex:1;min-height:38px;max-height:140px;border-radius:19px;border:1px solid var(--rule);background:#fff;padding:8px 14px;font-size:16px;line-height:1.35;font-family:var(--sans);color:var(--ink);resize:none;outline:none;display:block}
.recbar{flex:1;height:38px;border-radius:19px;background:#fff;border:1px solid var(--rule);display:flex;align-items:center;gap:8px;padding:0 14px;font-size:15px;font-variant-numeric:tabular-nums}
.recbar .wv{color:var(--red);height:18px}
.recdot{width:9px;height:9px;border-radius:50%;background:var(--red);flex:none;animation:pulse 1s var(--ease) infinite alternate}
@keyframes pulse{to{opacity:.3}}
.tray{flex:none;display:flex;gap:6px;padding:8px 10px 0;border-top:1px solid var(--rule);background:var(--paper);overflow-x:auto}
.tray img{width:60px;height:60px;border-radius:10px;object-fit:cover;flex:none}
.tray + .composer{border-top:0}

/* sheets */
.scrim{position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:20;animation:fade .2s var(--ease)}
@keyframes fade{from{opacity:0}}
.sheet{position:fixed;left:0;right:0;bottom:0;max-width:600px;margin:0 auto;max-height:85dvh;overflow-y:auto;background:#fff;border-radius:22px 22px 0 0;z-index:21;padding:10px 20px calc(24px + var(--bottom));animation:rise .28s var(--ease)}
@keyframes rise{from{transform:translateY(40px);opacity:0}}
.grab{width:36px;height:5px;border-radius:3px;background:#ddd;margin:0 auto 14px}
.chip{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:var(--blue)}
.chip svg{width:14px;height:14px}
.nope{font-size:13px;color:var(--faint)}

/* newspaper */
.paper{flex:1;overflow-y:auto;font-family:var(--serif);color:var(--ink)}
.mast{text-align:center;padding:10px 16px 0}
.mast .name{font-family:var(--black);font-size:clamp(30px,10.5vw,84px);line-height:1.05;white-space:nowrap}
.mast .tag{font-style:italic;font-size:12px;color:var(--muted);margin-top:2px}
.dateline{margin:8px 16px 0;border-top:1px solid var(--ink);border-bottom:3px double var(--ink);padding:4px 0;display:flex;justify-content:space-between;gap:8px;font-family:var(--sans);font-size:9.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.np{padding:14px 16px 28px}
.kicker{font-family:var(--sans);font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.hl{font-weight:800;line-height:1.08;letter-spacing:-.01em}
.hl.xl{font-size:32px}
.hl.l{font-size:25px}
.hl.s{font-size:16px;font-weight:700;line-height:1.2}
.deck{font-style:italic;font-size:15.5px;line-height:1.38;color:#3d3933;margin-top:7px}
.byline{font-family:var(--sans);font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;margin-top:9px;color:var(--muted)}
.copy{font-size:17px;line-height:1.55;margin-top:12px}
.copy p+p{margin-top:10px;text-indent:1em}
.drop>p:first-child:first-letter{float:left;font-size:54px;line-height:.85;font-weight:800;margin:5px 7px 0 0}
.photo{margin-top:12px}
.photo img{width:100%;display:block;filter:grayscale(.15) contrast(1.02);background:var(--paper2)}
.figcap{font-size:12px;line-height:1.4;color:var(--muted);margin-top:5px}
.hr{border-top:1px solid var(--ink);margin:16px 0}
.brief{display:block;padding:10px 0;border-bottom:1px dotted #bdb6a8;font-size:15.5px;line-height:1.45}
.brief b{font-weight:700}
.brief i{color:var(--muted);font-size:13px}
.noword{font-style:italic;color:var(--muted)}
.pull{border-top:2px solid var(--ink);border-bottom:1px solid var(--ink);margin:18px 0;padding:12px 0;font-size:22px;line-height:1.25;font-weight:600;font-style:italic;text-align:center}
.pull small{display:block;font-family:var(--sans);font-style:normal;font-size:10px;letter-spacing:.1em;text-transform:uppercase;font-weight:600;color:var(--muted);margin-top:7px}
.pager{display:flex;justify-content:space-between;font-family:var(--sans);font-size:13px;font-weight:600;border-top:3px double var(--ink);padding-top:12px;margin-top:22px}
.pagebar{display:flex;justify-content:space-between;align-items:center;padding:8px 16px 8px;border-bottom:1px solid var(--ink)}
.pagebar span:first-child{font-family:var(--black);font-size:22px}
.pagebar span:last-child{font-family:var(--sans);font-size:11px;font-weight:600;color:var(--muted)}
.issue-row{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid var(--rule)}
.issue-row .no{width:56px;flex:none;font-family:var(--sans);font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--muted);padding-top:3px}
.issue-row small{font-family:var(--sans);font-size:12px;color:var(--muted)}
.briefs{display:block}
@media (min-width:900px){
  .np{padding:20px 40px 48px}
  .dateline{margin:10px 40px 0;font-size:11px}
  .hl.xl{font-size:52px;max-width:820px;margin:0 auto}
  .front .deck{font-size:19px}
  .briefs{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 28px}
  .article{max-width:680px;margin:0 auto}
  .pull{max-width:560px;margin-left:auto;margin-right:auto}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
