/*
  Studio Tools pages on production-expert.com (18 Nov 2026; v1.1 hardened against the site's dark mode)
  ---------------------------------------------------------
  One stylesheet for the three reader pages built from the Studio Tools app's data:
    /pro-tools-error-codes, /loudness-delivery-specs, /frame-rate-pull-up-pull-down
  Each page's Code Block loads this file and studio-tools.js from pe-related-answers.pages.dev,
  so a design fix here reaches all three pages at the next publish, with no repasting.

  Rules that keep it safe inside Squarespace:
  - Everything is scoped to #pe-st, so nothing leaks into the rest of the site.
  - No H2 anywhere (the site styles H2 as a pull quote). Titles are H1, cards are H3.
  - Squarespace's own heading, link and list styles are reset inside #pe-st.
  - Site dark mode (html.pe-dark) swaps the colour variables. The site's own dark mode forces paragraph,
    list and input colours with !important, so every colour, background and border here carries
    !important too (an ID-scoped !important wins over the site's).
*/

/* ---------- Colours and sizes (light mode) ---------- */
#pe-st{
  --st-page:#ffffff; --st-soft:#fafafa; --st-card:#ffffff;
  --st-ink:#151515; --st-ink2:#3d3f45; --st-ink3:#5b5e66;
  --st-line:#e2e2e2; --st-line2:#cfcfcf;
  --st-orange:#E28602;            /* Production Expert orange, from the Experts "e" logo */
  --st-link:#8A4D00;              /* a darker orange that passes contrast on white */
  --st-good:#145A2E; --st-goodbg:#E3F2E8;
  --st-warn:#7A3A00; --st-warnbg:#FCEBD9;
  --st-plainbg:#f0f0f0;
  --st-w:1080px;                  /* content width, matching the approved mockup */
  --st-pad:clamp(16px,4vw,48px);  /* side margin: 48px on desktop, less on phones */
  color:var(--st-ink); font-family:"Open Sans",sans-serif; font-size:16px; line-height:1.6; text-align:left;
}
/* ---------- Colours in the site's dark mode ---------- */
html.pe-dark #pe-st{
  --st-page:#141518; --st-soft:#1a1b1f; --st-card:#1d1e22;
  --st-ink:#ECEDEF; --st-ink2:#c4c7cd; --st-ink3:#9a9ea7;
  --st-line:#2c2e34; --st-line2:#3a3d44;
  --st-orange:#F09A2A; --st-link:#F5B35C;
  --st-good:#7fdca3; --st-goodbg:#16301f;
  --st-warn:#f6bf72; --st-warnbg:#33260f;
  --st-plainbg:#26282d;
}

/* ---------- Resets against Squarespace's own styles ---------- */
#pe-st *{box-sizing:border-box}
/* Open Sans throughout, as on the rest of the site. Figures use its tabular digits so numbers line up in columns. */
#pe-st,#pe-st h1,#pe-st h3,#pe-st p,#pe-st li,#pe-st td,#pe-st th,#pe-st a,#pe-st button,#pe-st input,#pe-st select,#pe-st summary,#pe-st label{font-family:"Open Sans",sans-serif!important}
#pe-st .st-code,#pe-st .st-target,#pe-st .st-mono,#pe-st .st-pct,#pe-st .st-v,#pe-st .st-big,#pe-st .st-pop,#pe-st .st-form select,#pe-st .st-form input{font-variant-numeric:tabular-nums}
/* The site adds clearfix ::before/::after boxes to blocks; inside flex rows they act as extra items and push content right */
#pe-st div::before,#pe-st div::after,#pe-st nav::before,#pe-st nav::after{content:none!important;display:none!important}
#pe-st h1,#pe-st h3{font-family:inherit;letter-spacing:normal;text-transform:none;color:var(--st-ink)!important}
#pe-st p{margin:0}
#pe-st a{color:var(--st-link)!important}
#pe-st a:hover{color:var(--st-ink)!important}
#pe-st ol,#pe-st ul{margin:0}
#pe-st li{margin:0}
#pe-st button,#pe-st input,#pe-st select{font-family:inherit;letter-spacing:normal;text-transform:none;line-height:1.4;margin:0}
#pe-st [hidden]{display:none!important}
#pe-st input:focus-visible,#pe-st select:focus-visible,#pe-st button:focus-visible,#pe-st a:focus-visible,#pe-st summary:focus-visible{outline:3px solid var(--st-orange);outline-offset:2px}

