

  @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&display=swap');

  /* ── Theme variables ──────────────────────────────────────────────────────── */
  :root {
    --bg:           #1A1728;
    --bg-deep:      #120F1E;
    --surface:      #221E35;
    --surface-2:    #2C2845;
    --surface-3:    #332F52;
    --border:       #3E3A5E;
    --border-sub:   #2C2845;
    --t1:           #F4F5FC;
    --t2:           #C8C6DF;
    --t3:           #8A87A8;
    --t4:           #5A5775;
    --t5:           #3E3A5E;
    --modal-bg:     #1E1A30;
    --modal-border: #3E3A5E;
    --seg-active:   #2C2845;
    --seg-border:   #3E3A5E;
    --input-bg:     #1E1A30;
    --pill-bg:      rgba(255,255,255,0.06);
    --shadow:       rgba(0,0,0,0.5);
    --tabbar-bg:    rgba(22,19,36,0.95);
    --tabbar-bdr:   #2C2845;
    --tabbar-txt:   #5A5775;
    --tabbar-act:   #7DF9C0;
    --card-glow:    rgba(167,139,250,0.04);
  }
  [data-theme="light"] {
    --bg:           #F4F5FC;
    --bg-deep:      #EDEAF8;
    --surface:      #FFFFFF;
    --surface-2:    #EAE8F5;
    --surface-3:    #D4D0E8;
    --border:       #A8A4C4;
    --border-sub:   #C8C4DC;
    --t1:           #1A1728;
    --t2:           #2E2B4A;
    --t3:           #4A4768;
    --t4:           #6B6888;
    --t5:           #8A87A8;
    --modal-bg:     #FFFFFF;
    --modal-border: #D0CCE8;
    --seg-active:   #EAE8F5;
    --seg-border:   #A8A4C4;
    --input-bg:     #F0EEF8;
    --pill-bg:      rgba(0,0,0,0.05);
    --shadow:       rgba(100,90,160,0.12);
    --tabbar-bg:    rgba(244,245,252,0.96);
    --tabbar-bdr:   #B8B4D0;
    --tabbar-txt:   #6B6888;
    --tabbar-act:   #6B5FCF;
    --card-glow:    rgba(167,139,250,0.03);
    color-scheme: light;

    /* Remap neon accent text to darker readable versions in light mode */
    --accent-green:  #1A7A4A;
    --accent-teal:   #0D6B7A;
    --accent-blue:   #2853A8;
    --accent-purple: #5B3FA8;
    --accent-amber:  #8A5A00;
    --accent-red:    #A83030;
  }

  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { margin: 0; padding: 0; background: var(--bg); }
  body { font-family: 'DM Sans', -apple-system, sans-serif; color: var(--t1); overscroll-behavior: none; transition: background 0.25s, color 0.25s; }
  input, select, textarea, button { font-family: inherit; }
  input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
  ::-webkit-scrollbar { width: 0; height: 0; }
  @keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
  @keyframes slideUp { from { transform: translateY(20px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
  .serif { font-family: 'Fraunces', Georgia, serif; }
  .mono { font-family: 'DM Mono', monospace; }
  #app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding: calc(env(safe-area-inset-top) + 8px) 16px calc(90px + env(safe-area-inset-bottom)); }
  button { cursor: pointer; border: none; background: none; }
  /* Prevent heading text running under theme toggle */
  input[type="date"], input[type="datetime-local"], input[type="time"] { max-width: 100%; min-width: 0; width: 100%; box-sizing: border-box; appearance: none; -webkit-appearance: none; }
  .tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; background: var(--tabbar-bg); backdrop-filter: blur(20px); border-top: 1px solid var(--tabbar-bdr); display: flex; justify-content: space-around; padding: 10px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 50; }
  .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--tabbar-txt); font-size: 10px; letter-spacing: 0.3px; padding: 4px 12px; transition: color 0.2s; }
  .tabbar button.active { color: var(--tabbar-act); }
  .tabbar svg { width: 22px; height: 22px; }
  .modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; z-index: 100; }
  .modal { background: var(--modal-bg); border: 1px solid var(--modal-border); border-radius: 22px 22px 0 0; padding: 24px 22px calc(24px + env(safe-area-inset-bottom)); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; animation: slideUp 0.25s ease; transition: background 0.25s; }
  @media (min-width: 561px) { .modal-bg { align-items: center; } .modal { border-radius: 20px; max-width: 440px; } }
  .field-label { display: block; font-size: 10px; color: var(--t3); letter-spacing: 1px; margin-bottom: 6px; font-family: 'DM Mono', monospace; }
  .inp { width: 100%; background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; color: var(--t1); font-size: 15px; outline: none; transition: background 0.2s, border-color 0.2s; }
  input[type="date"].inp, input[type="time"].inp { display: flex; align-items: center; line-height: normal; height: 46px; padding-top: 0; padding-bottom: 0; -webkit-appearance: none; appearance: none; }

  /* Light mode: remap neon text colors to readable equivalents */
  [data-theme="light"] .card { background: var(--surface); }
  [data-theme="light"] [style*="color:#7DF9C0"], [data-theme="light"] [style*="color: #7DF9C0"] { color: #1A7A4A !important; }
  [data-theme="light"] [style*="color:#C8FF9C"], [data-theme="light"] [style*="color: #C8FF9C"] { color: #2A7A00 !important; }
  [data-theme="light"] [style*="color:#8AB4FF"], [data-theme="light"] [style*="color: #8AB4FF"] { color: #2853A8 !important; }
  [data-theme="light"] [style*="color:#A78BFA"], [data-theme="light"] [style*="color: #A78BFA"] { color: #5B3FA8 !important; }
  [data-theme="light"] [style*="color:#F9C87D"], [data-theme="light"] [style*="color: #F9C87D"] { color: #8A5A00 !important; }
  [data-theme="light"] [style*="color:#ff7c7c"], [data-theme="light"] [style*="color: #ff7c7c"] { color: #A83030 !important; }
  [data-theme="light"] [style*="color:#9DC8FF"], [data-theme="light"] [style*="color: #9DC8FF"] { color: #2853A8 !important; }
  [data-theme="light"] [style*="color:#9CC8FF"], [data-theme="light"] [style*="color: #9CC8FF"] { color: #2853A8 !important; }
  [data-theme="light"] [style*="color:#FF9CC8"], [data-theme="light"] [style*="color: #FF9CC8"] { color: #A83060 !important; }
  [data-theme="light"] [style*="color:#C9A0FF"], [data-theme="light"] [style*="color: #C9A0FF"] { color: #5B3FA8 !important; }
  [data-theme="light"] .mono { color: var(--t3); }
  [data-theme="light"] .pill { border-color: rgba(0,0,0,0.15) !important; }
  [data-theme="light"] .btn-primary { color: #fff !important; }
  .inp:focus { border-color: var(--t3); }
  .pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-family: 'DM Mono', monospace; font-weight: 500; }
  .card { background: var(--surface); border: 1px solid var(--border-sub); border-radius: 16px; padding: 20px; margin-bottom: 14px; transition: background 0.25s, border-color 0.25s; }
  .btn-primary { width: 100%; padding: 14px; border-radius: 12px; font-weight: 700; font-size: 14px; letter-spacing: 0.5px; font-family: 'DM Mono', monospace; color: #000; }
  .seg { display: flex; gap: 6px; }
  .seg button { flex: 1; padding: 9px; border-radius: 9px; font-size: 13px; background: transparent; border: 1px solid var(--seg-border); color: var(--t3); transition: all 0.2s; }
  .seg button.on { background: var(--seg-active); color: var(--t1); border-color: var(--border); }
  h1.greet { font-size: 22px; font-weight: 500; margin: 4px 0 2px; color: var(--t1); padding-right: 50px; }
  .hint { font-size: 13px; color: var(--t3); line-height: 1.5; }
  /* ── Unified accordion system ────────────────────────────────────────────── */
  .app-acc { border-radius: 14px; overflow: hidden; margin-bottom: 12px; transition: border-color 0.2s; }
  .app-acc > .tacc { border: none !important; border-radius: 0 !important; width: 100%; text-align: left; }
  .app-acc-body { border-top: 1px solid var(--border-sub); }
  .app-sub-acc { border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
  .app-sub-acc > .tacc { border: none !important; border-radius: 0 !important; width: 100%; text-align: left; }
  .app-sub-body { border-top: 1px solid var(--border-sub); }
  details.app-detail { border: 1px solid var(--border-sub); border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
  details.app-detail > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; user-select: none; background: var(--surface-2); }
  details.app-detail > summary::-webkit-details-marker { display: none; }
  details.app-detail[open] > summary { border-bottom: 1px solid var(--border-sub); }
  details.app-detail > .app-detail-body { padding: 12px 14px; background: var(--surface-2); }

  .quick-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 14px 0; }
  .quick-actions button { padding: 11px 4px 10px; border-radius: 12px; font-size: 10px; font-weight: 600; text-align: center; width: 100%; display:flex; flex-direction:column; align-items:center; gap:5px; }
  .quick-actions button .qa-icon { font-size: 18px; line-height: 1; }
  .quick-actions button .qa-label { font-size: 10px; line-height: 1.2; letter-spacing: 0.2px; }
  /* ── Day tooltip ──────────────────────────────────────────────────────────── */
  #cal-tip { display:none; position:fixed; z-index:200; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px 14px; min-width:170px; max-width:230px; font-size:12px; box-shadow:0 6px 24px var(--shadow); pointer-events:none; transition:opacity 0.1s; }
  #cal-tip .tip-date { font-size:10px; color:var(--t4); font-family:'DM Mono',monospace; letter-spacing:1px; margin-bottom:8px; }
  #cal-tip .tip-row { display:flex; align-items:flex-start; gap:8px; margin-bottom:6px; }
  #cal-tip .tip-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; margin-top:3px; }
  #cal-tip .tip-empty { color:var(--t5); font-style:italic; }
  #theme-toggle { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--t2); font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  /* ── Light mode inline-style overrides ───────────────────────────────────── */
  [data-theme="light"] #body { color: var(--t1); }
  [data-theme="light"] .card { box-shadow: 0 2px 16px var(--shadow); }
  [data-theme="light"] .mono { color: var(--t3); }
  [data-theme="light"] .hint { color: var(--t3); }
  .inp::placeholder { color: var(--t5); font-style: italic; }
  [data-theme="light"] .inp::placeholder { color: #B0ACC8; font-style: italic; }
  [data-theme="light"] .field-label { color: var(--t3); }
  [data-theme="light"] .pill { background: rgba(0,0,0,0.07); color: var(--t2); border-color: var(--border); }
  [data-theme="light"] .card { border-color: var(--border-sub) !important; }
  [data-theme="light"] .inp { background: var(--input-bg); color: var(--t1); border-color: var(--border); }

  /* ── Shared component system (design pass — reuse these instead of one-off inline styles) ── */
  .btn-secondary { padding:11px; border-radius:10px; font-weight:600; font-size:13px; border:1px solid var(--border); color:var(--t2); background:transparent; }
  .btn-text { padding:6px 2px; font-weight:600; font-size:13px; border:none; background:none; }
  .icon-btn { width:34px; height:34px; min-width:34px; border-radius:10px; background:var(--surface-2); border:1px solid var(--border-sub); color:var(--t3); font-size:15px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .divider { border-top:1px solid var(--border-sub); }
  /* Rows inside an action sheet — one visual language for every "pick one of these" menu (Manage Kit, Log Something, Vial Actions, …) */
  .sheet-row { display:block; width:100%; text-align:left; padding:13px 14px; border-radius:10px; background:var(--surface-2); border:1px solid var(--border-sub); margin-bottom:8px; font-size:13px; color:var(--t1); font-weight:600; }
  .sheet-row .sub { font-size:11px; color:var(--t4); font-weight:400; margin-top:2px; }
  .sheet-row.danger { background:#ff7c7c0d; border-color:#ff7c7c33; color:#ff7c7c; }
  .sheet-row:last-child { margin-bottom:0; }

/* Respect accessibility motion settings and visible keyboard focus. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
:focus-visible { outline: 3px solid #7DF9C0; outline-offset: 3px; }

/* Phase 2A: mobile-first navigation and accessible secondary sheet */
.nexus-tabbar-v2 { justify-content:space-around; padding:8px 6px calc(8px + env(safe-area-inset-bottom)); }
.nexus-tabbar-v2 button { flex:1; min-width:0; min-height:48px; padding:5px 2px; gap:4px; font-size:11px; cursor:pointer; }
.nexus-tabbar-v2 button span { white-space:nowrap; }
.nexus-tabbar-v2 button:focus-visible,.nexus-more-sheet button:focus-visible { outline:2px solid var(--tabbar-act);outline-offset:2px; }
.nexus-more-backdrop { position:fixed;inset:0;background:rgba(0,0,0,.58);z-index:200;display:flex;align-items:flex-end;justify-content:center; }
.nexus-more-sheet { width:100%;max-width:560px;background:var(--tabbar-bg);color:var(--t1);border-radius:22px 22px 0 0;padding:12px 20px calc(22px + env(safe-area-inset-bottom));box-shadow:0 -8px 40px #0005;max-height:85dvh;overflow-y:auto; }
.nexus-more-handle {width:38px;height:5px;border-radius:99px;background:var(--tabbar-bdr);margin:0 auto 20px;}
.nexus-more-heading {display:flex;justify-content:space-between;align-items:center;font-size:21px;}
.nexus-more-close {min-width:44px;min-height:44px;font-size:18px;color:inherit;}
.nexus-more-sheet p {color:var(--t3);font-size:13px;margin:0 0 14px;}
.nexus-more-item {width:100%;min-height:62px;display:flex;justify-content:space-between;align-items:center;text-align:left;padding:10px 4px;border-top:1px solid var(--tabbar-bdr);color:inherit;}
.nexus-more-item span:first-child {display:flex;flex-direction:column;gap:4px;}
.nexus-more-item strong {font-size:15px;font-weight:600;}
.nexus-more-item small {font-size:12px;color:var(--t3);}
.nexus-more-item > span:last-child {font-size:25px;color:var(--t3);}
@media (prefers-reduced-motion:reduce) {.nexus-tabbar-v2 button {transition:none;}}

/* Phase 2B: Today presentation layer. Does not alter stored data or calculations. */
.nexus-today-hero{background:linear-gradient(140deg,var(--surface-2),var(--surface-3));border:1px solid var(--border);border-radius:18px;padding:18px 18px 15px;margin:12px 0 14px;box-shadow:0 5px 22px #0000000b}
.nexus-today-eyebrow{font-size:10px;letter-spacing:1.4px;color:var(--t4);font-weight:700;margin-bottom:11px}
.nexus-today-hero-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.nexus-today-big{font-size:clamp(20px,6vw,28px);line-height:1.2;letter-spacing:-.6px;font-weight:750;color:var(--t1)}
.nexus-today-big span{font-size:.7em;color:var(--t3);font-weight:550}
.nexus-today-sub{color:var(--t3);font-size:12px;margin-top:5px}
.nexus-today-pending{border:1px solid var(--border);background:var(--surface-2);border-radius:999px;padding:7px 10px;white-space:nowrap;font-size:11px;color:var(--t2)}
.nexus-today-track{height:7px;border-radius:999px;background:var(--border);overflow:hidden;margin-top:15px}
.nexus-today-track>div{height:100%;background:#a78bfa;border-radius:999px;transition:width .25s ease}
.nexus-today-jump{display:inline-block;margin-top:12px;padding:7px 0;min-height:44px;line-height:30px;font-size:12px;font-weight:650;color:var(--t2);text-decoration:none}
.nexus-today-section-label{font-size:10px;font-weight:700;letter-spacing:1.25px;color:var(--t4);padding:12px 0 9px;scroll-margin-top:18px}
@media(prefers-reduced-motion:reduce){.nexus-today-track>div{transition:none}}
@media(max-width:360px){.nexus-today-hero{padding:14px}.nexus-today-pending{font-size:10px;padding:6px 8px}}


/* Phase 2B-1 — cohesive Today experience; presentation only. */
.nexus-today-hero{border-radius:20px;background:linear-gradient(145deg,var(--surface-2),var(--surface-3));margin-bottom:12px}
.nexus-today-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin:0 0 18px}
.nexus-today-action-primary,.nexus-today-action-secondary{min-height:46px;border-radius:13px;font-size:13px;font-weight:650;padding:10px 15px;cursor:pointer}
.nexus-today-action-primary{background:#A78BFA;color:#18121f;border:1px solid #A78BFA}
.nexus-today-action-secondary{background:var(--surface-2);color:var(--t2);border:1px solid var(--border);display:flex;align-items:center;gap:10px}
.nexus-today-section-label{font-family:inherit;font-size:17px;font-weight:700;letter-spacing:-.25px;color:var(--t1);padding:7px 0 12px}
.nexus-today-view-nav{display:flex;gap:5px;margin-bottom:12px;overflow-x:auto;scrollbar-width:none}
.nexus-today-view-nav::-webkit-scrollbar{display:none}
.nexus-today-view-nav .hv-nav{white-space:nowrap;min-height:44px!important}
.nexus-today-details{margin:18px 0 14px;border:1px solid var(--border);border-radius:16px;background:var(--surface);overflow:hidden}
.nexus-today-details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;min-height:62px;padding:12px 16px}
.nexus-today-details>summary::-webkit-details-marker{display:none}
.nexus-today-details-title{font-size:14px;font-weight:700;color:var(--t1);white-space:nowrap}
.nexus-today-details-meta{font-size:11px;color:var(--t4);flex:1;text-align:right;line-height:1.4}
.nexus-today-details-chevron{font-size:17px;color:var(--t4);transition:transform .2s}
.nexus-today-details[open] .nexus-today-details-chevron{transform:rotate(180deg)}
.nexus-today-details-body{padding:0 15px 15px;border-top:1px solid var(--border-sub)}
.nexus-today-tracking-content{padding-top:14px}
.nexus-today-onboarding{margin:0 0 14px;border:1px solid var(--border-sub);border-radius:12px;padding:0 12px}
.nexus-today-onboarding>summary{cursor:pointer;padding:12px 0;color:var(--t3);font-size:12px;display:flex;justify-content:space-between;align-items:center}
.nexus-today-onboarding .card{margin-top:0!important}
@media(max-width:390px){.nexus-today-details>summary{flex-wrap:wrap}.nexus-today-details-meta{font-size:10px}.nexus-today-action-secondary{padding:10px 12px}}
@media(prefers-reduced-motion:reduce){.nexus-today-details-chevron{transition:none}}

/* Phase 2B-2: Today secondary content — same hierarchy as the new daily overview */
.nexus-week-card,.nexus-lookahead{background:var(--surface);border:1px solid var(--border-sub);border-radius:16px;padding:17px 16px;margin:18px 0 14px;overflow:hidden}
.nexus-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.nexus-section-head h3{font-size:17px;line-height:1.25;font-weight:700;letter-spacing:-.3px;color:var(--t1);margin:3px 0 0}
.nexus-section-kicker{font-size:9px;font-weight:700;letter-spacing:1.6px;color:var(--t5)}
.nexus-text-action{background:none;border:0;color:#B99BEA;font-size:12px;font-weight:650;padding:9px 0 9px 9px;min-height:44px;white-space:nowrap;cursor:pointer}
.nexus-week-range{display:block;font-size:11px;color:var(--t4);margin-top:4px}
.nexus-week-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.nexus-week-metrics>div{border:1px solid var(--border-sub);background:var(--surface-2);border-radius:12px;padding:12px 10px;display:flex;flex-direction:column;gap:5px;min-width:0}
.nexus-week-metrics strong{font-size:23px;font-weight:750;color:var(--t1);font-variant-numeric:tabular-nums;line-height:1}
.nexus-week-metrics span{font-size:10px;color:var(--t4)}
.nexus-week-footnote,.nexus-lookahead-note{font-size:11px;color:var(--t5);margin:10px 0 0}
.nexus-week-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;background:transparent;border:0;border-top:1px solid var(--border-sub);padding:14px 0 0;margin-top:14px;text-align:left;color:var(--t3);font-size:12px;min-height:44px;cursor:pointer}
.nexus-lookahead-list{border-top:1px solid var(--border-sub)}
.nexus-lookahead-row{width:100%;min-height:54px;display:flex;align-items:center;gap:12px;background:none;border:0;border-bottom:1px solid var(--border-sub);padding:10px 0;text-align:left;cursor:pointer}
.nexus-lookahead-date{font-size:11px;color:var(--t4);min-width:82px;flex-shrink:0}
.nexus-lookahead-name{font-size:13px;font-weight:550;color:var(--t2);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nexus-lookahead-arrow{color:var(--t5);font-size:20px}
.nexus-week-card button:focus-visible,.nexus-lookahead button:focus-visible{outline:2px solid #C5A4F5;outline-offset:3px;border-radius:5px}
@media(max-width:360px){.nexus-week-card,.nexus-lookahead{padding:14px 12px}.nexus-week-metrics>div{padding:10px 7px}.nexus-lookahead-date{min-width:70px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.nexus-week-card *,.nexus-lookahead *{transition:none!important;animation:none!important}}

/* Phase 2B-3 — Progressive disclosure: quiet secondary sections, unchanged underlying data. */
.nexus-today-hero{padding:17px 18px!important;margin-bottom:10px!important}
.nexus-today-hero .nexus-today-eyebrow{margin-bottom:8px}
.nexus-today-actions{display:flex!important;justify-content:flex-start;margin:0 0 18px!important}
.nexus-today-action-primary{min-height:44px!important;padding:9px 16px!important}
.nexus-today-tracking-actions{display:flex;justify-content:flex-start;margin:0 0 14px}
.nexus-today-tracking-actions .nexus-today-action-secondary{min-height:42px}
.nexus-week-card.nexus-week-quiet,.nexus-lookahead.nexus-quiet-details{background:transparent;border:0;border-top:1px solid var(--border-sub);border-radius:0;padding:0;margin:0;box-shadow:none}
.nexus-week-quiet .nexus-quiet-header{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:74px;padding:14px 3px}
.nexus-quiet-header h3,.nexus-quiet-details summary strong{font-size:14px;font-weight:700;color:var(--t1);margin:0}
.nexus-quiet-header p,.nexus-quiet-details summary small{font-size:12px;color:var(--t4);margin:5px 0 0;line-height:1.5;display:block}
.nexus-quiet-toggle{min-width:44px;min-height:44px;border:0;background:transparent;color:var(--t3);font-size:18px;cursor:pointer}
.nexus-week-quiet #nexus-week-expanded{padding:0 2px 16px}
.nexus-week-expanded-top,.nexus-quiet-expanded-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--t4);font-size:11px}
.nexus-week-expanded-top .nexus-text-action{min-height:40px}
.nexus-week-quiet .nexus-week-metrics{margin:8px 0 14px}
.nexus-quiet-details summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;min-height:74px;padding:14px 3px;cursor:pointer}
.nexus-quiet-details summary::-webkit-details-marker{display:none}
.nexus-quiet-chevron{min-width:44px;min-height:44px;display:grid;place-items:center;color:var(--t3);font-size:18px;transition:transform .2s}
.nexus-quiet-details[open] .nexus-quiet-chevron{transform:rotate(180deg)}
.nexus-quiet-expanded{padding:0 2px 12px}
.nexus-quiet-expanded-footer{padding:4px 0}
.nexus-today-details{background:transparent!important;border:0!important;border-top:1px solid var(--border-sub)!important;border-radius:0!important;margin:0!important}
.nexus-today-details>summary{padding:13px 3px!important;min-height:74px!important}
.nexus-today-details-body{padding:0 3px 15px!important}
.nexus-today-onboarding{background:transparent;border-color:var(--border-sub)}
@media(prefers-reduced-motion:reduce){.nexus-quiet-chevron{transition:none}}


/* Phase 2B-5: match quick action alignment */
.nexus-today-actions-b4 .nexus-today-action-secondary{display:flex!important;justify-content:center!important;align-items:center!important;text-align:center!important;gap:0!important}
/* Phase 2C-1: scoped visual hierarchy for Protocol and Stash; no inventory/dose logic changes */
.nexus-screen-protocols>.greet,.nexus-screen-stash>.greet{margin-bottom:18px!important;letter-spacing:-.025em}
.nexus-screen-protocols .proto-sub,.nexus-screen-stash .stash-sub-btn{min-height:42px!important;display:inline-flex;align-items:center;justify-content:center;line-height:1.25}
.nexus-screen-protocols #new-protocol{min-height:46px!important;border-radius:12px!important;font-weight:650!important;margin-bottom:22px!important}
.nexus-screen-protocols .nexus-protocol-archive{border-top:1px solid var(--border-sub);margin-top:16px;padding-top:12px}
.nexus-screen-protocols .nexus-protocol-archive>summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--t2);font-size:13px;font-weight:600}
.nexus-screen-protocols .nexus-protocol-archive>summary::-webkit-details-marker{display:none}
.nexus-screen-protocols .nexus-protocol-archive>summary:after{content:'⌄';font-size:18px;color:var(--t4)}
.nexus-screen-protocols .nexus-protocol-archive[open]>summary:after{transform:rotate(180deg)}
.nexus-screen-stash .stash-sub-btn{flex:1;min-width:0}
.nexus-screen-stash button{touch-action:manipulation}
.nexus-screen-protocols button:focus-visible,.nexus-screen-stash button:focus-visible,.nexus-protocol-archive>summary:focus-visible{outline:3px solid #A78BFA!important;outline-offset:3px}
@media(max-width:390px){.nexus-screen-stash .stash-sub-btn{font-size:12px!important;padding:9px 6px!important}}
/* Phase 2B-4: focused Today actions and contextual, manageable alerts */
.nexus-today-actions-b4{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px!important;margin-bottom:16px!important}
.nexus-today-actions-b4 button{min-height:46px!important;width:100%;font-size:13px!important;padding:10px 8px!important;white-space:normal}
.nexus-today-actions-b4 .nexus-today-action-secondary{background:var(--surface-2)!important;border:1px solid var(--border-sub)!important;color:var(--t2)!important;border-radius:10px!important}
.nexus-dismissed-alerts{margin:-4px 0 12px;text-align:right}
.nexus-dismissed-alerts button{border:0;background:transparent;color:var(--t4);font-size:11px;padding:7px 4px;text-decoration:underline;text-underline-offset:3px}
@media(max-width:350px){.nexus-today-actions-b4{grid-template-columns:1fr}}

/* Phase 2C-2: progressive disclosure for Protocol cards */
.nexus-protocol-card{padding:15px!important;border-radius:16px!important}
.nexus-protocol-card-head{display:flex;align-items:center;gap:9px;margin-bottom:9px}
.nexus-protocol-card .manage-proto-btn{min-width:38px;min-height:38px}
.nexus-protocol-summary{font-size:12px;line-height:1.5;color:var(--t2);overflow-wrap:anywhere}
.nexus-protocol-muted{font-size:11px;line-height:1.45;color:var(--t4);margin-top:3px}
.nexus-protocol-meta{font-size:11px;line-height:1.5;color:var(--t4);margin-top:5px}
.nexus-protocol-section-label{font-size:10px;font-weight:700;letter-spacing:1.1px;text-transform:uppercase;margin:18px 0 9px}
.nexus-protocol-details{border-top:1px solid var(--border-sub);margin-top:12px}
.nexus-protocol-details>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;min-height:42px;color:var(--t2);font-size:12px;font-weight:600}
.nexus-protocol-details>summary::-webkit-details-marker{display:none}
.nexus-protocol-details[open]>summary .nx-proto-chevron{transform:rotate(180deg)}
.nexus-protocol-details>summary span:not(.nx-proto-chevron){transform:none!important;}
.nexus-protocol-details>summary .nx-proto-chevron{display:inline-block;transition:transform .18s ease;transform-origin:center}
.nexus-protocol-details-body{padding:4px 0 6px}
.nexus-protocol-timeline{background:var(--surface-2);border-radius:10px;padding:10px;margin-bottom:9px}
.nexus-protocol-compound{padding:7px 0;border-bottom:1px solid var(--border-sub)}
.nexus-protocol-compound:last-child{border-bottom:0}
.nexus-protocol-start{display:flex;align-items:center;gap:10px;border-radius:10px;background:#7DF9C00D;border:1px solid #7DF9C02B;padding:11px;margin-top:10px}
@media(prefers-reduced-motion:reduce){.nexus-protocol-details>summary .nx-proto-chevron{transition:none}}

/* Nexus v0.2.3.4 — cleaner Calendar > Logs day cards */
.nx-log-quick-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.nx-log-day{margin:0 0 14px;border:1px solid var(--border);background:var(--surface-1,var(--surface-2));border-radius:16px;overflow:hidden}
.nx-log-day-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 16px 11px}
.nx-log-day-title{font-size:14px;font-weight:650;color:var(--t1);display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.nx-log-today{font-size:10px;font-weight:600;color:#D8B5E7;background:#A78BFA19;padding:3px 7px;border-radius:99px}
.nx-log-day-count{font-size:11px;color:var(--t4);white-space:nowrap}
.nx-log-day-body{padding:0 12px 10px}
.nx-log-entry{display:flex;align-items:flex-start;gap:11px;padding:12px 5px;border-radius:10px}
.nx-log-entry+.nx-log-entry{margin-top:2px}
.nx-log-entry-icon{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;background:var(--surface-2);border-radius:9px;font-size:14px}
.nx-log-entry-content{flex:1;min-width:0;line-height:1.55}
.nx-log-entry-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}
.nx-log-entry-actions button{min-height:30px;min-width:30px}
.nx-log-updates{margin:5px 4px 0;background:var(--surface-2);border-radius:10px;overflow:hidden}
.nx-log-updates summary{cursor:pointer;list-style:none;padding:11px 12px;color:var(--t3);font-size:12px;display:flex;justify-content:space-between;align-items:center}
.nx-log-updates summary::-webkit-details-marker{display:none}
.nx-log-updates[open] summary span{transform:rotate(180deg)}
.nx-log-updates-content{padding:2px 12px 12px}
.nx-log-update{display:flex;gap:9px;align-items:flex-start;padding:9px 0}
.nx-log-update+.nx-log-update{border-top:1px solid var(--border-sub)}
@media(max-width:400px){.nx-log-entry{gap:8px}.nx-log-day-body{padding:0 9px 10px}.nx-log-day-header{padding:13px 12px 10px}}


/* v0.2.3.5 — Logs: preview-inspired compact editorial cards */
.nx-log-quick-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-bottom:20px}
.nx-log-quick-actions button{min-width:0!important;flex:unset!important;min-height:43px;padding:8px 3px!important;border-radius:12px!important;font-size:clamp(9px,2.6vw,12px)!important;white-space:nowrap}
.nx-log-day{margin-bottom:12px;border-radius:17px;border:1px solid var(--border-sub);background:var(--surface-1,var(--surface));box-shadow:0 4px 18px rgba(15,10,35,.035);overflow:hidden}
.nx-log-day-header{padding:16px 17px 9px;align-items:baseline}
.nx-log-day-title{font-size:14px;letter-spacing:-.2px;font-weight:750;gap:8px}
.nx-log-day-count{font-size:10px;font-weight:550;opacity:.85}
.nx-log-day-body{padding:0 12px 11px}
.nx-log-entry{padding:9px 5px;gap:10px;align-items:center;min-height:46px}
.nx-log-entry+.nx-log-entry{margin-top:3px}
.nx-log-entry-icon{width:34px;height:34px;flex-basis:34px;border-radius:11px;font-size:16px;background:var(--surface-2);border:1px solid var(--border-sub)}
.nx-log-entry-content{line-height:1.42;font-size:12px;color:var(--t2)}
.nx-log-entry-content>span,.nx-log-entry-content>div{max-width:100%}
.nx-log-entry-content .pill{display:inline-flex;align-items:center;max-width:100%;padding:4px 8px!important;margin:2px 0;font-size:10px!important;line-height:1.2;white-space:normal;border-radius:9px!important}
.nx-log-entry-actions{gap:4px;align-self:center}
.nx-log-entry-actions button{min-height:32px;min-width:32px;border-radius:9px!important;font-size:11px!important}
.nx-log-entry-actions button:first-child{background:var(--surface-2);padding:5px 9px!important}
.nx-log-entry-actions button:last-child{font-size:14px!important;opacity:.8}
.nx-log-updates{margin:7px 4px 1px;border-radius:11px;border:1px solid var(--border-sub);background:var(--surface-2)}
.nx-log-updates summary{min-height:40px;font-weight:600;padding:10px 12px}
.nx-log-updates-content{padding:3px 12px 12px}
.nx-log-update{padding:8px 0}
.nx-log-today{font-size:9px;padding:3px 8px}
[data-theme="light"] .nx-log-day{background:#FFFFFF!important;border-color:#E6E3F0!important;box-shadow:0 4px 16px rgba(49,36,80,.045)}
[data-theme="light"] .nx-log-entry-icon{background:#F2EFF9;border-color:#ECE7F4}
[data-theme="light"] .nx-log-entry-actions button:first-child{background:#F7F5FB;border-color:#E5E0F0!important;color:#514968!important}
[data-theme="light"] .nx-log-entry-content .pill{background:#F6F4FA!important;border-color:#E8E3F0!important;color:#625A78!important}
[data-theme="light"] .nx-log-updates{background:#F8F7FC;border-color:#E8E3F0}
@media(max-width:390px){.nx-log-day-header{padding:14px 13px 8px}.nx-log-day-body{padding:0 9px 9px}.nx-log-entry{gap:8px}.nx-log-entry-icon{width:31px;height:31px;flex-basis:31px}.nx-log-quick-actions{gap:5px}}


/* v0.2.3.6 — Lavender Atelier navigation, logs, and stash */
.nx-log-add-wrap{margin:0 0 16px;position:relative}
.nx-add-log-btn{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:13px 16px;border:1px solid var(--border-sub);border-radius:13px;background:var(--surface-2);color:var(--t1);font-size:13px;font-weight:650;cursor:pointer}
.nx-add-log-btn span{font-size:16px;color:var(--t4)}
.nx-add-log-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:10px;margin-top:7px;border:1px solid var(--border-sub);border-radius:13px;background:var(--surface-1)}
.nx-add-log-menu[hidden]{display:none!important}
.nx-add-log-menu button{padding:11px 9px;border:1px solid var(--border-sub);border-radius:10px;background:var(--surface-2);color:var(--t2);font-size:12px;text-align:left;cursor:pointer}
.nx-add-log-menu button:last-child{grid-column:span 2}
.nx-cal-segment{display:flex!important;gap:4px!important;padding:4px!important;border-radius:14px!important;background:var(--surface-2)!important;border:1px solid var(--border-sub)!important;margin-bottom:17px!important}
.nx-cal-segment button{flex:1!important;min-height:40px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--t4)!important;font-size:13px!important;font-weight:600!important;cursor:pointer}
.nx-cal-segment button.on{background:var(--surface-3)!important;color:var(--t1)!important;box-shadow:0 1px 5px #00000010!important}
.nx-stash-hero{padding:15px 16px;border:1px solid var(--border-sub);background:var(--surface-2);border-radius:16px;margin:0 0 14px}
.nx-stash-hero-title{font-size:10px;letter-spacing:1.4px;text-transform:uppercase;color:var(--t4);margin-bottom:9px;font-weight:700}
.nx-stash-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.nx-stash-stat{background:var(--surface-1);border:1px solid var(--border-sub);border-radius:11px;padding:10px 9px}
.nx-stash-stat strong{display:block;color:var(--t1);font-size:22px;line-height:1.1;margin-bottom:5px}
.nx-stash-stat span{font-size:10px;color:var(--t4)}
.nx-stash-stat.attention strong{color:#A47AC6}
.nx-stash-invested{margin-top:10px;color:var(--t4);font-size:10px}
.nx-stash-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:17px}
.nx-stash-actions button{min-width:0;padding:12px 5px;border:1px solid var(--border-sub);border-radius:11px;background:var(--surface-2);color:var(--t2);font-size:12px;font-weight:600}


/* Nexus 0.2.3.8 — Lavender Atelier inventory cards. Presentation-only. */
.nx-kit-card{background:var(--surface-1)!important;border:1px solid var(--border-sub)!important;border-radius:18px!important;box-shadow:0 3px 16px rgba(70,46,102,.055);padding:17px!important;overflow:hidden}
.nx-kit-heading{margin-bottom:14px!important}
.nx-kit-heading>span:nth-child(2){font-size:16px!important;letter-spacing:-.35px!important;font-weight:700!important}
.nx-kit-heading>div:first-child{width:7px!important;height:24px!important;border-radius:6px!important}
.nx-kit-quantity{margin:6px 0 11px!important}
.nx-kit-quantity>span:first-child{font-size:32px!important;letter-spacing:-1px!important;font-variant-numeric:tabular-nums}
.nx-kit-meter{height:6px!important;border-radius:8px!important;margin-bottom:11px!important}
.nx-kit-actions{margin-top:14px!important;gap:8px!important}
.nx-kit-actions button{min-height:42px!important;border-radius:11px!important;font-size:12px!important;letter-spacing:0!important;font-family:inherit!important}
.nx-kit-actions button:first-child{background:var(--surface-2)!important;color:var(--t1)!important;border-color:var(--border-sub)!important}
.nx-kit-details{border-top:1px solid var(--border-sub);padding-top:12px;margin-top:16px!important}
.nx-kit-details>summary{font-size:12px!important;font-weight:650!important;color:var(--t3)!important;display:flex;justify-content:space-between;align-items:center;min-height:30px}
.nx-kit-details>summary::after{content:'⌄';font-size:19px;line-height:1;transition:transform .15s}
.nx-kit-details[open]>summary::after{transform:rotate(180deg)}
.nx-stash-hero{background:var(--surface-1);border-radius:18px;padding:17px}
.nx-stash-stat{background:var(--surface-2);border:0;border-radius:12px}
.nx-stash-actions button{background:var(--surface-1);border-radius:12px;min-height:44px}
@media(max-width:390px){.nx-kit-card{padding:14px!important}.nx-kit-heading>span:nth-child(2){font-size:14px!important}.nx-kit-actions button{font-size:11px!important}}

/* Nexus v0.2.3.9-beta — Lavender Atelier Protocol refinement */
.nexus-screen-protocols #new-protocol.nx-proto-create{
  width:auto!important;max-width:100%!important;min-height:44px!important;
  padding:10px 17px!important;margin:0 0 19px!important;border-radius:12px!important;
  font-family:inherit!important;font-size:13px!important;font-weight:650!important;
  letter-spacing:0!important;background:#A78BFA!important;color:#fff!important;
  box-shadow:none!important;
}
.nexus-screen-protocols .nx-proto-create span{font-size:19px;line-height:0;vertical-align:-1px;margin-right:5px}
.nexus-screen-protocols .nexus-protocol-card{
  padding:16px!important;margin-bottom:10px!important;border-radius:17px!important;
  background:var(--surface-1)!important;border:1px solid var(--border-sub)!important;
  box-shadow:0 3px 16px rgba(70,46,102,.045)!important;
}
.nexus-screen-protocols .nexus-protocol-card-head{margin-bottom:6px!important;gap:7px!important}
.nexus-screen-protocols .nx-proto-title{
  font-size:15px!important;line-height:1.35!important;font-weight:700!important;
  letter-spacing:-.025em;color:var(--t1);overflow-wrap:anywhere;
}
.nexus-screen-protocols .nexus-protocol-summary{font-size:12px!important;line-height:1.45!important}
.nexus-screen-protocols .nexus-protocol-meta{font-size:11px!important;margin-top:3px!important}
.nexus-screen-protocols .nexus-protocol-card .manage-proto-btn{
  width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;
  border-radius:11px!important;font-family:inherit!important;
}
.nexus-screen-protocols .nexus-protocol-details{
  margin-top:9px!important;border-top:0!important;
  background:var(--surface-2)!important;border-radius:11px!important;
}
.nexus-screen-protocols .nexus-protocol-details>summary{
  padding:0 12px!important;min-height:42px!important;font-size:12px!important;
  border:0!important;gap:8px!important;
}
.nexus-screen-protocols .nexus-protocol-details>summary .nx-proto-chevron{
  margin-left:auto!important;font-size:17px!important;
}
.nexus-screen-protocols .nexus-protocol-details-body{padding:0 12px 12px!important}
.nexus-screen-protocols .nexus-protocol-section-label{margin:16px 0 8px!important;letter-spacing:.085em!important}
@media(max-width:390px){
 .nexus-screen-protocols .nexus-protocol-card{padding:13px!important}
 .nexus-screen-protocols .nx-proto-title{font-size:14px!important}
}


/* Nexus v0.2.3.11 — Lavender Atelier form and modal consistency */
.modal-bg{background:rgba(22,16,35,.58)!important;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.modal{box-sizing:border-box!important;width:100%;max-height:min(92dvh,920px)!important;overscroll-behavior:contain;padding:22px 20px calc(24px + env(safe-area-inset-bottom))!important;scroll-padding-bottom:130px;border-radius:22px 22px 0 0!important;box-shadow:0 -12px 48px rgba(22,14,45,.15)!important}
@media(min-width:561px){.modal{border-radius:20px!important;max-height:min(90dvh,850px)!important}}
.modal .field-label{font-family:inherit!important;font-size:11px!important;letter-spacing:.02em!important;text-transform:none!important;font-weight:650!important;margin:0 0 7px!important;line-height:1.4!important}
.modal .inp,.modal input.inp,.modal select.inp,.modal textarea.inp{font-family:inherit!important;min-height:44px!important;font-size:16px!important;line-height:1.4!important;border-radius:12px!important;padding:11px 12px!important;transition:border-color .18s,box-shadow .18s!important}
.modal textarea.inp{min-height:90px!important;resize:vertical}
.modal .inp:focus-visible,.modal input:focus-visible,.modal select:focus-visible,.modal textarea:focus-visible{outline:2px solid rgba(151,117,211,.45)!important;outline-offset:1px!important;border-color:#A78BFA!important}
.modal button{font-family:inherit!important;min-height:40px;touch-action:manipulation}
.modal .btn-primary{min-height:46px!important;font-family:inherit!important;font-weight:700!important;letter-spacing:0!important;border-radius:12px!important}
.modal .seg button{min-height:42px!important;border-radius:10px!important}
.modal :is(input,select,textarea,button){max-width:100%;box-sizing:border-box}
.modal :is(h2,h3){line-height:1.25;letter-spacing:-.025em}
@media(max-width:390px){.modal{padding-left:16px!important;padding-right:16px!important}}
@media(prefers-reduced-motion:reduce){.modal{animation:none!important;transition:none!important}}


/* Nexus v0.2.3.12-beta — Today + Settings Lavender Atelier */
.nexus-screen-home .nexus-today-view-nav{
 display:flex!important;gap:4px!important;background:var(--surface-2)!important;
 border:1px solid var(--border-sub)!important;border-radius:14px!important;
 padding:4px!important;margin:9px 0 15px!important;
}
.nexus-screen-home .nexus-today-view-nav .hv-nav{
 border:0!important;min-width:0!important;border-radius:10px!important;
 font-size:12px!important;min-height:39px!important;padding:8px 3px!important;
 box-shadow:none!important;white-space:nowrap!important;
}
.nexus-screen-home .nexus-today-view-nav .hv-nav[aria-pressed="true"]{
 background:var(--surface)!important;box-shadow:0 1px 5px #00000012!important;
 color:var(--t1)!important;
}
.nexus-screen-home #add-custom-compound{
 border:0!important;border-radius:10px!important;background:var(--surface)!important;
 min-width:40px!important;min-height:39px!important;font-size:19px!important;
}
.nexus-screen-home .nexus-today-details{
 border-radius:16px!important;overflow:hidden;
}
.nexus-screen-home .nexus-today-section-label{
 letter-spacing:-.01em!important;font-weight:650!important;
}
.nexus-screen-profile .settings-row{
 border-bottom:1px solid var(--border-sub)!important;
 padding:13px 10px!important;border-radius:10px!important;
 transition:background .15s ease;
}
.nexus-screen-profile .settings-row:active{background:var(--surface-2)!important}
.nexus-screen-profile .settings-row .nx-settings-icon{
 width:35px;height:35px;display:flex;align-items:center;justify-content:center;
 flex-shrink:0;border-radius:10px;background:var(--surface-2);color:#9875C9;
}
.nexus-screen-profile .settings-row .nx-settings-chevron{
 color:var(--t4);width:15px;height:15px;flex-shrink:0;
}
#theme-toggle{min-width:40px!important;min-height:40px!important;display:inline-flex!important;
 align-items:center!important;justify-content:center!important;border-radius:12px!important}
#theme-toggle svg{width:19px;height:19px;display:block}
@media(max-width:360px){
 .nexus-screen-home .nexus-today-view-nav .hv-nav{font-size:11px!important}
 .nexus-screen-home #add-custom-compound{min-width:36px!important}
}
@media(prefers-reduced-motion:reduce){.nexus-screen-profile .settings-row{transition:none}}


/* Nexus v0.2.3.13-beta — whole-app visual consistency pass.
   Scoped presentation-only refinements; existing JS/data untouched. */
:root{--nx-tap-min:44px;--nx-focus:#A78BFA}
:is(.nexus-screen-home,.nexus-screen-protocols,.nexus-screen-stash,.nexus-screen-profile)
 :is(button,[role="button"],summary){-webkit-tap-highlight-color:transparent;touch-action:manipulation}
:is(.nexus-screen-home,.nexus-screen-protocols,.nexus-screen-stash,.nexus-screen-profile)
 :is(button,[role="button"],summary,input,select,textarea):focus-visible{
 outline:2px solid var(--nx-focus)!important;outline-offset:3px!important
}
:is(.nexus-screen-home,.nexus-screen-protocols,.nexus-screen-stash,.nexus-screen-profile)
 :is(input,textarea,select){max-width:100%;box-sizing:border-box}
:is(.nexus-screen-home,.nexus-screen-protocols,.nexus-screen-stash,.nexus-screen-profile)
 :is(h1,h2,h3){text-wrap:balance;overflow-wrap:break-word}
:is(.nexus-screen-home,.nexus-screen-protocols,.nexus-screen-stash,.nexus-screen-profile)
 :is(p,.nexus-protocol-summary,.nexus-protocol-muted){overflow-wrap:anywhere}
.nexus-screen-stash .stash-sub-btn,
.nexus-screen-protocols .manage-proto-btn,
.nexus-screen-home .nexus-today-actions-b4 button{min-height:var(--nx-tap-min)!important}
.nexus-screen-profile .settings-row{min-height:var(--nx-tap-min);box-sizing:border-box}
.nexus-screen-protocols .nexus-protocol-card,
.nexus-screen-stash .nexus-stash-kit-card{min-width:0}
.nexus-screen-protocols .nexus-protocol-details>summary{
 min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px
}
.nexus-screen-protocols .nexus-protocol-details>summary span:not(.nx-proto-chevron){
 transform:none!important;rotate:none!important;writing-mode:horizontal-tb!important
}
.nexus-screen-protocols .nexus-protocol-details[open]>summary .nx-proto-chevron{
 transform:rotate(180deg)
}
@media(max-width:380px){
 .nexus-screen-protocols .nexus-protocol-card{padding:12px!important}
 .nexus-screen-stash .stash-sub-btn{white-space:normal;line-height:1.25}
}
@media(prefers-reduced-motion:reduce){
 :is(.nexus-screen-home,.nexus-screen-protocols,.nexus-screen-stash,.nexus-screen-profile)
 :is(button,summary,.settings-row){animation:none!important;transition:none!important}
}


/* Nexus v0.2.3.14 — Lavender Atelier visual system refresh.
   Unified palettes, quiet surfaces, readable type, and restrained emphasis. */
:root{
 --bg:#171421;--bg-deep:#100E18;
 --surface:#221D2E;--surface-1:#221D2E;
 --surface-2:#2D273A;--surface-3:#383046;
 --border:#4B405B;--border-sub:#393044;
 --t1:#F8F4FC;--t2:#D5CADF;--t3:#B1A3C1;
 --t4:#9787AA;--t5:#7F708E;
 --modal-bg:#231D2F;--modal-border:#493D58;
 --seg-active:#413550;--seg-border:#493D58;
 --input-bg:#2B2438;--pill-bg:rgba(190,166,221,.12);
 --tabbar-bg:rgba(25,20,34,.96);--tabbar-bdr:#41364F;
 --tabbar-txt:#B0A0C0;--tabbar-act:#D5B5FF;
 --nx-lavender:#B99AE7;--nx-lavender-strong:#A88BDB;
 --nx-card-shadow:0 5px 22px rgba(5,3,15,.13);
 color-scheme:dark;
}
[data-theme="light"]{
 --bg:#F7F5FC;--bg-deep:#F0ECF7;
 --surface:#FFFFFF;--surface-1:#FFFFFF;
 --surface-2:#F5F1FA;--surface-3:#EBE5F3;
 --border:#DCD3E8;--border-sub:#EAE4F1;
 --t1:#30263F;--t2:#534663;--t3:#6F617F;
 --t4:#81738E;--t5:#9387A0;
 --modal-bg:#FFFFFF;--modal-border:#E7DEEE;
 --seg-active:#FFFFFF;--seg-border:#E7DFEE;
 --input-bg:#FBFAFE;--pill-bg:#F3EEF9;
 --shadow:rgba(74,52,104,.10);
 --tabbar-bg:rgba(250,248,253,.96);--tabbar-bdr:#E9E3F0;
 --tabbar-txt:#796D86;--tabbar-act:#7554AC;
 --nx-lavender:#A78BFA;--nx-lavender-strong:#7957BA;
 --nx-card-shadow:0 4px 18px rgba(67,45,92,.045);
 color-scheme:light;
}
body{line-height:1.45;letter-spacing:-.005em}
.card,.nx-log-day,.nx-kit-card,.nexus-screen-protocols .nexus-protocol-card{
 box-shadow:var(--nx-card-shadow)!important;
 border-color:var(--border-sub)!important;
}
.card{border-radius:17px;padding:17px;margin-bottom:12px}
.btn-primary{font-family:inherit!important;letter-spacing:0!important;font-weight:700!important;
 border-radius:12px!important;min-height:46px}
.field-label{font-family:inherit!important;letter-spacing:.025em!important;font-size:11px!important;font-weight:650!important}
.inp{border-color:var(--border-sub)!important;background:var(--input-bg)!important;border-radius:12px!important}
.inp:focus{border-color:var(--nx-lavender-strong)!important;box-shadow:0 0 0 3px rgba(167,139,250,.12)}
.tabbar{border-top-color:var(--tabbar-bdr)!important}
.tabbar button{min-height:48px;min-width:54px;padding:6px 9px;font-weight:550}
.tabbar button.active{font-weight:700}
.nx-cal-segment button.on{background:var(--seg-active)!important;
 box-shadow:0 1px 5px rgba(55,32,80,.09)!important}
.nx-add-log-btn,.nx-stash-actions button,.nx-kit-actions button{
 border-color:var(--border-sub)!important}
.nx-add-log-btn{background:var(--surface)!important}
.nx-stash-hero{background:var(--surface)!important;border-color:var(--border-sub)!important}
.nx-stash-stat{background:var(--surface-2)!important}
.nexus-screen-protocols #new-protocol.nx-proto-create{
 background:#9270D2!important;color:#fff!important;
}
.nexus-screen-protocols .nexus-protocol-details{background:var(--surface-2)!important}
.nexus-screen-profile .settings-row .nx-settings-icon{
 background:var(--surface-2)!important;color:var(--nx-lavender-strong)!important
}
[data-theme="light"] .nx-log-day,[data-theme="light"] .nx-kit-card{
 background:#fff!important;border-color:#EAE4F1!important
}
[data-theme="light"] .modal-bg{background:rgba(43,28,63,.35)!important}
@media(max-width:390px){#app{padding-left:13px;padding-right:13px}
 .card{padding:14px}
 .tabbar button{min-width:0;flex:1;padding-left:3px;padding-right:3px}
}
@media(prefers-reduced-motion:reduce){body,.card,.inp{transition:none!important}}


/* Nexus 0.3.0 — Atelier Unified: one visual layer across the full product */
:root{
 --nx-space-1:4px;--nx-space-2:8px;--nx-space-3:12px;
 --nx-space-4:16px;--nx-space-5:20px;--nx-space-6:24px;
 --nx-radius-sm:10px;--nx-radius-md:14px;--nx-radius-lg:18px;
 --nx-radius-xl:22px;--nx-touch:44px;
 --nx-ring:rgba(167,139,250,.24);
 --nx-muted:var(--t3);--nx-ink:var(--t1);
 --nx-canvas:var(--bg);--nx-panel:var(--surface);
 --nx-subtle:var(--surface-2);--nx-stroke:var(--border-sub);
}
html{scroll-padding-top:16px}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 -webkit-font-smoothing:antialiased;line-height:1.5}
#app{max-width:700px;margin-inline:auto;min-width:0}
#app *{box-sizing:border-box}
#app :is(h1,h2,h3){letter-spacing:-.025em;line-height:1.2;overflow-wrap:break-word}
#app :is(p,.hint,.muted){line-height:1.5}
#app :is(button,input,select,textarea){font-family:inherit}
#app :is(button,[role="button"],summary){-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#app :is(button,[role="button"],input,select,textarea,summary):focus-visible,
.tabbar button:focus-visible,.modal :is(button,input,textarea,select):focus-visible{
 outline:2px solid var(--nx-lavender-strong,#A78BFA)!important;
 outline-offset:2px!important;box-shadow:0 0 0 5px var(--nx-ring)!important
}
#app :is(input,select,textarea){min-width:0;max-width:100%;font-size:16px}
#app textarea{resize:vertical;min-height:88px}
#app :is(.card,.nx-kit-card,.nx-log-day,.nexus-protocol-card){
 background:var(--surface);border:1px solid var(--border-sub);
 border-radius:var(--nx-radius-lg);
}
#app .card{padding:var(--nx-space-4);margin-bottom:var(--nx-space-3)}
#app :is(.btn-primary,.btn-secondary,.btn-ghost){
 min-height:var(--nx-touch);border-radius:var(--nx-radius-md);
 font-weight:650;letter-spacing:0;transition:background-color .15s,border-color .15s;
}
#app :is(.inp,input[type="text"],input[type="number"],input[type="date"],input[type="time"],select,textarea){
 border-radius:var(--nx-radius-sm);scroll-margin-bottom:100px
}
#app :is(.field-label,label){overflow-wrap:break-word}
#app :is(.nexus-protocol-details>summary,.settings-row){min-height:var(--nx-touch)}
#app :is(.nexus-protocol-card,.nx-kit-card,.nx-log-day){min-width:0;overflow-wrap:anywhere}
#app .nexus-protocol-details>summary span:not(.nx-proto-chevron){
 transform:none!important;rotate:none!important
}
.tabbar.nexus-tabbar-v2{padding-bottom:max(6px,env(safe-area-inset-bottom));
 background:var(--tabbar-bg);border-top:1px solid var(--tabbar-bdr);
 backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.tabbar.nexus-tabbar-v2 button{min-height:52px;min-width:0;flex:1;gap:4px}
.tabbar.nexus-tabbar-v2 button.active{color:var(--tabbar-act)}
.nexus-more-sheet{border-radius:22px 22px 0 0;max-height:min(82dvh,750px);
 overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(18px,env(safe-area-inset-bottom))}
.modal-bg{overscroll-behavior:contain}
.modal{max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
.modal :is(input,select,textarea){font-size:16px!important}
.modal :is(button,[role="button"]){touch-action:manipulation}
[data-theme="light"] #app :is(.card,.nx-kit-card,.nx-log-day,.nexus-protocol-card){
 box-shadow:0 3px 16px rgba(63,43,91,.045)}
[data-theme="dark"] #app :is(.card,.nx-kit-card,.nx-log-day,.nexus-protocol-card){
 box-shadow:0 4px 20px rgba(0,0,0,.10)}
.nx-a11y-skip{position:fixed;top:-80px;left:12px;z-index:100000;
 background:var(--surface);color:var(--t1);padding:10px 16px;
 border:2px solid var(--nx-lavender-strong,#A78BFA);border-radius:12px}
.nx-a11y-skip:focus{top:12px}
.nx-product-note{font-size:11px;color:var(--t4)}
@media(max-width:390px){
 #app{padding-left:12px!important;padding-right:12px!important}
 #app .card{padding:13px!important}
 .tabbar.nexus-tabbar-v2 button{font-size:10px;padding-inline:2px}
 .modal{max-width:calc(100vw - 16px);margin-inline:8px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;
 transition-duration:.01ms!important}
}


/* Nexus 0.4.0 — Whole-product Lavender Atelier 2.0.
   All screens use shared visual rules; no stored data shape is changed. */
:root{
 --nx2-radius:16px;--nx2-gap:12px;--nx2-control:44px;
 --nx2-line:var(--border-sub);--nx2-panel:var(--surface);
 --nx2-muted:var(--t3);--nx2-accent:var(--nx-lavender-strong,#9474D1);
}
.nx2-page{min-width:0;max-width:100%;padding-bottom:6px}
.nx2-page :is(h1,h2,h3){letter-spacing:-.025em;line-height:1.25}
.nx2-page :is(.card,.nx-log-day,.nx-kit-card,.nexus-protocol-card){
 border-radius:var(--nx2-radius)!important;border-color:var(--nx2-line)!important;
}
.nx2-page :is(button,[role="button"],summary){touch-action:manipulation}
.nx2-page :is(input,select,textarea){max-width:100%;min-width:0}
.nx2-page :is(.hint,.muted,p){overflow-wrap:anywhere}
.nx2-page :is(.plans-sub,.profile-subtab){min-height:44px!important;
 font-family:inherit!important;letter-spacing:0!important}
.nx2-page :is(.plans-sub,.profile-subtab):focus-visible{
 outline:2px solid var(--nx2-accent)!important;outline-offset:2px!important}
.nx2-page--trends :is(.card,details){scroll-margin-top:16px}
.nx2-page--trends :is(canvas,svg){max-width:100%}
.nx2-page--trends :is(button,[role="button"]){max-width:100%}
.nx2-page--plans .plans-sub{padding:10px 5px!important;border-radius:11px!important}
.nx2-page--plans .card{margin-bottom:12px}
.nx2-page--amino #amino-chat{
 min-height:220px;height:min(54dvh,560px)!important;
 overscroll-behavior:contain;scrollbar-width:thin}
.nx2-page--amino :is(textarea,input){font-size:16px!important}
.nx2-page--profile .profile-subtab{padding:10px 4px!important}
.nx2-page--profile .settings-row{border-radius:10px!important;
 min-height:52px!important;display:flex!important}
.nx2-page--profile .settings-row:focus-visible{outline:2px solid var(--nx2-accent)!important}
.nx2-page--profile .settings-row .nx-settings-icon{
 min-width:36px;min-height:36px;border-radius:11px}
.nx2-page--home :is(.hv-nav,.nexus-today-view-nav button){min-height:44px!important}
.nx2-page--calendar :is(.nx-cal-segment button,.nx-add-log-btn){min-height:44px!important}
.nx2-page--protocols .nexus-protocol-details>summary{
 min-height:44px!important;cursor:pointer}
.nx2-page--protocols .nexus-protocol-details>summary span:not(.nx-proto-chevron){
 transform:none!important;rotate:none!important}
.nx2-page--stash :is(.stash-sub-btn,.nx-kit-actions button){min-height:44px!important}
.nx2-dose-modal{--nx2-modal-gap:14px}
.nx2-dose-modal .field-label{
 display:block!important;margin:12px 0 6px!important;
 font-size:11px!important;letter-spacing:.035em!important;
 font-weight:700!important;color:var(--t2)!important}
.nx2-dose-modal :is(.inp,input,select,textarea){font-size:16px!important;
 min-height:44px;border-radius:11px!important}
.nx2-dose-modal input[type="checkbox"]{min-height:auto}
.nx2-dose-modal :is(.src-opt,.kit-opt,#date-now){
 min-height:44px!important;line-height:1.35!important}
.nx2-dose-modal :is(button,[role="button"]){touch-action:manipulation}
.nx2-dose-modal #date{min-width:0!important}
.nx2-dose-modal :is(#x,#date-now){min-width:44px!important}
.nx2-dose-modal :is(input,select,textarea):focus-visible{
 outline:2px solid var(--nx2-accent)!important;outline-offset:2px!important}
@media(max-width:390px){
 .nx2-page--plans .plans-sub{font-size:10.5px!important}
 .nx2-page--profile .profile-subtab{font-size:12px!important}
 .nx2-dose-modal #date{font-size:14px!important}
}
@media(prefers-reduced-motion:reduce){
 .nx2-page *,.nx2-dose-modal *{scroll-behavior:auto!important}
}


/* Nexus 0.4.1 — Trends workspace redesign */
.nx-trends-intro{margin:4px 0 16px}
.nx-trends-eyebrow{font-size:10px;font-weight:750;letter-spacing:.13em;color:var(--nx-lavender-strong,#A78BFA);text-transform:uppercase}
.nx-trends-intro h1{margin:5px 0 5px!important}
.nx-trends-intro p{margin:0;font-size:12px;color:var(--t3);line-height:1.55}
.nx-trends-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0 0 16px}
.nx-trends-stat{padding:14px;background:var(--surface);border:1px solid var(--border-sub);border-radius:16px;min-width:0}
.nx-trends-stat-label{font-size:10px;letter-spacing:.03em;color:var(--t3);margin-bottom:5px}
.nx-trends-stat-value{font-size:19px;font-weight:750;line-height:1.2;color:var(--t1);overflow-wrap:anywhere}
.nx-trends-stat-foot{font-size:10px;color:var(--t4);margin-top:6px;line-height:1.45}
.nx-trends-jump{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding:0 0 14px;margin-bottom:8px}
.nx-trends-jump::-webkit-scrollbar{display:none}
.nx-trends-jump button{white-space:nowrap;flex:0 0 auto;min-height:38px;border-radius:999px;
 padding:7px 13px;background:var(--surface);border:1px solid var(--border-sub);color:var(--t2);font-size:11px;font-weight:650}
.nx-trends-jump button:focus-visible{outline:2px solid var(--nx-lavender-strong,#A78BFA);outline-offset:2px}
.nx-trends-section-caption{font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:750;color:var(--t4);margin:14px 0 9px}
.nx2-page--trends .app-acc{border-radius:15px!important;overflow:hidden;margin-bottom:9px!important}
.nx2-page--trends .app-acc>.tacc{min-height:54px!important;padding:13px 14px!important}
.nx2-page--trends .app-acc-body{padding:15px!important}
.nx2-page--trends .app-sub-acc{border-radius:12px!important;overflow:hidden;margin-bottom:8px}
.nx2-page--trends .app-sub-acc>.tacc{min-height:44px!important}
.nx2-page--trends .chart-tap{border-radius:12px;overflow:hidden;max-width:100%}
.nx2-page--trends .seg{background:var(--surface-3);border-radius:12px;padding:4px}
.nx2-page--trends .seg button{min-height:40px;border-radius:9px}
.nx-trends-context{font-size:11px;color:var(--t3);line-height:1.55;margin:10px 0 12px}
.nx-trends-expand-hint{font-size:11px;color:var(--t4);margin:8px 0}
@media(min-width:560px){.nx-trends-summary{grid-template-columns:repeat(4,minmax(0,1fr))}}


/* Nexus 0.4.2 — Adaptive compound Trends cards */
.nx2-page--trends .nx-compound-card{border:1px solid var(--border-sub);background:var(--surface);border-radius:19px;overflow:hidden;margin:0 0 13px}
.nx2-page--trends .nx-compound-top{display:flex;gap:10px;align-items:center;padding:15px 15px 12px;min-width:0}
.nx2-page--trends .nx-compound-mark{height:34px;width:4px;border-radius:5px;flex:none}
.nx2-page--trends .nx-compound-title{font-size:15px;font-weight:750;color:var(--t1);line-height:1.25;overflow-wrap:anywhere}
.nx2-page--trends .nx-compound-meta{font-size:11px;color:var(--t4);margin-top:4px}
.nx2-page--trends .nx-compound-intel{border:1px solid var(--border-sub);border-radius:11px;background:var(--surface-2);color:var(--t2);padding:10px 12px;min-height:44px;font-size:11px;font-weight:700;flex:none}
.nx2-page--trends .nx-compound-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:0 15px 14px}
.nx2-page--trends .nx-compound-fact{background:var(--surface-2);border-radius:11px;padding:10px 8px;min-width:0}
.nx2-page--trends .nx-compound-fact b{display:block;font-size:14px;color:var(--t1);overflow-wrap:anywhere}
.nx2-page--trends .nx-compound-fact span{display:block;font-size:10px;color:var(--t4);margin-top:3px}
.nx2-page--trends .nx-compound-main{padding:15px;border-top:1px solid var(--border-sub)}
.nx2-page--trends .nx-compound-heading{font-size:13px;font-weight:750;color:var(--t1);margin:0 0 4px}
.nx2-page--trends .nx-compound-desc{font-size:11px;line-height:1.5;color:var(--t3);margin:0 0 12px}
.nx2-page--trends .nx-compound-main svg{max-width:100%}
.nx2-page--trends .nx-compound-details{border-top:1px solid var(--border-sub)}
.nx2-page--trends .nx-compound-details>summary{list-style:none;cursor:pointer;padding:14px 15px;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--t2);font-size:12px;font-weight:700}
.nx2-page--trends .nx-compound-details>summary::-webkit-details-marker{display:none}
.nx2-page--trends .nx-compound-details>summary:after{content:'⌄';font-size:18px;color:var(--t4);transition:transform .15s}
.nx2-page--trends .nx-compound-details[open]>summary:after{transform:rotate(180deg)}
.nx2-page--trends .nx-compound-details-body{padding:0 15px 15px}
.nx2-page--trends .nx-compound-details .app-sub-acc{margin:7px 0!important}
.nx2-page--trends .nx-compound-caption{font-size:10px;color:var(--t4);line-height:1.5;padding:7px 0}
.nx2-page--trends .nx-compound-status{display:inline-flex;font-size:10px;font-weight:700;color:var(--t3);border:1px solid var(--border-sub);border-radius:999px;padding:4px 8px}
@media(max-width:360px){.nx2-page--trends .nx-compound-facts{gap:5px}.nx2-page--trends .nx-compound-fact{padding:9px 6px}.nx2-page--trends .nx-compound-fact b{font-size:12px}}


/* Nexus 0.4.4 — Evidence-aware chart styling */
.nx-dose-chart{width:100%;height:auto;display:block;overflow:visible}
.nx-chart-block{background:var(--surface);border:1px solid var(--border-sub);border-radius:14px;padding:12px 10px 9px;margin:8px 0}
.nx-chart-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:10px;color:var(--t3);font-weight:600;padding:0 4px}
.nx-chart-note{font-size:10px;line-height:1.55;color:var(--t4);padding:5px 4px 0}
.nx-chart-empty{padding:16px;text-align:center;color:var(--t4);font-size:12px}
.nx-sym-observed{padding:10px 12px;border:1px solid var(--border-sub);border-radius:12px;background:var(--surface);font-size:11px;line-height:1.5;color:var(--t3);margin-bottom:12px}
.nx-model-warning{border-left:3px solid var(--nx-lavender-strong,#A78BFA);padding:9px 11px;background:var(--surface);color:var(--t3);font-size:11px;line-height:1.55;border-radius:0 10px 10px 0;margin-bottom:12px}
.nx2-page--trends svg text{font-family:system-ui,-apple-system,sans-serif}

/* Nexus v0.4.5 — read-only chart detail */
.nx-trends-open-detail{margin:7px 0 0;min-height:42px;width:100%;border:1px solid var(--border-sub);
 border-radius:11px;background:var(--surface-2);color:var(--t2);font-size:12px;font-weight:700}
.nx-trends-open-detail:focus-visible,.nx-trends-detail-modal button:focus-visible{
 outline:2px solid var(--nx-lavender-strong,#A78BFA);outline-offset:2px}
.nx-trends-detail-modal{max-width:610px!important}
.nx-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}
.nx-detail-head h2{font-size:22px;margin:4px 0;color:var(--t1)}
.nx-detail-head p{font-size:12px;color:var(--t3);line-height:1.5;margin:0}
.nx-detail-head button{min-width:44px;min-height:44px;border-radius:12px;border:1px solid var(--border-sub);background:var(--surface-2);color:var(--t2)}
.nx-detail-filter{display:flex;gap:5px;background:var(--surface-2);padding:4px;border-radius:12px;margin-bottom:14px}
.nx-detail-filter button{flex:1;min-width:0;min-height:42px;padding:6px 3px;border:0;border-radius:9px;background:transparent;color:var(--t3);font-size:11px;font-weight:700}
.nx-detail-filter button[aria-pressed="true"]{background:var(--surface);color:var(--t1);box-shadow:0 2px 8px #00000010}
.nx-detail-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.nx-detail-counts>div{background:var(--surface-2);padding:11px 9px;border-radius:12px;min-width:0}
.nx-detail-counts span,.nx-detail-counts small{display:block;color:var(--t4);font-size:10px;line-height:1.4}
.nx-detail-counts strong{display:block;color:var(--t1);font-size:23px;margin:5px 0}
.nx-detail-caution{margin:13px 0;padding:10px 12px;background:var(--surface-2);border-radius:12px;color:var(--t3);font-size:11px;line-height:1.6}
.nx-detail-subtitle{font-size:12px;font-weight:750;color:var(--t1);display:flex;justify-content:space-between;gap:8px;margin:17px 0 9px}
.nx-detail-subtitle span{font-size:10px;font-weight:500;color:var(--t4)}
.nx-detail-rows{border:1px solid var(--border-sub);border-radius:12px;max-height:300px;overflow:auto;overscroll-behavior:contain}
.nx-detail-row{display:grid;grid-template-columns:95px minmax(0,1fr);gap:10px;padding:11px 12px;border-bottom:1px solid var(--border-sub)}
.nx-detail-row:last-child{border-bottom:0}
.nx-detail-row time{font-size:11px;color:var(--t3)}
.nx-detail-row b{font-size:12px;color:var(--t1);font-weight:700;display:block;overflow-wrap:anywhere}
.nx-detail-row small{font-size:10px;color:var(--t4);display:block;margin-top:3px}
@media(max-width:380px){.nx-detail-counts{gap:5px}.nx-detail-counts>div{padding:9px 6px}.nx-detail-counts strong{font-size:20px}.nx-detail-row{grid-template-columns:78px minmax(0,1fr)}}

/* 0.4.6 Pattern Explorer */
.nx-pe-entry{padding:16px;margin:10px 0 18px;border:1px solid var(--border-sub);background:var(--surface);border-radius:18px}
.nx-pe-entry h3{font-size:16px;color:var(--t1);margin:0 0 5px}
.nx-pe-entry p{font-size:12px;color:var(--t3);margin:0 0 12px;line-height:1.55}
.nx-pe-entry button{min-height:44px;width:100%;border-radius:12px;background:var(--surface-2);border:1px solid var(--border-sub);color:var(--t1);font-weight:700;font-size:12px}
.nx-pe-heading{display:flex;justify-content:space-between;gap:12px;margin-bottom:14px}
.nx-pe-heading h2{font-size:22px;margin:5px 0;color:var(--t1)}
.nx-pe-heading p{font-size:12px;line-height:1.5;color:var(--t3);margin:0}
.nx-pe-heading button{min-width:44px;height:44px;border:1px solid var(--border-sub);background:var(--surface-2);color:var(--t2);border-radius:12px}
.nx-pe-modal{max-width:620px!important}
.nx-pe-modal .field-label{display:block;margin:13px 0 6px}
.nx-pe-modal .inp{width:100%;min-height:44px;font-size:16px}
.nx-pe-caution{margin:15px 0;padding:11px 12px;border-left:3px solid var(--nx-lavender-strong,#A78BFA);background:var(--surface-2);border-radius:0 10px 10px 0;color:var(--t3);font-size:11px;line-height:1.55}
.nx-pe-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.nx-pe-stats>div{background:var(--surface-2);border-radius:13px;padding:12px;min-width:0}
.nx-pe-stats small{display:block;font-size:10px;line-height:1.5;color:var(--t3)}
.nx-pe-stats strong{font-size:24px;color:var(--t1);display:block;margin:5px 0}
.nx-pe-status{font-size:12px;line-height:1.55;color:var(--t2);padding:12px;margin-top:10px;border:1px solid var(--border-sub);border-radius:12px}

/* 0.4.7 symptom timing explorer */
.nx-pe-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.nx-pe-actions button{padding:10px;min-height:48px;line-height:1.4}
.nx-st-chart{display:flex;gap:5px;align-items:flex-end;overflow-x:auto;min-height:172px;padding:16px 6px 7px;margin-top:12px;background:var(--surface-2);border-radius:12px}
.nx-st-bar{flex:1;min-width:29px;display:flex;flex-direction:column;align-items:center;gap:5px;color:var(--t3);font-size:9px}
.nx-st-bar span{white-space:nowrap;font-size:9px}
.nx-st-bar small{font-size:10px}
.nx-st-track{height:108px;width:100%;max-width:26px;display:flex;align-items:flex-end;background:var(--border-sub);border-radius:5px 5px 0 0;overflow:hidden}
.nx-st-track>div{width:100%;border-radius:5px 5px 0 0}

/* Nexus v0.4.8 — Pattern Explorer evidence-first visual hierarchy */
.nx-pe-modal .nx-pe-heading{padding-bottom:12px;border-bottom:1px solid var(--border-sub)}
.nx-pe-modal .nx-pe-heading h2{letter-spacing:-.5px}
.nx-pe-modal .nx-pe-heading p{max-width:440px}
.nx-pe-modal .nx-pe-caution{margin:10px 0 12px}
.nx-pe-eyebrow{font-size:10px;letter-spacing:.07em;text-transform:uppercase;font-weight:800;color:var(--t3);margin:18px 0 8px}
.nx-pe-summary{background:var(--surface-2);border:1px solid var(--border-sub);border-radius:16px;padding:14px;margin-top:14px}
.nx-pe-summary-head{display:flex;align-items:center;gap:9px;justify-content:space-between;flex-wrap:wrap;margin-bottom:8px}
.nx-pe-summary-head strong{font-size:14px;color:var(--t1)}
.nx-pe-evidence{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--border-sub);background:var(--surface);border-radius:99px;padding:5px 9px;font-size:10px;color:var(--t2);font-weight:750}
.nx-pe-summary p{margin:0;color:var(--t2);font-size:12px;line-height:1.65}
.nx-pe-summary .nx-pe-muted{margin-top:8px;color:var(--t3);font-size:11px}
.nx-pe-stats>div{border:1px solid var(--border-sub)}
.nx-pe-records{border:1px solid var(--border-sub);border-radius:14px;margin-top:14px;overflow:hidden;background:var(--surface)}
.nx-pe-records>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:49px;padding:12px 13px;color:var(--t1);font-size:12px;font-weight:750}
.nx-pe-records>summary::-webkit-details-marker{display:none}
.nx-pe-records>summary:after{content:"⌄";font-size:17px;color:var(--t3)}
.nx-pe-records[open]>summary:after{content:"⌃"}
.nx-pe-records>summary span{color:var(--t3);font-weight:500;font-size:10px}
.nx-pe-records .nx-detail-rows{border:0;border-top:1px solid var(--border-sub);border-radius:0}
.nx-pe-records .nx-chart-empty{border-top:1px solid var(--border-sub)}
.nx-pe-records:focus-within{outline:1px solid var(--border-sub)}
.nx-pe-disclaimer{font-size:11px;line-height:1.55;color:var(--t3);margin:11px 1px}
.nx-pe-actions button{transition:background .15s ease}
.nx-pe-actions button:focus-visible,.nx-pe-records>summary:focus-visible{outline:2px solid var(--accent,#A78BFA);outline-offset:2px}
@media(max-width:390px){.nx-pe-actions{grid-template-columns:1fr}.nx-pe-stats strong{font-size:21px}}

/* 0.4.9 Body Progress and Apple Health import transparency */
.nx-body-summary{margin:12px 0 16px}.nx-body-summary>p{font-size:11px;color:var(--t3);line-height:1.6;margin:8px 0 0}
.nx-body-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.nx-body-stat{padding:13px;border:1px solid var(--border-sub);background:var(--surface-2);border-radius:14px;display:flex;flex-direction:column;gap:5px;min-width:0}
.nx-body-stat small{font-size:10px;color:var(--t3)}.nx-body-stat strong{font-size:22px;letter-spacing:-.6px;color:var(--t1)}.nx-body-stat strong em{font-size:11px;font-weight:500;font-style:normal;color:var(--t3)}
.nx-body-stat span{font-size:11px;line-height:1.5;color:var(--t2)}
.nx-health-source{padding:14px;margin:12px 0 15px;border:1px solid var(--border-sub);border-radius:15px;background:var(--surface-2)}
.nx-health-source strong{font-size:14px;color:var(--t1)}.nx-health-source p{font-size:11px;line-height:1.65;color:var(--t3);margin:7px 0 12px}
.nx-health-source-row{display:flex;flex-wrap:wrap;justify-content:space-between;gap:7px;font-size:11px;font-weight:600;color:var(--t2);border-top:1px solid var(--border-sub);padding-top:10px}
.nx-health-source small{display:block;color:var(--t3);margin-top:8px;line-height:1.5}
.nx-measure-window{font-size:11px;color:var(--t3);line-height:1.6;margin:8px 0}
@media(max-width:420px){.nx-body-stat-grid{grid-template-columns:1fr}.nx-body-stat strong{font-size:20px}}
/* Nexus v0.5.0 measurement dashboard */
.nx-md{margin-top:20px;padding-top:17px;border-top:1px solid var(--border-sub)}
.nx-md-top,.nx-md-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:15px}
.nx-md-eyebrow{font-size:10px;letter-spacing:1.2px;font-weight:800;color:var(--t3);margin-bottom:5px}
.nx-md-top h3{font-size:19px;letter-spacing:-.5px;margin:0;color:var(--t1)}
.nx-md-top p{font-size:11px;line-height:1.5;color:var(--t3);margin:5px 0 0}
.nx-md-count{font-size:10px;color:var(--t3);white-space:nowrap}
.nx-md-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.nx-md-tile{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left;min-height:111px;padding:12px;background:var(--surface-2);border:1px solid var(--border-sub);border-radius:14px;color:var(--t1);cursor:pointer;min-width:0}
.nx-md-tile.is-selected{border-color:var(--accent,#A78BFA);box-shadow:0 0 0 1px var(--accent,#A78BFA);background:var(--surface)}
.nx-md-label{font-size:11px;color:var(--t3);font-weight:700}
.nx-md-tile strong{font-size:20px;line-height:1.15;letter-spacing:-.4px}
.nx-md-tile strong small{font-size:10px;color:var(--t3);font-weight:500}
.nx-md-tile-foot{font-size:10px;line-height:1.4;color:var(--t3)}
.nx-md-detail{background:var(--surface);border:1px solid var(--border-sub);border-radius:16px;padding:16px;margin-top:13px}
.nx-md-detail h4{font-size:17px;margin:0;color:var(--t1)}
.nx-md-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.nx-md-metrics>div{background:var(--surface-2);border-radius:11px;padding:11px;display:flex;flex-direction:column;gap:5px;min-width:0}
.nx-md-metrics small,.nx-md-metrics span{font-size:10px;color:var(--t3);line-height:1.4}
.nx-md-metrics strong{font-size:15px;color:var(--t1);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.nx-md-chart{margin:14px 0 8px}.nx-md-svg{width:100%;height:auto;display:block}.nx-md-empty{padding:25px 12px;text-align:center;font-size:12px;color:var(--t3);background:var(--surface-2);border-radius:12px}
.nx-md-history{border-top:1px solid var(--border-sub);margin-top:12px}.nx-md-history summary{cursor:pointer;display:flex;justify-content:space-between;gap:8px;align-items:center;min-height:48px;font-size:12px;color:var(--t1);font-weight:700}.nx-md-history summary span{color:var(--t3);font-size:10px;font-weight:400}
.nx-md-history-list>div{display:flex;justify-content:space-between;padding:10px 0;border-top:1px solid var(--border-sub);font-size:12px}.nx-md-history-list time{color:var(--t3)}.nx-md-history-list strong{color:var(--t1)}
.nx-md-footnote{font-size:10px;line-height:1.5;color:var(--t3);margin:12px 0 0}
.nx-md-tile:focus-visible,.nx-md-history summary:focus-visible{outline:2px solid var(--accent,#A78BFA);outline-offset:2px}
@media(max-width:500px){.nx-md-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.nx-md-metrics{grid-template-columns:1fr 1fr}.nx-md-metrics>div:last-child{grid-column:span 2}.nx-md-top{flex-wrap:wrap}}

/* 0.5.1 Body Progress hierarchy */
.nx-body-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;background:var(--surface);border:1px solid var(--border-sub);border-radius:14px;margin:0 0 14px}
.nx-body-tab{min-height:44px;padding:10px 12px;border-radius:10px;color:var(--t3);font-weight:650;font-size:13px;background:transparent;border:1px solid transparent}
.nx-body-tab.is-active{background:var(--surface-2);border-color:var(--border-sub);color:var(--t1)}
.nx-body-tab:focus-visible,.nx-md-tile:focus-visible{outline:2px solid var(--accent,#A78BFA);outline-offset:2px}
.nx-body-panel-head{display:flex;justify-content:space-between;gap:10px;align-items:start;margin:6px 0 12px}
.nx-body-panel-head h3{font-size:17px;color:var(--t1);margin:2px 0 3px}
.nx-body-panel-head p{font-size:11px;color:var(--t3);margin:0;line-height:1.5}
.nx-body-records{border:1px solid var(--border-sub);border-radius:12px;margin:12px 0;overflow:hidden}
.nx-body-records>summary{cursor:pointer;list-style:none;min-height:44px;padding:12px;font-size:12px;font-weight:650;color:var(--t2)}
.nx-body-records>summary::-webkit-details-marker{display:none}
.nx-body-records>summary:after{content:'⌄';float:right;color:var(--t3)}
.nx-body-records[open]>summary:after{content:'⌃'}
.nx-body-records-list{padding:4px 12px 10px;border-top:1px solid var(--border-sub)}
.nx-body-records-list>div{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:38px;font-size:12px;border-bottom:1px solid var(--border-sub)}
.nx-body-records-list>div:last-child{border-bottom:0}
.nx-body-records-list button{min-width:35px;min-height:35px;color:var(--t3)}
.nx-body-panel-note{font-size:11px;color:var(--t3);line-height:1.55;margin:12px 0 0}
.nx-md-tile-foot{line-height:1.5}

/* Nexus 0.5.3: concise health + compound browser */
.nx-library{border:1px solid var(--border-sub);background:var(--surface);border-radius:18px;padding:16px;margin:12px 0}.nx-library-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.nx-library-head h3{font-size:17px;color:var(--t1);margin:0}.nx-library-search{width:100%;min-height:44px;border:1px solid var(--border-sub);border-radius:12px;background:var(--surface-2);color:var(--t1);padding:10px 12px;font:inherit;box-sizing:border-box;margin:0 0 12px}.nx-library-list{display:grid;gap:6px;max-height:410px;overflow-y:auto;overscroll-behavior:contain}.nx-library-item{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;padding:12px;border:1px solid var(--border-sub);border-radius:12px;background:var(--surface-2);color:var(--t1);cursor:pointer;font:inherit}.nx-library-item.is-active{border-color:var(--accent);background:var(--surface)}.nx-library-meta{font-size:11px;color:var(--t4);margin-top:3px}.nx-library-empty{font-size:12px;color:var(--t4);padding:14px}.nx-library-back{border:1px solid var(--border-sub);border-radius:9px;background:var(--surface-2);color:var(--t2);padding:8px 12px;font:inherit;cursor:pointer}.nx-health-manage{display:flex;justify-content:flex-end;margin:0 0 12px}.nx-health-manage button{border:1px solid var(--border-sub);background:var(--surface);color:var(--t3);padding:9px 12px;border-radius:10px;font:inherit;font-size:12px;cursor:pointer}

/* v0.5.4: navigation and contextual reports */
.nx-direct-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0 0 17px}
.nx-direct-nav button{min-width:0;min-height:48px;padding:9px 3px;border-radius:11px;border:1px solid var(--border-sub);background:var(--surface-2);color:var(--t3);font-size:12px;font-weight:600;cursor:pointer}
.nx-direct-nav button[aria-selected="true"]{background:rgba(167,139,250,.15);border-color:#A78BFA;color:var(--t1)}
.nx-today-quick{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:10px 0 16px}
.nx-today-quick button{border:1px solid var(--border-sub);background:var(--surface-2);border-radius:12px;padding:12px;text-align:left;color:var(--t1);font-weight:650;font-size:13px;min-height:58px;cursor:pointer}
.nx-today-quick button small{display:block;color:var(--t4);font-weight:400;font-size:11px;margin-top:4px}
.nx-report-row{border:1px solid var(--border-sub);border-radius:12px;padding:12px;margin-bottom:9px;background:var(--surface-2)}
.nx-report-row strong{color:var(--t1);font-size:14px}.nx-report-row p{color:var(--t3);font-size:12px;margin:6px 0;line-height:1.5}
.nx-report-toolbar{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0 16px}
.nx-report-toolbar button{padding:8px 12px;border-radius:10px;border:1px solid var(--border-sub);background:var(--surface-2);color:var(--t2);cursor:pointer}
.nx-report-toolbar button[aria-pressed="true"]{border-color:#A78BFA;background:rgba(167,139,250,.14);color:var(--t1)}
.nx-report-records{margin-top:8px;max-height:240px;overflow:auto;color:var(--t3);font-size:12px}
.nx-report-records div{padding:6px 0;border-top:1px solid var(--border-sub)}
.nx-learn-quick{border:1px solid var(--border-sub);border-radius:12px;padding:12px;margin-bottom:12px;background:var(--surface-2)}
.nx-learn-quick button{border:1px solid #A78BFA;border-radius:9px;background:rgba(167,139,250,.13);color:var(--t1);padding:9px 12px;font-size:13px;font-weight:650;cursor:pointer}
@media(max-width:370px){.nx-direct-nav{gap:4px}.nx-direct-nav button{font-size:11px}}

/* v0.5.7: shared UI tokens for the quick access / contextual controls */
:root{--nx-action-accent:#A78BFA;--nx-touch-min:44px;--nx-control-radius:12px}
.nx-qa button,.nx-usage-panel button,#nx-shopping-from-stash{min-height:var(--nx-touch-min);touch-action:manipulation}
.nx-qa-tile{border-radius:var(--nx-control-radius);text-align:left}
.nx-qa button:focus-visible,.nx-usage-panel button:focus-visible,#nx-shopping-from-stash:focus-visible{outline:3px solid var(--nx-action-accent);outline-offset:3px}
@media(max-width:380px){.nx-qa-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.nx-qa-copy strong{overflow-wrap:anywhere}}

/* v0.5.8: shared Today accordion rhythm and aligned shopping rows */
.nexus-today-details{margin:14px 0 12px;border-color:var(--border-sub);border-radius:16px}
.nexus-today-details>summary{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:12px;min-height:74px;padding:13px 14px;outline-offset:-3px}
.nexus-today-details-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.nexus-today-details-title{font-size:15px;line-height:1.3;font-weight:700;white-space:normal}
.nexus-today-details-meta{font-size:12px;line-height:1.45;text-align:left;flex:none;overflow-wrap:anywhere}
.nexus-today-details-chevron,.nexus-week-quiet .nexus-quiet-chevron{width:44px;height:44px;display:flex;align-items:center;justify-content:center;font-size:19px;line-height:1;color:var(--t4);flex-shrink:0;transition:transform .2s}
.nexus-today-details[open] .nexus-today-details-chevron{transform:rotate(180deg)}
.nexus-today-details>summary:focus-visible,.nexus-week-quiet .nexus-quiet-toggle:focus-visible{outline:2px solid #C5A4F5;outline-offset:-3px;border-radius:12px}
.nexus-week-quiet{padding:0 14px!important;margin:12px 0 14px!important}
.nexus-week-quiet .nexus-quiet-header{padding:0;min-height:0;display:block}
.nexus-week-quiet .nexus-quiet-toggle{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:12px;text-align:left;width:100%;min-height:74px;padding:13px 0;background:none;border:0;color:var(--t1);cursor:pointer}
.nexus-week-quiet .nexus-quiet-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.nexus-week-quiet .nexus-quiet-copy h3{font-size:15px;line-height:1.3;font-weight:700;margin:0}
.nexus-week-quiet .nexus-quiet-copy p{font-size:12px;line-height:1.45;color:var(--t4);margin:0}
.nexus-week-quiet .nexus-quiet-toggle[aria-expanded="true"] .nexus-quiet-chevron{transform:rotate(180deg)}
.nx-shopping-row{display:grid;grid-template-columns:90px minmax(0,1fr) 44px;align-items:center;column-gap:10px;min-height:62px;padding:9px 0;border-bottom:1px solid var(--border-sub)}
.nx-shopping-row:last-child{border-bottom:0}
.nx-shopping-category{font-size:12px;color:var(--t4);min-width:0;overflow-wrap:anywhere}
.nx-shopping-main{min-width:0}
.nx-shopping-name{font-size:13px;line-height:1.45;color:var(--t1);overflow-wrap:anywhere}
.nx-shopping-qty{font-size:11px;color:var(--t4);white-space:nowrap}
.nx-shopping-goal{font-size:11px;color:var(--t4);margin-top:3px;overflow-wrap:anywhere}
.nx-shopping-row .manage-plan-btn{width:44px!important;height:44px!important;min-width:44px!important;justify-self:end;font-size:19px}
@media(max-width:360px){.nx-shopping-row{grid-template-columns:76px minmax(0,1fr) 44px;column-gap:7px}.nx-shopping-category{font-size:11px}}
@media(prefers-reduced-motion:reduce){.nexus-week-quiet .nexus-quiet-chevron,.nexus-today-details-chevron{transition:none}}


/* v0.6.0: Today compound-card hierarchy and tap targets */
.nx-compound-card{border-radius:14px!important;overflow:hidden}
.nx-compound-header{min-height:64px;outline-offset:3px}
.nx-compound-chevron{color:var(--t4);display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex:0 0 32px;border:1px solid var(--border-sub);border-radius:9px;font-size:19px}
.nx-compound-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px;padding-top:12px;border-top:1px solid var(--border-sub)}
.nx-compound-actions button{min-height:44px;border-radius:10px;padding:9px 12px;font-size:12px;font-weight:650;line-height:1.2;white-space:normal;cursor:pointer}
.nx-compound-primary{background:var(--nx-compound-accent,#A78BFA);color:#171421;flex:1.3 1 115px;border:1px solid transparent}
.nx-compound-secondary{background:var(--surface-2);color:var(--t2);border:1px solid var(--border);flex:1 1 100px}
.nx-compound-header:focus-visible,.nx-compound-actions button:focus-visible{outline:3px solid #A78BFA;outline-offset:3px}
@media(max-width:390px){.nx-compound-actions{gap:6px}.nx-compound-actions button{padding:9px 8px;font-size:11.5px;flex-basis:90px}}


/* v0.6.1: unified disclosure glyphs and redesigned compact dose cards */
.nx-compound-card{padding:16px!important;border-radius:17px!important;background:var(--surface)!important;border:1px solid var(--border-sub)!important}
.nx-compound-header{min-height:0!important}
.nx-compound-card .nx-card-top{display:grid;grid-template-columns:minmax(0,1fr) 30px;gap:10px;align-items:start}
.nx-compound-card .nx-card-title{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-width:0}
.nx-compound-card .nx-card-title strong{font-size:15px;line-height:1.4;color:var(--t1);overflow-wrap:anywhere}
.nx-compound-card .nx-card-frequency{font-size:12px;color:var(--t4);margin-top:4px}
.nx-compound-card .nx-card-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.nx-compound-card .nx-card-fact-label{font-size:10px;letter-spacing:.7px;text-transform:uppercase;color:var(--t5);margin-bottom:4px}
.nx-compound-card .nx-card-fact-value{font-size:12.5px;font-weight:600;color:var(--t2);overflow-wrap:anywhere}
.nx-compound-card .nx-compound-actions{margin-top:15px;padding-top:13px}
.nx-compound-chevron{width:30px!important;height:30px!important;flex:0 0 30px!important;border:0!important;background:var(--surface-2);border-radius:8px!important;font-size:0!important}
.nx-compound-chevron:after,.nexus-quiet-chevron:after{content:'';display:block;width:8px;height:8px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:translateY(-2px) rotate(45deg);margin:auto}
.nexus-quiet-chevron{font-size:0!important;display:inline-flex!important;align-items:center;justify-content:center;min-width:30px;min-height:30px}
.nexus-quiet-details[open] .nexus-quiet-chevron:after{transform:translateY(2px) rotate(225deg)}
.nx-compound-card .nx-card-status{font-size:11px;font-weight:650;border-radius:999px;padding:4px 8px;background:var(--surface-2);color:var(--t2);border:1px solid var(--border-sub)}
@media(max-width:360px){.nx-compound-card .nx-card-facts{gap:8px}.nx-compound-card .nx-card-title strong{font-size:14px}}

/* v0.6.2 shared disclosure language: same stroke, direction and alignment */
:root{--nx-chevron-size:8px}
.nx-compound-chevron:after,.nexus-quiet-chevron:after,
.nexus-screen-protocols .nexus-protocol-archive>summary:after,
.nx-kit-details>summary:after,.nx2-page--trends .nx-compound-details>summary:after,
.nx-pe-records>summary:after,.nx-body-records>summary:after,.nx-tools summary:after{
 content:""!important;display:inline-block!important;box-sizing:border-box!important;
 width:var(--nx-chevron-size)!important;height:var(--nx-chevron-size)!important;
 border-right:2px solid currentColor!important;border-bottom:2px solid currentColor!important;
 transform:rotate(45deg)!important;vertical-align:middle!important;flex-shrink:0!important;
 font-size:0!important;line-height:0!important;transition:transform .18s ease!important;
}
.nexus-screen-protocols .nexus-protocol-archive[open]>summary:after,
.nx-kit-details[open]>summary:after,.nx2-page--trends .nx-compound-details[open]>summary:after,
.nx-pe-records[open]>summary:after,.nx-body-records[open]>summary:after,
.nx-tools[open] summary:after,.nexus-quiet-details[open] .nexus-quiet-chevron:after{
 content:""!important;transform:rotate(225deg)!important;
}
.nx-compound-card .nx-card-top{align-items:center!important}
.nx-compound-card .nx-card-title{align-items:center!important}
.nx-compound-card .nx-compound-chevron{color:var(--t3)!important;display:grid!important;place-items:center!important}
.nx-compound-card .nx-card-facts{padding-top:2px}
/* Logging sheet: readable grouped fields and accessible mobile inputs without changing logic */
.modal:has(#dose) .field-label,.modal:has(#sprays) .field-label{font-size:11px!important;letter-spacing:.6px!important;font-weight:700!important;color:var(--t3)!important;margin-bottom:7px!important}
.modal:has(#dose) .inp,.modal:has(#sprays) .inp{min-height:44px;font-size:16px!important;border-radius:11px!important}
.modal:has(#dose) button,.modal:has(#sprays) button{min-height:36px}
@media(max-width:430px){.nx-compound-card .nx-compound-actions{gap:7px!important}.nx-compound-card .nx-compound-actions button{min-height:42px!important}.modal:has(#dose) input[type=datetime-local]{min-width:0!important}}

/* v0.6.3: Today disclosures — intentionally matching independent cards.
   Overrides older flat-row treatments without changing event handlers. */
.nexus-today-details,
.nexus-week-card.nexus-week-quiet {
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  margin:12px 0!important;
  padding:0!important;
  border:1px solid var(--border-sub)!important;
  border-radius:16px!important;
  background:var(--surface)!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
.nexus-today-details>summary,
.nexus-week-quiet .nexus-quiet-toggle {
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 36px!important;
  align-items:center!important;
  gap:12px!important;
  width:100%!important;
  min-height:76px!important;
  padding:14px 16px!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  cursor:pointer!important;
  text-align:left!important;
}
.nexus-today-details-copy,
.nexus-week-quiet .nexus-quiet-copy {gap:5px!important;min-width:0!important}
.nexus-today-details-chevron,
.nexus-week-quiet .nexus-quiet-chevron {
  box-sizing:border-box!important;
  position:relative!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  justify-self:end!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  padding:0!important;
  margin:0!important;
  font-size:0!important;
  line-height:0!important;
  color:var(--t3)!important;
  transform:none!important;
  transition:none!important;
}
.nexus-today-details-chevron::after,
.nexus-week-quiet .nexus-quiet-chevron::after {
  content:""!important;
  display:block!important;
  width:10px!important;
  height:10px!important;
  border:0!important;
  border-right:2px solid currentColor!important;
  border-bottom:2px solid currentColor!important;
  transform:translateY(-2px) rotate(45deg)!important;
  transition:transform .18s ease!important;
}
.nexus-today-details[open] .nexus-today-details-chevron,
.nexus-week-quiet .nexus-quiet-toggle[aria-expanded="true"] .nexus-quiet-chevron {transform:none!important}
.nexus-today-details[open] .nexus-today-details-chevron::after,
.nexus-week-quiet .nexus-quiet-toggle[aria-expanded="true"] .nexus-quiet-chevron::after {
  transform:translateY(3px) rotate(225deg)!important;
}
.nexus-today-details-body,
.nexus-week-quiet #nexus-week-expanded {padding:0 16px 16px!important}
.nexus-today-details[open]>summary,
.nexus-week-quiet:has(.nexus-quiet-toggle[aria-expanded="true"]) .nexus-quiet-toggle {
  border-bottom:1px solid var(--border-sub)!important;
}
@media(max-width:390px){
  .nexus-today-details>summary,
  .nexus-week-quiet .nexus-quiet-toggle {padding:13px 14px!important;gap:8px!important}
}
@media(prefers-reduced-motion:reduce){
  .nexus-today-details-chevron::after,
  .nexus-week-quiet .nexus-quiet-chevron::after {transition:none!important}
}

/* v0.7.8 — Shortfall resolution: explicit steps, clear actions, mobile-first layout */
.nx-dose-form #alloc-panel .nx-allocation-card{padding:15px!important;background:var(--surface-2)!important;border:1px solid var(--border)!important}
.nx-shortfall-eyebrow{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--t4);margin-bottom:6px}
.nx-shortfall-intro{font-size:12px;color:var(--t3);line-height:1.55;margin:5px 0 10px}
.nx-shortfall-progress{height:7px;background:var(--surface-3);border-radius:30px;overflow:hidden;margin:12px 0 5px}
.nx-shortfall-progress>div{background:#7DF9C0;height:100%;border-radius:30px;transition:width .16s ease}
.nx-shortfall-status{font-size:12px;line-height:1.5;color:var(--t2);padding:9px 11px;background:var(--surface);border:1px solid var(--border-sub);border-radius:9px;margin:8px 0 12px}
.nx-shortfall-step{font-size:11px;text-transform:uppercase;font-weight:750;letter-spacing:.08em;color:var(--t4);margin:13px 0 7px}
.nx-dose-form #alloc-rows>.nx-alloc-row{grid-template-columns:minmax(0,1fr) minmax(74px,94px) 46px 46px!important}
.nx-dose-form #alloc-panel .nx-allocation-help{font-size:11px!important;margin:10px 0!important;line-height:1.55!important}
.nx-dose-form #alloc-panel #alloc-open-new{background:var(--surface-3)!important;border:1px solid var(--border)!important;color:var(--t1)!important;font-weight:750!important;min-height:48px!important}
.nx-dose-form #alloc-panel #alloc-add-kit{background:var(--surface)!important}
@media(max-width:380px){.nx-dose-form #alloc-panel .nx-allocation-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.nx-dose-form #alloc-panel .nx-allocation-metric{padding:8px 5px}.nx-dose-form #alloc-panel .nx-allocation-metric strong{font-size:11px}}
@media(prefers-reduced-motion:reduce){.nx-shortfall-progress>div{transition:none}}



.nexus-cal-selected{outline:2px solid #A78BFA!important;outline-offset:1px;background:color-mix(in srgb,#A78BFA 16%,var(--surface-2))!important}
.nexus-cal-legend{margin-bottom:10px;color:var(--t3);font-size:11px}
.nexus-cal-legend summary{cursor:pointer;padding:7px 0}
.nexus-cal-hint{color:var(--t4);font-size:12px;padding:16px 4px;text-align:center}
.cal-day{min-width:0;min-height:42px}
.cal-day:focus-visible{outline:2px solid #A78BFA;outline-offset:2px}


/* Nexus v0.5.3 — page hierarchy and type system */
.nx-page-intro{margin:0 0 17px}.nx-page-intro h1{margin-bottom:5px}.nx-page-intro p{font-size:13px;line-height:1.5;color:var(--t4);margin:0}
.nx-kicker{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--t4);font-weight:700;margin:0 0 8px}
.nx-panel{background:var(--surface);border:1px solid var(--border-sub);border-radius:16px;padding:16px;margin-bottom:13px}
.nx-panel-title{font-size:16px;font-weight:700;color:var(--t1);margin:0 0 5px}
.nx-muted{font-size:13px;line-height:1.5;color:var(--t4)}
.nx-two-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:var(--surface-2);border-radius:13px;margin-bottom:12px}
.nx-two-tabs button{border:0;border-radius:10px;min-height:44px;background:transparent;color:var(--t4);font-size:14px;font-weight:650}
.nx-two-tabs button[aria-selected="true"]{background:var(--surface);color:var(--t1);box-shadow:0 1px 5px #0001}
.nx-tools{margin:0 0 15px;border:1px solid var(--border-sub);border-radius:13px;overflow:hidden}
.nx-tools summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:11px 14px;color:var(--t3);font-size:13px;font-weight:650}
.nx-tools summary::-webkit-details-marker{display:none}.nx-tools summary:after{content:'⌄';font-size:17px;color:var(--t4)}.nx-tools[open] summary:after{content:'⌃'}
.nx-tool-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:0 10px 10px}
.nx-tool-buttons button{border:1px solid var(--border-sub);background:var(--surface-2);border-radius:9px;min-height:42px;font-size:13px;color:var(--t3);font-weight:600}
.nx-tool-buttons button[aria-selected="true"]{border-color:var(--accent);color:var(--t1);background:var(--surface-3)}
.nx-profile-hero{display:flex;align-items:center;gap:14px}.nx-profile-avatar{width:52px;height:52px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:var(--surface-3);color:var(--t1);font-size:20px;font-weight:700;overflow:hidden}
.nx-plan-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 15px}.nx-plan-summary>div{background:var(--surface);border:1px solid var(--border-sub);border-radius:12px;padding:12px 10px}.nx-plan-summary strong{display:block;font-size:21px;color:var(--t1)}.nx-plan-summary span{font-size:11px;color:var(--t4)}
.nx-plan-item{background:var(--surface);border:1px solid var(--border-sub);border-radius:13px;padding:13px 14px;margin-bottom:9px}.nx-plan-item-title{font-size:14px;font-weight:650;color:var(--t1)}.nx-plan-item-sub{font-size:12px;color:var(--t4);line-height:1.5;margin-top:3px}
.nx-plan-item details{margin-top:9px}.nx-plan-item details summary{font-size:12px;color:var(--t3);cursor:pointer;min-height:28px;padding-top:5px}
.nx-plan-nav{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:var(--surface-2);padding:4px;border-radius:12px;margin-bottom:14px}.nx-plan-nav button{min-height:44px;font-size:13px;font-weight:650;border:0;border-radius:9px;background:transparent;color:var(--t4)}.nx-plan-nav button[aria-selected="true"]{background:var(--surface);color:var(--t1)}
@media(max-width:390px){.nx-plan-summary>div{padding:10px 7px}.nx-plan-summary span{font-size:10px}}


.nx-qa{margin:15px 0 18px}.nx-qa-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.nx-qa-head h2{font-size:17px;line-height:1.3;font-weight:650;margin:3px 0 0;color:var(--t1)}.nx-qa-eyebrow{font-size:11px;letter-spacing:.9px;color:var(--t4)}#nx-qa-customize{min-height:44px;padding:8px 12px;border:1px solid var(--border);border-radius:10px;color:var(--t2);font-size:12px;background:var(--surface-2)}.nx-qa-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.nx-qa-tile{min-height:75px;display:flex;align-items:center;text-align:left;gap:11px;padding:13px 11px;background:var(--surface-2);border:1px solid var(--border);border-radius:14px;color:var(--t1)}.nx-qa-icon{width:30px;flex:0 0 30px;font-size:21px;color:#A78BFA;text-align:center}.nx-qa-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.nx-qa-copy strong{font-size:13px;font-weight:650;line-height:1.25}.nx-qa-copy small{font-size:11px;color:var(--t4);line-height:1.25}.nx-qa-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.nx-qa-picker label{display:flex;align-items:center;gap:9px;min-height:48px;border:1px solid var(--border);border-radius:10px;padding:10px;color:var(--t2);font-size:13px}.nx-qa-picker input{accent-color:#A78BFA;width:18px;height:18px}.nx-qa-tile:focus-visible,#nx-qa-customize:focus-visible,.nx-qa-picker input:focus-visible{outline:3px solid #A78BFA;outline-offset:2px}@media(max-width:350px){.nx-qa-tile{padding:10px 8px;gap:7px}.nx-qa-copy strong{font-size:12px}}@media(prefers-reduced-motion:reduce){.nx-qa *{animation:none!important;transition:none!important}}

.nx-usage-panel button:focus-visible,#nx-shopping-from-stash:focus-visible{outline:3px solid #A78BFA;outline-offset:3px}.nx-usage-panel input:focus-visible{outline:3px solid #A78BFA;outline-offset:3px}@media(prefers-reduced-motion:reduce){.nx-usage-panel *{scroll-behavior:auto!important;transition:none!important}}

/* Single canonical layout for the two Today disclosure cards. */
.nexus-screen-home .nexus-today-details,
.nexus-screen-home .nexus-week-card.nexus-week-quiet,
.nexus-today-details,
.nexus-week-card.nexus-week-quiet {
  box-sizing:border-box!important;
  width:100%!important;
  margin:12px 0!important;
  padding:0!important;
  border:1px solid var(--border)!important;
  border-radius:16px!important;
  background:var(--surface)!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
.nexus-today-details>summary,
.nexus-week-quiet .nexus-quiet-toggle {
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 40px!important;
  align-items:center!important;
  gap:12px!important;
  width:100%!important;
  min-height:76px!important;
  padding:15px 16px!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  text-align:left!important;
  cursor:pointer!important;
  list-style:none!important;
  color:var(--t1)!important;
}
.nexus-today-details>summary::-webkit-details-marker{display:none!important}
.nexus-today-details-copy,
.nexus-week-quiet .nexus-quiet-copy {
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  gap:5px!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
}
.nexus-today-details-title,
.nexus-week-quiet .nexus-quiet-copy h3 {
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.35!important;
  letter-spacing:-.02em!important;
  margin:0!important;
  color:var(--t1)!important;
}
.nexus-today-details-meta,
.nexus-week-quiet .nexus-quiet-copy p {
  display:block!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.45!important;
  color:var(--t4)!important;
  text-align:left!important;
  margin:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.nexus-today-details-chevron,
.nexus-week-quiet .nexus-quiet-chevron {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  justify-self:center!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  padding:0!important;
  margin:0!important;
  font-size:0!important;
  line-height:0!important;
  color:var(--t4)!important;
  transition:transform .2s ease!important;
}
.nexus-today-details-chevron::after,
.nexus-week-quiet .nexus-quiet-chevron::after {
  content:""!important;
  display:block!important;
  box-sizing:border-box!important;
  width:11px!important;
  height:11px!important;
  border-right:2px solid currentColor!important;
  border-bottom:2px solid currentColor!important;
  border-top:0!important;
  border-left:0!important;
  transform:translateY(-2px) rotate(45deg)!important;
}
.nexus-today-details[open] .nexus-today-details-chevron,
.nexus-week-quiet .nexus-quiet-toggle[aria-expanded="true"] .nexus-quiet-chevron{
  transform:rotate(180deg)!important;
}
.nexus-week-quiet .nexus-quiet-header{
  display:block!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
}
.nexus-today-details-body,
.nexus-week-quiet #nexus-week-expanded{
  box-sizing:border-box!important;
  padding:14px 16px 16px!important;
  border-top:1px solid var(--border-sub)!important;
}
.nexus-today-details>summary:focus-visible,
.nexus-week-quiet .nexus-quiet-toggle:focus-visible {
  outline:2px solid #A78BFA!important;
  outline-offset:-3px!important;
  border-radius:14px!important;
}
@media(prefers-reduced-motion:reduce){
  .nexus-today-details-chevron,.nexus-week-quiet .nexus-quiet-chevron{transition:none!important}
}


/* Consistent Today card disclosure: one stable chevron, no competing X. */
.compound-collapse-btn,.nx-compound-chevron{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;flex:0 0 40px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;border:1px solid var(--border-sub)!important;border-radius:10px!important;background:var(--surface-2)!important;color:var(--t4)!important;font-size:0!important;line-height:0!important;padding:0!important;margin:0!important}
.compound-collapse-btn::after,.nx-compound-chevron::after{content:"";display:block;width:10px;height:10px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);box-sizing:border-box}
.compound-collapse-btn::after{transform:translateY(2px) rotate(225deg)}
.nx-compound-remove-row{display:flex;justify-content:flex-end;margin-top:14px;padding-top:10px;border-top:1px solid var(--border-sub)}
.nx-compound-remove-row .archivepep{min-height:40px!important;padding:8px 12px!important;font-size:11px!important;color:var(--t4)!important;background:transparent!important;border:1px solid var(--border-sub)!important;border-radius:9px!important}


/* Fix 30px grid track squeezing a 40px disclosure control beyond the compact card padding.
   Match the expanded card's 40px chevron and 16px right inset. */
.nx-compound-card .nx-card-top{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 40px!important;
  align-items:center!important;
  column-gap:10px!important;
}
.nx-compound-card .nx-compound-chevron{
  position:static!important;
  box-sizing:border-box!important;
  justify-self:end!important;
  align-self:center!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  margin:0!important;
  transform:none!important;
}
.compound-collapse-btn{
  position:static!important;
  box-sizing:border-box!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  margin:0!important;
  transform:none!important;
}


/* Identical 40px anchor inside both 16px-padded compound card headers. */
.nx-compound-card .nx-card-top{display:block!important;position:relative!important;min-height:40px!important;padding-right:52px!important}
.nx-compound-card .nx-compound-chevron{position:absolute!important;top:0!important;right:0!important;width:40px!important;height:40px!important;margin:0!important}
.nx-expanded-compound-head{position:relative!important;min-height:40px!important;padding-right:52px!important}
.nx-expanded-compound-head>.compound-collapse-btn{position:absolute!important;top:0!important;right:0!important;width:40px!important;height:40px!important;min-width:40px!important;margin:0!important}


/* Dose entry: coherent hierarchy, larger touch targets, responsive source selectors. */
.nx-dose-form .nx-dose-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}
.nx-dose-form .nx-dose-kicker{font-size:10px;letter-spacing:1.5px;font-weight:700;color:var(--t4);text-transform:uppercase;margin-bottom:5px}
.nx-dose-form .nx-dose-title{font-size:19px;font-weight:750;line-height:1.3;letter-spacing:-.025em;color:var(--t1);overflow-wrap:anywhere}
.nx-dose-form .nx-dose-subtitle{font-size:11px;color:var(--t4);margin-top:5px}
.nx-dose-form .nx-dose-close{display:grid;place-items:center;width:40px;height:40px;min-width:40px;border:1px solid var(--border);border-radius:11px;background:var(--surface-2);color:var(--t3);font-size:18px}
.nx-dose-form .nx-dose-section{border:1px solid var(--border-sub);border-radius:14px;background:var(--surface-2);padding:16px;margin-bottom:12px;min-width:0}
.nx-dose-form .nx-dose-section-title{font-size:13px;font-weight:750;color:var(--t1);margin:0 0 4px}
.nx-dose-form .nx-dose-section-desc{font-size:11px;line-height:1.5;color:var(--t4);margin:0 0 14px}
.nx-dose-form .field-label{display:block;font-size:11px!important;letter-spacing:.055em!important;font-weight:700!important;color:var(--t3)!important;margin-bottom:7px!important}
.nx-dose-form .inp{box-sizing:border-box;width:100%;min-height:44px!important;border-radius:10px!important;font-size:14px!important}
.nx-dose-form input[type=datetime-local]{min-width:0}
.nx-dose-form .src-opt,.nx-dose-form .kit-opt{min-height:40px!important;line-height:1.35!important;text-align:left}
.nx-dose-form #date-now{min-height:44px}
.nx-dose-form #toggle-multi{min-height:36px;padding:5px 0!important;text-align:left}
.nx-dose-form #sym{min-height:32px}
.nx-dose-form #notes{min-height:84px!important}
.nx-dose-form .nx-dose-footer{position:sticky;bottom:-1px;z-index:3;background:var(--surface);padding:12px 0 max(10px,env(safe-area-inset-bottom));border-top:1px solid var(--border-sub);margin-top:12px}
.nx-dose-form #save{min-height:48px;font-weight:750;letter-spacing:.025em}
.nx-dose-form .nx-dose-review-note{font-size:10.5px;color:var(--t4);line-height:1.5;margin-bottom:9px}
@media(max-width:380px){.nx-dose-form .nx-dose-section{padding:12px}.nx-dose-form .nx-dose-title{font-size:17px}}
.nx-dose-form .nx-dose-source-readout{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border-radius:10px;background:var(--surface);border:1px solid var(--border-sub);color:var(--t2)}
.nx-dose-form .nx-dose-source-dot{width:8px;height:8px;border-radius:50%;margin-top:5px;background:#7DF9C0;flex:none}
.nx-dose-form .nx-dose-source-readout strong{display:block;font-size:12px;font-weight:700;line-height:1.5}
.nx-dose-form .nx-dose-source-readout small{display:block;margin-top:3px;font-size:11px;line-height:1.45;color:var(--t3)}


/* v0.7.0 — isolated dose logging UI refinements; no data or inventory logic changes. */
.modal.nx-dose-picker #today-dose-single{display:block!important;width:100%!important;min-height:48px!important;margin:14px 0 10px!important;border:1px solid #A78BFA!important;border-radius:12px!important;background:#A78BFA!important;color:#211630!important;font-weight:750!important;font-size:14px!important;opacity:1!important;visibility:visible!important;box-shadow:none!important;-webkit-text-fill-color:#211630!important}
.modal.nx-dose-picker #today-dose-single:focus-visible{outline:3px solid #C4B5FD!important;outline-offset:3px!important}
.modal.nx2-dose-modal{display:flex!important;flex-direction:column!important;overflow:hidden!important;height:min(88dvh,880px)!important;max-height:min(88dvh,880px)!important;padding:0!important;scroll-padding-bottom:0!important}
.modal.nx2-dose-modal .nx-dose-form{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}
.modal.nx2-dose-modal .nx-dose-scroll{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:22px 20px 20px;scroll-padding-bottom:24px}
.modal.nx2-dose-modal .nx-dose-footer{flex:none;position:relative!important;bottom:auto!important;z-index:4;margin:0!important;background:var(--modal-bg)!important;padding:12px 20px calc(14px + env(safe-area-inset-bottom))!important;border-top:1px solid var(--border-sub);box-shadow:0 -6px 18px rgba(20,12,40,.05)}
.modal.nx2-dose-modal .nx-dose-review-note{margin-bottom:7px;line-height:1.35}
.modal.nx2-dose-modal .nx-dose-section{padding:14px;margin-bottom:10px}
.modal.nx2-dose-modal .nx-dose-section-desc{margin-bottom:10px}
.modal.nx2-dose-modal .nx-dose-optional{padding:0!important;overflow:visible}
.modal.nx2-dose-modal .nx-dose-optional>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer;padding:14px;list-style:none;color:var(--t1);font-size:13px;font-weight:750;min-height:48px;box-sizing:border-box}
.modal.nx2-dose-modal .nx-dose-optional>summary::-webkit-details-marker{display:none}
.modal.nx2-dose-modal .nx-dose-optional>summary:after{content:'+';font-size:20px;color:var(--t3);font-weight:400}
.modal.nx2-dose-modal .nx-dose-optional[open]>summary:after{content:'−'}
.modal.nx2-dose-modal .nx-dose-optional>summary:focus-visible{outline:2px solid #A78BFA;outline-offset:-3px;border-radius:12px}
.modal.nx2-dose-modal .nx-dose-optional-body{padding:0 14px 14px}
.modal.nx2-dose-modal .nx-dose-optional-body>.nx-dose-section-desc{margin:0 0 8px}
@media(max-width:380px){.modal.nx2-dose-modal .nx-dose-scroll{padding:16px 14px}.modal.nx2-dose-modal .nx-dose-footer{padding-left:14px!important;padding-right:14px!important}}


/* v0.7.1: shared sheet geometry and accessibility. No changes to record handlers. */
:root{--nx-sheet-radius:22px;--nx-sheet-mobile-max:calc(100dvh - max(12px,env(safe-area-inset-top)));--nx-sheet-control:44px}
.modal-bg,.nexus-more-backdrop{padding:0!important;align-items:flex-end!important;overscroll-behavior:contain}
.modal-bg>.modal{box-sizing:border-box!important;width:100%!important;max-width:560px!important;max-height:var(--nx-sheet-mobile-max)!important;border-radius:var(--nx-sheet-radius) var(--nx-sheet-radius) 0 0!important;margin:0!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch;padding-bottom:calc(20px + env(safe-area-inset-bottom))!important}
.modal-bg>.modal :is(input,select,textarea){font-size:16px!important}
.modal-bg>.modal :is(button,[role="button"],summary){touch-action:manipulation}
.modal-bg>.modal button:focus-visible,.nexus-more-sheet button:focus-visible{outline:2px solid #A78BFA!important;outline-offset:2px!important}
.modal-bg>.modal :is(input,select,textarea){min-width:0;max-width:100%}
.modal-bg>.modal :is(h2,h3){overflow-wrap:anywhere}
.nexus-more-backdrop>.nexus-more-sheet{box-sizing:border-box;width:100%;max-width:560px;max-height:var(--nx-sheet-mobile-max)!important;border-radius:var(--nx-sheet-radius) var(--nx-sheet-radius) 0 0!important;margin:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(20px + env(safe-area-inset-bottom))!important}
/* Specialized dose entry has its own scroll region and a stationary action dock. */
.modal-bg>.modal.nx2-dose-modal{height:min(88dvh,880px)!important;max-height:min(88dvh,880px)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important}
.modal.nx2-dose-modal .nx-dose-form{flex:1;min-height:0;overflow:hidden}
.modal.nx2-dose-modal .nx-dose-scroll{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scroll-padding-bottom:24px}
.modal.nx2-dose-modal .nx-dose-footer{flex:none;position:relative!important;bottom:auto!important;box-sizing:border-box;background:var(--modal-bg)!important;border-top:1px solid var(--border)!important;margin:0!important;padding-bottom:calc(14px + env(safe-area-inset-bottom))!important}
@media(min-width:561px){.modal-bg,.nexus-more-backdrop{align-items:center!important;padding:16px!important}.modal-bg>.modal,.nexus-more-backdrop>.nexus-more-sheet{max-height:min(88dvh,880px)!important;border-radius:20px!important}.modal-bg>.modal.nx2-dose-modal{height:min(88dvh,880px)!important}}
@media(max-width:390px){.modal-bg>.modal{padding-left:16px!important;padding-right:16px!important}.modal-bg>.modal.nx2-dose-modal{padding:0!important}}
@media(prefers-reduced-motion:reduce){.modal-bg>.modal,.nexus-more-sheet{scroll-behavior:auto!important}}


/* v0.7.2: structural shell for legacy modals; data and workflow JS unchanged */
.modal-bg>.modal.nx-sheet.nx-structured{display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important;max-height:calc(100dvh - max(12px,env(safe-area-inset-top)))!important}
.nx-structured>.nx-unified-header{flex:0 0 auto;display:flex;justify-content:center;align-items:center;min-height:24px;padding:8px 16px 3px;background:var(--surface,#fff)}
.nx-unified-grip{width:35px;height:4px;border-radius:4px;background:var(--border,#aaa);opacity:.7}
.nx-structured>.nx-unified-body{min-height:0;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px 20px 18px;scrollbar-gutter:stable}
.nx-structured>.nx-unified-footer{flex:0 0 auto;display:flex;gap:10px;padding:12px 20px calc(12px + env(safe-area-inset-bottom));background:var(--surface,#fff);border-top:1px solid var(--border,#ddd);box-shadow:0 -8px 18px rgba(0,0,0,.05)}
.nx-structured>.nx-unified-footer>button,.nx-structured>.nx-unified-footer>div{min-width:0;flex:1}
.nx-structured>.nx-unified-footer button{min-height:44px}
@media(max-width:480px){.nx-structured>.nx-unified-body{padding:8px 16px 18px}.nx-structured>.nx-unified-footer{padding-left:16px;padding-right:16px}}
@media(prefers-reduced-motion:reduce){.nx-structured *{scroll-behavior:auto!important}}


/* Progressive sheet refinement: retains legacy event handlers and data behavior. */
.modal-bg>.modal.nx-structured>.nx-unified-header{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-height:30px;padding:7px 16px 4px;background:var(--modal-bg,var(--surface));border-bottom:1px solid var(--border-sub,var(--border))}
.nx-structured>.nx-unified-header>.nx-unified-grip{display:block;align-self:center;flex-shrink:0}
.nx-structured>.nx-unified-header>.nx-sheet-title-row{width:100%;margin-bottom:0!important;min-width:0;flex-shrink:0}
.nx-structured>.nx-unified-header>.nx-sheet-title-row #x{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;touch-action:manipulation}
.nx-structured>.nx-unified-body{scroll-padding-bottom:18px;overflow-anchor:none}
.nx-structured>.nx-unified-footer{background:var(--modal-bg,var(--surface));z-index:2}
.nx-structured :is(input,select,textarea,button):focus-visible{outline:2px solid var(--accent-purple,#A78BFA);outline-offset:2px}
@media(max-width:480px){.modal-bg>.modal.nx-structured{max-height:min(calc(100dvh - env(safe-area-inset-top) - 8px),var(--nx-visible-height,100dvh))!important}.nx-structured>.nx-unified-header{padding-left:16px;padding-right:16px}}
@media(prefers-reduced-motion:reduce){.nx-structured>.nx-unified-body{scroll-behavior:auto!important}}


/* Check-in-specific sheet refinements; uses existing shared modal infrastructure. */
.nx-checkin-sheet>.nx-unified-body{padding-bottom:22px!important}
.nx-checkin-sheet>.nx-unified-footer{display:flex;align-items:stretch;gap:9px;padding-top:12px!important}
.nx-checkin-sheet>.nx-unified-footer>button{flex:1;min-height:48px;margin:0!important;display:flex!important;justify-content:center;align-items:center;gap:7px;line-height:1.3;text-align:center;border-radius:11px}
.nx-checkin-sheet>.nx-unified-footer>button:not(.btn-primary){border:1px solid var(--border);color:var(--t2);background:var(--surface-2)}
.nx-checkin-sheet .nx-checkin-symptoms{border:1px solid var(--border-sub);border-radius:12px;margin:0 0 14px;overflow:hidden}
.nx-checkin-sheet .nx-checkin-symptoms>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;padding:13px 12px;min-height:44px;cursor:pointer;font-size:12px;font-weight:650;color:var(--t2);background:var(--surface-2)}
.nx-checkin-sheet .nx-checkin-symptoms>summary::-webkit-details-marker{display:none}
.nx-checkin-sheet .nx-checkin-symptoms>summary:after{content:'⌄';font-size:17px;color:var(--t4);transition:transform .15s}
.nx-checkin-sheet .nx-checkin-symptoms[open]>summary:after{transform:rotate(180deg)}
.nx-checkin-sheet .nx-checkin-symptoms>div{padding:10px 10px 12px}
.nx-checkin-sheet .nx-checkin-symptoms .symcat-toggle{min-height:44px;text-align:left}
.nx-checkin-sheet .moodbtn{min-height:56px}
.nx-checkin-sheet .nx-checkin-inline-label{font-size:10px;color:var(--t4);margin-bottom:9px}
@media(max-width:390px){.nx-checkin-sheet>.nx-unified-footer{gap:7px}.nx-checkin-sheet>.nx-unified-footer>button{font-size:12px!important;padding:12px 8px!important}}
@media(prefers-reduced-motion:reduce){.nx-checkin-sheet .nx-checkin-symptoms>summary:after{transition:none}}


.nx-compact-tagging{border:1px solid var(--border-sub);border-radius:12px;overflow:hidden;margin:4px 0 12px;background:var(--surface-2)}
.nx-compact-tagging-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;padding:12px 12px 0;font-size:11px;letter-spacing:.5px;color:var(--t2)}
.nx-compact-tagging-head span,.nx-compact-tagging-hint{font-size:11px;color:var(--t4);letter-spacing:0}
.nx-compact-tagging-hint{margin:4px 12px 10px}
.nx-compact-tagging-item+.nx-compact-tagging-item{border-top:1px solid var(--border-sub)}
.nx-tag-sym-row,.nx-notes-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:10px;padding:11px 12px;background:transparent;border:0;color:var(--t1);cursor:pointer;min-height:48px}
.nx-tag-sym-main,.nx-notes-toggle>span:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}
.nx-tag-sym-main strong,.nx-notes-toggle strong{font-size:12px;font-weight:650}
.nx-tag-sym-main small,.nx-notes-toggle small{font-size:11px;color:var(--t4);overflow-wrap:anywhere}
.nx-tag-options{display:flex;flex-wrap:wrap;gap:7px;padding:1px 12px 12px}
.nx-tag-options .tag-pill{font-size:11px;font-weight:600;border:1px solid var(--border-sub);border-radius:999px;padding:8px 11px;min-height:36px;cursor:pointer}
.nx-note-list{display:grid;gap:10px;padding:0 12px 12px}
.nx-note-label{display:grid;gap:5px;font-size:11px;color:var(--t3)}
.nx-note-list textarea{min-height:55px;resize:vertical;font-size:13px}
.nx-compact-tagging button:focus-visible{outline:3px solid #A78BFA;outline-offset:-3px}


.nx-sym-picker{display:grid;gap:8px}.nx-sym-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border-radius:12px;background:var(--surface-2);border:1px solid var(--border-sub)}
.nx-sym-tab{border:0;border-radius:9px;background:transparent;color:var(--t3);padding:11px 5px;font-size:12px;font-weight:650;min-height:42px;cursor:pointer}
.nx-sym-tab[aria-pressed="true"]{background:#A78BFA24;color:var(--t1);box-shadow:inset 0 0 0 1px #A78BFA88}
.nx-sym-key{display:flex;flex-wrap:wrap;gap:5px 10px;align-items:center;justify-content:space-between;color:var(--t2);font-size:11px;font-weight:650;padding:3px 2px}.nx-sym-key span{font-weight:400;color:var(--t3)}
.nx-sym-list{display:grid;gap:0;border:1px solid var(--border-sub);border-radius:11px;overflow:hidden;margin-bottom:7px}
.nx-sym-row{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:5px 8px;min-height:48px;background:var(--surface-2)}.nx-sym-row+.nx-sym-row{border-top:1px solid var(--border-sub)}
.nx-sym-name{display:flex;align-items:center;gap:8px;text-align:left;border:0!important;border-radius:7px!important;background:transparent!important;color:var(--t2)!important;font-size:12px!important;min-height:38px;padding:5px 3px!important;flex:1;min-width:0;cursor:pointer}
.nx-sym-name[aria-pressed="true"]{color:var(--t1)!important;font-weight:650}.nx-sym-check{display:grid;place-items:center;width:20px;height:20px;border:1px solid var(--border);border-radius:6px;flex-shrink:0;font-size:12px;color:var(--t3)}.nx-sym-name[aria-pressed="true"] .nx-sym-check{background:#A78BFA30;border-color:#A78BFA;color:#C4B5FD}
.nx-sym-int{display:flex;align-items:center;gap:4px;flex-shrink:0}.nx-sym-level{width:32px;min-width:32px;height:34px;border-radius:8px;border:1px solid var(--border-sub);background:var(--surface-3);font-weight:700;font-size:12px;color:var(--t3);cursor:pointer}.nx-sym-level.is-active{background:#A78BFA30;border-color:#A78BFA;color:var(--t1)}
.nx-sym-search-label{display:grid;gap:6px;color:var(--t3);font-size:11px}.nx-sym-search{width:100%!important;min-height:42px}.nx-sym-empty{color:var(--t3);padding:14px 10px;font-size:12px}.nx-sym-picker button:focus-visible{outline:2px solid #A78BFA;outline-offset:2px}
.nx-sym-picker .symcat-toggle{min-height:44px}.nx-sym-picker [hidden]{display:none!important}
@media(max-width:360px){.nx-sym-row{padding:4px 5px}.nx-sym-name{font-size:11px!important}.nx-sym-int{gap:2px}.nx-sym-level{width:28px;min-width:28px;height:33px}}


/* Dedicated dose sheet must have exactly one scrollport; iOS Safari touch/keyboard. */
.modal-bg > .modal.nx2-dose-modal {height: min(92dvh, var(--nx-visible-height, 92dvh)) !important;max-height: min(92dvh,var(--nx-visible-height, 92dvh)) !important;display:flex!important;flex-direction:column!important;overflow:hidden!important;touch-action:pan-y!important;}
.modal.nx2-dose-modal > .nx-dose-form {display:flex!important;flex-direction:column!important;min-height:0!important;flex:1 1 0%!important;overflow:hidden!important;}
.modal.nx2-dose-modal .nx-dose-scroll {display:block!important;flex:1 1 0%!important;min-height:0!important;max-height:none!important;overflow-x:hidden!important;overflow-y:scroll!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain;touch-action:pan-y!important;}
.modal.nx2-dose-modal .nx-dose-footer {flex:0 0 auto!important;min-height:0!important;}
/* Responsive inventory shortfall: full-size touch controls and legible summaries. */
.nx-dose-form #alloc-panel .nx-allocation-card{padding:14px!important;border-radius:13px!important;}
.nx-allocation-heading{font-size:13px;font-weight:750;color:#F9C87D;margin-bottom:5px}
.nx-allocation-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0 15px}
.nx-allocation-metric{border:1px solid var(--border-sub);background:var(--surface);border-radius:9px;padding:9px 7px;min-width:0}
.nx-allocation-metric small{display:block;font-size:10px;color:var(--t4);line-height:1.4;margin-bottom:5px}
.nx-allocation-metric strong{display:block;font-size:12px;color:var(--t1);overflow-wrap:anywhere}
.nx-dose-form #alloc-rows>.nx-alloc-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(66px,86px) 46px 46px;gap:6px!important;align-items:center!important;margin-bottom:10px!important;padding:9px!important;background:var(--surface);border:1px solid var(--border-sub);border-radius:10px}
.nx-dose-form #alloc-rows .alloc-mg-input{width:100%!important;min-height:44px!important;height:44px!important;font-size:16px!important}
.nx-dose-form #alloc-rows .alloc-draw,.nx-dose-form #alloc-rows .alloc-remove{min-width:44px!important;min-height:44px!important;font-size:11px!important;border-radius:8px!important;padding:7px!important}
.nx-dose-form #alloc-panel #alloc-add-kit,.nx-dose-form #alloc-panel #alloc-open-new{min-height:46px!important;font-size:13px!important}
.nx-allocation-help{font-size:11px!important;line-height:1.55!important;color:var(--t3)!important;margin:12px 0!important}
@media(max-width:370px){.nx-allocation-summary{grid-template-columns:1fr 1fr}.nx-dose-form #alloc-rows>.nx-alloc-row{grid-template-columns:minmax(0,1fr) minmax(65px,1fr) 44px 44px;gap:4px!important;padding:6px!important}.nx-allocation-metric{padding:8px 6px}}


/* Nexus mobile UX audit: compact symptoms and safe, non-overlapping action areas.
   Presentation only; do not change event wiring or saved data. */
.nx-sym-row{min-width:0}
.nx-sym-row .nx-sym-name{min-width:0;overflow-wrap:anywhere}
.nx-sym-int{max-width:100%}
.nx-sym-level{touch-action:manipulation}
.nx-checkin-sheet .nx-unified-body,
.modal.nx2-dose-modal .nx-dose-scroll{scroll-padding-bottom:20px}
.nx-checkin-sheet .nx-unified-footer,
.modal.nx2-dose-modal .nx-dose-footer{
  padding-bottom:max(12px, env(safe-area-inset-bottom, 0px))!important;
}
.nx-checkin-sheet .nx-unified-footer button,
.modal.nx2-dose-modal .nx-dose-footer button{min-height:44px}
@media(max-width:360px){
  .nx-sym-row{flex-wrap:wrap;row-gap:2px}
  .nx-sym-row .nx-sym-name{flex-basis:100%}
  .nx-sym-row .nx-sym-int{margin-left:28px}
}
@media(prefers-reduced-motion:reduce){
  .nx-sym-picker *, .nx-checkin-sheet * {scroll-behavior:auto!important}
}


/* Nexus compact month cells — exact recorded weight remains scannable. */
.nx-cal-compact-day{
  box-sizing:border-box;display:flex;flex-direction:column;align-items:center;
  justify-content:space-between;gap:2px;aspect-ratio:auto!important;
  height:clamp(65px,10.5vw,87px);min-width:0;width:100%;
  padding:6px 2px 5px;border:1px solid var(--border-sub);border-radius:10px;
  background:var(--surface-2);color:var(--t2);cursor:pointer;
  font-variant-numeric:tabular-nums;
}
.nx-cal-compact-day[data-today="true"]{border-color:#7DF9C066;background:#7DF9C00c}
.nx-cal-compact-day.nexus-cal-selected{outline:2px solid #A78BFA;outline-offset:1px;background:#A78BFA17}
.nx-cal-day-number{font-size:12px;line-height:15px;color:var(--t3);font-weight:550}
.nx-cal-compact-day[data-today="true"] .nx-cal-day-number{color:#238C67;font-weight:800}
.nx-cal-day-signals{height:17px;max-width:100%;display:flex;align-items:center;justify-content:center;gap:3px;white-space:nowrap}
.nx-cal-log-count{min-width:16px;height:15px;box-sizing:border-box;padding:1px 3px;border-radius:5px;background:#A78BFA;color:#231835;font-size:10px;font-weight:800;line-height:13px}
.nx-cal-scheduled{width:10px;height:5px;border-radius:5px;background:var(--t4);opacity:.7;flex-shrink:0}
.nx-cal-paused{width:6px;height:6px;border:1px solid var(--t4);border-radius:50%;flex-shrink:0}
.nx-cal-mood{font-size:11px;line-height:15px}
.nx-cal-weight{display:block;height:14px;max-width:100%;font-size:10px;line-height:14px;font-weight:650;color:#416EBC;white-space:nowrap;letter-spacing:-.2px}
@media(max-width:370px){
 .nx-cal-compact-day{height:67px;padding:5px 1px 4px;gap:1px}
 .nx-cal-day-signals{gap:2px}
 .nx-cal-log-count{min-width:13px;font-size:9px;padding:1px 2px}
 .nx-cal-weight{font-size:9px}
 .nx-cal-mood{font-size:10px}
}
.nx-cal-compact-day:focus-visible{outline:2px solid #A78BFA;outline-offset:2px}

/* Nexus contrast pass: high-visibility controls in both themes. */
.btn-primary { color: #1A1728; }
[data-theme="light"] .btn-primary { color: #1A1728; }
[data-theme="light"] .inp::placeholder { color: #625D7B; opacity: 1; }
[data-theme="light"] button:focus-visible, [data-theme="light"] input:focus-visible { outline: 2px solid #51429B; outline-offset: 2px; }
[data-theme="light"] .modal button[style*="background:#C8FF9C"], [data-theme="light"] .modal button[style*="background: #C8FF9C"] { color: #1A1728 !important; }

/* v0.8.9 symptom picker spacing cleanup */
.nx-sym-picker .nx-sym-list { margin:0!important;padding:0!important;border-radius:0!important;overflow:hidden; }
.nx-sym-picker .nx-sym-row { border-radius:0!important;margin:0!important; }
.nx-sym-picker .nx-sym-row:last-child { border-bottom:0!important; }
.nx-sym-picker .symcat-toggle { min-height:48px; }
.nx-sym-search-results { max-height:224px;overflow-y:auto;overscroll-behavior:contain; }


/* v0.9.0 Chevron audit: one geometric icon, 20px box, 2px stroke, consistent alignment.
   Replaces mixed Unicode glyphs and native disclosure markers. */
:where(#supp-toggle,#supp-selected-toggle,.nx-sym-browse-toggle,.symcat-toggle){
  position:relative;display:flex!important;align-items:center!important;
  justify-content:space-between!important;gap:12px!important;
  padding-right:14px!important;min-height:48px!important;
}
:where(#supp-toggle,#supp-selected-toggle,.nx-sym-browse-toggle,.symcat-toggle)>span:last-child:not(:first-child){
  /* Only decorative glyph spans; the selected-count span is the first child. */
  font-size:0!important;line-height:0!important;
}
:where(#supp-toggle,#supp-selected-toggle,.nx-sym-browse-toggle,.symcat-toggle)::after,
.nx-checkin-sheet .nx-checkin-symptoms>summary::after{
  content:""!important;display:block!important;flex:none!important;
  width:9px!important;height:9px!important;
  border-right:2px solid currentColor!important;
  border-bottom:2px solid currentColor!important;
  transform:translateY(-2px) rotate(45deg)!important;
  margin-right:5px!important;opacity:.85!important;
  transition:transform .15s ease!important;
}
:where(#supp-toggle,#supp-selected-toggle,.nx-sym-browse-toggle)[aria-expanded="true"]::after,
.nx-checkin-sheet .nx-checkin-symptoms[open]>summary::after{
  transform:translateY(3px) rotate(225deg)!important;
}
.symcat-toggle[data-nx-open="true"]::after{transform:translateY(3px) rotate(225deg)!important}
.nx-checkin-sheet .nx-checkin-symptoms>summary{
  min-height:48px!important;padding:12px 14px!important;align-items:center!important;
}
.nx-checkin-sheet .nx-checkin-symptoms>summary::marker{content:""}
@media(prefers-reduced-motion:reduce){
  :where(#supp-toggle,#supp-selected-toggle,.nx-sym-browse-toggle,.symcat-toggle)::after,
  .nx-checkin-sheet .nx-checkin-symptoms>summary::after{transition:none!important}
}

/* v0.9.14: Plans controls follow one-action-per-surface hierarchy. */
.nx-plan-head{display:flex;align-items:flex-start;gap:8px;margin-bottom:8px;min-width:0}
.nx-plan-head .manage-plan-btn{display:inline-flex;align-items:center;justify-content:center;width:44px!important;height:44px!important;min-width:44px!important;font-size:20px}
.nx-plan-head .status-badge{flex-shrink:0}
.nx-plan-item details>summary{min-height:44px!important;display:flex;align-items:center;padding:10px 3px!important;font-size:12.5px!important}
.nx-plan-secondary{display:flex;justify-content:flex-start;margin:5px 0 10px}
.nx-plan-intel{min-height:44px;padding:9px 12px;display:inline-flex;align-items:center;gap:7px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--t2);font-size:12px;font-weight:600;cursor:pointer}
.nx-plan-intel:focus-visible,.nx-plan-head .manage-plan-btn:focus-visible{outline:3px solid #A78BFA;outline-offset:2px}
@media(max-width:360px){.nx-plan-head{gap:6px}.nx-plan-head .status-badge{font-size:10px}}

/* v0.9.15 candidate: Plans icons use coherent, non-text SVG geometry. */
.nx-plan-action-icon{width:20px;height:20px;display:block;flex:none;pointer-events:none}
.nx-plan-link-icon{width:16px;height:16px;display:block;flex:none;pointer-events:none}
.nx-plan-head .manage-plan-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
.nx-plan-intel .nx-plan-link-icon{margin-left:2px}
