/* Central stylesheet. Rules selected verbatim from the approved mock (profile-mockup/shared.css rule indices
   0-9,13-15,17-18,21-22,59-62,77,242-244,246-248,375-379). No mock data styles. Empty-state block at the end is new,
   built only from the same tokens. */
:root{--content-max:700px}
*{box-sizing:border-box}
:root{--bg:#0b0b0b;--surface:#171613;--text:#f6f3eb;--muted:#aaa69e;--line:#383127;--brand-accent-dark:#d4a64c;--brand-accent-light:#80600e;--accent:var(--brand-accent-dark);--accent-ink:#171209;--bad:#ffb6a8;--space:20px;--radius:14px;color-scheme:dark;font:16px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
html[data-theme=light]{--bg:#faf8f1;--surface:#fffdf7;--text:#211f19;--muted:#665f51;--line:#d9d0bd;--accent:var(--brand-accent-light);--accent-ink:#fff;--bad:#a02713;color-scheme:light}
body{margin:0;background:var(--bg);color:var(--text);line-height:1.45}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);padding:10px 14px}
button:hover{border-color:var(--accent)}
button:disabled{opacity:.5;cursor:default}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
header{max-width:700px;margin:auto;height:76px;padding:16px var(--space);display:flex;align-items:center;justify-content:space-between}
header img{width:151px;display:block}
html[data-theme=light] header img{background:#080808;padding:5px;border-radius:3px}
.header-actions{display:flex;gap:8px}
.header-actions button{width:44px;font-size:22px}
main{max-width:700px;padding:25px var(--space) calc(112px + env(safe-area-inset-bottom));margin:auto;min-height:65vh}
h1{font-size:29px;letter-spacing:-1px;line-height:1.15;margin:0 0 14px}
#nav{position:fixed;bottom:0;left:0;right:0;background:var(--bg);border-top:1px solid var(--line);padding:8px 8px calc(10px + env(safe-area-inset-bottom));display:flex;justify-content:center;z-index:5}
#nav button{width:25%;max-width:175px;border:0;background:none;border-radius:0;font-size:11px;color:var(--muted);min-height:58px;padding:5px 0}
#nav button[aria-current=page]{color:var(--accent)}
#nav svg{width:21px;height:21px;display:block;margin:0 auto 5px;fill:none;stroke:currentColor;stroke-width:1.6}
@media(max-width:359px){:root{--space:14px}.reminder .row{flex-wrap:wrap}.filters{grid-template-columns:1fr}h1{font-size:26px}}
:root{--brandmark-bg:#0b0b0b}
.preview-toolbar{height:auto;min-height:60px;max-width:var(--content-max);padding:10px var(--space);display:flex;justify-content:space-between;gap:12px;align-items:center}
.preview-toolbar>span{font-size:12px;color:var(--muted)}
html[data-theme=light] main img[alt="Peptide X"]{background:var(--brandmark-bg);padding:5px;border-radius:6px}
#nav button{position:relative}
.nav-count{display:inline-flex;align-items:center;justify-content:center;position:absolute;top:0;left:calc(50% + 9px);min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:var(--accent);color:var(--accent-ink);font-size:11px;font-weight:700;line-height:1}
html[data-environment=staging] .preview-toolbar,html[data-environment=test] .preview-toolbar{position:sticky;top:0;z-index:80;background:var(--bg);border-bottom:2px solid var(--accent);max-width:none}
.environment-badge{display:flex;flex-direction:column;gap:2px}
.environment-badge strong{font-size:11px;letter-spacing:.04em;color:var(--accent)}
.environment-badge small{font-size:10px}
html[data-environment=production] .environment-badge{display:none}
/* Logo: keep the true aspect ratio when the light-theme backing padding applies (width/height attributes only reserve space). */
header img,main img[alt="Peptide X"]{height:auto}
/* Empty state (new; tokens only) */
.empty-state{border:1px dashed var(--line);border-radius:var(--radius);background:var(--surface);padding:28px var(--space);text-align:center}
.empty-state h2{margin:0 0 8px;font-size:20px;letter-spacing:-.3px}
.empty-state p{margin:0 auto;max-width:42ch;color:var(--muted)}
/* Logo keeps its true aspect ratio when the light-theme backing padding applies */
header img,main img[alt="Peptide X"]{height:auto}
/* Header layout: ONE row. Logo left, STAGING badge centred both ways, theme pill and account avatar right (tokens only).
   Desktop: three equal-weight columns so the badge is the true centre. Phones: a single flex row; the badge is centred in
   the space between logo and controls and the logo scales (aspect kept) so nothing overlaps or wraps onto a lower row. */
.preview-toolbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;column-gap:12px}
.preview-toolbar .brand{justify-self:start}
.preview-toolbar .environment-badge{align-items:center;justify-content:center;text-align:center;color:var(--muted)}
.preview-toolbar .header-actions{justify-self:end;display:flex;align-items:center;gap:8px}
@media(max-width:600px){
.preview-toolbar{display:flex;align-items:center;gap:8px}
.preview-toolbar .brand{flex:none;width:clamp(96px,31vw,151px)}
.preview-toolbar .environment-badge{flex:1 1 0;min-width:0}
.preview-toolbar .environment-badge strong{font-size:10px;letter-spacing:.02em;line-height:1.25}
.preview-toolbar .environment-badge small{display:none}
.preview-toolbar .header-actions{flex:none}
}
@media(max-width:360px){
.preview-toolbar .environment-badge strong{font-size:9px}
.header-actions{gap:6px}
.header-actions .theme-toggle{width:48px}
}
/* Both controls centre their icon exactly: no inherited padding, flex-centred (the mock's generic button padding made the
   22px avatar icon overflow its 14px content box and sit off-centre). */
.header-actions .theme-toggle,.header-actions .account-btn{padding:0;display:inline-flex;align-items:center;justify-content:center}
/* Theme control: one compact pill showing ONLY the action icon (sun in dark = switch to light, moon in light = switch to dark).
   Colours are the mock's own button tokens (--surface, --text, --line, hover/focus --accent); nothing new is introduced. */
.header-actions .theme-toggle{width:56px;border-radius:999px}
.theme-toggle svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.8}
html[data-theme=dark] .theme-toggle .icon-moon,html[data-theme=light] .theme-toggle .icon-sun{display:none}
/* Account avatar */
.header-actions .account-btn{border-radius:50%}
.account-btn svg{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.7}
.account-menu{position:absolute;top:100%;right:var(--space);z-index:90;min-width:220px;max-width:calc(100vw - 2*var(--space));background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:12px;display:grid;gap:10px;box-shadow:0 8px 24px rgba(0,0,0,.35)}
.account-menu[hidden]{display:none}
.account-note{margin:0;color:var(--muted);font-size:13px}
.account-menu [data-signout]{text-align:left;font-weight:600}
