/* BarkleyOS website mock-up: styles.
   Sections: 1 Fonts · 2 Tokens · 3 Colour schemes · 4 Base · 5 Header · 6 Hero · 7 Sections and graphic panels
             8 Working with us · 9 Closing panel and footer · 10 The line map · 11 Contact dialog · 12 Dialogs
             13 Legal pages · 14 Utilities · 15 The thread · 16 Small screens · 17 Motion and print
   Everything that changes colour is a custom property, so a colour scheme is only a different set of values. */

/* ---------- 1 · Fonts ----------
   Self hosted, because the Content Security Policy allows fonts from this origin only. The two files and
   their unicode ranges are the repo's own; the fallback's metrics are overridden so swapping it for
   Montserrat does not move the page. */
@font-face{
  font-family:"Montserrat"; font-style:normal; font-weight:300 800; font-display:swap;
  src:url("../fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:"Montserrat"; font-style:normal; font-weight:300 800; font-display:swap;
  src:url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{ font-family:"Montserrat Fallback"; src:local("Arial"), local("Helvetica");
            size-adjust:113%; ascent-override:85%; descent-override:22%; line-gap-override:0%; }

/* ---------- 2 · Tokens ---------- */
:root{
  /* Logo artwork palette */
  --navy-900:#07101F; --navy-800:#0B1B33; --paper:#F6F7F9; --orange:#FF6F2B;
  --body:"Montserrat","Montserrat Fallback",-apple-system,"Segoe UI",system-ui,sans-serif;
  /* The navy band with teal and rust glows: graphic panels, the closing panel and any dark band */
  --deep:radial-gradient(80% 60% at 20% 0%,rgba(21,128,140,.5),transparent 70%),
         radial-gradient(60% 60% at 100% 60%,rgba(122,59,30,.45),transparent 70%),
         var(--navy-800);

  /* Light tokens: the default, used by scheme B (light mode) */
  --ink:#0B1220; --slate:#525E71; --line:rgba(11,27,51,.12); --focus:#2563EB;
  /* The teal the diagrams use, #2BB3BF, measures 2.5:1 on white and cannot carry text or a border there,
     so the light scheme uses teal 700 from the guidelines instead, which measures 7.7:1. */
  --teal-ui:#0E5C66; --teal-ui-soft:rgba(14,92,102,.09);
  --nav-bg:rgba(255,255,255,.86); --nav-panel:#FFFFFF;        /* the phone menu panel is solid: it sits over the page */
  --panel:var(--deep); --panel-line:transparent;
  --footer-bg:var(--navy-900);
  --ground-solid:#F6F7F9; --accent2:#15808C;
  --thread-base:rgba(11,18,32,.15);
  /* Thread pulse colours. The thread script reads these as '--p' + i, so a search for --p1 finds nothing: do not delete them. */
  --p1:#15808C; --p2:#2E9E73; --p3:#E09A2A; --p4:#F0642A; --p5:#3F6FD8;
  --seam-line:linear-gradient(90deg,transparent,rgba(255,168,128,.7) 25%,rgba(147,169,242,.7) 55%,rgba(21,128,140,.6) 80%,transparent);
  --s1:#FFA880; --s2:#93A9F2; --s3:#3FB3A0;                                              /* hero seam colours */
  --flow-rgb:14,92,102; --flow-alpha:.75;                                                /* hero flow field */
  color-scheme:light;
}

/* Dark tokens: the whole page in A, and the footer and closing panel everywhere.
   Scheme B's hero is the light-mode field, so it keeps the light tokens. */
[data-scheme="a"], footer, .close .panel, .contact-dialog, .legal-dialog{   /* the legal dialog sits on the same dark panel as the contact one, so it takes the same ink and slate */
  --ink:#F2F5F8; --slate:#9FB0C4; --line:rgba(255,255,255,.14); --focus:#7FB0FF;
  --teal-ui:#2BB3BF; --teal-ui-soft:rgba(43,179,191,.14);                 /* 7.2:1 on the dark bar */
  --accent2:#2BB3BF;
  --seam-line:linear-gradient(90deg,transparent,rgba(43,179,191,.85) 25%,rgba(255,122,61,.8) 55%,rgba(90,139,224,.75) 80%,transparent);
  --s1:#2BB3BF; --s2:#FF7A3D; --s3:#5A8BE0;
  --flow-rgb:190,198,208; --flow-alpha:1;
  color:var(--ink);
}

/* ---------- 3 · Colour schemes ---------- */
/* A · dark mode: continuous dark */
[data-scheme="a"]{
  --nav-bg:rgba(7,16,31,.72); --nav-panel:#0B1526;
  --panel-line:rgba(255,255,255,.14);
  --footer-bg:rgba(4,10,20,.7);
  --ground-solid:#07101F;
  --thread-base:rgba(255,255,255,.17);
  --p1:#2BB3BF; --p2:#4FD1A5; --p3:#F5B544; --p4:#FF7A3D; --p5:#6FA0F0;      /* read as '--p' + i, see above */
  color-scheme:dark;
}
[data-scheme="a"] body{
  background-color:var(--navy-900);
  background-image:
    radial-gradient(70% 45% at 52% -5%,rgba(21,128,140,.55),transparent 70%),
    radial-gradient(55% 40% at 105% 32%,rgba(122,59,30,.55),transparent 70%),
    radial-gradient(75% 55% at 12% 78%,rgba(18,41,74,.85),transparent 70%);
  background-attachment:fixed;
}
[data-scheme="a"] .frame{border-color:rgba(255,255,255,.12)}

/* B · light mode: light page and hero, dark graphic panels */
[data-scheme="b"] body{background:var(--paper)}
[data-scheme="b"] .hero{                                                                  /* light ground, dark paths, the same orange exit lane */
  background:
    radial-gradient(80% 60% at 20% 0%,rgba(21,128,140,.12),transparent 70%),
    radial-gradient(55% 50% at 100% 70%,rgba(122,59,30,.07),transparent 72%),
    var(--paper);
  --flow-rgb:11,18,32; --flow-alpha:1;
}

/* ---------- 4 · Base ---------- */
*{box-sizing:border-box}
/* overscroll-behavior-x stops the sideways rubber band on a phone: the page has nothing to scroll to
   horizontally (scrollWidth equals the viewport at every width we test), but iOS will still let a
   drag pull the whole page left and right unless it is told not to. overflow-x:clip is belt and
   braces for anything that ever does stick out. */
html{scroll-behavior:smooth;scroll-padding-top:80px;-webkit-text-size-adjust:100%;text-size-adjust:100%;overscroll-behavior-x:none;overflow-x:hidden;overflow-x:clip}
/* touch-action is what finally stops the page sliding sideways on a phone. Nothing on the page is
   wider than the screen, measured at every scroll position over 49 seconds, so there was nothing left
   to clip: iOS was simply treating a diagonal drag as a horizontal pan and rubber banding the whole
   page. pan-y says the only panning a touch may do here is vertical. pinch-zoom is listed with it so
   the page can still be pinched, which matters for anyone who needs to enlarge the text. */
body{margin:0;color:var(--ink);font-family:var(--body);font-size:18px;line-height:1.5;-webkit-font-smoothing:antialiased;overflow-x:hidden;overflow-x:clip;touch-action:pan-y pinch-zoom}
/* Only the legal statements' tables may genuinely need a sideways drag, and the dialog they sit in
   needs to scroll. A graphic frame must never need one: nothing on this site scrolls sideways, and
   leaving the exception on .frame reopened the gesture this is meant to stop. */
.legal-table,.legal-inner{touch-action:auto}
a{color:inherit}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:8px}
h1,h2{font-family:var(--body);font-weight:500;margin:0;text-wrap:balance;letter-spacing:-.03em}
h2{font-size:clamp(1.9rem,3.3vw,2.9rem);line-height:1.12;max-width:17ch}
h2 sup{font-size:.35em;vertical-align:top;position:relative;top:.5em}
p{margin:0;color:var(--slate);max-width:34ch;font-size:1.15rem}
sup{color:var(--orange);font-weight:600}
.wrap{max-width:1200px;margin:0 auto;padding:0 28px}
.accent{color:var(--orange);font-weight:600;white-space:nowrap}
/* Call to action: a fine outline and small capitals, like the captions in the graphics; the box fits the words */
.btn{display:inline-flex;align-items:center;padding:13px 20px;border:1px solid var(--ink);border-radius:3px;background:transparent;color:var(--ink);
  font:600 .8rem var(--body);letter-spacing:.14em;text-transform:uppercase;text-decoration:none;white-space:nowrap;transition:border-color .2s,box-shadow .2s,background .2s}
.btn:hover{border-color:var(--orange);background:rgba(255,111,43,.06);box-shadow:0 0 22px rgba(255,111,43,.28)}
main{position:relative;overflow-x:hidden;overflow-x:clip}
.hero,section.msg,.close{position:relative;z-index:1}                                    /* content sits above the thread */

/* ---------- 5 · Header ---------- */
header{position:sticky;top:0;z-index:5;background:var(--nav-bg);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
/* The header runs the full width of the window rather than sitting in the 1200px content column,
   so the mark starts at the page gutter instead of floating inwards on a wide screen. */
header .wrap{max-width:none;display:flex;align-items:center;gap:8px 32px;min-height:68px;flex-wrap:nowrap;padding:8px max(28px,env(safe-area-inset-right)) 8px max(28px,env(safe-area-inset-left))}
/* The brand guidelines set the Barkley company wordmark in Montserrat 600 and the BarkleyOS product
   wordmark in a lighter weight. This is the product site, so the header, the footer and the hero
   slide all use 400. The typeface was never wrong; the weight was. */
.logo{display:flex;align-items:center;gap:10px;font-weight:400;font-size:1.15rem;text-decoration:none;letter-spacing:-.02em}
/* The mark: three waves, the brand asset's own curve and stroke weight, not three straight bars.
   No glow on it. The guidelines are explicit that the waves are never outlined, stretched, recoloured
   or given a glow, and the straight bars carried a drop shadow that broke that rule. */
.waves{display:block;width:26px;height:26px;flex:none;color:var(--orange)}
.waves svg{display:block;width:100%;height:100%}
nav{display:flex;flex-wrap:wrap;gap:4px 28px;margin-left:auto;font-size:.95rem;font-weight:500;align-items:center}   /* centre, not stretch: the links were being pulled to the log in box's height and their text then sat at the top of it */
nav a{text-decoration:none;color:var(--slate);padding:6px 0}
nav a:hover{color:var(--ink)}
header .btn{padding:10px 14px;font-size:.7rem;flex:none}
/* Log in. The same shape as the call to action but in teal, so the two read as a pair with an obvious
   first and second rather than as two of the same thing. Teal is the brand's supporting colour and is
   doing the same job here as in the diagrams, which leaves the orange spent on the one thing that asks
   you to act. Sentence case against the call to action's capitals does as much of the work as the colour. */
.login{display:inline-flex;align-items:center;justify-content:center;flex:none;white-space:nowrap;
  padding:9px 16px;border:1px solid var(--teal-ui);border-radius:8px;
  color:var(--teal-ui);background:transparent;text-decoration:none;font-weight:500;font-size:.88rem;
  transition:background .2s ease}
.login:hover{background:var(--teal-ui-soft)}
/* Allow `hidden` to actually hide the Log in link (our .login display rule would otherwise override it). */
.login[hidden]{display:none !important}
/* On a phone the mark itself is the menu. Three bars in the top left of a small screen read as a
   hamburger whatever they are drawn to mean, so rather than fight that, the waves do the job and the
   wordmark beside them stays the link to the top of the page. On a laptop this button is not there
   at all and the mark belongs to the logo link as before, which is why the mark appears twice in the
   markup: one copy in each, each hidden at the other width. */
.nav-toggle{display:none;align-items:center;justify-content:center;flex:none;padding:6px 4px;margin:0 -4px;
  background:none;border:0;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.nav-toggle .waves{transition:transform .22s ease}
.nav-toggle[aria-expanded="true"] .waves{transform:rotate(90deg)}   /* a quarter turn: open, and the same object
                                                                       as the mark, rather than swapping in a cross */
/* Light and dark mode button: a moon in dark mode, a sun in light mode */
/* No box around this one. A bordered square beside the call to action read as a second menu button,
   especially in light mode where the border is the only thing drawn and the old "moon" was a plain
   filled disc. It is a mode switch, so it is now just the icon, at a 40px tap target. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;margin-left:-14px;padding:0;border:0;background:transparent;color:var(--slate);cursor:pointer}
.theme-toggle:hover{color:var(--ink)}
.theme-toggle svg{width:16px;height:16px;display:block}
/* The icon shows where the button takes you, not where you already are, which is what its own
   accessible name has always said: in dark mode the name reads "Switch to light mode", so the icon
   is the sun. It used to show the mode you were in, so a screen reader and a pair of eyes were being
   told opposite things by the same control. */
.theme-toggle .theme-icon--moon{display:none}
.theme-toggle[aria-pressed="false"] .theme-icon--day{display:none}
.theme-toggle[aria-pressed="false"] .theme-icon--moon{display:block}

/* ---------- 6 · Hero ---------- */
/* svh, not vh. On iOS 100vh is the viewport with the toolbars hidden, so a hero sized to it is taller
   than what the visitor can actually see when the page loads and the proof row starts below the fold.
   100svh is the viewport with the toolbars showing. vh first as the fallback for anything too old. */
.hero{min-height:calc(100vh - 69px);min-height:calc(100svh - 69px);display:flex;flex-direction:column;justify-content:center;padding:72px 0;isolation:isolate}   /* fills the screen under the menu bar */
.hero .wrap{display:flex;flex-direction:column;gap:32px;align-items:center;text-align:center;width:min(1200px,100%);min-width:0;flex:none}
/* Headline carousel. Each slide is two lines inside one fixed slot, so the button and the proof line do not move between slides. */
.hero h1{position:relative;width:100%;height:100%;font-size:min(5.8rem,calc((100vw - 48px) / 13.6));line-height:1.08;color:var(--ink);overflow:hidden}
/* Deep enough for the tallest slide, which is the two line question, or the button and the proof row
   move as the slides change. The brand has a slide of its own now and needs only one line. */
.hero-carousel{position:relative;width:100%;flex:0 0 calc(min(5.8rem,(100vw - 48px) / 13.6) * 2.4);height:calc(min(5.8rem,(100vw - 48px) / 13.6) * 2.4);overflow:hidden}
/* The slot is two lines deep and every slide fills it, so they all share a first baseline. Keep this block:
   a grid or flex container blockifies its children, which puts the brand mark in slide three on its own row. */
.hero-slide{display:block;height:100%;text-align:center;transition:opacity .7s ease}
.hero-slide:nth-child(3){font-size:min(5.4rem,calc((100vw - 48px) / 13.6))}
.hero-slide:not(.is-on){position:absolute;left:0;right:0;top:0;opacity:0}
/* The Barkley mark: three waves that drift through the brand colours. Used in the last headline slide and the footer */
.hero-mark{display:inline-flex;width:calc(22em / 14);height:1em;margin-right:.28em;overflow:hidden;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;color:#5a12b2;animation:tapestry-glow 20s ease-in-out infinite}
.hero-mark svg{width:calc(22em / 14);height:calc(22em / 14);flex-shrink:0;stroke-width:2.02}
@keyframes tapestry-glow{
  0%,100%{color:#5a12b2;filter:drop-shadow(0 0 14px rgba(90,18,178,.55))}
  25%{color:#dc3a9a;filter:drop-shadow(0 0 15px rgba(220,58,154,.58))}
  50%{color:#ff6f2b;filter:drop-shadow(0 0 17px rgba(255,111,43,.62))}
  75%{color:#ff9520;filter:drop-shadow(0 0 16px rgba(255,149,32,.6))}
}
.hero p{max-width:68ch;font-size:1.25rem;text-wrap:balance}
.proof{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));border-top:1px solid var(--ink);margin-top:40px;width:100%}
.proof div{padding:22px 12px 0}
.proof b{display:block;font-size:clamp(1.8rem,3vw,2.6rem);font-weight:600;letter-spacing:-.03em;line-height:1.1;font-variant-numeric:tabular-nums}
.proof span{color:var(--slate);font-size:1rem}
.flowfield{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;-webkit-mask:linear-gradient(to bottom,transparent 0,#000 22%,#000 100%);mask:linear-gradient(to bottom,transparent 0,#000 22%,#000 100%)}
/* The seam: the glowing line along the bottom of the hero, where the thread starts */
/* overflow-x:clip, not hidden, and not on the bars themselves: the three bars below drift sideways and
   the third one travels past the right edge of a phone, which is the only thing on the page that ever
   sticks out. Clipping it here rather than relying on the root element matters, because overflow on
   the root propagates to the viewport and Safari does not treat it the same way. overflow-y stays
   visible, which clip allows, so the bars can still sit above the 1px seam and keep their blur. */
.seam{position:absolute;left:0;right:0;bottom:0;height:1px;pointer-events:none;z-index:0;background:var(--seam-line);overflow-x:clip}
.seam i{position:absolute;top:-4px;height:9px;width:28vw;border-radius:9px;filter:blur(5px);will-change:transform;animation:drift 9s ease-in-out infinite}
.seam i:nth-child(1){left:6%;background:linear-gradient(90deg,transparent,var(--s1) 50%,transparent)}
.seam i:nth-child(2){left:38%;background:linear-gradient(90deg,transparent,var(--s2) 50%,transparent);filter:blur(10px);opacity:.9;animation-duration:11s;animation-delay:-3s}
.seam i:nth-child(3){left:66%;background:linear-gradient(90deg,transparent,var(--s3) 50%,transparent);animation-duration:13s;animation-delay:-6s}
@keyframes drift{0%,100%{transform:translateX(0)}30%{transform:translateX(-12vw)}60%{transform:translateX(16vw)}}
/* Entrance: hidden until the font is ready (see the script in the head), then a quick, staggered fade */
@keyframes heroIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes heroFade{from{opacity:0}to{opacity:1}}
html.js:not(.ready) .hero .flowfield,html.js:not(.ready) .hero .seam,html.js:not(.ready) .hero .wrap>*{opacity:0}
html.ready .hero .flowfield{animation:heroFade .9s ease-out backwards}
html.ready .hero .seam{animation:heroFade .9s ease-out .3s backwards}
html.ready .hero .wrap>*{animation:heroIn .65s cubic-bezier(.2,.7,.2,1) backwards}
html.ready .hero .wrap>:nth-child(1){animation-delay:.08s}
html.ready .hero .wrap>:nth-child(2){animation-delay:.18s}
html.ready .hero .wrap>:nth-child(3){animation-delay:.26s}
html.ready .hero .wrap>:nth-child(4){animation-delay:.34s}

/* ---------- 7 · Sections and graphic panels ---------- */
section.msg{padding:88px 0}
.split{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));gap:56px;align-items:center}
.copy{display:flex;flex-direction:column;gap:22px;align-items:flex-start}
.section-head{max-width:720px;margin-inline:auto;align-items:center;text-align:center;margin-bottom:clamp(14px,2vw,26px)}   /* a head above a full-width graphic is centred on it */
.section-head h2{max-width:20ch}
.section-head p{max-width:62ch}
/* The knowledge head is left aligned on the same 860px column as the map beneath it, so the headline,
   the standfirst and the panel's left edge all start on one line. The engage head stays centred. */
#operate .section-head{max-width:860px;align-items:start;text-align:left}
.frame{background:var(--deep);border:1px solid rgba(11,27,51,.08);border-radius:12px;padding:clamp(18px,2.6vw,34px);overflow-x:auto;box-shadow:0 24px 60px rgba(7,16,31,.3)}
.frame canvas{display:block;width:100%;aspect-ratio:600/440}
.oflow canvas{aspect-ratio:1}                                                           /* the twin orbit is round, so its panel is square */
.rflow canvas{aspect-ratio:600/360}                                                     /* the running process is wide and shallow */

/* ---------- 8 · Working with us: the timeline ---------- */
.timeline{list-style:none;margin:64px 0 0;padding:0;display:grid;grid-template-columns:2fr 1fr;position:relative}   /* three steps: the first two share one fixed fee, so they sit in one group */
.timeline ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr}
.timeline::before{content:"";position:absolute;left:0;right:0;top:6px;height:1px;background:var(--line)}
.timeline::after{content:"";position:absolute;top:5px;height:3px;width:140px;left:0;border-radius:2px;filter:blur(1.5px);
  background:linear-gradient(90deg,transparent,var(--accent2),transparent);animation:tl 7s ease-in-out infinite}
@keyframes tl{0%{transform:translateX(-140px);opacity:0}10%{opacity:1}90%{opacity:1}100%{transform:translateX(min(1144px,100vw));opacity:0}}
.timeline>li{display:flex;flex-direction:column}
.timeline .step{position:relative;padding:36px 32px 0 0}
.timeline .step::before{content:"";position:absolute;left:0;top:0;width:11px;height:11px;border:1.5px solid var(--ink);background:var(--ground-solid,transparent);box-sizing:border-box}
.timeline .dur{display:block;font-size:.72rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--slate);margin-bottom:10px}
.timeline h3{margin:0 0 10px;font-size:1.35rem;font-weight:500;letter-spacing:-.02em}
.timeline p{font-size:1rem;max-width:26ch;margin-bottom:14px;flex:0 0 auto}
.timeline .note{display:block;margin-top:auto;font-size:.72rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent2)}   /* the two notes line up along the bottom */
.timeline .fixed>.note{margin-right:32px;text-align:center;color:var(--orange)}
.timeline .fixed>.note::before{content:"";display:block;height:7px;margin-bottom:10px;border:1px solid var(--orange);border-top:0;opacity:.7}   /* a bracket under both steps the fee covers */

/* ---------- 9 · Closing panel and footer ---------- */
.close{padding:0 0 88px}
.close .wrap{position:relative}
.close .panel{position:relative;overflow:hidden;background:var(--panel);border:1px solid var(--panel-line);border-radius:14px;
  padding:clamp(34px,4.4vw,56px) clamp(34px,5vw,72px);display:grid;grid-template-columns:1fr auto;gap:28px 48px;align-items:center}
.close .panel .cta{display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.close .panel .cta .note{margin:0;font-size:.88rem;color:var(--slate)}
.close .panel .cta .note a{color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.close .panel .cta .note a:hover{color:var(--orange)}
@media (max-width:820px){.close .panel{grid-template-columns:1fr}}
.close .panel>*{position:relative}
.close h2{max-width:20ch;margin:0}
.close p{color:#D4D8E1;max-width:none}
/* Coloured light travelling round the whole border. .pring is the crisp line (a rotating conic gradient, masked to a thin ring);
   .pglow is a blurred copy behind the panel, so the light spills softly outside the box. The angle is a registered custom property so it can animate. */
@property --ra{syntax:'<angle>';initial-value:0deg;inherits:false}
.pring,.pglow{position:absolute;top:0;bottom:0;left:28px;right:28px;border-radius:14px;pointer-events:none;
  background:conic-gradient(from var(--ra),transparent 0deg,#2BB3BF 38deg,transparent 78deg,transparent 102deg,#F5A024 136deg,transparent 168deg,
    transparent 196deg,#FF6F2B 232deg,transparent 266deg,transparent 288deg,#5A8BE0 324deg,transparent 360deg);
  animation:ring 14s linear infinite}
.pring{z-index:2;padding:1.6px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.pglow{z-index:0;filter:blur(16px);opacity:.6;transform:scale(1.005)}
@keyframes ring{to{--ra:360deg}}
/* The knot: where the thread ends, on the top edge of the panel */
.knot{position:absolute;left:50%;top:0;z-index:3;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;
  background:var(--orange);border:3px solid #fff;box-shadow:0 0 14px rgba(255,111,43,.7);animation:knot 3s ease-out infinite}
@keyframes knot{0%{box-shadow:0 0 14px rgba(255,111,43,.7),0 0 0 0 rgba(255,111,43,.45)}100%{box-shadow:0 0 14px rgba(255,111,43,.7),0 0 0 22px rgba(255,111,43,0)}}
footer{background:var(--footer-bg);border-top:1px solid var(--line);padding:clamp(40px,5vw,64px) 0 28px;font-size:.82rem;color:var(--slate)}
footer p{font-size:.82rem;max-width:none}
.footer-row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px 30px;padding-bottom:36px}
.footer-links{display:flex;flex-wrap:wrap;align-items:center;gap:10px 30px;margin:0;padding:0;list-style:none}
.footer-links a{display:inline-flex;align-items:center;gap:9px;color:var(--slate);font-size:.9rem;text-decoration:none}
.footer-links a:hover{color:var(--ink)}
.footer-links a:hover .logo-li{opacity:.8}
/* The two marks are the owners' own artwork, on transparent backgrounds, and are never recoloured */
.logo-li{display:block;flex:none;width:30px;height:30px;transition:opacity .2s}
.cred{display:inline-flex;align-items:center;margin:0;max-width:none}
.logo-ce{display:block;height:28px;width:auto}
.footer-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:20px 28px;padding-top:22px;border-top:1px solid var(--line)}
.site-footer .brand{display:inline-flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:400;letter-spacing:-.02em}
.site-footer .brand:hover{color:var(--ink);text-decoration:none}
.site-footer .brand-mark{display:inline-flex;width:22px;height:22px;color:#5a12b2;animation:tapestry-glow 20s ease-in-out infinite}
.site-footer .brand-mark svg{width:22px;height:22px}
.site-footer .brand-word{font-size:1rem;line-height:1}
.legal-links{display:flex;flex-wrap:wrap;gap:8px 22px;margin:0;padding:0;list-style:none}
.legal-links a{color:var(--slate);font-size:.78rem;text-decoration:none}
.legal-links a:hover,.legal-links a[aria-current="page"]{color:var(--ink);text-decoration:underline}
.copyright{margin:0 0 0 auto;font-size:.78rem;color:var(--slate)}
.footer-note{margin-top:14px;color:var(--slate)}

/* Policy panel: the legal pages open over the page in the site's own styling, rather than as a bare file */

/* ---------- 10 · The line map ----------
   The module sets the SVG's viewBox itself: on a narrow screen it shows a window of the map at the same
   physical size rather than shrinking it, and pans to follow the work. Nothing here scrolls sideways. */
/* The line map is drawn at close to its own scale and centred, rather than stretched across the full
   width of the section. Stretching it made the steps drift apart and the panel grow: the SVG keeps its
   aspect ratio, so a wider panel is also a taller one. 860px shows the whole map without the camera in
   section 8 of linemap.js having to crop and pan, which it starts doing below about 800px. */
.lmframe{max-width:860px;margin-inline:auto}
#lm svg{display:block;width:100%;height:auto}

/* ---------- 11 · Contact dialog ----------
   The destination address exists only in the form's action in index.html. Nothing on the page shows it. */
.contact-dialog{width:min(560px,calc(100% - 32px));max-height:min(86vh,860px);padding:0;border:1px solid var(--line);
  border-radius:14px;background:var(--deep);color:var(--ink);box-shadow:0 30px 80px rgba(7,16,31,.5)}
.contact-dialog::backdrop{background:rgba(5,12,24,.78);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.contact-inner{position:relative;padding:clamp(24px,4vw,38px)}
.contact-inner h2{margin:0 44px 10px 0;font-size:clamp(1.3rem,2.4vw,1.8rem);font-weight:500;letter-spacing:-.025em;max-width:none}
.contact-inner .muted{margin:0 0 24px;color:var(--slate);font-size:.95rem;line-height:1.6}
.contact-close{position:absolute;top:16px;right:16px;width:36px;height:36px;display:grid;place-items:center;
  border:1px solid var(--line);border-radius:3px;background:transparent;color:var(--slate);font-size:1.1rem;
  line-height:1;cursor:pointer;transition:color .2s ease,border-color .2s ease}
.contact-close:hover{border-color:var(--orange);color:var(--orange)}
.contact-form{display:grid;gap:16px}
.contact-form[hidden],.contact-done[hidden]{display:none}
.contact-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.contact-form .field{display:grid;gap:6px}
.contact-form label{font-size:.7rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--slate)}
.contact-form input,.contact-form textarea{width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:3px;
  background:rgba(255,255,255,.04);color:var(--ink);font:inherit;font-size:.95rem}
.contact-form textarea{min-height:120px;resize:vertical}
.contact-form input:focus-visible,.contact-form textarea:focus-visible{outline:2px solid var(--focus);outline-offset:1px;border-color:transparent}
.contact-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.contact-form .btn{justify-self:start}
.contact-form .btn[disabled]{opacity:.6;cursor:progress}
.contact-status{margin:0;min-height:1.4em;font-size:.88rem;color:var(--slate)}
.contact-status.is-error{color:#FF8A66}
.contact-done h3{margin:0 0 8px;font-size:1.2rem;font-weight:600}
.contact-done p{margin:0 0 20px}

/* ---------- 12 · Dialogs: the legal statements, and the contact form ----------
   Both fade in and out, and blur what is behind them. @starting-style gives the opening frame something to
   animate from, and transition-behavior:allow-discrete keeps display and overlay in the transition so the
   closing fade is seen rather than skipped. A browser without either shows the dialog at once, which is the
   right way for this to degrade. */
dialog.legal-dialog,dialog.contact-dialog{
  opacity:0;transform:translateY(8px) scale(.99);
  transition:opacity .26s ease,transform .26s ease,overlay .26s allow-discrete,display .26s allow-discrete}
dialog.legal-dialog[open],dialog.contact-dialog[open]{opacity:1;transform:none}
@starting-style{dialog.legal-dialog[open],dialog.contact-dialog[open]{opacity:0;transform:translateY(8px) scale(.99)}}
dialog.legal-dialog::backdrop,dialog.contact-dialog::backdrop{
  background:rgba(5,12,24,0);-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0);
  transition:background .26s ease,backdrop-filter .26s ease,-webkit-backdrop-filter .26s ease,overlay .26s allow-discrete,display .26s allow-discrete}
dialog.legal-dialog[open]::backdrop,dialog.contact-dialog[open]::backdrop{
  background:rgba(5,12,24,.68);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}
@starting-style{dialog.legal-dialog[open]::backdrop,dialog.contact-dialog[open]::backdrop{
  background:rgba(5,12,24,0);-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}}

.legal-dialog{width:min(820px,calc(100% - 32px));max-height:min(86vh,900px);padding:0;border:1px solid var(--line);
  border-radius:14px;background:var(--deep);color:var(--ink);box-shadow:0 30px 80px rgba(7,16,31,.5)}
.legal-inner{position:relative;padding:clamp(26px,4vw,44px);overflow:auto;max-height:inherit}
.legal-close{position:absolute;top:16px;right:16px;z-index:1;width:36px;height:36px;display:grid;place-items:center;
  border:1px solid var(--line);border-radius:3px;background:var(--navy-800);color:var(--slate);font-size:1rem;
  line-height:1;cursor:pointer;transition:color .2s ease,border-color .2s ease}
.legal-close:hover{border-color:var(--orange);color:var(--orange)}
.legal-dialog .legal-doc{max-width:none}
.legal-dialog .legal-title{margin:0 44px 18px 0;font-size:clamp(1.4rem,2.6vw,2rem);font-weight:500;
  letter-spacing:-.025em;text-transform:none;color:var(--ink);text-wrap:balance}

/* ---------- 13 · Legal pages ----------
   legal/*.html are generated from content/legal by tools/build-legal.mjs and share this sheet. Ported from
   the previous stylesheet, with its tokens mapped onto this one: text is --ink, muted is --slate, accent is
   --orange. */
.legal{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;gap:14px;font-size:.81rem;color:var(--slate)}
@media (max-width:640px){.legal{align-items:flex-start;flex-direction:column;gap:10px}}
.legal-header{border-bottom:1px solid var(--line);background:var(--nav-bg)}
.legal-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:72px}
.legal-header .btn{min-height:40px;padding:0 16px;font-size:.88rem}
.legal-page main{padding:clamp(40px,6vw,88px) 0 clamp(56px,7vw,112px)}
.legal-page footer{padding-top:8px}
.legal-doc{max-width:760px}
.legal-doc h1{font-size:clamp(1.9rem,2vw + 1.25rem,3rem);margin-bottom:12px;max-width:none}
.legal-doc .legal-updated{font-size:.88rem;color:var(--slate);margin-bottom:36px}
.legal-doc .legal-updated strong{color:var(--slate);font-weight:600}
/* balance is for display headings; on a short uppercase label it breaks in odd places */
.legal-doc h2{text-wrap:normal;font-size:.81rem;font-weight:700;letter-spacing:.12em;color:var(--accent2);margin:0 0 14px;line-height:1.4}   /* orange fails contrast at this size; accent2 is the readable one in both schemes */
.legal-doc h3{font-size:1.06rem;font-weight:600;margin:28px 0 10px}
.legal-doc p,.legal-doc li{font-size:1rem;line-height:1.7;color:var(--slate);max-width:70ch}
.legal-doc strong{color:var(--ink);font-weight:620}
.legal-doc ul{margin:0 0 18px;padding-left:1.2em}
.legal-doc li{margin:0 0 8px;padding-left:4px}
.legal-doc li::marker{color:var(--accent2)}
.legal-doc hr{border:0;border-top:1px solid var(--line);margin:36px 0}
.legal-doc code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.88em;padding:1px 6px;
  border-radius:4px;background:rgba(255,255,255,.07);border:1px solid var(--line);color:var(--ink);white-space:nowrap}
.legal-table{overflow-x:auto;margin:8px 0 24px;border:1px solid var(--line);border-radius:10px}
.legal-table table{width:100%;min-width:680px;border-collapse:collapse;font-size:.88rem}
.legal-table th,.legal-table td{text-align:left;vertical-align:top;padding:12px 14px;border-bottom:1px solid var(--line);line-height:1.5}
.legal-table th{font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--slate);background:rgba(255,255,255,.04)}
.legal-table tr:last-child td{border-bottom:0}
@media (max-width:560px){.legal-header .wrap{min-height:60px}.legal-doc p,.legal-doc li{font-size:.97rem}}

/* ---------- 14 · Utilities used by the generated legal pages ---------- */
.mb-12{margin-bottom:12px}.max-36ch{max-width:36ch}.items-center{align-items:center}

/* ---------- 15 · The thread: one line down the whole page, with the pulses drawn in the same SVG ---------- */
#thread{position:absolute;top:0;left:0;z-index:0;pointer-events:none;overflow:visible}

/* ---------- 16 · Small screens ---------- */
@media (max-width:820px){
  .timeline,.timeline ol{grid-template-columns:1fr}
  .timeline{margin-top:40px}
  .timeline::before{left:5px;right:auto;top:0;bottom:0;width:1px;height:auto}
  .timeline::after{display:none}
  .timeline .step{padding:0 0 34px 36px}
  .timeline .fixed>.note{margin:0 0 34px 36px}
}
@media (max-width:760px){
  .nav-toggle{display:inline-flex}
  .logo .waves{display:none}                     /* the mark is the button at this width, just to its left */
  .logo{gap:0}
  header .wrap{flex-wrap:nowrap;justify-content:flex-start;gap:10px;min-height:60px}
  header .btn{margin-left:auto;padding:9px 11px;font-size:.66rem;letter-spacing:.1em}   /* stays in the bar: the menu holds the links only */
  .theme-toggle{margin-left:0}
  /* The panel drops out of the header, full width, and is laid over the page rather than pushing it */
  nav{position:absolute;left:0;right:0;top:100%;display:grid;gap:4px;padding:10px max(28px,env(safe-area-inset-right)) 18px max(28px,env(safe-area-inset-left));
    background:var(--nav-panel);box-shadow:0 18px 40px rgba(4,10,20,.4);
    border-bottom:1px solid var(--line);visibility:hidden;opacity:0;transform:translateY(-6px);
    transition:opacity .22s ease,transform .22s ease,visibility .22s}
  nav[data-open]{visibility:visible;opacity:1;transform:none}
  nav a{padding:13px 2px;font-size:1.02rem}
  /* On a phone the bar has no room for it, so it heads the menu. justify-self keeps the box around the
     words rather than stretched across the panel. The call to action stays in the bar where it was. */
  .login{order:-1;justify-self:start;margin:2px 0 12px;padding:10px 18px;font-size:.95rem}
  .hero{min-height:calc(100vh - 61px);min-height:calc(100svh - 61px)}
  .copyright{margin-left:0;width:100%}
  .split>.copy{order:-1}                                                                  /* stacked: the words always come before the graphic */
}
@media (max-width:560px){
  .contact-row{grid-template-columns:1fr}
  /* The hero has to fit the first screen on a phone, headline, standfirst, button and all three proof
     points, with no scrolling. Everything below is in service of that: less air above and below, a
     tighter rhythm between the parts, and a proof row set at a size that reads as three facts rather
     than three headlines. */
  .hero{padding:26px 0}
  .hero .proof{margin-top:20px}
  .hero .proof div{padding:13px 10px 0}
  .hero .proof b{font-size:1.32rem}
  .hero .proof span{font-size:.88rem;line-height:1.35;display:block}
  section.msg{padding:56px 0}
  /* The divisor in section 6 sizes the headline so the longest slide fits on two lines at any width.
     On a phone that works out at about 25px, barely above the 20px standfirst below it, and the hero
     loses its hierarchy. Here the headline is sized to the screen instead, the long slides wrap to as
     many as four lines, and the slot is deepened to match so the button and the proof row still do
     not move between slides. The standfirst comes down so the gap between them is a real one. */
  .hero h1,.hero-slide:nth-child(3){font-size:clamp(2.1rem,10.4vw,2.9rem)}
  /* The slides are now two, four and three lines, so the slot is as deep as the longest and the
     shorter ones are centred in it rather than hanging from the top. align-content does this in
     block layout, so unlike grid or flex it leaves the brand mark in slide three inline where it
     belongs. A browser too old to know it top aligns them, which is what they did before. */
  .hero-slide{align-content:center}
  .hero-carousel{flex-basis:calc(clamp(2.1rem,10.4vw,2.9rem) * 4.6);height:calc(clamp(2.1rem,10.4vw,2.9rem) * 4.6)}
  .hero p{font-size:1.02rem}
  .hero .wrap{gap:18px}
}
@media (max-width:420px){header .wrap{padding-left:18px;padding-right:18px}}
/* Smallest phones: the whole logo link goes, not just the word. The mark is the menu button at this
   width, so hiding only the word left the link with nothing inside it: invisible, still focusable,
   and with no accessible name. The mark, the call to action and the mode switch still fit. */
@media (max-width:380px){.logo{display:none}}
@media (max-width:380px){.split>.frame{margin-inline:-20px;padding:10px}}                 /* smallest phones: panels run closer to the screen edge, so the drawings keep their width */
/* iOS Safari does not support fixed backgrounds; use a normal scroll background on touch screens */
@media (hover:none) and (pointer:coarse){[data-scheme] body{background-attachment:scroll}}

/* ---------- 17 · Motion and print ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .seam i,.knot,.pring,.pglow{animation:none}
  .btn{transition:none}
  .hero-slide{transition:none}
  .hero-mark,.site-footer .brand-mark{animation:none;color:#dc3a9a;filter:none}
  html.ready .hero .flowfield,html.ready .hero .seam,html.ready .hero .wrap>*{animation:heroFade .3s ease-out backwards}
}
@media print{.flowfield,#thread,.seam,.theme-toggle,.pring,.pglow{display:none}}
