/* ==========================================================================
   gridEHR — site styles
   Palette is derived from clinical chart paper: deep petrol ink, cool paper,
   a single teal used for anything actionable, amber reserved for signals.
   Edit the tokens below to restyle the whole site.
   ========================================================================== */

:root {
  --ink:        #0C1618;
  --ink-2:      #14262B;
  --ink-3:      #1D343A;
  --paper:      #F2F4F2;
  --paper-2:    #E6EBE7;
  --white:      #FFFFFF;
  --rule:       #C8D2CD;
  --rule-dark:  rgba(242, 244, 242, 0.16);
  --teal:       #0E6E62;
  --teal-lite:  #2FB39E;
  --amber:      #D98A15;
  --text:       #10201F;
  --muted:      #55665F;
  --muted-dark: #9FB3AC;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --gap: 28px;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; height: auto; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--teal-lite);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Keeps brand capitalisation intact — "gridEHR", not "GRIDEHR". */
.nocase { text-transform: none; letter-spacing: 0.04em; }

/* --- Eyebrow label ------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 18px;
}
.on-ink .eyebrow { color: var(--teal-lite); }

/* --- Signature divider: hairline carrying one vitals blip ---------------- */
.trace { color: var(--rule); line-height: 0; }
.trace svg { width: 100%; height: 24px; display: block; }
.on-ink .trace { color: var(--rule-dark); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-head {
  background: var(--ink);
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(242, 244, 242, 0.10);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { width: 26px; height: 26px; color: var(--teal-lite); flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.brand-name em { font-style: normal; font-weight: 500; color: var(--teal-lite); }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--teal-lite); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--teal-lite); }

.site-nav .nav-cta {
  background: var(--teal-lite);
  color: var(--ink);
  font-weight: 600;
  padding: 9px 17px;
  border: 0;
  border-radius: var(--radius);
}
.site-nav .nav-cta:hover { background: var(--paper); color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(242, 244, 242, 0.3);
  border-radius: var(--radius);
  width: 42px; height: 38px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--paper);
  margin: 0 auto;
  position: relative;
}
.nav-toggle-bars::before { content: ""; position: absolute; top: -6px; }
.nav-toggle-bars::after  { content: ""; position: absolute; top: 6px; }

/* ==========================================================================
   Hero — chart paper on ink, with a drawn vitals trace
   ========================================================================== */
.hero {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(47, 179, 158, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 179, 158, 0.075) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.35) 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.35) 62%, transparent 100%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  max-width: 15ch;
}
.hero h1 .accent { color: var(--teal-lite); }

.hero-lede {
  font-size: 1.16rem;
  color: #C4D2CD;
  max-width: 54ch;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--teal-lite); color: var(--ink); }
.btn-primary:hover { background: var(--paper); color: var(--ink); }
.btn-ghost { border-color: rgba(242, 244, 242, 0.32); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--teal-lite); color: var(--teal-lite); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--teal); color: var(--white); }

