/* hermes.x — standalone brand site, not derived from silentmode.st shared.css.
   Primary accent is sky-mid #38BDF8 (default; swap --sky in :root to re-skin). */
:root{
  color-scheme:dark;  /* hermes.x is a dark-only brand; opt out of OS light mode */
  --bg:#0b0e14;
  --panel:#141a24;
  --panel2:#18202c;
  --panel3:#1d2634;
  --line:rgba(255,255,255,.09);
  --line2:rgba(255,255,255,.14);
  --ink:#e7eaf1;
  --mut:#8b98a9;
  --dim:#5e6678;
  --sky:#38BDF8;        /* primary accent — the Hermes mark colour */
  --sky-soft:#60A5FA;
  --sky-deep:#0EA5E9;
  --warn:#ffc75f;
  --ok:#4fd1a5;
  --err:#f6768a;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--bg)}  /* mobile browsers paint the html bg before body loads — force dark */
body{
  margin:0;
  background:radial-gradient(1100px 560px at 50% -12%,#121a26,var(--bg));
  color:var(--ink);
  font:16px/1.65 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  min-height:100vh;
}
a{color:var(--sky)}
a:hover{color:var(--sky-soft)}

/* ---- top nav ---- */
.topnav{
  position:sticky;top:0;z-index:20;
  display:flex;gap:2px;align-items:center;flex-wrap:wrap;
  padding:10px 1.2rem;
  background:rgba(11,14,20,.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.topnav .brand{
  font-weight:600;color:var(--ink);text-decoration:none;
  margin-right:14px;font-size:15px;letter-spacing:.2px;
  display:inline-flex;align-items:center;gap:8px;
}
.topnav .brand svg{width:20px;height:20px;color:var(--sky)}
.topnav .brand .x{color:var(--sky)}
.topnav a{
  color:var(--mut);text-decoration:none;
  padding:6px 12px;border-radius:8px;font-size:14px;
}
.topnav a:hover{color:var(--ink);background:var(--panel)}
.topnav a.here{color:var(--sky);background:rgba(56,189,248,.08)}
.topnav .get{margin-left:auto;background:rgba(56,189,248,.14);color:var(--sky);font-weight:500}
.topnav .get:hover{background:rgba(56,189,248,.22)}

/* Collapsible nav. The non-brand links are wrapped in .nav-links so a
   hamburger can swap them for a dropdown at mobile widths. On desktop the
   wrapper is `display:contents` so its children remain direct flex items
   of .topnav, preserving the existing margin-left:auto Sign-in placement
   and the here-highlight on the current page. */
.topnav .nav-links{display:contents}
.topnav .nav-toggle{
  display:none;
  background:transparent;border:0;cursor:pointer;color:var(--mut);
  padding:6px 8px;border-radius:8px;
  align-items:center;justify-content:center;
}
.topnav .nav-toggle:hover{color:var(--ink);background:var(--panel)}

/* ---- layout ---- */
.wrap{max-width:980px;margin:0 auto;padding:0 1.2rem}
.wrap.narrow{max-width:780px}

header.hero{text-align:center;padding:2.2rem 1.2rem 1.4rem}
header.hero .mark{display:inline-flex;color:var(--sky);line-height:0}
header.hero .mark svg,
header.hero .mark img{width:84px;height:84px}
h1{font-size:clamp(2rem,5vw,2.8rem);margin:.4rem 0 .25rem;letter-spacing:.4px;font-weight:600;line-height:1.1}
h1 .x{color:var(--sky)}
.tag{color:var(--mut);font-size:1rem;max-width:660px;margin:.35rem auto 0;line-height:1.5}
.tag kbd{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:4px;padding:1px 7px;font-family:ui-monospace,monospace;font-size:13px;color:var(--ink)}

section{padding:1.8rem 0;border-top:1px solid var(--line)}
section.plain{border-top:none;padding-top:1rem}
h2{font-size:1.45rem;margin:0 0 .35rem;font-weight:600}
h3{font-size:1.05rem;margin:0 0 .3rem;font-weight:600}
.lede{color:var(--mut);margin:0 0 1.2rem;max-width:680px}

/* ---- cards ---- */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.card{
  background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:16px;
}
.card h3{display:flex;align-items:center;gap:8px;margin-bottom:.5rem}
.card p{margin:0;color:var(--mut);font-size:14px;line-height:1.55}
.src{display:inline-block;font-size:11px;padding:1px 7px;border-radius:999px;background:var(--panel2);color:var(--mut);text-transform:uppercase;letter-spacing:.4px;font-weight:600}
.src.ok{color:var(--ok);background:rgba(79,209,165,.12)}
.src.next{color:var(--sky);background:rgba(56,189,248,.12)}
.src.plan{color:var(--mut)}

/* ---- notes ---- */
.note{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 16px;font-size:14px;color:var(--mut)}
.note b{color:var(--ink)}
.note.warn{background:rgba(255,199,95,.06);border-color:rgba(255,199,95,.22);color:var(--ink)}
.note.warn b{color:var(--warn)}

/* ---- buttons / CTAs ---- */
.cta{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:1.7rem}
.btn{display:inline-flex;align-items:center;gap:8px;text-decoration:none;padding:11px 20px;border-radius:999px;font-weight:600;font-size:14px}
.btn.primary{background:var(--sky);color:#06111a}
.btn.primary:hover{filter:brightness(1.08)}
.btn.ghost{background:var(--panel);color:var(--ink);border:1px solid var(--line)}
.btn.ghost:hover{background:var(--panel2);border-color:var(--line2)}

/* ---- mobile ---- */
@media (max-width: 640px){
  /* Mobile: brand on the left, hamburger on the right. The non-brand links
     collapse into a dropdown drawer anchored under the hamburger. Tapping
     a link or the backdrop closes the drawer. */
  .topnav{position:relative;padding:8px 12px;gap:4px;flex-wrap:nowrap;min-width:0}
  .topnav .brand{margin-right:4px;font-size:14px;min-width:0;flex:0 0 auto}
  .topnav .brand img{width:20px;height:20px}

  /* Hide the inline wrapper, replace with a dropdown when open. */
  .topnav .nav-links{
    display:none;
    position:absolute;top:calc(100% + 6px);right:8px;
    background:var(--panel);border:1px solid var(--line);border-radius:12px;
    padding:6px;min-width:200px;z-index:21;flex-direction:column;gap:2px;
    box-shadow:0 20px 48px rgba(0,0,0,.5);
  }
  .topnav .nav-links.open{display:flex}
  .topnav .nav-links > a{
    color:var(--mut);text-decoration:none;
    padding:10px 14px;border-radius:8px;font-size:15px;margin:0;
    display:flex;align-items:center;gap:10px;
  }
  .topnav .nav-links > a:hover,
  .topnav .nav-links > a.here{color:var(--sky);background:rgba(56,189,248,.08)}
  /* Sign-in pill in the drawer: keep the sky accent, drop the margin-left:auto
     push so it stacks under the other links in the normal order. */
  .topnav .nav-links > a[aria-label^="Sign in"]{
    background:rgba(56,189,248,.14)!important;color:var(--sky)!important;
    font-weight:600;margin:4px 0 0 0!important;justify-content:flex-start;
  }

  /* Hamburger button lives flush to the right edge. */
  .topnav .nav-toggle{display:inline-flex;margin-left:auto}
  .topnav .nav-toggle .icon-close{display:none}
  .topnav .nav-toggle[aria-expanded="true"] .icon-open{display:none}
  .topnav .nav-toggle[aria-expanded="true"] .icon-close{display:inline}

  header.hero{padding:1.4rem 1rem 1rem}
  header.hero .mark img{width:68px!important;height:68px!important}
  h1{font-size:clamp(1.7rem,8vw,2.2rem)}
  .tag{font-size:.95rem}

  section{padding:1.4rem 0}
  h2{font-size:1.25rem}

  .cta{gap:8px;margin-top:1rem}
  .btn{padding:10px 16px;font-size:13.5px}

  .wrap, .wrap.narrow{padding:0 1rem}
}

code.inline{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:rgba(255,255,255,.05);padding:1px 6px;border-radius:5px;font-size:.92em}

/* ---- steps list ---- */
.steps{list-style:none;padding:0;margin:0;counter-reset:step}
.steps li{display:flex;gap:14px;padding:14px 0;border-top:1px solid var(--line)}
.steps li:first-child{border-top:none;padding-top:0}
.steps li::before{counter-increment:step;content:counter(step);flex-shrink:0;width:28px;height:28px;border-radius:50%;background:rgba(56,189,248,.12);color:var(--sky);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600}
.steps li b{display:block;margin-bottom:4px}
.steps li span{color:var(--mut);font-size:14px}

/* Legacy flat footer — kept as the default so pages that haven't been
   upgraded still render. The upgraded footer uses .site-footer below. */
footer{text-align:center;padding:1.6rem 1.2rem 2rem;color:var(--mut);font-size:13px;border-top:1px solid var(--line)}
footer .fine{color:var(--dim);font-size:12px;margin-top:.5rem}

/* Column-based site footer. Left lead = brand mark + one-line description +
   'A Silent Mode project' sub-line; right side = three link columns that
   wrap into two then one at narrower widths. A thin divider row underneath
   holds the copyright + licence + motto. */
.site-footer{
  border-top:1px solid var(--line);
  padding:2.4rem 1.2rem 1.6rem;
  color:var(--mut);
  font-size:13.5px;
  margin-top:2.4rem;
}
.site-footer .inner{
  max-width:1120px;margin:0 auto;
  display:grid;
  grid-template-columns:minmax(220px,1.3fr) repeat(3,minmax(0,1fr));
  gap:28px;
  align-items:start;
}
.site-footer .lead{display:flex;flex-direction:column;gap:12px;color:var(--mut)}
.site-footer .lead .brand-row{display:inline-flex;align-items:center;gap:10px;color:var(--ink);font-weight:600;font-size:15px}
.site-footer .lead .brand-row img{display:block}
.site-footer .lead .brand-row .x{color:var(--sky)}
.site-footer .lead .desc{margin:0;line-height:1.55;color:var(--mut);max-width:28ch;font-size:13.5px}
.site-footer .lead .sub{color:var(--dim);font-size:12.5px}
.site-footer .lead .sub a{color:var(--mut)}
.site-footer .lead .sub a:hover{color:var(--sky)}

.site-footer .col h4{margin:0 0 10px;font-size:11.5px;color:var(--dim);text-transform:uppercase;letter-spacing:.8px;font-weight:600}
.site-footer .col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.site-footer .col a{color:var(--mut);text-decoration:none;font-size:13.5px}
.site-footer .col a:hover{color:var(--sky)}

.site-footer .bottom{
  max-width:1120px;margin:1.8rem auto 0;padding-top:1rem;
  border-top:1px solid rgba(255,255,255,.04);
  display:flex;flex-wrap:wrap;gap:8px 18px;
  color:var(--dim);font-size:12px;
  align-items:center;justify-content:space-between;
}
.site-footer .bottom .motto{color:var(--dim);font-style:italic}
.site-footer .bottom a{color:var(--mut)}
.site-footer .bottom a:hover{color:var(--sky)}

@media (max-width:860px){
  .site-footer .inner{grid-template-columns:1fr 1fr;gap:22px}
  .site-footer .lead{grid-column:1/-1}
}
@media (max-width:520px){
  .site-footer{padding:2rem 1rem 1.2rem}
  .site-footer .inner{grid-template-columns:1fr;gap:18px}
  .site-footer .bottom{justify-content:flex-start}
}

/* iOS-style toggle switch used across Settings panes. */
.hs-switch{position:relative;display:inline-block;width:40px;height:22px;flex:0 0 auto;cursor:pointer}
.hs-switch input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.hs-slider{position:absolute;inset:0;background:var(--panel-2);border:1px solid var(--line);border-radius:999px;transition:background .18s,border-color .18s}
.hs-slider::before{content:"";position:absolute;left:2px;top:1px;width:16px;height:16px;background:var(--mut);border-radius:50%;transition:transform .18s,background .18s}
.hs-switch input:checked + .hs-slider{background:var(--sky);border-color:var(--sky)}
.hs-switch input:checked + .hs-slider::before{transform:translateX(18px);background:#fff}
.hs-switch input:disabled + .hs-slider{opacity:.55;cursor:wait}
