/* ==========================================================================
   gpi-ai.com — design system
   Brand continuity with gpiglobal.com (navy + amber, Poppins/Open Sans,
   "Guide. Perform. Inspire." voice) re-skinned in a modern AI/data register:
   deep-navy hero, faint data-grid, mono accents for machine output, glass
   cards, restrained motion.

   Palette values below were read from the parent site's own compiled CSS
   (template_main-head.min.css), not guessed:
       #15216b  GPI navy      (primary brand)
       #ffaf03  GPI amber     (accent)
       #212427  charcoal      (body text on parent)
       #e8eae9  light line
   No third-party requests: no CDN, no web fonts, no analytics. Runs offline.
   ========================================================================== */

:root {
  /* --- brand, from the parent site --- */
  --navy:       #15216b;
  --navy-deep:  #0d1648;
  --navy-ink:   #080e2e;
  --amber:      #ffaf03;
  --amber-soft: #ffcb00;
  --charcoal:   #212427;

  /* --- AI/data register --- */
  --teal:       #0d9b8c;   /* the teal inside the GPI logo mark */
  --teal-deep:  #0c978b;   /* the parent site's heading teal */
  --teal-soft:  #3fbfae;   /* lighter teal for dark surfaces */
  --teal-text:  #0a7d71;   /* teal dark enough for small TEXT on light (4.9:1) */

  /* --- surface + text --- */
  --paper:      #f6f8fb;
  --white:      #ffffff;
  --text:       #1b2330;
  --text-soft:  #5a6a7e;
  --text-inv:   #eef3fb;
  --text-inv-soft: #9fb0cb;
  --line:       #e3e9f0;
  --line-inv:   rgba(255,255,255,.11);

  --grad:       linear-gradient(115deg, #0a7d71 0%, #0c9184 100%); /* teal, white-text safe */
  --grad-text:  linear-gradient(100deg, var(--amber) 0%, var(--teal-soft) 100%);
  --grad-brand: linear-gradient(115deg, #0a7d71 0%, #0c9184 100%);

  /* --- type --- */
  --font-head: "Poppins", "Segoe UI", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;

  /* --- shape + motion --- */
  --r:    14px;
  --r-sm: 9px;
  --sh:    0 20px 54px -20px rgba(8,14,46,.40);
  --sh-sm: 0 8px 26px -14px rgba(8,14,46,.30);
  --ease: cubic-bezier(.22,.7,.25,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; }

.container { width: min(1200px, 92vw); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ==========================================================================
   HEADER — brand + nav, login slots pinned top-right
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(120deg, rgba(6,63,57,.97), rgba(4,48,44,.94));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-inv);
  color: var(--text-inv);
}

.header-inner {
  display: flex; align-items: center; gap: 22px;
  padding: 11px 0;
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand img { height: 38px; width: auto; }
/* The real GPI logo is navy (#15216B) — invisible on this dark header.
   A light chip keeps the genuine mark legible without recolouring it. */
.logo-chip {
  display: inline-grid; place-items: center;
  padding: 6px 11px; border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px -4px rgba(0,0,0,.5);
}
.brand-name {
  font-family: var(--font-head); font-weight: 700; font-size: 20px; color: #fff;
}
.brand-name small {
  display: block; font-size: 9.5px; font-weight: 600;
  color: var(--amber); letter-spacing: 2.2px; text-transform: uppercase;
}

.main-nav { display: flex; gap: 2px; margin-left: 6px; }
.main-nav a {
  padding: 8px 13px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--text-inv-soft);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.main-nav a[aria-current="page"] {
  color: #fff; background: rgba(255,255,255,.10);
  box-shadow: inset 0 -2px 0 var(--amber);
}

/* --- LOGIN SLOTS: top-right corner, per spec --- */
.login-wrap {
  margin-left: auto; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  position: relative;
}
.login-slot {
  display: flex; align-items: center; gap: 8px;
}
.login-slot input {
  width: 128px; padding: 8px 11px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.17);
  background: rgba(255,255,255,.06);
  color: #fff; font-size: 13px; font-family: var(--font-body);
  outline: none;
  transition: border-color .2s var(--ease), width .25s var(--ease), box-shadow .2s var(--ease);
}
.login-slot input::placeholder { color: var(--text-inv-soft); }
.login-slot input:focus {
  border-color: var(--teal); width: 146px;
  box-shadow: 0 0 0 3px rgba(13,155,140,.18);
}
.login-slot.invalid input { border-color: #ff8b8b; }
.login-slot.shake { animation: shake .38s var(--ease); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* reset-password link sits under the form, per spec */
.login-meta {
  display: flex; justify-content: flex-end;
  padding-bottom: 7px;
}
.link-reset {
  font-size: 11.5px; color: var(--text-inv-soft);
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,.35);
  transition: color .2s var(--ease);
}
.link-reset:hover { color: var(--amber); }

.login-msg {
  display: none; text-align: right;
  font-size: 12px; padding: 0 0 8px;
}
.login-msg.visible { display: block; }
.login-msg.err { color: #ffb0b0; }
.login-msg.ok  { color: #7ff0c8; }

/* signed-in chip replaces the form after demo login */
.session-chip {
  margin-left: auto; flex: 0 0 auto;
  display: none; align-items: center; gap: 10px;
}
.session-chip.on { display: flex; }
.session-chip .who {
  font-size: 13.5px; font-weight: 600; color: #fff;
}
.session-chip .avatar {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
}
.session-chip .out {
  font-size: 12px; color: var(--text-inv-soft);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.session-chip .out:hover { color: var(--amber); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--r-sm); border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 13.5px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  /* Amber, not the gradient: measured 9.29:1 for the navy text on it.
     The navy->teal gradient only reached 3.16:1 at its mid stop with white
     text, which fails WCAG AA where the button is actually clicked. */
  background: var(--amber); color: var(--navy-ink);
  box-shadow: 0 10px 24px -12px rgba(255,175,3,.55);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--amber-soft);
  box-shadow: 0 14px 30px -12px rgba(255,175,3,.65);
}
.btn-amber {
  background: var(--amber); color: var(--navy-deep);
  box-shadow: 0 10px 24px -12px rgba(255,175,3,.8);
}
.btn-amber:hover { background: var(--amber-soft); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text-inv);
  border: 1px solid rgba(255,255,255,.3);
}
.btn-ghost:hover { background: rgba(255,255,255,.09); }
.btn-lg { padding: 13px 26px; font-size: 15px; }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -12%, rgba(63,191,174,.20), transparent 62%),
    radial-gradient(900px 460px at -8% 112%, rgba(13,155,140,.26), transparent 58%),
    radial-gradient(700px 380px at 50% 120%, rgba(255,175,3,.08), transparent 60%),
    #04302c;
  color: var(--text-inv);
  padding: 92px 0 104px;
}

/* faint data-grid, masked toward the visual */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(920px 540px at 34% 22%, #000 28%, transparent 76%);
  -webkit-mask-image: radial-gradient(920px 540px at 34% 22%, #000 28%, transparent 76%);
}

.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1.12fr .88fr;
  gap: 54px; align-items: center;
}
.hero-copy { min-width: 0; }

/* newsletter page: caption under the thumbnail + the "coming next" slot */
.news-meta {
  text-align: center; font-size: 13.5px; color: var(--text-soft);
  margin-top: 14px;
}
.news-meta a {
  color: var(--navy); text-decoration: underline; text-underline-offset: 3px;
}
.news-meta a:hover { color: var(--teal-text); }
.news-upcoming {
  margin: 34px auto 0; max-width: 520px; text-align: center;
  padding: 20px 22px; border-radius: var(--r);
  border: 1px dashed rgba(13,155,140,.4);
  background: rgba(13,155,140,.05);
}
.news-upcoming b {
  display: block; font-family: var(--font-head);
  color: var(--teal-text); font-size: 15px; margin-bottom: 4px;
}
.news-upcoming span { font-size: 13.5px; color: var(--text-soft); }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--amber);
  padding: 7px 14px; margin-bottom: 22px;
  border: 1px solid rgba(255,175,3,.38); border-radius: 999px;
  background: rgba(255,175,3,.08);
}
.hero-kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px 2px rgba(255,175,3,.85);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .32 } }

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.07; font-weight: 800; letter-spacing: -.6px;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero .lede {
  font-size: 17.5px; color: var(--text-inv-soft);
  max-width: 56ch; margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 13px; flex-wrap: wrap; }
