/* ─────────────────────────────────────────────────────────────
   features.css — shared feature layer (loaded on every page,
   AFTER enhance.css so it can override the motion layer).

   Contents
     1.  Light theme (var overrides + hardcoded-grey rescues)
     2.  Nav tools (theme toggle, search trigger)
     3.  Skip-to-content
     4.  Floating action stack (back-to-top, contact)
     5.  Command palette (site search)
     6.  Loading states (skeletons, pending buttons)
     7.  Toast (copy-to-clipboard feedback)
     8.  Modal (confirmations)
     9.  Cookie / consent banner
     10. FAQ accordion
     11. Newsletter signup
     12. Copy buttons + password toggle
     13. Footer "last updated"
   ───────────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════
   1. LIGHT THEME
   Every page declares the same :root var names, so the theme is
   mostly a var swap. `html[data-theme=light]` outranks `:root`
   on specificity, so no !important is needed for the vars —
   only for colours the pages hardcoded as rgba() literals.
   ════════════════════════════════════════════════ */
:root{
  --dim:rgba(200,220,232,.68);
  --dimmer:rgba(200,220,232,.5);
  --faint:rgba(200,220,232,.3);
  --navbg:rgba(15,17,23,.92);
}
html[data-theme="light"]{
  --ink:#f6f3ec;   --ink2:#fffdf9;  --ink3:#ece7dd;
  --paper:#141821; --paper2:#1d232e;
  --text:#1b2330;  --muted:#5d6b7c; --border:#d8d1c4;
  --accent:#b8431a; --accent2:#1e3a5f;
  --gold:#7a5a08;  --cyan:#0a5566;  --green:#106d3e;
  --violet:#5a3fa0; --rose:#a32a3c;
  --dim:rgba(27,35,48,.92);
  --dimmer:rgba(27,35,48,.82);
  --faint:rgba(27,35,48,.66);
  --navbg:rgba(255,253,249,.94);
  color-scheme:light;
}
html[data-theme="light"] body{background:var(--ink);color:var(--text);}

/* the ambient canvases are drawn for a dark ground — keep them as a
   whisper on light rather than removing them (identity stays intact) */
/* the ambient fields are drawn in bright cyan for a dark ground; at .16 on
   cream they were invisible, so light mode looked like it had no animation.
   Darken and saturate the same pixels instead of fading them out. */
/* #stars is excluded: its script now paints dark ink directly on light,
   so dimming it here would only wash the dots back out. */
html[data-theme="light"] #ambientCanvas,
html[data-theme="light"] #ambientFx{
  opacity:.5;
  filter:brightness(.42) saturate(1.35);
}

/* Brand icons on index are forced pure white for the dark card; the
   alt-targeted rules below flatten every one of them to black on light. */
html[data-theme="light"] .soc img,
html[data-theme="light"] .lnk-icon img{
  filter:brightness(0) !important;
}

/* rescues for greys the pages wrote as literals */
html[data-theme="light"] .proj-tag,
html[data-theme="light"] .hs-label,
html[data-theme="light"] .ss-label,
html[data-theme="light"] .wid-desc,
html[data-theme="light"] .ep-desc,
html[data-theme="light"] .proj-desc,
html[data-theme="light"] .proj-n,
html[data-theme="light"] .footer-center,
html[data-theme="light"] .tb-item,
html[data-theme="light"] .lp-desc{color:rgba(27,35,48,.78) !important;}
html[data-theme="light"] .form-field input::placeholder,
html[data-theme="light"] .form-field textarea::placeholder{color:rgba(27,35,48,.42) !important;}
html[data-theme="light"] .proj-idx{color:rgba(27,35,48,.07);}
html[data-theme="light"] nav,
html[data-theme="light"] .top-bar{background:rgba(255,253,249,.92) !important;backdrop-filter:blur(10px);}
html[data-theme="light"] .mobile-menu{background:var(--ink2) !important;}
html[data-theme="light"] nav.nav-condensed{box-shadow:0 8px 26px rgba(20,24,33,.12);}
html[data-theme="light"] footer{background:var(--ink3) !important;}
html[data-theme="light"] .proj-card:hover{box-shadow:0 14px 34px rgba(20,24,33,.14);}
/* Brand icons are forced pure white for the dark ground
   (.soc img{filter:brightness(0) invert(1)}). Inverting them for light
   mode acted on each SVG's SOURCE colour, not on that white result:
   Medium ships black, so invert() turned it white and invisible, and
   LinkedIn's blue merely shifted hue. Flatten the whole set to black
   instead: one monochrome black row on light, mirroring the white row
   on dark. */
