/* Additions on top of prototype.css. Keep prototype.css verbatim so the site matches the approved design;
   everything the real site needs beyond the prototype lives here. */

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.skip{position:absolute;left:12px;top:-60px;z-index:100;background:#111;color:#fff;padding:10px 16px;font-family:var(--display);font-weight:700;text-decoration:none}
.skip:focus{top:12px}

/* The white shelves stay readable when the visitor's system is in dark mode */
.shelf.ways,.shelf.read,.shelf.consult{--text:#111111;--muted:#555555;--rule:#DDDDDD;color:#111}

/* Dark mode: the first shelf turns dark, so its espresso accents switch to the shell colour */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .land .turn{color:var(--field)}
  :root:not([data-theme="light"]) .land .beat{border-top-color:var(--field)}
  :root:not([data-theme="light"]) .land .tag b{background:var(--field);border-color:var(--field);color:#111}
}

/* ===== Mobile menu (the prototype hides the links on small screens) ===== */
.nav-end{display:flex;align-items:center;gap:12px}
.menu-btn{display:none;width:44px;height:44px;border:0;background:transparent;color:inherit;cursor:pointer;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:0}
.menu-btn i{display:block;width:24px;height:2px;background:currentColor;transition:transform .2s}
.open .menu-btn i:first-of-type{transform:translateY(4px) rotate(45deg)}
.open .menu-btn i:last-of-type{transform:translateY(-4px) rotate(-45deg)}
.cl-nav .brand{font-size:20px}
@media (max-width:900px){
  .nav{position:relative}
  .nav ul{display:none}
  .nav .menu-btn{display:flex}
  .nav.open ul{display:flex;position:absolute;left:0;right:0;top:100%;z-index:30;flex-direction:column;gap:0;background:var(--field);padding:8px 0 16px;font-size:20px;border-bottom:1px solid color-mix(in srgb,var(--field-text) 25%,transparent)}
  .nav.open ul a{display:block;padding:14px 0}
}
@media (max-width:860px){
  .cl-nav .menu-btn{display:flex}
  .cl-nav.open ul{display:flex;position:absolute;left:0;right:0;top:100%;flex-direction:column;gap:0;background:#fff;padding:8px var(--gut) 20px;box-shadow:0 18px 30px rgba(0,0,0,.08);font-size:20px}
  .cl-nav.open ul li{border-bottom:1px solid #eee}
  .cl-nav.open ul a{display:block;padding:16px 0}
}

/* "TheRewired100" is one long word: size it to its column so it never runs off the page */
.r100>.wrap{container-type:inline-size}
.r100 .mega,[data-pop] .r100 .mega{font-size:min(210px,12.6cqw);white-space:nowrap}

/* Hero wordmark: fill the width up to the screen edge, keeping the full stop (in the pop colour) on screen */
.hero-body{container-type:inline-size}
.wordmark{font-size:min(400px,calc((100cqw + var(--gut)) / 4.25))}

/* Larger click/tap area for nav links without changing how they look */
.nav ul a,.cl-nav ul a{display:inline-block;padding:4px 0}

/* Phone header: keep brand and Contact on one line; on the smallest phones Contact moves into the menu */
.nav-contact{display:none}
@media (max-width:480px){
  .nav .brand,.cl-nav .brand{font-size:18px!important;white-space:nowrap}
  .nav .btn,.cl-nav .nav-end .cl-pill{white-space:nowrap;padding:10px 14px;font-size:14px}
  .nav-end{gap:6px}
}
@media (max-width:400px){
  .nav-end>.btn,.nav-end>.cl-pill{display:none}
  .open .nav-contact{display:list-item}
}

/* Homepage "Latest thinking": a sideways-scrolling row of article cards (4 visible on desktop, a peek of the next on phones) */
.art-rail{--rail-gap:clamp(20px,2.4vw,36px);display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 3 * var(--rail-gap)) / 4);gap:var(--rail-gap);overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:0;margin-top:clamp(40px,5vw,64px);padding:6px 0 18px;scrollbar-width:thin;scrollbar-color:var(--rule) transparent}
.art-rail::-webkit-scrollbar{height:6px}
.art-rail::-webkit-scrollbar-thumb{background:var(--rule);border-radius:3px}
.art-rail>.art{scroll-snap-align:start;min-width:0}
.art-rail:focus-visible{outline:3px solid var(--pk);outline-offset:6px}
@media (max-width:1000px){.art-rail{grid-auto-columns:calc((100% - 2 * var(--rail-gap)) / 2.3)}}
@media (max-width:620px){.art-rail{grid-auto-columns:82%}}
@media (prefers-reduced-motion:reduce){.art-rail{scroll-behavior:auto}}
.rail-foot{justify-content:space-between}
.rail-nav{display:flex;gap:10px}
.rail-btn{width:52px;height:52px;border-radius:50%;border:1.5px solid var(--text);background:transparent;color:var(--text);display:grid;place-items:center;cursor:pointer;transition:background .2s,color .2s}
.rail-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rail-btn:hover:not([disabled]){background:var(--text);color:#fff}
.rail-btn[disabled]{opacity:.3;cursor:default}

/* "The Rewired Podcast." headline: sized to its column so it fits any screen and sits on two lines */
.series>.wrap{container-type:inline-size}
[data-pop] .series .mega{font-size:min(280px,15cqw)}

/* Headline spacing. The display face is set with tight letter-spacing, which also squeezes the gap between
   words ("Workmoved."). Open the word gaps back up, and give multi-line page titles more room between lines. */
h1,h2,h3,h4,.mega,.hero-line,.art-th span{word-spacing:.14em}
.pg-hero h1{line-height:1.06;letter-spacing:-.045em}

/* Calmer type scale (review, Nov 2026). "Rewired." in the hero stays the one huge moment; section
   headlines drop to ~60% of the prototype size, long statements get a wider measure, and sections
   size to their content instead of always filling the screen. */
.mega{font-size:clamp(42px,6.4vw,104px);line-height:.94;letter-spacing:-.05em}
.land .mega{max-width:18ch}
.turn{font-size:clamp(26px,3.1vw,46px);line-height:1.15}
.r100 .quote{font-size:clamp(24px,2.5vw,38px);line-height:1.22;max-width:36ch}
.r100 .mega,[data-pop] .r100 .mega{font-size:min(150px,8.4cqw)}
[data-pop] .series .mega{font-size:min(170px,9.6cqw)}
.close-band h2{font-size:clamp(34px,4.4vw,68px)}
.pg-hero h1{font-size:clamp(38px,5.4vw,84px);max-width:20ch}
.pg-hero{padding:clamp(64px,8vw,112px) 0 clamp(52px,6.4vw,88px)}
.pg-cta h2{font-size:clamp(30px,3.6vw,52px)}
.shelf{min-height:0;padding:clamp(72px,9vw,140px) 0}
.beats,.r100-body,.way-grid,.eng-rows,.art-rail{margin-top:clamp(36px,4.4vw,64px)}
.turn{margin-top:clamp(40px,5vw,72px)}
@media (max-width:760px){
  .mega{font-size:clamp(34px,10vw,60px)}
  .r100 .mega,[data-pop] .r100 .mega{font-size:min(150px,11.5cqw)}
}

/* Hero: don't let a very tall screen push "Rewired." down to the bottom of a huge empty block */
.hero{min-height:0} /* sized by its content, not the window, so there is never a big empty band above Rewired. */

/* Big screens: keep the designed font sizes (and let browser zoom work normally); only let the
   content column grow wider so less of a wide screen is empty margin. */
@media (min-width:1760px){:root{--max:1680px}}

/* Hero fits any window: "Rewired." is sized by the window height as well as its width, with guaranteed
   space under the menu line, so short windows (bookmarks bar, taskbar, browser zoom) never crowd it. */
.hero-body{flex:none;padding-top:clamp(36px,7vh,112px);padding-bottom:min(clamp(48px,6vw,88px),8vh)}
.wordmark{margin-bottom:min(clamp(36px,5vw,64px),5vh)}
/* Podcast photo section: same cap as the hero, so zooming out or a very tall window doesn't stretch the
   photo into a huge block with the text pushed to the bottom */
.series{min-height:min(100vh,860px);min-height:min(100svh,860px)}
.close{min-height:0} /* unused prototype section; never let it size itself by the window */
/* Phones: the hero fills most of the screen rather than all of it, so tall phones don't get a big empty
   gap above "Rewired." and the next section peeks in as a cue to scroll */
@media (max-width:760px),(max-width:1100px) and (orientation:portrait){
  .series{min-height:min(80vh,640px);min-height:min(80svh,640px)}
}
.wordmark{font-size:min(400px,calc((100cqw + var(--gut)) / 4.25),30vh)}
.hero h1.hero-line{font-size:min(clamp(28px,3.4vw,52px),5.4vh);font-size:min(clamp(28px,3.4vw,52px),max(5.4vh,18px))}


/* Page CTA with two buttons */
.pg-cta .acts{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
footer a:hover{color:#fff;text-decoration:underline}
footer .wrap{align-items:center}
.foot-social{display:flex;gap:24px;flex-wrap:wrap}
.foot-social a{color:#fff}

/* Social icons (Simple Icons, CC0) beside the platform names */
.ico{width:1.15em;height:1.15em;flex:none}
.foot-social a,.platforms a,.pg-plat a{display:inline-flex;align-items:center;gap:.5em}

/* ===== Forms ===== */
.pg-form label .opt{font-weight:500;color:#777}
.pg-form input,.pg-form select,.pg-form textarea{width:100%}
.pg-form [aria-invalid="true"]{border-color:#B3261E}
.pg-form .hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.form-err{color:#B3261E;font-family:var(--display);font-weight:600;font-size:15px;margin:0}
.pg-done small{display:block;font-family:var(--serif);font-weight:400;font-size:18px;letter-spacing:0;margin-top:10px;color:#555}
.cl-pill{border:0;cursor:pointer}
.cl-pill:hover{filter:brightness(.97)}
.cl-pill[disabled]{opacity:.55;cursor:progress}

/* Sending state for forms: spinner on the button, fields dimmed and locked */
.spinner{display:inline-block;width:1em;height:1em;margin-right:.55em;vertical-align:-.15em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rw-spin .7s linear infinite}
@keyframes rw-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:1.8s}}
form.is-sending button[type="submit"]{opacity:1;cursor:progress;display:inline-flex;align-items:center}
form.is-sending input,form.is-sending select,form.is-sending textarea{opacity:.6;cursor:progress}

/* ===== Members + admin app ===== */
.app-shell{min-height:420px}
.app-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:32px}
.app-bar p{margin:0;font-family:var(--display);font-weight:600;font-size:15px;color:#555}
.tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #e3e3e3;padding-bottom:16px;margin-bottom:32px}
.tabs button{font-family:var(--display);font-weight:700;font-size:15px;padding:10px 18px;border-radius:999px;border:0;background:#F3F3F3;color:#111;cursor:pointer}
.tabs button[aria-selected="true"]{background:var(--pk-band);color:var(--field)}
.panel h2{font-family:var(--display);font-weight:900;font-size:clamp(28px,3vw,40px);letter-spacing:-.04em;margin:0 0 8px}
.panel>.lede{margin:0 0 28px;color:#555;max-width:60ch}
.card{background:#F6F6F6;border-radius:22px;padding:clamp(20px,2.4vw,32px);margin-bottom:16px}
.card h3{font-family:var(--display);font-weight:800;font-size:22px;letter-spacing:-.025em;margin:0 0 6px}
.card .meta,.meta{font-family:var(--display);font-size:14px;font-weight:600;color:#666;margin:0 0 12px}
.card p{margin:0 0 10px}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.chart{background:#fff;border:1px solid #e6e6e6;border-radius:18px;padding:22px;margin-bottom:16px}
.chart h4{font-family:var(--display);font-weight:800;font-size:19px;letter-spacing:-.02em;margin:0 0 4px}
.chart .n{font-family:var(--display);font-size:13px;font-weight:700;color:#666;margin:0 0 16px}
.bar-row{display:grid;grid-template-columns:minmax(90px,200px) 1fr 52px;gap:12px;align-items:center;font-size:16px;margin-bottom:8px}
.bar-row .track{background:#F0F0F0;height:14px;border-radius:7px;overflow:hidden}
.bar-row .fill{display:block;height:100%;background:var(--pk);border-radius:7px}
.bar-row .v{font-family:var(--display);font-weight:700;font-size:14px;text-align:right}
.empty{color:#666;font-style:italic}
.q-block{border-top:1px solid #e3e3e3;padding:20px 0}
.q-block fieldset{border:0;margin:0;padding:0}
.q-block legend{font-family:var(--display);font-weight:800;font-size:19px;margin-bottom:12px;padding:0}
.scale{display:flex;gap:8px;flex-wrap:wrap}
.choices{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.pg-form .scale label,.pg-form .choices label{display:inline-flex;align-items:center;gap:8px;font-weight:600;background:#F3F3F3;border-radius:999px;padding:10px 16px;cursor:pointer}
.pg-form .scale input,.pg-form .choices input{width:auto;accent-color:var(--pk)}
.thread{border-top:1px solid #e3e3e3;padding:20px 0}
.thread p{margin:0 0 8px}
.replies{margin:12px 0 0 20px;border-left:3px solid var(--field);padding-left:16px}
.replies p{font-size:17px}
.row-acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.small-btn{font-family:var(--display);font-weight:700;font-size:13px;padding:8px 14px;border-radius:999px;border:0;background:#e9e9e9;color:#111;cursor:pointer;text-decoration:none;display:inline-block}
.small-btn.dark,.filters button[aria-pressed="true"]{background:#111;color:#fff}
.small-btn.danger{background:#fbe3e1;color:#8c1d18}
.status{display:inline-block;font-family:var(--display);font-weight:700;font-size:12px;padding:4px 10px;border-radius:999px;background:#e9e9e9;text-transform:uppercase;letter-spacing:.04em}
.status.new{background:var(--pk);color:#fff}
.status.approved,.status.handled,.status.yes{background:#dff0e4;color:#0b5a2b}
.status.declined,.status.no{background:#fbe3e1;color:#8c1d18}
dl.kv{display:grid;grid-template-columns:minmax(120px,220px) 1fr;gap:6px 16px;margin:0 0 8px;font-size:17px}
dl.kv dt{font-family:var(--display);font-weight:700;font-size:14px;color:#555}
dl.kv dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
@media (max-width:760px){
  .pg-hero h1{overflow-wrap:anywhere}
  .mega{font-size:clamp(32px,10vw,60px)} /* calmer on phones; "Consultancy." still fits a 320px phone */
  [data-pop] .series .mega{font-size:min(170px,11cqw)}
  dl.kv{grid-template-columns:1fr}
  .bar-row{grid-template-columns:1fr 52px}.bar-row .lbl{grid-column:1/-1}
}