.hero-note {
  margin-top: 26px; font-size: 13px; color: var(--text-inv-soft);
  padding-left: 14px; border-left: 2px solid rgba(13,155,140,.55);
}
.hero-note b { color: var(--text-inv); font-weight: 600; }

/* decorative console, aria-hidden: pure theatre, no data */
.console-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r);
  box-shadow: var(--sh);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transform: rotate(.5deg);
}
.console-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
}
.console-bar i { width: 10px; height: 10px; border-radius: 50%; }
.console-bar i:nth-child(1) { background: #ff6b6b; }
.console-bar i:nth-child(2) { background: #ffd166; }
.console-bar i:nth-child(3) { background: #2bd97c; }
.console-bar span {
  margin-left: 8px; font-family: var(--font-mono);
  font-size: 11px; color: var(--text-inv-soft);
}
.console-body {
  padding: 17px 18px 8px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75;
}
.console-body .u { color: var(--teal); }
.console-body .a { color: var(--text-inv-soft); }
.console-body .row { opacity: 0; animation: typein .55s var(--ease) forwards; }
.console-body .row:nth-child(1) { animation-delay: .35s; }
.console-body .row:nth-child(2) { animation-delay: 1.05s; }
.console-body .row:nth-child(3) { animation-delay: 1.75s; }
.console-body .row:nth-child(4) { animation-delay: 2.45s; }
.console-body .caret {
  display: inline-block; width: 8px; height: 14px; vertical-align: -2px;
  background: var(--teal); animation: pulse 1.1s steps(2) infinite;
}
@keyframes typein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.console-chips {
  display: flex; gap: 7px; flex-wrap: wrap;
  padding: 2px 18px 14px;
}
.chip {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--teal-text);
  border: 1px solid rgba(13,151,139,.4); border-radius: 999px;
  padding: 4px 10px; background: rgba(13,151,139,.09);
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section { padding: 76px 0; }
.section.alt { background: var(--white); }

.section-head { max-width: 740px; margin-bottom: 42px; }
.section-head .eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--teal-text); font-weight: 700;
  margin-bottom: 10px;
}
.section-head h2 {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(25px, 3vw, 36px); line-height: 1.16; letter-spacing: -.3px;
  color: var(--teal-text);
}
.section-head p { margin-top: 12px; color: var(--text-soft); font-size: 16px; }

.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 25px 23px 22px;
  box-shadow: 0 4px 18px -13px rgba(8,14,46,.22);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-sm);
  border-color: rgba(13,155,140,.55);
}
.card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(140deg, rgba(13,155,140,.15), rgba(13,151,139,.15));
  border: 1px solid rgba(13,155,140,.28);
  margin-bottom: 15px;
}
.card h3 {
  font-family: var(--font-head); font-size: 17px; font-weight: 700;
  color: var(--teal-text); margin-bottom: 7px;
}
.card p { font-size: 14.5px; color: var(--text-soft); }