html[data-theme="light"] img[alt="LinkedIn"],
html[data-theme="light"] img[alt="GitHub"],
html[data-theme="light"] img[alt="TryHackMe"],
html[data-theme="light"] img[alt="Medium"]{filter:brightness(0) !important;}
/* the portfolio folder icon ships as black line art: white in dark mode, as-drawn on paper */
html[data-theme="light"] img[alt="Portfolio"]{filter:brightness(0) !important;}

/* --cyan becomes a DARK teal on light, so buttons that pair it with the
   dark ink text they use on dark ground end up dark-on-dark (2.3:1).
   Flip their label to paper instead. */
html[data-theme="light"] .nl-btn,
html[data-theme="light"] .btn-primary{color:#fff !important;}
/* the updated stamp sat at 4.4:1 on the footer bar */
html[data-theme="light"] .last-updated{color:rgba(27,35,48,.88) !important;}
/* the small trailing year on the "Most Recent" stat is a dark-mode literal
   (var(--dimmer) at .5 alpha only reached 4.0:1 there) — give it the paper
   equivalent so both themes clear 4.5:1 */
html[data-theme="light"] .ph-stat-num .yr{color:rgba(27,35,48,.85) !important;}
/* writeup-card body copy and tags carry dark-mode literals for the same
   reason — give them the paper equivalent rather than inheriting */
html[data-theme="light"] .wu-card-desc,
html[data-theme="light"] .wu-tag{color:rgba(27,35,48,.85) !important;}
/* featured-card issuer lines inherit accent colours tuned for a dark card;
   on paper the gold at .55 alpha fell to 1.5:1 */
html[data-theme="light"] .feat-issuer{color:rgba(27,35,48,.8) !important;}
/* the 404 footer link sat just under 4.5:1 */
html[data-theme="light"] footer a{color:rgba(27,35,48,.86) !important;}
/* the pixel sprites' hood is bright cyan, tuned for a dark ground: ~1.7:1
   on cream. Swap the hood colour rather than dimming the whole sprite. */
html[data-theme="light"] .nf-sprite rect[fill="#00d4ff"]{fill:#0a5566;}
html[data-theme="light"] #runner rect[fill="#00d4ff"]{fill:#0a5566;}
html[data-theme="light"] .nf-scan span{background:#0a5566;}

/* theme changes shouldn't strobe the whole page */
html.theme-anim body,html.theme-anim nav,html.theme-anim footer{
  transition:background-color .3s ease,color .3s ease;
}

/* ════════════════════════════════════════════════
   2. NAV TOOLS
   ════════════════════════════════════════════════ */
.nav-tools{display:flex;align-items:center;gap:8px;}
.nav-tool{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-width:36px;min-height:36px;padding:0 10px;
  background:transparent;border:1px solid var(--border);border-radius:3px;
  color:var(--text);cursor:pointer;
  font-family:"DM Mono",ui-monospace,monospace;font-size:10.5px;letter-spacing:1px;
  transition:color .2s,border-color .2s,background .2s,transform .2s;
}
.nav-tool:hover{color:var(--accent);border-color:var(--accent);background:rgba(224,92,42,.08);transform:translateY(-1px);}
.nav-tool svg{width:15px;height:15px;flex:none;}
.nav-tool .kbd{
  opacity:.55;font-size:9.5px;letter-spacing:.5px;
  border:1px solid var(--border);border-radius:2px;padding:1px 4px;
}
/* icon-only by default — the nav is a tight row; the shortcut hint only
   appears where there is genuinely room for it */
.nav-tool .lbl{display:none}
.nav-tool .kbd{display:none}
@media(min-width:1180px){.nav-tool .kbd{display:inline-block}}
.nav-tools-li{display:flex;align-items:center;margin-left:4px;}
/* the collapse applies to the in-nav instance only — pages with no <nav>
   (sitemap, 404) get a floated copy that is their ONLY way to reach the
   palette and theme toggle, so it must never be hidden */
@media(max-width:1060px){.nav-tools:not(.is-floating),.nav-tools-li{display:none}}

/* mobile-menu equivalents */
.mob-tool{
  display:flex !important;align-items:center;justify-content:space-between;gap:12px;
  width:100%;background:transparent;border:0;border-top:1px solid var(--border);
  color:inherit;font:inherit;cursor:pointer;padding:14px 0;text-align:left;
  min-height:48px;
}
.mob-tool .mt-val{font-family:"DM Mono",ui-monospace,monospace;font-size:11px;color:var(--accent);letter-spacing:1px;}

/* ════════════════════════════════════════════════
   3. SKIP TO CONTENT
   ════════════════════════════════════════════════ */
.skip-link{
  position:fixed;top:-100px;left:14px;z-index:10050;
  background:var(--accent);color:#fff;
  padding:12px 18px;border-radius:0 0 4px 4px;
  font-family:"DM Mono",ui-monospace,monospace;font-size:12px;letter-spacing:1px;
  text-decoration:none;transition:top .18s ease;
}
/* only reveal for keyboard users: programmatic focus (e.g. back-to-top)
   must not slide the skip link into view for someone using a mouse */
.skip-link:focus{outline:2px solid var(--cyan);outline-offset:2px;}
.skip-link:focus-visible{top:0;}

/* ════════════════════════════════════════════════
   4. FLOATING ACTION STACK
   ════════════════════════════════════════════════ */
.fab-stack{
  position:fixed;right:clamp(14px,2.2vw,26px);
  bottom:calc(clamp(14px,2.2vw,26px) + env(safe-area-inset-bottom,0px));
  z-index:940;display:flex;flex-direction:column;gap:10px;align-items:flex-end;
}
.fab{
  width:48px;height:48px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--ink2);border:1px solid var(--border);color:var(--text);
  cursor:pointer;text-decoration:none;
  box-shadow:0 10px 30px rgba(0,0,0,.34);
  transition:transform .25s var(--ease-out,ease),opacity .25s ease,
             background .2s ease,border-color .2s ease,color .2s ease,visibility .25s;
}
.fab svg{width:20px;height:20px;}
.fab:hover{transform:translateY(-3px);color:var(--accent);border-color:var(--accent);}
.fab-contact{background:var(--accent);border-color:var(--accent);color:#fff;}
.fab-contact:hover{color:#fff;transform:translateY(-3px) scale(1.04);box-shadow:0 14px 34px rgba(224,92,42,.42);}
.fab-top{opacity:0;visibility:hidden;transform:translateY(12px);}
.fab-top.show{opacity:1;visibility:visible;transform:none;}
/* tooltip label */
.fab[data-tip]{position:relative;}
.fab[data-tip]::after{
  content:attr(data-tip);position:absolute;right:calc(100% + 10px);top:50%;
  transform:translateY(-50%);white-space:nowrap;pointer-events:none;
  background:var(--ink3);color:var(--text);border:1px solid var(--border);
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;letter-spacing:1px;
  padding:5px 9px;border-radius:3px;opacity:0;transition:opacity .2s;
}
.fab[data-tip]:hover::after{opacity:1;}
@media(max-width:600px){.fab[data-tip]::after{display:none}.fab{width:44px;height:44px}}

/* ════════════════════════════════════════════════
   5. COMMAND PALETTE (SEARCH)
   ════════════════════════════════════════════════ */
.pal-backdrop{
  position:fixed;inset:0;z-index:10000;
  background:rgba(4,7,12,.72);backdrop-filter:blur(5px);
  display:flex;align-items:flex-start;justify-content:center;
  padding:clamp(40px,10vh,120px) 16px 16px;
  opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s;
}
.pal-backdrop.open{opacity:1;visibility:visible;}
.pal{
  width:100%;max-width:620px;max-height:min(70vh,560px);
  display:flex;flex-direction:column;overflow:hidden;
  background:var(--ink2);border:1px solid var(--border);border-radius:6px;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.7);
  transform:translateY(-10px) scale(.985);transition:transform .22s var(--ease-out,ease);
}
.pal-backdrop.open .pal{transform:none;}
.pal-head{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--border);}
.pal-head svg{width:17px;height:17px;color:var(--muted);flex:none;}
.pal-input{
  flex:1;min-width:0;background:transparent;border:0;outline:none;
  color:var(--text);font-family:"Syne",system-ui,sans-serif;font-size:16px;
}
.pal-input::placeholder{color:var(--muted);}
.pal-esc{
  font-family:"DM Mono",ui-monospace,monospace;font-size:9.5px;letter-spacing:1px;
  color:var(--muted);border:1px solid var(--border);border-radius:2px;padding:3px 6px;
}
.pal-list{overflow-y:auto;padding:8px;flex:1;}
.pal-group{
  font-family:"DM Mono",ui-monospace,monospace;font-size:9px;letter-spacing:2px;
  text-transform:uppercase;color:var(--muted);padding:12px 10px 6px;
}
.pal-item{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:10px 10px;border:0;background:transparent;border-radius:4px;
  color:var(--text);text-align:left;cursor:pointer;text-decoration:none;
  font:inherit;min-height:44px;
}
.pal-item:hover,.pal-item.sel{background:var(--ink3);}
.pal-item.sel{box-shadow:inset 2px 0 0 var(--accent);}
.pal-it-main{min-width:0;flex:1;}
.pal-it-title{display:block;font-size:13.5px;font-weight:600;line-height:1.3;}
.pal-it-sub{
  display:block;
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;
  color:var(--muted);margin-top:3px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.pal-it-kind{
  font-family:"DM Mono",ui-monospace,monospace;font-size:8.5px;letter-spacing:1px;
  text-transform:uppercase;color:var(--muted);
  border:1px solid var(--border);border-radius:2px;padding:3px 6px;flex:none;
}
.pal-empty{padding:34px 16px;text-align:center;color:var(--muted);font-size:13px;}
.pal-foot{
  display:flex;gap:16px;flex-wrap:wrap;padding:10px 18px;border-top:1px solid var(--border);
  font-family:"DM Mono",ui-monospace,monospace;font-size:9.5px;letter-spacing:1px;color:var(--muted);
}

/* ════════════════════════════════════════════════
   6. LOADING STATES
   ════════════════════════════════════════════════ */
@keyframes skelSweep{100%{transform:translateX(100%)}}
.skel{position:relative;overflow:hidden;background:var(--ink2);border:1px solid var(--border);}
.skel::after{
  content:"";position:absolute;inset:0;transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.055),transparent);
  animation:skelSweep 1.35s infinite;
}
.skel-card{min-height:210px;padding:24px;display:flex;flex-direction:column;gap:12px;}
.skel-line{height:10px;border-radius:2px;background:var(--ink3);}
.skel-line.w40{width:40%}.skel-line.w70{width:70%}.skel-line.w90{width:90%}
.skel-line.tall{height:20px;margin-bottom:4px}
.skel-row{height:52px;margin-bottom:2px;}
@media(prefers-reduced-motion:reduce){.skel::after{animation:none}}

/* button pending state — works on any button given .is-loading */
.is-loading{position:relative;pointer-events:none;opacity:.78;}
.is-loading::after{
  content:"";position:absolute;top:50%;left:50%;width:15px;height:15px;
  margin:-7.5px 0 0 -7.5px;border-radius:50%;
  border:2px solid currentColor;border-right-color:transparent;
  animation:spin .7s linear infinite;
}
.is-loading > *{visibility:hidden;}
@keyframes spin{to{transform:rotate(360deg)}}

/* ════════════════════════════════════════════════
   7. TOAST
   ════════════════════════════════════════════════ */
.toast-wrap{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:calc(22px + env(safe-area-inset-bottom,0px));
  z-index:10040;display:flex;flex-direction:column;gap:8px;align-items:center;
  pointer-events:none;width:max-content;max-width:calc(100vw - 32px);
}
.toast{
  display:flex;align-items:center;gap:9px;
  background:var(--ink3);color:var(--text);
  border:1px solid var(--border);border-left:3px solid var(--green,#39ff8a);
  border-radius:4px;padding:11px 16px;
  font-family:"DM Mono",ui-monospace,monospace;font-size:11.5px;letter-spacing:.5px;
  box-shadow:0 12px 34px rgba(0,0,0,.4);
  opacity:0;transform:translateY(10px);transition:opacity .22s ease,transform .22s ease;
}
.toast.in{opacity:1;transform:none;}
.toast svg{width:14px;height:14px;color:var(--green,#39ff8a);flex:none;}

/* ════════════════════════════════════════════════
   8. MODAL (CONFIRMATIONS)
   ════════════════════════════════════════════════ */
.modal-backdrop{
  position:fixed;inset:0;z-index:10030;
  background:rgba(4,7,12,.7);backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;padding:20px;
  opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s;
}
.modal-backdrop.open{opacity:1;visibility:visible;}
.modal{
  width:100%;max-width:420px;background:var(--ink2);
  border:1px solid var(--border);border-top:3px solid var(--accent);border-radius:5px;
  padding:clamp(22px,3vw,30px);box-shadow:0 30px 70px -18px rgba(0,0,0,.7);
  transform:scale(.97);transition:transform .2s var(--ease-out,ease);
}
.modal-backdrop.open .modal{transform:none;}
.modal-title{font-family:"Syne",system-ui,sans-serif;font-size:19px;font-weight:700;margin-bottom:10px;}
.modal-body{font-size:13.5px;line-height:1.6;color:var(--dim,inherit);margin-bottom:22px;}
.modal-acts{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;}
.modal-btn{
  min-height:44px;padding:0 18px;border-radius:3px;cursor:pointer;
  font-family:"DM Mono",ui-monospace,monospace;font-size:11px;letter-spacing:1.5px;
  text-transform:uppercase;transition:background .2s,color .2s,border-color .2s;
}
.modal-cancel{background:transparent;border:1px solid var(--border);color:var(--text);}
.modal-cancel:hover{border-color:var(--text);}
.modal-ok{background:var(--accent);border:1px solid var(--accent);color:#fff;}
.modal-ok:hover{filter:brightness(1.08);}

/* ════════════════════════════════════════════════
   9. COOKIE / CONSENT BANNER
   ════════════════════════════════════════════════ */
.cc-banner{
  position:fixed;z-index:2147483001;
  left:clamp(14px,2.2vw,26px);
  bottom:calc(clamp(14px,2.2vw,26px) + env(safe-area-inset-bottom,0px));
  width:min(420px,calc(100vw - 28px));
  background:var(--ink2,#0d1620);border:1px solid var(--border,rgba(120,160,190,.22));border-left:3px solid var(--cyan,#00d4ff);
  border-radius:5px;padding:20px 22px;
  box-shadow:0 20px 50px -16px rgba(0,0,0,.6);
  transform:translateY(20px);opacity:0;visibility:hidden;
  transition:transform .3s var(--ease-out,ease),opacity .3s ease,visibility .3s;
}
.cc-banner.show{transform:none;opacity:1;visibility:visible;}
html[data-theme="light"] .cc-banner{background:var(--ink2,#f4f7fa);}
.cc-scrim{position:fixed;inset:0;z-index:2147483000;background:rgba(4,8,12,.72);opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s;}
.cc-scrim.show{opacity:1;visibility:visible;}
@media(min-width:641px){.cc-scrim{display:none;}}
.cc-title{
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;letter-spacing:2px;
  text-transform:uppercase;color:var(--cyan,#00d4ff);margin-bottom:9px;
}
.cc-text{font-size:12.5px;line-height:1.65;color:var(--dim,#9fb3c4);margin-bottom:16px;}
.cc-acts{display:flex;gap:9px;flex-wrap:wrap;}
.cc-btn{
  min-height:40px;padding:0 15px;border-radius:3px;cursor:pointer;
  font-family:"DM Mono",ui-monospace,monospace;font-size:10.5px;letter-spacing:1.2px;
  text-transform:uppercase;transition:filter .2s,border-color .2s,color .2s;
}
.cc-accept{background:var(--accent,#c0441c);border:1px solid var(--accent,#c0441c);color:#fff;}
.cc-accept:hover{filter:brightness(1.1);}
.cc-decline{background:transparent;border:1px solid var(--border,rgba(120,160,190,.35));color:var(--text,#e6eef4);}
.cc-decline:hover{border-color:var(--text,#e6eef4);}
@media(max-width:640px){
  .cc-banner{left:14px;right:14px;width:auto;bottom:calc(76px + env(safe-area-inset-bottom,0px));}
}

/* ════════════════════════════════════════════════
   10. FAQ ACCORDION
   ════════════════════════════════════════════════ */
.faq{max-width:820px;margin:0 auto;}
.faq-item{border-bottom:1px solid var(--border);}
.faq-item:first-child{border-top:1px solid var(--border);}
.faq-q{
  width:100%;display:flex;align-items:center;gap:16px;justify-content:space-between;
  background:transparent;border:0;cursor:pointer;color:var(--text);
  padding:20px 4px;text-align:left;min-height:56px;
  font-family:"Syne",system-ui,sans-serif;font-size:clamp(14.5px,1.7vw,17px);font-weight:600;
  transition:color .2s;
}
.faq-q:hover{color:var(--accent);}
.faq-mark{
  flex:none;width:22px;height:22px;position:relative;
  border:1px solid var(--border);border-radius:2px;transition:border-color .2s,background .2s;
}
.faq-q:hover .faq-mark,.faq-item.open .faq-mark{border-color:var(--accent);}
.faq-mark::before,.faq-mark::after{
  content:"";position:absolute;top:50%;left:50%;background:var(--accent);
  transform:translate(-50%,-50%);transition:transform .25s var(--ease-out,ease),opacity .2s;
}
.faq-mark::before{width:10px;height:1.5px;}
.faq-mark::after{width:1.5px;height:10px;}
.faq-item.open .faq-mark::after{transform:translate(-50%,-50%) rotate(90deg);opacity:0;}
.faq-a{overflow:hidden;height:0;transition:height .3s var(--ease-out,ease);}
.faq-a-inner{padding:0 4px 22px;max-width:70ch;}
.faq-a-inner p{font-size:13.5px;line-height:1.75;color:var(--dim,inherit);}
.faq-a-inner a{color:var(--cyan);text-decoration:none;border-bottom:1px solid transparent;}
.faq-a-inner a:hover{border-bottom-color:var(--cyan);}

/* ════════════════════════════════════════════════
   11. NEWSLETTER
   ════════════════════════════════════════════════ */
.nl{
  max-width:820px;margin:0 auto;background:var(--ink2);
  border:1px solid var(--border);border-top:3px solid var(--cyan);
  border-radius:4px;padding:clamp(24px,3.4vw,38px);
}
.nl-eyebrow{
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;letter-spacing:2.5px;
  text-transform:uppercase;color:var(--cyan);margin-bottom:12px;
}
.nl-title{font-family:"Syne",system-ui,sans-serif;font-size:clamp(20px,2.6vw,27px);font-weight:700;margin-bottom:10px;letter-spacing:-.4px;}
.nl-desc{font-size:13.5px;line-height:1.7;color:var(--dim,inherit);max-width:56ch;margin-bottom:22px;}
.nl-form{display:flex;gap:10px;flex-wrap:wrap;}
.nl-form input[type="email"]{
  flex:1 1 240px;min-width:0;min-height:48px;padding:0 15px;
  background:var(--ink3);border:1px solid var(--border);border-radius:3px;
  color:var(--text);font-family:"DM Mono",ui-monospace,monospace;font-size:13px;
  transition:border-color .2s;
}
.nl-form input[type="email"]:focus{outline:none;border-color:var(--cyan);}
.nl-form input[type="email"]::placeholder{color:var(--muted);}
.nl-btn{
  min-height:48px;padding:0 22px;cursor:pointer;border-radius:3px;
  background:var(--cyan);border:1px solid var(--cyan);color:#06121a;
  font-family:"DM Mono",ui-monospace,monospace;font-size:11px;letter-spacing:1.6px;
  text-transform:uppercase;font-weight:500;transition:filter .2s,transform .2s;
}
.nl-btn:hover{filter:brightness(1.08);transform:translateY(-1px);}
.nl-note{
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;letter-spacing:.8px;
  color:var(--muted);margin-top:14px;
}
.nl-done{display:none;font-size:14px;line-height:1.7;color:var(--green);}
/* the two routes that actually deliver a notification to the reader */
.nl-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px;}
.nl-primary,.nl-secondary{
  min-height:48px;display:inline-flex;align-items:center;gap:8px;
  padding:0 22px;border-radius:3px;text-decoration:none;
  font-family:"DM Mono",ui-monospace,monospace;font-size:11.5px;letter-spacing:1.4px;
  text-transform:uppercase;transition:filter .2s,transform .2s,border-color .2s,color .2s;
}
.nl-primary{background:var(--cyan);border:1px solid var(--cyan);color:#06121a;}
.nl-primary:hover{filter:brightness(1.08);transform:translateY(-1px);color:#06121a;}
.nl-secondary{background:transparent;border:1px solid var(--border);color:var(--cyan);}
.nl-secondary:hover{border-color:var(--cyan);transform:translateY(-1px);}
.nl-or{
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;letter-spacing:2px;
  text-transform:uppercase;color:var(--muted);margin-bottom:10px;
}

/* ════════════════════════════════════════════════
   12. COPY BUTTONS + PASSWORD TOGGLE
   ════════════════════════════════════════════════ */
.copy-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;flex:none;vertical-align:middle;
  background:transparent;border:1px solid var(--border);border-radius:3px;
  color:var(--muted);cursor:pointer;transition:color .2s,border-color .2s,background .2s;
}
.copy-btn svg{width:13px;height:13px;}
.copy-btn:hover{color:var(--cyan);border-color:var(--cyan);background:rgba(0,212,255,.08);}
.copy-btn.done{color:var(--green);border-color:var(--green);}

.pw-wrap{position:relative;display:block;}
.pw-toggle{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);
  width:34px;height:34px;display:flex;align-items:center;justify-content:center;
  background:transparent;border:0;color:var(--muted);cursor:pointer;
  border-radius:3px;transition:color .2s;
}
.pw-toggle:hover{color:var(--cyan);}
.pw-toggle svg{width:17px;height:17px;}
.pw-wrap input{padding-right:46px !important;}

/* ════════════════════════════════════════════════
   13. FOOTER LAST-UPDATED
   ════════════════════════════════════════════════ */
.last-updated{
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;letter-spacing:1px;
  color:var(--muted);
}

/* hide every injected chrome from print + reduced-motion tidy-ups */
@media print{
  .fab-stack,.cc-banner,.cc-scrim,.pal-backdrop,.modal-backdrop,.toast-wrap,
  .nav-tools,.skip-link,.copy-btn,.nl{display:none !important}
  .faq-a{height:auto !important}
}
@media(prefers-reduced-motion:reduce){
  .pal,.modal,.cc-banner,.cc-scrim,.toast,.fab-top{transition-duration:.001ms !important}
  .faq-a{transition-duration:.001ms !important}
}

/* ── section shell for the contact page's FAQ + newsletter blocks ── */
.fq-sec{
  padding:clamp(48px,7vw,90px) clamp(18px,5vw,64px);
  border-top:1px solid var(--border);
}
.fq-head{max-width:820px;margin:0 auto clamp(26px,3.4vw,40px);}
.fq-eyebrow{
  font-family:"DM Mono",ui-monospace,monospace;font-size:10px;letter-spacing:2.5px;
  text-transform:uppercase;color:var(--accent);margin-bottom:12px;
}
.fq-title{
  font-family:"Syne",system-ui,sans-serif;font-weight:700;
  font-size:clamp(24px,3.4vw,40px);letter-spacing:-.8px;line-height:1.1;
}
.fq-sub{font-size:13.5px;line-height:1.7;color:var(--dim,inherit);margin-top:12px;max-width:58ch;}

/* clear-form control under the contact submit button */
.form-clear{
  display:block;width:100%;margin-top:10px;min-height:44px;
  background:transparent;border:1px solid var(--border);border-radius:3px;
  color:var(--muted);cursor:pointer;
  font-family:"DM Mono",ui-monospace,monospace;font-size:10.5px;letter-spacing:1.5px;
  text-transform:uppercase;transition:color .2s,border-color .2s;
}
.form-clear:hover{color:var(--accent);border-color:var(--accent);}

/* ════════════════════════════════════════════
   LIGHT-MODE STRUCTURAL FIXES
   Several grids use "2px gap over a --border background" to draw their
   divider lines. On a dark page an empty cell in that grid is invisible;
   on paper-light it reads as a solid grey block, so the line colour is
   pulled closer to the page.
   ════════════════════════════════════════════ */
html[data-theme="light"] .wid-grid,
html[data-theme="light"] .explore-grid,
html[data-theme="light"] .exp-grid,
html[data-theme="light"] .thm-cert-grid,
html[data-theme="light"] .feat-grid,
html[data-theme="light"] .paths,
html[data-theme="light"] .goals-grid{background:#f0ebe1;}

/* the hero's decorative radial glow is tuned for a dark ground */
html[data-theme="light"] #hero::before,
html[data-theme="light"] #page-hero::before,
html[data-theme="light"] body::after{opacity:.4;}

/* Brand glyphs are white-filled SVG payloads, so on paper they need the
   invert (not filter:none, which paints white on white). .ci-icon already
   applies its own brightness(0) invert(1), so only that one is reset. */
html[data-theme="light"] .ci-icon img{filter:brightness(0) !important;opacity:.85;}

/* ════════════════════════════════════════════
   ROW-LEVEL TEXT FITTING (both themes)
   Small monospace pills and footer links were wrapping mid-label,
   breaking out of their own borders.
   ════════════════════════════════════════════ */
.wid-tag,.ep-tag,.thm-tag,.feat-tag,.skill-tag,.tb-ow,.footer-links a,
.cert-tag,.sp-title,.badge-label{white-space:nowrap;}
/* pills were inline spans: when their label wrapped, the border broke and the
   second line spilled outside the box. inline-block keeps the border around
   the whole label, so a long pill grows to two lines instead of leaking. */
.sd-tag,.wid-tag,.ep-tag,.thm-tag,.feat-tag,.skill-tag,.cert-tag,.proj-tag{
  display:inline-block;line-height:1.45;max-width:100%;
}
.sd-tag{white-space:normal;}
.sd-tags{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;}
.wid-tags,.ep-tags{row-gap:6px;}

/* ── light mode: solid-fill controls keep white ink ──
   These paint text in --paper (dark in light mode), which on an accent or
   gold fill drops to ~2.7:1. Full-opacity white on the darkened accent
   clears 4.5:1 instead. */
html[data-theme="light"] .nav-dl,
html[data-theme="light"] .mob-dl,
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .form-submit,
html[data-theme="light"] .tl-tag,
html[data-theme="light"] .tl-tag.gold,
html[data-theme="light"] .exp-badge,
html[data-theme="light"] .tb-ow,
html[data-theme="light"] .avail-badge,
html[data-theme="light"] .proj-tag.solid,
html[data-theme="light"] .cc-accept,
html[data-theme="light"] .modal-ok{color:#fff !important;}

/* gold-on-paper reads as mustard at small sizes */
html[data-theme="light"] .tl-tag.gold,
html[data-theme="light"] .exp-badge.gold{background:#6d5208 !important;}
html[data-theme="light"] .exp-org{color:#6d5208 !important;}

/* white 9px label on a light accent fill — full-strength ink instead */
html[data-theme="light"] .photo-tag-status,
html[data-theme="light"] .photo-tag,
html[data-theme="light"] .tb-ow{color:#fff !important;opacity:1 !important;}