/* The content column. Everything below the hero sits in this, and the hero text lines up with its left edge. */
#pe-st .st-wrap{max-width:calc(var(--st-w) + 2 * var(--st-pad));margin:0 auto;padding:0 var(--st-pad)}

/* ---------- Hero: full-width photo, same height on all three pages ---------- */
#pe-st .st-hero{
  position:relative; width:100vw; max-width:none; margin:0 0 0 calc(50% - 50vw);
  min-height:520px; display:flex; align-items:center; overflow:hidden;
  background-color:#111!important; background-size:cover; background-position:center; color:#fff!important;
}
/* The dark shade over the photo: heavier on the left where the text sits, lighter on the right so the photo still shows.
   It is drawn as a layer of the hero's own background (see hero() in studio-tools.js), so site rules can't strip it. */
#pe-st .st-hero{--st-shade:linear-gradient(90deg,rgba(0,0,0,.9) 0%,rgba(0,0,0,.82) 50%,rgba(0,0,0,.6) 100%)}
#pe-st .st-hero::before{content:none!important;display:none!important}
/* --st-left is set by studio-tools.js so the hero text starts exactly where the content column starts */
#pe-st .st-hero-in{position:relative;z-index:1;width:100%;padding:56px var(--st-right,var(--st-pad)) 56px var(--st-left,var(--st-pad))}
#pe-st .st-hero-in>*{max-width:820px}
#pe-st .st-kicker{font-size:13px;font-weight:700;letter-spacing:2px;color:var(--st-orange)!important;margin:0 0 12px}
html.pe-dark #pe-st .st-kicker{color:#F09A2A!important}
#pe-st .st-hero h1{color:#fff!important;font-size:clamp(30px,4.2vw,44px);line-height:1.15;font-weight:800;margin:0 0 16px;text-wrap:balance}
#pe-st .st-hero .st-intro{font-size:18px;line-height:1.6;color:#D6D6D6!important;margin:0 0 28px}
#pe-st .st-hero label{display:block;font-size:14px;font-weight:600;margin:0 0 8px;color:#fff!important}
#pe-st .st-hero .st-meta{font-size:14px;color:#c9c9c9!important;margin-top:20px}
#pe-st .st-hero .st-meta a{color:#fff!important}
@media (max-width:700px){#pe-st .st-hero .st-intro{font-size:16px}#pe-st .st-hero{--st-shade:linear-gradient(rgba(0,0,0,.85),rgba(0,0,0,.85))}#pe-st .st-nav .st-wrap{gap:0 20px}#pe-st .st-nav a{padding:12px 0}}

/* Search box and buttons that sit on the hero */
#pe-st .st-row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}
#pe-st .st-big{height:56px;padding:0 18px;font-size:18px;border:0!important;border-radius:6px;background:#fff!important;color:#111!important;font-family:"Open Sans",sans-serif}
#pe-st .st-big.st-grow{flex:1 1 320px;min-width:0}
#pe-st .st-big.st-num{width:200px;font-size:22px;font-weight:700}
#pe-st .st-btn{min-height:44px;padding:0 20px;border-radius:6px;border:1px solid var(--st-ink)!important;background:var(--st-card)!important;color:var(--st-ink)!important;font-weight:700;font-size:15px;cursor:pointer}
#pe-st a.st-btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
#pe-st .st-btn.st-o{background:var(--st-orange)!important;border-color:var(--st-orange)!important;color:#000!important}
#pe-st .st-hero .st-btn.st-o{height:56px;font-size:16px}
#pe-st .st-hero .st-sum{font-size:15px;color:#D6D6D6!important;margin:0 0 14px;max-width:520px}

/* ---------- Tools menu under the hero ---------- */
#pe-st .st-nav{width:100vw;max-width:none;margin:0 0 0 calc(50% - 50vw);background:var(--st-soft)!important;border-bottom:1px solid var(--st-line)}
#pe-st .st-nav .st-wrap{display:flex;gap:28px;flex-wrap:wrap;font-size:15px;font-weight:600;max-width:none;margin:0;padding:0 var(--st-right,var(--st-pad)) 0 var(--st-left,var(--st-pad))}
/* The menu bar is full width like the hero, so its links take the same left edge as the hero text (set by studio-tools.js),
   not the middle of the screen: Squarespace's content column isn't always centred. */
#pe-st .st-nav a{padding:16px 0;color:var(--st-ink2)!important;text-decoration:none;border-bottom:3px solid transparent}
#pe-st .st-nav a[aria-current="page"]{color:var(--st-ink)!important;border-bottom-color:var(--st-orange)!important}
#pe-st .st-nav a:hover{color:var(--st-ink)!important}

/* ---------- Page body ---------- */
#pe-st .st-main{padding:48px 0 80px}
#pe-st .st-cols{display:flex;flex-wrap:wrap;gap:40px;align-items:flex-start}
#pe-st .st-col-main{flex:999 1 560px;min-width:0}
#pe-st .st-col-side{flex:1 1 280px;min-width:0;display:flex;flex-direction:column;gap:20px}

/* Filter chips (error groups, loudness groups) */
#pe-st .st-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}
#pe-st .st-chip{min-height:44px;padding:0 16px;border-radius:22px;border:1px solid var(--st-line2)!important;background:var(--st-card)!important;color:var(--st-ink)!important;font-size:14px;font-weight:600;cursor:pointer}
#pe-st .st-chip em{font-style:normal;font-weight:400;opacity:.75;margin-left:4px}
#pe-st .st-chip[aria-pressed="true"]{background:var(--st-ink)!important;color:var(--st-page)!important;border-color:var(--st-ink)!important}
#pe-st .st-popular{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 18px;font-size:14px;color:var(--st-ink3)!important}
#pe-st .st-pop{background:none!important;border:1px solid var(--st-line2)!important;border-radius:4px;padding:4px 10px;font-family:"Open Sans",sans-serif;font-size:14px;font-weight:700;color:var(--st-ink)!important;cursor:pointer}
#pe-st .st-count{font-size:14px;color:var(--st-ink3)!important;margin:0 0 16px}

/* ---------- Error cards ---------- */
#pe-st .st-errs{list-style:none;padding:0;margin:0}
#pe-st .st-err{border:1px solid var(--st-line)!important;border-radius:8px;padding:24px;margin:0 0 16px;background:var(--st-card)!important;list-style:none}
#pe-st .st-err::before{content:none}
#pe-st .st-err:target{outline:3px solid var(--st-orange)}
#pe-st .st-err-top{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:0 0 14px}
#pe-st .st-code{background:#000!important;color:#E28602!important;font-family:"Open Sans",sans-serif;font-weight:700;font-size:18px;padding:6px 12px;border-radius:4px;white-space:nowrap}
/* The Pro Tools error window at the top of each card. The picture is the empty dialog (896 x 335);
   the message sits in its grey panel, right of the Pro Tools logo, sized to the window's width (cqw)
   so it scales with the picture. Long messages get a smaller size so they stay inside the panel. */
#pe-st .st-win{position:relative;width:100%;max-width:620px;aspect-ratio:896/335;margin:-8px 0 16px -6px;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent!important;container-type:inline-size}
#pe-st .st-win-msg{position:absolute;left:24.5%;right:4.5%;top:27.5%;bottom:28%;overflow:hidden;margin:0;font-size:2.55cqw;line-height:1.38;color:#d2d2d2!important;font-weight:400;overflow-wrap:anywhere}
#pe-st .st-win-m .st-win-msg{font-size:2.2cqw}
#pe-st .st-win-s .st-win-msg{font-size:1.95cqw;top:25.5%}
html.pe-dark #pe-st .st-win-msg{color:#d2d2d2!important}
#pe-st .st-err h3{margin:0 0 14px;font-size:21px;font-weight:700;line-height:1.3}
#pe-st .st-lbl{font-size:13px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--st-ink3)!important;margin:0 0 6px}
#pe-st .st-dialog{font-family:"Open Sans",sans-serif;font-size:14px;background:var(--st-soft)!important;border:1px solid var(--st-line)!important;border-radius:4px;padding:10px 12px;margin:0 0 16px;color:var(--st-ink2)!important}
#pe-st .st-err .st-p{font-size:16px;line-height:1.6;margin:0 0 16px}
#pe-st .st-steps{padding-left:22px;margin:0 0 16px;font-size:16px;line-height:1.6}
#pe-st .st-steps li{margin:0 0 6px;padding:0}
#pe-st .st-steps b{font-weight:700}
#pe-st .st-older{margin:0 0 16px;font-size:15px}
#pe-st .st-older summary{cursor:pointer;font-weight:600;color:var(--st-ink2)!important}
#pe-st .st-older ul{padding-left:22px;margin:8px 0 0}
#pe-st .st-avid{font-size:15px;color:var(--st-ink2)!important;border-left:3px solid var(--st-orange);padding:2px 0 2px 12px;margin:0 0 16px}
#pe-st .st-err-foot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid var(--st-line);padding-top:14px;font-size:14px;color:var(--st-ink3)!important}
#pe-st .st-err-foot strong{color:var(--st-ink)!important}
#pe-st .st-err-foot span{display:flex;gap:16px;flex-wrap:wrap}
#pe-st .st-empty{border:2px dashed var(--st-line2)!important;border-radius:8px;padding:32px;text-align:center}
#pe-st .st-empty h3{margin:0 0 8px;font-size:20px}
#pe-st .st-empty p{margin:0 0 18px;color:var(--st-ink2)!important}
#pe-st .st-empty .st-row{justify-content:center}

/* Side panels and the boxes at the foot of the loudness and frame rate pages */
#pe-st .st-panel{border:1px solid var(--st-line)!important;border-radius:8px;padding:24px;background:var(--st-card)!important}
#pe-st .st-panel.st-soft{background:var(--st-soft)!important}
#pe-st .st-panel.st-dark{background:#000!important;border-color:#000!important;color:#fff!important}
#pe-st .st-panel h3{margin:0 0 10px;font-size:18px;font-weight:700;line-height:1.3}
#pe-st .st-panel.st-dark h3{color:#fff!important}
#pe-st .st-panel p{font-size:15px;line-height:1.6;color:var(--st-ink2)!important;margin:0 0 14px}
#pe-st .st-panel p:last-child{margin:0}
#pe-st .st-panel.st-dark p{color:#D6D6D6!important}
#pe-st .st-panel .st-a{font-weight:700}
#pe-st .st-panel a.st-btn{display:inline-flex;align-items:center;text-decoration:none}
#pe-st .st-boxes{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px}

/* ---------- Tables (loudness specs, common conversions) ---------- */
#pe-st .st-tablebox{overflow-x:auto;border:1px solid var(--st-line)!important;border-radius:8px;margin:0 0 12px}
#pe-st table.st-table{width:100%;border-collapse:collapse;font-size:15px;min-width:860px;margin:0;border:0!important}
#pe-st .st-table th{background:#000!important;color:#fff!important;text-align:left;padding:14px 16px;font-weight:700;border:0!important}
#pe-st .st-table td{padding:16px;vertical-align:top;border:0!important;border-top:1px solid var(--st-line);color:var(--st-ink)!important}
#pe-st .st-table .st-mono{font-family:"Open Sans",sans-serif}
#pe-st .st-table .st-target{font-family:"Open Sans",sans-serif;font-weight:700;font-size:16px;white-space:nowrap}
#pe-st .st-table strong{display:block;font-size:16px}
#pe-st .st-table small{display:block;font-family:"Open Sans",sans-serif;font-size:13px;color:var(--st-ink3)!important;margin-top:4px;line-height:1.45}
#pe-st .st-more{background:none!important;border:0!important;padding:0;margin-top:6px;font-size:13px;font-weight:700;color:var(--st-link)!important;cursor:pointer;text-decoration:underline}
#pe-st .st-detail td{background:var(--st-soft)!important;border-top:0;padding-top:4px}
#pe-st .st-detail dl{display:grid;grid-template-columns:150px minmax(0,1fr);gap:6px 16px;margin:0;font-size:14px}
#pe-st .st-detail dt{font-weight:700;color:var(--st-ink2)!important}
#pe-st .st-detail dd{margin:0;color:var(--st-ink)!important}
@media (max-width:700px){#pe-st .st-detail dl{grid-template-columns:minmax(0,1fr)}}
#pe-st .st-res{display:inline-block;padding:4px 10px;border-radius:4px;font-weight:700;font-size:14px;white-space:nowrap}
#pe-st .st-res.st-good{background:var(--st-goodbg)!important;color:var(--st-good)!important}
#pe-st .st-res.st-warn{background:var(--st-warnbg)!important;color:var(--st-warn)!important}
#pe-st .st-res.st-plain{background:var(--st-plainbg)!important;color:var(--st-ink2)!important;font-weight:600}
#pe-st .st-note{font-size:13px;color:var(--st-ink3)!important;margin:0 0 40px}

/* ---------- Frame rate calculator ---------- */
#pe-st .st-calc{display:flex;flex-wrap:wrap;gap:32px;align-items:stretch;margin:0 0 48px}
#pe-st .st-form{flex:1 1 360px;min-width:0;border:1px solid var(--st-line)!important;border-radius:8px;padding:28px;display:flex;flex-direction:column;gap:20px;background:var(--st-card)!important}
#pe-st .st-pair{display:flex;gap:16px;flex-wrap:wrap}
#pe-st .st-pair>div{flex:1 1 140px}
#pe-st .st-form label{display:block;font-size:14px;font-weight:600;margin:0 0 8px;color:var(--st-ink)!important}
#pe-st .st-form select,#pe-st .st-form input{width:100%;height:52px;font-size:18px;font-family:"Open Sans",sans-serif;padding:0 12px;border:1px solid var(--st-line2)!important;border-radius:6px;background:var(--st-card)!important;color:var(--st-ink)!important}
#pe-st .st-form .st-btn{align-self:flex-start}
#pe-st .st-out{flex:1 1 420px;min-width:0;background:#000!important;color:#fff!important;border-radius:8px;padding:28px}
#pe-st .st-out .st-dir{font-size:13px;font-weight:700;letter-spacing:2px;color:#E28602!important;margin:0 0 6px}
#pe-st .st-out .st-pct{font-family:"Open Sans",sans-serif;font-size:48px;font-weight:700;line-height:1.1;margin:0 0 24px}
#pe-st .st-out-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
#pe-st .st-out-grid p{margin:0}
#pe-st .st-out-grid .st-k{font-size:13px;color:#bdbdbd!important;margin:0 0 4px}
#pe-st .st-out-grid .st-v{font-family:"Open Sans",sans-serif;font-size:22px;font-weight:700}
#pe-st .st-out-grid .st-s{font-size:13px;color:#bdbdbd!important;margin-top:2px}
/* The two ways to match the audio, under the result */
#pe-st .st-method{border-top:1px solid #333!important;margin-top:20px;padding-top:16px}
#pe-st .st-out .st-m-h{font-size:16px;font-weight:700;color:#fff!important;margin:0 0 6px}
#pe-st .st-out .st-m-p{font-size:15px;line-height:1.6;color:#d0d0d0!important;margin:0}
#pe-st .st-out .st-pct-txt{font-size:clamp(26px,3.4vw,36px)}
#pe-st .st-modes{margin:0}
#pe-st h3.st-h{margin:0 0 16px;font-size:24px;font-weight:700}
@media (max-width:520px){#pe-st .st-out .st-pct{font-size:38px}#pe-st .st-out-grid{grid-template-columns:minmax(0,1fr)}}