/* stats band — brand navy, mono figures */
.stats-band { background: #063f39; color: var(--text-inv); padding: 44px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.stat b {
  display: block; font-family: var(--font-head); font-weight: 800; font-size: 33px;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat span { font-size: 12.5px; color: var(--text-inv-soft); letter-spacing: .3px; }

/* trust strip — mirrors the parent's certification logo band */
.trust-strip {
  background: var(--white); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); padding: 26px 0;
}
.trust-strip p {
  text-align: center; font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--text-soft); margin-bottom: 16px;
}
.trust-row {
  display: flex; justify-content: center; align-items: center;
  gap: 34px; flex-wrap: wrap;
}
.trust-row span {
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: var(--navy); opacity: .72;
  display: inline-flex; align-items: center; gap: 8px;
}
.trust-row span::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px;
  background: var(--amber);
}

/* ==========================================================================
   NEWSLETTER — thumbnail + click-to-enlarge lightbox
   ========================================================================== */

.news-wrap { max-width: 880px; margin-inline: auto; }
.news-list { display: grid; gap: 30px; margin-top: 8px; }

.news-thumb {
  display: block; width: min(520px, 100%); margin: 30px auto 6px;
  padding: 10px; border-radius: var(--r);
  background: var(--white); border: 1px solid var(--line);
  box-shadow: var(--sh-sm); cursor: zoom-in;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.news-thumb:hover, .news-thumb:focus-visible {
  transform: translateY(-4px) scale(1.012);
  box-shadow: var(--sh); outline: none;
  border-color: rgba(13,155,140,.55);
}
.news-thumb img { border-radius: var(--r-sm); width: 100%; height: auto; }
/* v1.9.1: the newsletter is gated, so the public teaser must not request its
   thumbnail (anonymous visitors got a broken image and a gate_denied row on
   every page view). A self-contained panel stands in until sign-in. */
.news-thumb.news-locked { cursor: pointer; }
.news-locked-art {
  display: grid; place-items: center; aspect-ratio: 4 / 3;
  border-radius: var(--r-sm); font-size: 42px;
  background: linear-gradient(135deg, rgba(13,155,140,.12), rgba(5,9,26,.06));
}
.news-locked-line {
  display: block; margin-top: 10px; text-align: center;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-soft);
}
.news-thumb figcaption {
  padding: 11px 6px 3px; text-align: center;
  font-size: 13px; color: var(--text-soft);
}
.news-thumb figcaption b {
  color: var(--teal-text); font-family: var(--font-head);
}
.news-thumb figcaption .zoom-hint { display: block; }
.zoom-hint {
  display: inline-block; margin-top: 3px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--teal);
}

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; place-items: center;
  background: rgba(5,9,26,.86);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 3.5vw;
}
.lightbox.open { display: grid; }
.lightbox figure {
  max-width: min(1150px, 93vw); max-height: 92vh; overflow: auto;
  background: var(--white); border-radius: var(--r); padding: 13px;
  box-shadow: var(--sh);
}
.lightbox img { width: 100%; height: auto; border-radius: var(--r-sm); }
.lightbox-close {
  position: fixed; top: 20px; right: 26px;
  color: #fff; font-size: 13px; letter-spacing: .4px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.38); border-radius: 999px;
  padding: 7px 17px; background: rgba(255,255,255,.09);
  font-family: var(--font-head); font-weight: 600;
}
.lightbox-close:hover { background: rgba(255,255,255,.18); }