/* Hero card: the three portals, stated plainly */
.portal-card {
  border: 1px solid rgba(242, 244, 242, 0.16);
  border-radius: var(--radius);
  background: rgba(20, 38, 43, 0.72);
  backdrop-filter: blur(2px);
}
.portal-card-head {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(242, 244, 242, 0.14);
  color: var(--muted-dark);
}
.portal-row {
  display: flex;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid rgba(242, 244, 242, 0.09);
}
.portal-row:last-child { border-bottom: 0; }
.portal-key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-lite);
  padding-top: 3px;
  white-space: nowrap;
}
.portal-row h3 { font-size: 1rem; margin: 0 0 3px; letter-spacing: -0.01em; }
.portal-row p { margin: 0; font-size: 14px; color: #AFC0BA; line-height: 1.5; }

/* Drawn trace under the hero */
.hero-trace { position: relative; z-index: 1; margin-top: 58px; color: var(--teal-lite); }
.hero-trace svg { width: 100%; height: 60px; display: block; opacity: 0.85; }
.hero-trace path {
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw 2.6s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ==========================================================================
   Sections
   ========================================================================== */
.band { padding: 84px 0; }
.band-tight { padding: 62px 0; }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink h2, .band-ink h3 { color: var(--paper); }
.band-ink p { color: #B7C6C0; }
.band-alt { background: var(--paper-2); }

.section-head { max-width: 62ch; margin-bottom: 46px; }
.section-head h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  margin-bottom: 14px;
}
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }
.band-ink .section-head p { color: #B7C6C0; }

/* --- Feature grid ------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.feature {
  background: var(--paper);
  padding: 30px 26px 32px;
}
.band-alt .feature { background: var(--paper-2); }
.feature-icon { color: var(--teal); width: 26px; height: 26px; margin-bottom: 16px; }
.feature-icon svg { width: 100%; height: 100%; }
.feature h3 { font-size: 1.09rem; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.55; }

/* --- Two-column prose split --------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 60px;
  align-items: start;
}

.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}
.spec-list li:last-child { border-bottom: 1px solid var(--rule); }
.spec-list dt, .spec-list .k {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.band-ink .spec-list li { border-color: var(--rule-dark); }
.band-ink .spec-list .k { color: var(--muted-dark); }

/* --- Screenshot slots ---------------------------------------------------- */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 34px;
}
.shots-wide { grid-template-columns: 1fr; }

.shot { margin: 0; }
.shot-frame {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.shot-empty {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 9px;
  text-align: center;
  padding: 24px;
  background-image:
    linear-gradient(rgba(12, 22, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 22, 24, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}
.shot-empty-mark {
  width: 26px; height: 26px;
  border: 1.5px solid var(--rule);
  border-radius: 50%;
  position: relative;
}
.shot-empty-mark::before,
.shot-empty-mark::after {
  content: ""; position: absolute; background: var(--rule);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.shot-empty-mark::before { width: 12px; height: 1.5px; }
.shot-empty-mark::after  { width: 1.5px; height: 12px; }
.shot-empty-note { margin: 0; font-size: 14px; color: var(--muted); max-width: 34ch; }
.shot-empty-path {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #93A49E;
}

.shot-cap {
  font-size: 14px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  margin-top: 12px;
}

/* --- Module chips -------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 0; list-style: none; }
.chips li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
}
.band-ink .chips li { border-color: var(--rule-dark); color: var(--muted-dark); }

/* --- Callout ------------------------------------------------------------- */
.callout {
  border-left: 2px solid var(--amber);
  padding: 4px 0 4px 20px;
  color: var(--muted);
  font-size: 15px;
}
.band-ink .callout { color: var(--muted-dark); }

/* --- CTA ----------------------------------------------------------------- */
.cta { text-align: left; }
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); max-width: 20ch; }
.cta p { max-width: 56ch; }

/* ==========================================================================
   Contact form
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 64px;
  align-items: start;
}

.form-row { margin-bottom: 20px; }
.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
label .req { color: var(--amber); }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 168px; resize: vertical; line-height: 1.55; }

input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 110, 98, 0.13);
  outline: none;
}

input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #B4442E; }

.field-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* Honeypot — hidden from people, visible to bots */
.hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }

.notice {
  border: 1px solid var(--rule);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 30px;
  font-size: 15px;
}
.notice h2 { font-size: 1.1rem; margin-bottom: 5px; }
.notice p { margin: 0; }
.notice-ok   { border-left-color: var(--teal); background: rgba(14, 110, 98, 0.06); }
.notice-bad  { border-left-color: #B4442E; background: rgba(180, 68, 46, 0.05); }
.notice-bad ul { margin: 8px 0 0; padding-left: 18px; }

.contact-aside {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px 26px;
  background: var(--white);
}
.contact-aside h2 { font-size: 1.15rem; }
.contact-aside p { font-size: 15px; color: var(--muted); }
.contact-aside a { word-break: break-word; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding: 62px 0 40px;
  margin-top: 0;
}
.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 0.7fr)) minmax(0, 0.9fr);
  gap: 40px;
}
.foot-line { color: #9FB3AC; font-size: 15px; max-width: 40ch; margin: 14px 0 0; }
.foot-h {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--teal-lite);
  margin: 0 0 14px;
}
.foot-nav { display: flex; flex-direction: column; gap: 9px; }
.foot-nav a { color: var(--paper); text-decoration: none; font-size: 15px; }
.foot-nav a:hover { color: var(--teal-lite); text-decoration: underline; }
.foot-meta { color: var(--muted-dark); }
.foot-meta p { margin: 0 0 7px; }

/* --- Newsletter box in the footer --------------------------------------- */
.news { margin-top: 30px; max-width: 380px; }
.news .foot-h { margin-bottom: 6px; }
.news-blurb { color: #9FB3AC; font-size: 14px; margin: 0 0 12px; }

.news-row { display: flex; gap: 8px; }

.news-row input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(242, 244, 242, 0.06);
  border: 1px solid rgba(242, 244, 242, 0.22);
  color: var(--paper);
  font-size: 15px;
  padding: 11px 13px;
}
.news-row input[type="email"]::placeholder { color: #7B8F89; }
.news-row input[type="email"]:focus {
  border-color: var(--teal-lite);
  box-shadow: 0 0 0 3px rgba(47, 179, 158, 0.16);
}

.news-row button {
  flex: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 11px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--teal-lite);
  color: var(--ink);
  cursor: pointer;
}
.news-row button:hover:not(:disabled) { background: var(--paper); }
.news-row button:disabled { opacity: 0.6; cursor: default; }

