/* ===== MEMBERS AREA: tokens from brand.css only, no raw colors or fonts. =====
   Same token names as the app (lib/theme/brand.dart), so the 2027 refresh is
   a value swap in brand.css and this file follows. */

html{scroll-padding-top:72px}
body{overflow-x:clip}
[hidden]{display:none!important}

/* boot: holds the page until Firebase says who is signed in */
.boot{min-height:70vh;display:grid;place-items:center}
.spinner{width:28px;height:28px;border-radius:50%;border:3px solid var(--brand-line);border-top-color:var(--brand-slate);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== sign in ===== */
.gate{min-height:100vh;display:grid;place-items:center;padding:24px 20px}
.auth{width:100%;max-width:420px;border:1px solid var(--brand-line);border-radius:var(--brand-radius);padding:28px;text-align:center}
.brandmark{display:inline-block;line-height:0}
.brandmark img{display:block;height:19px;width:auto}
/* The members area is a tool, not a shopfront, so the bar carries the
   mark; the full wordmark stays where the brand is being introduced. */
.brandmark.mark img{height:26px;border-radius:5px}
.auth .brandmark{margin-bottom:20px}
.auth .brandmark img{height:22px;margin:0 auto}
.auth h1{font:500 clamp(28px,5vw,36px)/1.1 var(--brand-font-serif);margin:0 0 8px}
.auth form{text-align:left}
.lead{color:var(--brand-slate);margin:0 0 22px}
label{display:block;font-size:14px;font-weight:600;margin:14px 0 6px}
input[type=email],input[type=password],input[type=search],input[type=text],textarea{width:100%;font:16px var(--brand-font-sans);color:var(--brand-ink);background:var(--brand-paper);border:1.5px solid var(--brand-line);border-radius:var(--brand-radius-sm);padding:11px 13px;min-height:44px}
input:focus,textarea:focus,button:focus-visible,a:focus-visible{outline:2px solid var(--brand-slate);outline-offset:2px}
.btn{cursor:pointer;border:0;background:var(--brand-ink);color:var(--brand-paper);text-decoration:none;font:600 15px var(--brand-font-sans);padding:11px 18px;border-radius:var(--brand-radius-sm);min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn.alt{background:var(--brand-paper);color:var(--brand-ink);box-shadow:inset 0 0 0 1.5px var(--brand-ink)}
.btn.wide{width:100%;margin:18px 0 0}
.btn[disabled]{opacity:.55;cursor:default}
.fine{font-size:13px;color:var(--brand-slate);text-align:center;margin:14px 0 0}
.fine.muted{margin-top:18px}
.err{color:var(--brand-flag);font-size:13.5px;margin:12px 0 0;border-left:3px solid var(--brand-flag);padding:4px 10px}

/* ===== shell ===== */
.bar{position:sticky;top:0;z-index:5;background:var(--brand-paper);border-bottom:1px solid var(--brand-line)}
.bar .in{max-width:1200px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px}
.barlinks{display:flex;gap:16px;align-items:center}
.out{font-size:14px;color:var(--brand-slate);text-decoration:none}
.linkish{background:none;border:0;padding:0;font:inherit;cursor:pointer;color:var(--brand-slate)}
.shell{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:220px minmax(0,1fr)}
.side{position:sticky;top:57px;align-self:start;display:flex;flex-direction:column;gap:2px;padding:24px 12px;border-right:1px solid var(--brand-line);min-height:calc(100vh - 57px)}
.side a{display:flex;justify-content:space-between;align-items:center;text-decoration:none;font-size:15px;padding:10px 12px;border-radius:var(--brand-radius-sm);color:var(--brand-slate);min-height:44px}
.side a[aria-current=page]{background:var(--brand-mist);color:var(--brand-ink);font-weight:600}
.grp{display:block;font-size:11.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--brand-slate);padding:20px 12px 4px}
.soon{display:block;font-size:14.5px;color:var(--brand-line);padding:9px 12px}
@media(max-width:820px){
  .shell{grid-template-columns:1fr}
  .side{position:sticky;top:53px;z-index:4;flex-direction:row;overflow-x:auto;gap:4px;padding:8px 12px;min-height:0;border-right:0;border-bottom:1px solid var(--brand-line);background:var(--brand-paper)}
  .side a{flex:none;border-radius:999px;font-size:14px;padding:8px 12px}
  .grp,.soon{display:none}
}
.view{display:none}.view.on{display:block}
.page{max-width:980px;margin:0 auto;padding:28px 20px 72px}
.page h1{font:500 clamp(30px,5vw,42px)/1.1 var(--brand-font-serif);margin:0 0 8px}
.sect{font:500 24px var(--brand-font-serif);margin:34px 0 8px}

/* ===== paste check ===== */
.grid2{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px;align-items:stretch}
@media(max-width:820px){.grid2{grid-template-columns:1fr}}
textarea{min-height:220px;resize:vertical;line-height:1.5}
.counter{font-size:13px;color:var(--brand-slate);margin-top:8px}
.result{border:1px solid var(--brand-line);border-radius:var(--brand-radius);overflow:hidden}
.result .hd{background:var(--brand-ink);padding:14px 18px;line-height:0}
.result .hd img{display:block;height:17px;width:auto}
.result .bd{padding:16px 18px}
.result h2{font:500 24px var(--brand-font-serif);margin:0}
.result .sub{font-size:13px;color:var(--brand-slate);margin:2px 0 12px}
/* The placeholder is not a result, so it gets no box: just quiet text,
   centred against the paste column beside it. */
#resultBox{display:flex;flex-direction:column;justify-content:flex-start;min-height:220px}
/* Only the placeholder floats in the middle; a real result sits at the
   top, level with the box you pasted into. */
#resultBox:has(> .empty){justify-content:center}
#resultBox > .result{flex:none}
.empty{color:var(--brand-slate);font-size:15px;text-align:center;margin:0;padding:24px 18px}
@media(max-width:820px){#resultBox{min-height:0}}
.flags{list-style:none;margin:0;padding:0}
.flags li{border-bottom:1px solid var(--brand-line)}
.flags button{all:unset;cursor:pointer;display:flex;align-items:center;gap:12px;width:100%;min-height:44px;font-size:15.5px}
.flags button:before{content:'';width:10px;height:10px;border-radius:50%;background:var(--brand-flag);flex:none}
.flags .why{font-size:14px;color:var(--brand-slate);padding:0 0 12px 22px}
.flags .why a{color:var(--brand-ink)}
.refs{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline}
.refs .reflead{font-size:13px;color:var(--brand-slate);width:100%}
.refs a{font-size:14px;overflow-wrap:anywhere}
.clean{display:flex;gap:10px;align-items:center;color:var(--brand-clean);font-weight:600}
.clean:before{content:'';width:10px;height:10px;border-radius:50%;background:var(--brand-clean)}
.limit{border:1px solid var(--brand-line);background:var(--brand-mist);border-radius:var(--brand-radius);padding:18px;margin-top:18px}
.limit h3{font:500 22px var(--brand-font-serif);margin:0 0 6px}
.limit p{margin:0 0 12px}
.pill{display:inline-block;font-size:12.5px;font-weight:600;border-radius:999px;padding:3px 10px;background:var(--brand-mist);color:var(--brand-ink)}
.pill.ok{color:var(--brand-clean)}

/* ===== history ===== */
.list{list-style:none;margin:14px 0 0;padding:0;border-top:1px solid var(--brand-line)}
.list li{border-bottom:1px solid var(--brand-line)}
.list > li > span.d{display:block;padding:14px 4px;font-size:13px;color:var(--brand-slate)}
.list b{display:block;font-weight:600}
.list span.d{font-size:13px;color:var(--brand-slate)}

/* ----- a history row ----- */
.hhead{display:flex;align-items:center;gap:12px;padding:10px 4px}
.hopen{all:unset;cursor:pointer;flex:1;min-width:0;min-height:44px;display:flex;
  flex-direction:column;justify-content:center;gap:2px;padding:2px 0}
.hopen b{overflow-wrap:anywhere}
.hrow .hopen b:after{content:'';display:inline-block;width:6px;height:6px;margin-left:8px;
  border-right:1.5px solid var(--brand-slate);border-bottom:1.5px solid var(--brand-slate);
  transform:translateY(-2px) rotate(45deg);transition:transform .15s}
.hrow .hopen[aria-expanded=true] b:after{transform:translateY(1px) rotate(225deg)}
.hacts{display:flex;gap:4px;flex:none}
.act{font-size:13.5px;padding:8px;min-height:44px}
.act:hover{color:var(--brand-ink);text-decoration:underline}
.hbody{padding:0 4px 16px}
.hbody .sub{font-size:13px;color:var(--brand-slate);margin:0 0 8px}
@media(max-width:560px){
  .hhead{flex-wrap:wrap}
  .hopen{flex:1 0 100%}
  .hacts{margin-left:auto}
}

/* ----- rename and delete, asked inside the row ----- */
.rename,.confirm{display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  background:var(--brand-mist);border-radius:var(--brand-radius-sm);padding:10px;margin:0 4px 10px}
.rename input{flex:1;min-width:180px;background:var(--brand-paper)}
.confirm span{flex:1;min-width:180px;font-size:14px}
.btn.small{padding:8px 14px;font-size:14px;min-height:40px}
.rename input[aria-invalid]{border-color:var(--brand-flag)}

/* ===== account ===== */
.plan{border:1px solid var(--brand-line);border-radius:var(--brand-radius);padding:18px;margin-top:6px}
.plan .price{font:500 34px var(--brand-font-serif);margin:6px 0}
.plan p{margin:0}
.rows{margin:18px 0 0;border-top:1px solid var(--brand-line)}
.rows div{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--brand-line);font-size:15px}
.rows dt{color:var(--brand-slate)}
.rows dd{margin:0;text-align:right;overflow-wrap:anywhere}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