/* ==========================================================================
   CHAT CONSOLE — left-margin history rail
   ========================================================================== */

.chat-layout {
  display: grid; grid-template-columns: 290px 1fr;
  min-height: calc(100vh - 60px);
}

.history-rail {
  border-right: 1px solid var(--line);
  background: var(--white);
  padding: 20px 14px 26px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  position: sticky; top: 60px;
}
.history-rail h2 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.9px;
  text-transform: uppercase; color: var(--text-soft);
  padding: 0 10px 10px;
}
.history-rail .rail-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; margin-bottom: 14px;
  border-radius: var(--r-sm);
  background: linear-gradient(140deg, rgba(13,155,140,.09), rgba(13,151,139,.09));
  border: 1px solid rgba(13,151,139,.22);
}
.history-rail .rail-user .avatar {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; color: #fff; flex: 0 0 30px;
}
.history-rail .rail-user .name {
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: var(--teal-text); line-height: 1.2;
}
.history-rail .rail-user .sub {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-soft); letter-spacing: .6px;
}

.history-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; margin-bottom: 5px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  background: transparent; color: var(--text);
  font-size: 13.5px; line-height: 1.45;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
/* v0.6: one line per entry - time label and topic share the line, the list
   scrolls (newest at top), long topics ellipsize. */
.history-rail #history-list {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  padding: 0 10px 16px;
}
.new-chat-btn {
  display: block; width: calc(100% - 20px); margin: 2px 10px 10px;
  padding: 8px 10px; border: 0; border-radius: var(--r-sm);
  background: var(--grad); color: #fff; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.4px;
  text-transform: uppercase; text-align: center;
}
.new-chat-btn:hover { opacity: .92; }
.history-item {
  display: flex; align-items: baseline; gap: 9px;
  padding: 6px 10px; margin-bottom: 3px; font-size: 12px;
}
.history-item time {
  flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-soft); letter-spacing: .5px;
}

/* v0.8: attachment chip + attach button in the composer row */
.attach-btn {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--text-soft); cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .6px;
}
.attach-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.attach-btn:disabled { opacity: .5; cursor: default; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 8px; align-self: center;
  max-width: 280px; overflow: hidden; white-space: nowrap;
  padding: 4px 10px; border: 1px dashed var(--line); border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-soft);
}
.attach-x {
  border: 0; background: none; cursor: pointer; color: var(--text-soft);
  font-size: 14px; line-height: 1;
}
.history-item .history-text {
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Clamp ONLY the prompt text. The time label is a block child of the button,
   so clamping the button itself made the label consume one of the two lines
   and sliced the prompt mid-glyph instead of adding an ellipsis. */
.history-item .history-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.history-item:hover {
  background: rgba(13,155,140,.09); border-color: rgba(13,155,140,.32);
}
.history-item.active {
  background: rgba(13,151,139,.10); border-color: rgba(13,151,139,.42);
}
.history-item time {
  display: block; margin-bottom: 3px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-soft);
}
.history-empty { font-size: 13px; color: var(--text-soft); padding: 0 11px; }