.news-msg { margin: 10px 0 0; font-size: 14px; min-height: 1px; }
.news-msg.is-good { color: var(--teal-lite); }
.news-msg.is-bad  { color: #F0A08C; }

/* ==========================================================================
   Chat widget
   ========================================================================== */
.chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid rgba(242, 244, 242, 0.18);
  border-radius: 999px;
  padding: 12px 20px 12px 17px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(12, 22, 24, 0.28);
  order: 2;
}
.chat-launcher:hover { background: var(--teal); border-color: var(--teal); }
.chat-launcher-icon { width: 20px; height: 20px; color: var(--teal-lite); flex: none; }
.chat-launcher-icon svg { width: 100%; height: 100%; }
.chat.is-open .chat-launcher-icon { color: var(--paper); }

.chat-panel {
  order: 1;
  width: min(370px, calc(100vw - 44px));
  height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(12, 22, 24, 0.26);
}
.chat-panel[hidden] { display: none; }

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  background: var(--ink);
  color: var(--paper);
  flex: none;
}
.chat-head-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  margin: 0;
}
.chat-head-name em { font-style: normal; font-weight: 500; color: var(--teal-lite); }
.chat-head-sub { margin: 2px 0 0; font-size: 12.5px; color: #9FB3AC; }

.chat-actions { display: flex; gap: 2px; flex: none; }

.chat-act {
  background: none;
  border: 0;
  color: var(--paper);
  width: 30px; height: 30px;
  padding: 5px;
  cursor: pointer;
  border-radius: var(--radius);
  flex: none;
}
.chat-act:hover { background: rgba(242, 244, 242, 0.12); }
.chat-act svg { width: 100%; height: 100%; }

.chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background-image:
    linear-gradient(rgba(12, 22, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 22, 24, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
}

.msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg-bot {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--rule);
  border-bottom-left-radius: 3px;
  color: var(--text);
}
.msg-me {
  align-self: flex-end;
  background: var(--teal);
  color: #EAF6F3;
  border-bottom-right-radius: 3px;
}

.msg-typing { display: flex; gap: 4px; align-items: center; padding: 13px 14px; }
.msg-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: blip 1.1s infinite ease-in-out;
}
.msg-typing span:nth-child(2) { animation-delay: 0.16s; }
.msg-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes blip {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 16px 0;
  flex: none;
}
.chat-quick:empty { display: none; }

.chat-chip {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--teal);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}
.chat-chip:hover { background: var(--teal); color: var(--white); }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
  flex: none;
}
.chat-form input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  padding: 10px 12px;
}
.chat-form input[type="text"]:disabled { background: var(--paper-2); color: var(--muted); }

.chat-form button {
  flex: none;
  width: 42px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  padding: 10px;
}
.chat-form button:hover:not(:disabled) { background: var(--teal); }
.chat-form button:disabled { opacity: 0.4; cursor: default; }
.chat-form button svg { width: 100%; height: 100%; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 34px; }
  .hero { padding: 68px 0 60px; }
  .band { padding: 62px 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .chat { right: 14px; bottom: 14px; left: 14px; align-items: flex-end; }
  .chat-panel { width: 100%; height: min(76vh, 540px); }
  .chat-launcher-text { display: none; }
  .chat-launcher { padding: 14px; border-radius: 50%; }
  .chat.is-open .chat-launcher { display: none; }
  .news { max-width: none; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 22px;
    border-bottom: 1px solid rgba(242, 244, 242, 0.12);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid rgba(242, 244, 242, 0.08); }
  .site-nav a[aria-current="page"] { color: var(--teal-lite); }
  .site-nav .nav-cta { margin-top: 14px; text-align: center; border-bottom: 0; }
  .head-inner { position: relative; }
  .form-row-split { grid-template-columns: 1fr; gap: 20px; }
  .spec-list li { grid-template-columns: 1fr; gap: 4px; }
  .foot-inner { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-trace path { animation: none; stroke-dashoffset: 0; }
  .msg-typing span { animation: none; opacity: 0.5; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* 3.0: portal sign-in links on the single domain (spec D1) */
.site-nav .nav-demo { background: transparent; color: inherit; border: 1px solid currentColor; opacity: .85; margin-right: 6px; }
.site-nav .nav-demo:hover { opacity: 1; }