/* Keyboard users: skip the header/login block and land on the page content.
   Off-screen until focused, then pinned to the top-left. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--amber); color: var(--navy-ink);
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  padding: 10px 16px; text-decoration: none; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; outline: 2px solid var(--navy-ink); }

.chat-pane { display: flex; flex-direction: column; background: var(--paper); min-width: 0; }

.chat-topbar {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  padding: 13px 26px; background: var(--white);
  border-bottom: 1px solid var(--line);
}
.chat-topbar .who {
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: var(--teal-text);
}
.chat-topbar .badge {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.3px;
  padding: 4px 11px; border-radius: 999px;
  color: var(--teal-text); border: 1px solid rgba(13,155,140,.4);
  background: rgba(13,155,140,.08);
}
.chat-topbar .badge.warn {
  color: #a35b00; border-color: rgba(255,175,3,.55);
  background: rgba(255,175,3,.13);
}

.chat-scroll { flex: 1; overflow-y: auto; padding: 28px 32px 8px; }

.msg { max-width: 780px; margin-bottom: 20px; display: flex; gap: 12px; }
.msg .avatar {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
}
.msg.user .avatar { background: linear-gradient(140deg, var(--teal-deep), var(--teal-deep)); }
.msg.ai .avatar   { background: var(--grad-brand); border: 1px solid rgba(255,175,3,.45); }
.msg .bubble {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  padding: 12px 16px; font-size: 14.5px;
  box-shadow: 0 3px 12px -9px rgba(8,14,46,.24);
}
.msg.user .bubble {
  border-radius: 14px 4px 14px 14px;
  background: #e9f7f4; border-color: #cfe9e4;
}
.msg .bubble.err {
  border-color: rgba(179,38,30,.45); background: #fdf2f1;
}
.msg .bubble .meta {
  margin-top: 7px; font-family: var(--font-mono);
  font-size: 10.5px; color: var(--text-soft);
}
.msg.system { display: block; max-width: 780px; }
.msg.system .bubble {
  background: rgba(255,175,3,.10); border-color: rgba(255,175,3,.4);
  border-radius: var(--r-sm); font-size: 13px; color: #6b4a00;
}

.chat-composer {
  border-top: 1px solid var(--line); background: var(--white);
  padding: 15px 26px 18px;
}
.composer-row { display: flex; gap: 11px; align-items: flex-end; }
.composer-row textarea {
  flex: 1; resize: none; min-height: 50px; max-height: 180px;
  padding: 13px 15px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--paper);
  font-family: var(--font-body); font-size: 14.5px; color: var(--text);
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.composer-row textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,155,140,.15);
}
.composer-note {
  margin-top: 9px; font-family: var(--font-mono);
  font-size: 11px; color: var(--text-soft); letter-spacing: .3px;
}

/* demo-auth warning banner: impossible to miss, always visible */
.skeleton-banner {
  background: repeating-linear-gradient(
    45deg, rgba(255,175,3,.16), rgba(255,175,3,.16) 12px,
    rgba(255,175,3,.06) 12px, rgba(255,175,3,.06) 24px);
  border-bottom: 1px solid rgba(255,175,3,.5);
  color: #6b4a00; text-align: center;
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .5px; padding: 7px 14px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: #04302c; color: var(--text-inv-soft);
  padding: 52px 0 26px; font-size: 14px;
}
.footer-grid {
  display: grid; grid-template-columns: 2.1fr 1fr 1fr;
  gap: 32px; margin-bottom: 30px;
}
.footer-grid h4 {
  color: #fff; font-family: var(--font-head); font-size: 13.5px;
  letter-spacing: .5px; margin-bottom: 11px;
}
.footer-grid a { display: block; padding: 3px 0; }
.footer-grid a:hover { color: var(--amber); }
.footer-grid p { font-size: 13.5px; }
.footer-bottom {
  border-top: 1px solid var(--line-inv); padding-top: 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1040px) {
  .hero-inner { grid-template-columns: 1fr; }
  .console-card { max-width: 560px; transform: none; }
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .login-slot { width: 100%; margin-left: 0; }
  .login-slot input { width: auto; flex: 1; min-width: 0; }
  .login-slot input:focus { width: auto; }
  .grid-cards { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .history-rail {
    position: static; max-height: 210px;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .footer-grid { grid-template-columns: 1fr; }
  .chat-scroll { padding: 22px 18px 8px; }
}
/* ==========================================================================
   REDUCED MOTION
   The hero console rows start at opacity:0 and fade in on a stagger. With no
   fallback, a visitor (or a screenshot tool) that has animations disabled saw
   an EMPTY console card. Respect the OS preference: show the rows immediately.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .console-body .row { opacity: 1; transform: none; }
  .console-body .caret { animation: none; }
}

/* ==========================================================================
   v0.10: PASSWORD REVEAL (the eyeball)
   The button is injected by main.js into a .pw-wrap span placed around each
   input[type=password], so it sits at the field's right edge without editing
   the 20+ generated console pages. It inherits the field's colour scheme, so
   it reads correctly on the dark header and on the white password pages.
   ========================================================================== */
.pw-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.pw-wrap > input { padding-right: 34px; }
.pw-reveal {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  padding: 0; margin: 0;
  border: 0; border-radius: 6px;
  background: transparent;
  color: currentColor;
  opacity: .55;
  cursor: pointer;
  transition: opacity .16s var(--ease), background .16s var(--ease);
}
.pw-reveal:hover { opacity: 1; background: rgba(127,127,127,.16); }
.pw-reveal:focus-visible {
  opacity: 1; outline: 2px solid var(--teal); outline-offset: 1px;
}
.pw-reveal.on { opacity: .95; }
/* On the dark header the input text is white, so the icon must be too. */
.login-slot .pw-reveal { color: #fff; }
.login-slot .pw-wrap > input { width: 128px; }
.login-slot .pw-wrap > input:focus { width: 146px; }
/* the wrapper is now the flex child, so IT must take the flexible width */
@media (max-width: 720px) {
  .login-slot .pw-wrap { flex: 1; min-width: 0; }
  .login-slot .pw-wrap > input,
  .login-slot .pw-wrap > input:focus { width: auto; }
}

/* ==========================================================================
   v0.10: ATTACHMENT PILLS - up to 3 files, side by side above the composer
   ========================================================================== */
.attach-chip {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
  width: 100%;
  margin: 0 0 8px;
}
.attach-pill {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 260px;
  padding: 4px 8px 4px 11px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-soft);
}
.attach-pill-name {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.attach-pill .attach-x {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(127,127,127,.14);
  color: var(--text-soft); cursor: pointer;
  font-size: 13px; line-height: 1;
}
.attach-pill .attach-x:hover { background: rgba(200,60,60,.16); color: #b33; }
.attach-full {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-soft); letter-spacing: .5px;
}

/* ===== v1.0 DUAL-CONSOLE: lane toggle, badges, downloads, notice ===== */
.lane-toggle {
  display: flex; gap: 6px; margin: 0 0 14px;
  border: 1px solid var(--line, #e8eae9); border-radius: 10px; padding: 4px;
}
.lane-opt {
  flex: 1; text-decoration: none; border-radius: 8px; padding: 7px 6px;
  font-size: 12px; font-weight: 600; color: var(--text-soft, #5b6470);
  text-align: center; line-height: 1.25;
}
.lane-opt small { display: block; font-weight: 500; font-size: 10px; opacity: .85; }
.lane-opt.lane-private { color: var(--teal-text, #0a7d71); }
.lane-opt.lane-assistant { color: #b97e0f; }
.lane-opt.is-active.lane-private { background: #0a7d71; color: #fff; }
.lane-opt.is-active.lane-assistant { background: #d97706; color: #fff; }

.chat-pane.lane-assistant .badge-assistant { background: #d97706; color: #fff; }
.badge.badge-assistant { background: #d97706; color: #fff; }

/* history badges: which console that thread belongs to */
.lane-tag { font-size: 9px; font-weight: 700; letter-spacing: .08em;
  padding: 1px 6px; border-radius: 999px; margin-right: 6px; }
.tag-private { background: rgba(10,125,113,.12); color: #0a7d71; }
.tag-assistant { background: rgba(217,119,6,.14); color: #b97e0f; }
.history-item.lane-assistant { border-left: 3px solid #d97706; }
.history-item.lane-private { border-left: 3px solid #0a7d71; }

/* lane-B generated-file download links */
a.download-link {
  display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600;
  color: #0a7d71; text-decoration: none; border: 1px solid currentColor;
  border-radius: 8px; padding: 5px 12px;
}
a.download-link:hover { background: rgba(10,125,113,.08); }

/* paste-in notice (non-modal warn) */
.paste-notice {
  margin-top: 6px; font-size: 12px; color: #b97e0f;
  border: 1px solid rgba(217,119,6,.35); border-radius: 8px;
  padding: 6px 10px; background: rgba(217,119,6,.06);
}

/* v1.1: "Email to me" composer button (both consoles) */
.mail-btn {
  border: 1px solid var(--line, #e8eae9); background: #fff; border-radius: 8px;
  padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--teal-text, #0a7d71);
  align-self: center; height: 32px;
}
.mail-btn:hover:not(:disabled) { background: rgba(10,125,113,.08); }
.mail-btn:disabled { opacity: .5; }
.lane-assistant .mail-btn { color: #b97e0f; }

/* ==========================================================================
   v1.4 — fixed composer: the console fills one screen; only the conversation
   scrolls, the question box always stays in view.
   ========================================================================== */
.chat-layout {
  height: calc(100vh - var(--hdr, 60px));
  height: calc(100dvh - var(--hdr, 60px));
  min-height: 0;
  overflow: hidden;
}
.history-rail { max-height: none; height: 100%; top: 0; }
.chat-pane { height: 100%; min-height: 0; overflow: hidden; }
.chat-topbar, .chat-composer { flex: 0 0 auto; }
.chat-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* v1.4 — documents offered for a "send me ..." request */
.offered-docs {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(13,155,140,.35); background: rgba(13,155,140,.06);
}
.offered-docs .offered-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.offered-docs ul { margin: 0 0 8px 18px; padding: 0; font-size: 13px; }
.offered-docs .offered-send { font-size: 13px; padding: 6px 12px; }
.mail-done { color: #0a7d71; }

/* v1.4 — "Email to me" dialog */
.mail-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(8,14,46,.45);
  display: grid; place-items: center; padding: 16px;
}
.mail-box {
  background: var(--white, #fff); border-radius: 14px; width: min(560px, 96vw);
  max-height: 88vh; overflow-y: auto; padding: 20px 22px;
  box-shadow: 0 20px 50px -20px rgba(8,14,46,.5); font-size: 14px;
}
.mail-box h3 { margin: 0 0 12px; font-size: 17px; }
.mail-label { display: block; font-size: 12.5px; color: var(--text-soft, #555); margin-bottom: 10px; }
.mail-to, .mail-find-q {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; box-sizing: border-box;
  border: 1px solid var(--line, #ddd); border-radius: 8px; font-size: 14px;
}
.mail-check { display: block; margin: 5px 0; cursor: pointer; }
.mail-list { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--line, #ddd);
  border-radius: 8px; max-height: 240px; overflow-y: auto; }
.mail-sub { font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-soft, #666); margin: 6px 0 2px; }
.mail-none { margin: 4px 0; color: var(--text-soft, #666); font-size: 13px; }
.mail-find { display: flex; gap: 8px; align-items: center; }
.mail-find .mail-find-q { margin-top: 0; }
.mail-find-res { font-size: 12.5px; color: var(--text-soft, #666); margin: 4px 0 0; min-height: 1em; }
.mail-msg { color: #b3261e; font-size: 13px; min-height: 1em; margin: 8px 0 0; }
.mail-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
@media (max-width: 820px) {
  /* v1.4: phones/tablets — rail on top (short), conversation scrolls, box stays */
  .chat-layout { grid-template-rows: auto minmax(0, 1fr); }
  .history-rail { height: auto; max-height: 160px; }
}

/* v1.5 F — formatted AI answers (tables, lists, code) */
.bubble.md { white-space: normal; }
.bubble.md .md-p { margin: 0 0 8px; }
.bubble.md .md-p:last-child { margin-bottom: 0; }
.bubble.md .md-h { font-weight: 700; margin: 10px 0 4px; }
.bubble.md .md-h1, .bubble.md .md-h2 { font-size: 1.05em; }
.bubble.md .md-list { margin: 4px 0 8px 20px; padding: 0; }
.bubble.md .md-list li { margin: 2px 0; }
.bubble.md code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em;
  background: rgba(8,14,46,.06); padding: 1px 4px; border-radius: 4px; }
.bubble.md .md-pre { background: rgba(8,14,46,.06); padding: 8px 10px; border-radius: 8px;
  overflow-x: auto; margin: 6px 0; }
.bubble.md .md-pre code { background: none; padding: 0; white-space: pre; }
.bubble.md .md-table-wrap { overflow-x: auto; margin: 6px 0 10px; max-width: 100%; }
.bubble.md .md-table { border-collapse: collapse; font-size: 13px; min-width: 60%; }
.bubble.md .md-table th, .bubble.md .md-table td { border: 1px solid rgba(8,14,46,.15);
  padding: 5px 8px; text-align: left; vertical-align: top; }
.bubble.md .md-table th { background: rgba(13,155,140,.08); font-weight: 700; }
.bubble.md a { color: #0a7d71; word-break: break-word; }
/* v1.5 E — download links for company documents */
.offered-docs .doc-dl { font-size: 12px; font-weight: 700; margin-left: 6px; color: #0a7d71; }
.offered-docs .doc-note { font-size: 11.5px; color: var(--text-soft, #666); }
.meta a.src-dl { color: inherit; text-decoration: underline dotted; }

/* ==========================================================================
   v1.6 — Files to Email list (right margin, both consoles)
   ========================================================================== */
.chat-layout.has-tray { grid-template-columns: 290px minmax(0, 1fr) 290px; }
.mail-tray {
  border-left: 1px solid var(--line); background: var(--white, #fff);
  padding: 18px 14px 16px; height: 100%; min-height: 0; box-sizing: border-box;
  display: flex; flex-direction: column; overflow: hidden;
}
.mail-tray .tray-head { display: flex; align-items: center; justify-content: space-between; }
.mail-tray h2 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.9px;
  text-transform: uppercase; color: var(--text-soft); margin: 0; padding: 0 4px;
}
.tray-close { display: none; border: 0; background: none; font-size: 20px; cursor: pointer; }
.tray-sum { font-size: 11.5px; color: var(--text-soft, #666); margin: 6px 4px 8px; }
.tray-list { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.tray-empty { font-size: 12.5px; color: var(--text-soft, #666); padding: 6px 4px; line-height: 1.5; }
.tray-item {
  display: flex; align-items: center; gap: 6px; padding: 6px 6px; margin-bottom: 4px;
  border: 1px solid var(--line, #e5e7e6); border-radius: 8px; font-size: 12.5px;
}
.tray-ic { flex: 0 0 auto; }
.tray-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-size { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-soft, #777); }
.tray-x { flex: 0 0 auto; border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: #999; padding: 0 2px; }
.tray-x:hover { color: #b3261e; }
.tray-foot { flex: 0 0 auto; border-top: 1px solid var(--line, #e5e7e6); padding-top: 10px; margin-top: 8px; }
.tray-inc { display: block; font-size: 12px; color: var(--text-soft, #555); margin-bottom: 8px; cursor: pointer; }
.tray-send { width: 100%; font-size: 13.5px; padding: 9px 12px; }
.tray-send:disabled { opacity: .5; cursor: default; }
.tray-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 6px; }
.tray-to { font-size: 11px; color: var(--text-soft, #666); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-clear { border: 0; background: none; color: var(--teal-text, #0a7d71); font-size: 11.5px; cursor: pointer; padding: 0; }
.tray-msg { font-size: 12.5px; min-height: 1em; margin: 8px 0 0; }
.tray-msg.err { color: #b3261e; }
.tray-msg.ok { color: #0a7d71; }
.tray-msg.warn { color: #9a6700; }
.tray-last { font-size: 11px; color: var(--text-soft, #777); margin: 6px 0 0; }
.lane-assistant .mail-tray .tray-clear { color: #b97e0f; }
/* the ticks: hidden unless the server has the list */
.tray-tick { display: none; }
.has-tray .tray-tick { display: inline-flex; align-items: center; margin: 0 5px 0 0; vertical-align: middle; cursor: pointer; }
.has-tray .tray-tick input { margin: 0; width: 14px; height: 14px; cursor: pointer; accent-color: #0a7d71; }
.has-tray .tray-tick-link { margin: 0 4px 0 3px; }
.has-tray .offered-send { display: none; }
.offered-hint { display: none; }
.has-tray .offered-hint { display: block; font-size: 12px; color: var(--text-soft, #666); }
.dl-row { display: flex; align-items: center; margin-top: 6px; }
.dl-row .download-link { margin-top: 0; }
.tray-fab { display: none; }
@media (max-width: 1100px) {
  .chat-layout.has-tray { grid-template-columns: 240px minmax(0, 1fr); }
  .mail-tray {
    position: fixed; top: var(--hdr, 60px); right: 0; bottom: 0; width: min(320px, 92vw);
    z-index: 150; transform: translateX(105%); transition: transform .2s ease;
    box-shadow: -12px 0 30px -18px rgba(8,14,46,.45); height: auto;
  }
  .mail-tray.tray-open { transform: none; }
  .tray-close { display: block; }
  .tray-fab {
    display: block; position: fixed; right: 14px; bottom: 96px; z-index: 140;
    border: 0; border-radius: 20px; padding: 9px 14px; font-size: 13px; font-weight: 600;
    background: var(--grad, #0a7d71); color: #fff; box-shadow: 0 8px 20px -10px rgba(8,14,46,.6); cursor: pointer;
  }
}
@media (max-width: 820px) {
  .chat-layout.has-tray { grid-template-columns: 1fr; }
}

/* v1.7 — Download selected (above Email selected) */
.tray-dl { width: 100%; font-size: 13.5px; padding: 8px 12px; margin-bottom: 7px;
  border: 1px solid var(--teal-text, #0a7d71); color: var(--teal-text, #0a7d71); background: #fff; }
.tray-dl:disabled { opacity: .5; cursor: default; }
.lane-assistant .tray-dl { border-color: #b97e0f; color: #b97e0f; }

/* v1.8: progress bar, "find more rows", saved preferences */
.progress { position: relative; height: 6px; margin: 8px 0 4px; border-radius: 3px;
  background: rgba(127,127,127,.22); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 3px; background: #0a7d71;
  transition: width .8s ease; }
.progress.indeterminate .progress-bar { width: 35%; animation: gpi-slide 1.6s ease-in-out infinite; }
@keyframes gpi-slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.progress-info { font-size: .82em; opacity: .8; white-space: pre-line; margin-bottom: 4px; }
.continue-row { margin-top: 8px; }
.continue-btn { font-size: .9em; }
.prefs-btn { white-space: nowrap; }
.prefs-box .prefs-help { font-size: .92em; opacity: .85; margin: 0 0 8px; }
.prefs-input { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border-radius: 6px;
  border: 1px solid rgba(127,127,127,.45); resize: vertical; }
.prefs-text { white-space: pre-wrap; font-size: .92em; padding: 8px 10px; border-radius: 6px;
  background: rgba(127,127,127,.12); max-height: 50vh; overflow: auto; }
.prefs-count { font-size: .8em; opacity: .7; margin: 4px 0 0; text-align: right; }
@media (prefers-reduced-motion: reduce) { .progress.indeterminate .progress-bar { animation: none; width: 100%; opacity: .5; } }
/* v1.9: one "Remember preferences" button in the right-margin list */
.tray-prefs { display: block; width: 100%; margin: 0 0 10px; }
.prefs-both { display: block; margin: 8px 0 0; font-size: .92em; }
.prefs-saved { margin-top: 12px; border-top: 1px solid rgba(127,127,127,.25); padding-top: 8px; }
.prefs-saved summary { cursor: pointer; font-weight: 600; }
.prefs-section h4 { margin: 10px 0 4px; font-size: .95em; }
.prefs-sec-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.prefs-box { max-height: 90vh; overflow: auto; }
