/* EnSome Services — shared styles
   Display: Neue Haas Grotesk Display (licensed webfont not yet embedded — falls back to Helvetica Neue / Inter Tight)
   Body: Source Serif 4 */

:root {
  --primary: #D4500A;
  --primary-dark: #B04208;
  --fg: #1A1410;
  --surface: #FAF8F4;
  --surface-alt: #F0EDE6;
  --muted: #6B5E52;
  --border: #D9D3C9;

  --display: "neue-haas-grotesk-display", "Neue Haas Grotesk Display Pro", "Helvetica Neue", "Inter Tight", Helvetica, Arial, sans-serif;
  --body: "Source Serif 4", Georgia, serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1240px;
  --measure: 65ch;
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--fg);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  font-weight: 400;
}

@media (max-width: 720px) {
  body { font-size: 17.5px; }
}

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

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

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

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--fg); color: var(--surface); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Type ---------- */

h1, h2, h3, h4, .display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0;
}

h1 { font-size: clamp(44px, 7.2vw, 96px); letter-spacing: -0.005em; }
h2 { font-size: clamp(34px, 4.6vw, 60px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; }
h4 { font-size: 18px; line-height: 1.25; }

p { margin: 0 0 1em; max-width: var(--measure); }

.eyebrow, .label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 20px;
}
.label.muted { color: var(--muted); }

.lead { font-size: clamp(20px, 1.9vw, 24px); line-height: 1.5; }
.muted { color: var(--muted); }

/* ---------- Layout ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: clamp(72px, 10vw, 140px) 0; }
section.alt { background: var(--surface-alt); }
section + section:not(.alt) { border-top: 1px solid var(--border); }
section.alt + section { border-top: none; }

.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.split.reverse { grid-template-columns: 7fr 5fr; }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
}

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { margin-bottom: 20px; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 24px;
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 19px;
  letter-spacing: 0.04em; text-decoration: none; white-space: nowrap;
}
.brand span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) {
  font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.06em; text-decoration: none;
}
.nav a[aria-current="page"] { color: var(--primary); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  width: 44px; height: 44px; cursor: pointer; color: var(--fg);
}
.nav-toggle svg { display: block; margin: auto; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 24px;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 17px; }
  .nav .btn { margin-top: 20px; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.06em;
  padding: 15px 26px;
  border: 1px solid var(--primary);
  background: var(--primary); color: #fff;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--surface); }
.btn.small { padding: 11px 18px; font-size: 14px; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.text-link {
  font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.04em;
  text-decoration: none; border-bottom: 1px solid var(--primary); padding-bottom: 3px;
}
.text-link::after { content: " →"; color: var(--primary); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(56px, 8vw, 112px); }
.hero-grid {
  display: grid; grid-template-columns: 3fr 2fr;
  gap: clamp(32px, 5vw, 80px); align-items: center;
}
.hero h1 { margin-bottom: 32px; }
.hero .audience {
  border-left: 2px solid var(--primary);
  padding-left: 20px; color: var(--muted); font-size: 18px; margin-top: 28px;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.flow-illustration {
  border: 1px solid var(--border); background: var(--surface-alt);
  padding: clamp(28px, 3.5vw, 48px);
}
.flow-illustration svg { width: 100%; height: auto; display: block; }
.flow-illustration figcaption { font-size: 14px; color: var(--muted); margin-top: 16px; }

/* ---------- Photo placeholder ---------- */

.photo {
  aspect-ratio: 4 / 5; background: var(--surface-alt);
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.wide { aspect-ratio: 3 / 2; }
.photo.placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border-style: dashed; color: var(--muted); font-size: 15px; padding: 24px;
}

/* Visible note for content still to be supplied — remove before launch */
.todo {
  background: #FFF4E5; border: 1px dashed var(--primary);
  padding: 2px 6px; font-size: 0.9em; color: var(--fg);
}
div.todo, p.todo { display: block; padding: 12px 16px; margin: 0 0 1em; }

/* ---------- Case examples ---------- */

.case { padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--fg); }
.case:last-child { padding-bottom: 0; }
.case-head { margin-bottom: 32px; }
.case-head h3 { font-size: clamp(28px, 3vw, 40px); margin-top: 8px; }
.case dl { margin: 0; display: grid; grid-template-columns: 200px 1fr; }
.case dt, .case dd { padding: 16px 0; border-bottom: 1px solid var(--border); margin: 0; }
.case dt {
  font-family: var(--display); font-weight: 700; font-size: 14px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 20px;
}
.case dd p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .case dl { grid-template-columns: 1fr; }
  .case dt { border-bottom: none; padding-bottom: 0; }
}

/* Workflow demo styles live at the end of this file */

/* ---------- Offer / deliverables ---------- */

.checklist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--fg); }
.checklist li {
  padding: 16px 0 16px 36px; border-bottom: 1px solid var(--border); position: relative;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 26px;
  width: 16px; height: 2px; background: var(--primary);
}

/* ---------- Process steps ---------- */

.process { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--fg); }
.process > div { padding: 28px 28px 0 0; }
.process > div + div { border-left: 1px solid var(--border); padding-left: 28px; }
.process .num { font-family: var(--display); font-weight: 700; color: var(--primary); font-size: 14px; letter-spacing: 0.12em; }
.process h3 { margin: 12px 0 14px; }
.process p { font-size: 17px; margin: 0; }
@media (max-width: 960px) {
  .process { grid-template-columns: 1fr 1fr; }
  .process > div:nth-child(3) { border-left: none; padding-left: 0; }
  .process > div { padding-bottom: 32px; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
  .process > div, .process > div + div { border-left: none; padding-left: 0; border-bottom: 1px solid var(--border); }
}

/* ---------- Closing CTA ---------- */

.closing { background: var(--fg); color: var(--surface); }
.closing h2 { font-size: clamp(44px, 7vw, 92px); margin-bottom: 28px; }
.closing p { color: #D9D3C9; }
.closing .eyebrow { color: var(--primary); }

/* ---------- Contact ---------- */

.form { max-width: 620px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; margin-bottom: 8px; }
.field label small { font-family: var(--body); font-weight: 400; color: var(--muted); letter-spacing: 0; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--border); background: #fff;
  font: inherit; font-size: 18px; color: var(--fg); border-radius: 0;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.form-msg { margin-top: 16px; }
.form-msg.error { color: #B42318; }
.form-done { display: none; border-top: 3px solid var(--primary); padding-top: 28px; }
.form-done:focus { outline: none; }
.sent .form { display: none; }
.sent .form-done { display: block; }

.aside-box { border-top: 1px solid var(--fg); padding-top: 24px; }
.aside-box + .aside-box { margin-top: 40px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); padding: 48px 0; font-size: 16px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: baseline; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { text-decoration: none; }

/* ---------- Nav dropdown ---------- */

.nav-item { position: relative; display: flex; align-items: center; gap: 2px; }
.submenu-toggle {
  background: none; border: none; cursor: pointer; color: var(--fg);
  width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
}
.submenu-toggle svg { transition: transform 0.2s; }
.nav-item.open .submenu-toggle svg { transform: rotate(180deg); }

.submenu {
  position: absolute; top: calc(100% + 22px); left: -20px; width: 320px;
  background: var(--surface); border: 1px solid var(--fg);
  box-shadow: 0 18px 40px rgba(26, 20, 16, 0.12);
  padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
/* hover bridge so the menu doesn't close while the pointer crosses the gap */
.submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; }
.nav-item.open .submenu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 761px) {
  .nav-item:hover .submenu { opacity: 1; visibility: visible; transform: none; }
  .nav-item:hover .submenu-toggle svg { transform: rotate(180deg); }
}
.submenu a {
  display: block; padding: 12px 20px; text-decoration: none;
  border-left: 3px solid transparent;
}
.submenu a strong { display: block; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.submenu a span { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.submenu a:hover, .submenu a:focus-visible { background: var(--surface-alt); border-left-color: var(--primary); color: var(--fg); outline: none; }

@media (max-width: 760px) {
  .nav { max-height: calc(100vh - 76px); overflow-y: auto; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--border); }
  .nav-item > a { flex: 1; border-bottom: none !important; }
  .submenu-toggle { width: 44px; height: 44px; border-left: 1px solid var(--border); }
  .submenu {
    position: static; width: 100%; flex-basis: 100%; box-shadow: none; border: none;
    border-top: 1px solid var(--border); padding: 4px 0 12px;
    display: none; opacity: 1; visibility: visible; transform: none;
  }
  .submenu::before { display: none; }
  .nav-item.open .submenu { display: block; }
  .submenu a { padding: 10px 0 10px 16px; border-bottom: none !important; }
}

/* ---------- Accordions (native <details>) ---------- */

/* Smooth open/close where supported; instant elsewhere */
:root { interpolate-size: allow-keywords; }
details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
}
details[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) {
  details::details-content { transition: none; }
}

summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

.acc-icon {
  position: relative; width: 22px; height: 22px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 50%;
  transition: background 0.2s, border-color 0.2s, transform 0.25s;
}
.acc-icon::before, .acc-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 10px; height: 1.5px; background: currentColor;
  transform: translate(-50%, -50%);
}
.acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.25s; }
details[open] > summary .acc-icon { background: var(--primary); border-color: var(--primary); color: #fff; }
details[open] > summary .acc-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
summary:hover .acc-icon { border-color: var(--fg); }

.acc-group { border-top: 1px solid var(--fg); }
.acc { border-bottom: 1px solid var(--border); }
.acc > summary {
  display: flex; align-items: center; gap: 20px; padding: 24px 0;
}
.acc > summary:hover .acc-title strong { color: var(--primary); }
.acc-num {
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.12em; color: var(--primary); width: 28px; flex-shrink: 0;
}
.acc-title { flex: 1; min-width: 0; }
.acc-title strong {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: 0.01em;
  transition: color 0.15s;
}
.acc-title > span { display: block; color: var(--muted); font-size: 17px; margin-top: 4px; }
.acc-body { padding: 0 42px 28px 48px; }
.acc-body p:last-child { margin-bottom: 0; }
.acc .example { font-style: italic; border-left: 2px solid var(--primary); padding-left: 16px; }
.label.inline { display: block; margin: 0 0 4px; font-size: 12px; }

.acc-group.compact .acc > summary { padding: 16px 0; }
.acc-group.compact .acc-title strong { font-size: 19px; font-family: var(--body); font-weight: 600; letter-spacing: 0; }
.acc-group.compact .acc-body { padding: 0 42px 20px 0; font-size: 17px; }

@media (max-width: 720px) {
  .acc-body { padding-left: 0; padding-right: 0; }
  .acc-num { display: none; }
}

.section-head.sticky { position: sticky; top: 116px; }
@media (max-width: 860px) { .section-head.sticky { position: static; } }

.expand-all {
  background: none; border: none; padding: 0; margin-left: 12px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary); text-decoration: underline; text-underline-offset: 3px;
}
.expand-all:hover { color: var(--primary-dark); }

/* ---------- Case summaries ---------- */

.case-situation { max-width: var(--measure); margin-top: 16px; }
.case-situation p { margin: 0; }
.case-more > summary {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 8px; padding: 8px 0;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em;
}
.case-more > summary:hover { color: var(--primary); }
.case-more .more-open, .case-more[open] .more-closed { display: none; }
.case-more[open] .more-open { display: inline; }
.case-more dl { margin-top: 20px; border-top: 1px solid var(--border); }
.case-head { margin-bottom: 0; }

/* ---------- Services ---------- */

.services-bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 16px;
}
.services-bar p { margin: 0; font-size: 17px; }

details.service { border-top: 1px solid var(--fg); scroll-margin-top: 96px; }
details.service:last-of-type { border-bottom: 1px solid var(--fg); }
details.service > summary {
  display: grid; grid-template-columns: minmax(140px, 1fr) 2fr auto; gap: clamp(20px, 4vw, 64px);
  align-items: start; padding: 40px 0;
}
.service-label { margin: 6px 0 0; }
.service-title .h2 {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; letter-spacing: 0.01em;
  transition: color 0.15s;
}
details.service > summary:hover .h2 { color: var(--primary); }
.service-title .when { display: block; color: var(--muted); font-size: 19px; margin-top: 10px; max-width: var(--measure); }
details.service .acc-icon { width: 34px; height: 34px; margin-top: 4px; }
details.service .acc-icon::before, details.service .acc-icon::after { width: 14px; }
.service-body {
  padding: 0 0 48px calc((100% - 34px - 2 * clamp(20px, 4vw, 64px)) / 3 + clamp(20px, 4vw, 64px));
}
.service-body .checklist { margin-top: 16px; max-width: var(--measure); }
.service-cta { margin-top: 28px; }
@media (max-width: 860px) {
  details.service > summary { grid-template-columns: 1fr auto; padding: 28px 0; }
  .service-label { grid-column: 1 / -1; margin: 0; }
  .service-body { padding-left: 0; }
}

.expand-all { white-space: nowrap; }


section[id] { scroll-margin-top: 76px; }

/* ---------- Price ---------- */

.price { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 0; }
.price span {
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.price strong { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 4vw, 48px); line-height: 1; color: var(--primary); }
.price.small { margin-top: 14px; }
.price.small strong { font-size: 24px; }

/* ---------- Workflow demo: mock app ---------- */

.demo-label {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--border); padding: 6px 10px; color: var(--muted); margin-bottom: 24px;
}

.wf {
  --app-bg: #FFFFFF;
  --app-line: #E7E2DA;
  --app-sub: #8A7E72;
  --ok: #2F7A4F;
  --app-font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start;
}

.app {
  position: relative; overflow: hidden;
  background: var(--app-bg); border: 1px solid var(--fg); border-radius: 10px;
  box-shadow: 0 1px 0 rgba(26,20,16,0.04), 0 24px 60px -20px rgba(26,20,16,0.28);
  font-family: var(--app-font); font-size: 14px; line-height: 1.45; color: var(--fg);
}

/* top bar */
.app-top {
  display: flex; align-items: center; gap: 14px;
  height: 48px; padding: 0 16px; background: var(--fg); color: #EDE7DE;
}
.app-logo {
  width: 26px; height: 26px; border-radius: 6px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 11px; letter-spacing: 0.04em;
}
.app-crumb { font-size: 13px; color: #A99D90; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-crumb span { margin: 0 4px; }
.app-crumb strong { color: #fff; font-weight: 600; }
.app-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; width: 200px; border-radius: 6px;
  background: rgba(255,255,255,0.08); color: #A99D90; font-size: 13px;
}

.avatar {
  --h: 20;
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center;
  background: hsl(var(--h) 45% 88%); color: hsl(var(--h) 45% 28%);
  font-weight: 700; font-size: 12px; letter-spacing: 0.02em;
}
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.app-top .avatar { background: #3A302A; color: #EDE7DE; }

.app-main { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 540px; }

/* sidebar */
.app-side { background: #F7F4EF; border-right: 1px solid var(--app-line); padding: 18px 10px; }
.app-side-label {
  margin: 0 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--app-sub);
}
.app-tabs { display: flex; flex-direction: column; gap: 2px; }
.app-tabs button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px; border: none; border-radius: 7px; background: none; cursor: pointer;
  text-align: left; font: inherit; color: var(--fg); transition: background 0.15s;
}
.app-tabs button:hover { background: #EFEAE2; }
.app-tabs button[aria-selected="true"] { background: var(--app-bg); box-shadow: 0 0 0 1px var(--app-line), 0 1px 2px rgba(26,20,16,0.06); }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; background: #CFC6BA; flex-shrink: 0; }
.app-tabs button[aria-selected="true"] .tab-dot { background: var(--primary); }
.tab-text { flex: 1; min-width: 0; }
.tab-text strong { display: block; font-weight: 600; font-size: 13.5px; }
.tab-text span { display: block; font-size: 12px; color: var(--app-sub); }
.tab-count {
  font-size: 11px; font-weight: 600; color: var(--app-sub);
  background: #EDE7DE; border-radius: 10px; padding: 1px 7px;
}

/* record */
.app-content { padding: 22px 24px 0; display: flex; flex-direction: column; min-width: 0; }
.rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rec-id { margin: 0 0 4px; font-size: 12px; color: var(--app-sub); max-width: none; }
.rec-title { font-family: var(--app-font); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: #FBE9DF; color: #9A3A06;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.done { background: #E3F1E8; color: var(--ok); }
.pill.done::before { display: none; }

/* stages */
.stages { display: flex; list-style: none; margin: 20px 0; padding: 0; gap: 6px; }
.stages li { flex: 1; min-width: 0; }
.stages button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 8px; min-height: 46px; border-radius: 7px; border: 1px solid var(--app-line);
  background: var(--app-bg); font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--app-sub); cursor: pointer; text-align: left; transition: border-color 0.2s, background 0.2s;
}
.stages button:disabled { cursor: default; }
.stage-name { line-height: 1.2; }
.stage-mark {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 11px;
  border: 1.5px solid currentColor;
}
.stages .done button { color: var(--fg); background: #F7F4EF; }
.stages .done button:hover { border-color: var(--fg); }
.stages .done .stage-mark { background: var(--fg); border-color: var(--fg); color: #fff; }
.stages .current button { border-color: var(--primary); color: var(--primary); background: #FFF7F2; box-shadow: 0 0 0 3px rgba(212,80,10,0.1); }
.stages .current .stage-mark { background: var(--primary); border-color: var(--primary); color: #fff; }

/* panels */
.rec-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; flex: 1; }
.panel { border: 1px solid var(--app-line); border-radius: 8px; padding: 16px; min-width: 0; }
.panel-label {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 0 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--app-sub); max-width: none;
}
.panel-count { letter-spacing: 0; text-transform: none; font-size: 12px; transition: color 0.2s; }
.panel-count.ok { color: var(--ok); }

.fields { list-style: none; margin: 0; padding: 0; }
.fields li {
  display: grid; grid-template-columns: 22px 1fr; column-gap: 8px;
  padding: 10px 0; border-top: 1px solid var(--app-line);
}
.fields li:first-child { border-top: none; padding-top: 0; }
.field-check {
  grid-row: span 2; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px;
  border: 1.5px solid #CFC6BA; color: transparent; display: grid; place-items: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.field-label { font-size: 12px; color: var(--app-sub); }
.field-value { position: relative; min-height: 20px; font-weight: 500; }
.field-value .val { opacity: 0; transition: opacity 0.25s; }
.skeleton {
  position: absolute; left: 0; top: 4px; height: 12px; width: 70%; border-radius: 4px;
  background: linear-gradient(90deg, #F0EBE4 0%, #E6DFD5 50%, #F0EBE4 100%); background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite; transition: opacity 0.2s;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.fields li.filled .field-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.fields li.filled .val { opacity: 1; }
.fields li.filled .skeleton { opacity: 0; }

.owner { display: flex; align-items: center; gap: 10px; }
.owner strong { display: block; font-weight: 600; }
.owner div span { display: block; font-size: 12px; color: var(--app-sub); }

.feed { list-style: none; margin: 0; padding: 0; max-height: 210px; overflow-y: auto; }
.feed li { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; }
.feed li + li { border-top: 1px dashed var(--app-line); }
.feed li strong { font-weight: 600; }
.feed time { display: block; font-size: 11.5px; color: var(--app-sub); margin-top: 1px; }
.feed .empty { color: var(--app-sub); font-size: 13px; }
.feed li.new { animation: feedIn 0.45s ease; background: linear-gradient(90deg, #FFF4EC, transparent); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.complete { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; }
.complete-mark {
  width: 40px; height: 40px; border-radius: 50%; background: #E3F1E8; color: var(--ok);
  display: grid; place-items: center; flex-shrink: 0; animation: pop 0.4s ease;
}
.complete-mark svg { width: 20px; height: 20px; }
.complete p { margin: 0; font-size: 14px; }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }

/* footer action bar */
.rec-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 18px -24px 0; padding: 14px 24px; border-top: 1px solid var(--app-line); background: #FBF9F6;
}
.rec-foot p { margin: 0; font-size: 13px; max-width: none; }
.foot-label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--app-sub); margin-bottom: 2px;
}
.app-btn {
  flex-shrink: 0; padding: 10px 18px; border: none; border-radius: 7px;
  background: var(--primary); color: #fff; font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background 0.15s, transform 0.1s, opacity 0.2s;
  box-shadow: 0 1px 2px rgba(26,20,16,0.2);
}
.app-btn:hover:not(:disabled) { background: var(--primary-dark); }
.app-btn:active:not(:disabled) { transform: translateY(1px); }
.app-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.app-btn:not(:disabled):not([data-restart]) { animation: ready 1.6s ease 1; }
@keyframes ready { 0% { box-shadow: 0 0 0 0 rgba(212,80,10,0.45); } 100% { box-shadow: 0 0 0 12px rgba(212,80,10,0); } }

/* toast */
.toast {
  position: absolute; right: 16px; bottom: 76px; z-index: 2;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 10px 14px; border-radius: 8px; background: var(--fg); color: #fff; font-size: 13px;
  box-shadow: 0 10px 30px rgba(26,20,16,0.3);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast svg { color: #7FD3A0; flex-shrink: 0; }
.toast.show { opacity: 1; transform: none; }

/* explanation panel */
.wf-notes { position: sticky; top: 100px; border-top: 3px solid var(--primary); padding-top: 20px; }
.notes-kicker {
  margin: 0 0 10px; font-family: var(--display); font-weight: 700; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary);
}
.notes-progress { display: flex; gap: 4px; margin-bottom: 20px; }
.notes-progress span { flex: 1; height: 3px; background: var(--border); transition: background 0.3s; }
.notes-progress .done { background: var(--fg); }
.notes-progress .current { background: var(--primary); }
.notes-problem { font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.notes-problem span, .notes-label {
  display: block; font-family: var(--display); font-weight: 700; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.notes-title { font-size: 28px; margin-bottom: 16px; }
.notes-text { font-size: 17px; }
.notes-block { border-top: 1px solid var(--border); padding: 14px 0; }
.notes-block p { margin: 0; font-size: 17px; }
.notes-block .notes-label { font-size: 11px; margin-bottom: 4px; }
.notes-block.solved p:not(.notes-label) { color: var(--primary); }
.notes-controls { display: flex; gap: 10px; margin-top: 12px; }
.notes-controls button:disabled { opacity: 0.35; cursor: default; }
.notes-hint { font-size: 14px; color: var(--muted); margin-top: 14px; font-style: italic; }

@media (max-width: 1100px) {
  .wf { grid-template-columns: 1fr; }
  .wf-notes { position: static; }
}
@media (max-width: 760px) {
  .app-search { display: none; }
  .app-top .avatar { margin-left: auto; }
  .app-main { grid-template-columns: 1fr; min-height: 0; }
  .app-side { border-right: none; border-bottom: 1px solid var(--app-line); padding: 10px; }
  .app-side-label { display: none; }
  .app-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .app-tabs button { flex: 0 0 auto; width: auto; }
  .tab-text span, .tab-count { display: none; }
  .app-content { padding: 18px 16px 0; }
  .rec-head { flex-direction: column; gap: 10px; }
  .stages { display: grid; grid-template-columns: 1fr 1fr; }
  .rec-grid { grid-template-columns: 1fr; }
  .rec-foot { margin: 16px -16px 0; padding: 14px 16px; flex-direction: column; align-items: stretch; }
  .app-btn { padding: 12px 18px; }
  .toast { left: 16px; right: 16px; bottom: 120px; }
}

/* ---------- Quick audit CTA ---------- */

.audit-cta { background: var(--fg); color: var(--surface); }
.audit-cta + section { border-top: none; }
.audit-cta-grid {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: end;
}
.audit-cta h2 { font-size: clamp(40px, 5.6vw, 76px); }
.audit-cta .lead { color: #D9D3C9; }
.audit-cta .actions { margin-top: 28px; }
@media (max-width: 860px) { .audit-cta-grid { grid-template-columns: 1fr; } }

/* ---------- Workflow assessment page ---------- */

.as-page { padding-top: clamp(40px, 6vw, 80px); min-height: 70vh; }
#assessment h1:focus, #assessment h2:focus { outline: none; }
.as-note { font-size: 16px; color: var(--muted); }
.as-link {
  background: none; border: none; padding: 0; cursor: pointer; color: var(--fg);
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.04em;
}
.as-link:hover { color: var(--primary); }

/* start */
.as-start { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.as-start h1 { margin-bottom: 28px; }
.as-facts { list-style: none; padding: 0; margin: 28px 0 20px; border-top: 1px solid var(--fg); max-width: var(--measure); }
.as-facts li { padding: 12px 0 12px 28px; border-bottom: 1px solid var(--border); position: relative; font-size: 17px; }
.as-facts li::before { content: ""; position: absolute; left: 0; top: 23px; width: 14px; height: 2px; background: var(--primary); }
.as-setup { position: sticky; top: 100px; }
@media (max-width: 900px) {
  .as-start { grid-template-columns: 1fr; }
  .as-setup { position: static; }
}

.as-industries { border: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.as-industries legend {
  font-family: var(--display); font-weight: 700; font-size: 22px; margin-bottom: 14px; padding: 0;
}
.as-card, .as-option, .as-na {
  position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 14px 16px; border: 1px solid var(--border); background: #fff;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.as-card input, .as-option input, .as-na input { position: absolute; opacity: 0; pointer-events: none; }
.as-card:hover, .as-option:hover, .as-na:hover { border-color: var(--fg); }
.as-card:has(input:focus-visible), .as-option:has(input:focus-visible), .as-na:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.as-card.selected, .as-option.selected, .as-na.selected { border-color: var(--primary); background: #FFF4EC; box-shadow: inset 3px 0 0 var(--primary); }
.as-radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0; position: relative; }
.as-card.selected .as-radio { border-color: var(--primary); }
.as-card.selected .as-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.as-card { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.02em; }
.as-begin { width: 100%; text-align: center; }
.as-begin:disabled { opacity: 0.4; cursor: not-allowed; }
.as-setup .as-note { margin-top: 10px; }

.as-resume, .as-warning { border: 1px solid var(--fg); padding: 18px 20px; margin-bottom: 24px; background: var(--surface-alt); }
.as-resume p, .as-warning p { font-size: 17px; margin-bottom: 14px; }
.as-warning { border-color: var(--primary); background: #FFF4EC; }
.as-warning-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* question */
.as-q { max-width: 760px; margin: 0 auto; }
.as-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.as-industry { font-size: 15px; color: var(--muted); }
.as-industry .as-link { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.as-count { font-size: 16px; margin-bottom: 10px; }
.as-count strong { font-family: var(--display); font-weight: 700; letter-spacing: 0.02em; }
.as-bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-bottom: 36px; }
.as-bars span { height: 4px; background: var(--border); transition: background 0.3s; }
.as-bars .done { background: var(--fg); }
.as-bars .current { background: var(--primary); }
.as-bars .skip { background: repeating-linear-gradient(90deg, var(--border) 0 4px, transparent 4px 7px); }
.as-cat {
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 12px;
}
.as-cat span { color: var(--muted); }
.as-question { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; margin-bottom: 28px; }

.as-options { display: grid; gap: 10px; transition: opacity 0.2s; }
.as-options.is-skipped { opacity: 0.4; }
.as-option { align-items: flex-start; font-size: 17px; line-height: 1.45; }
.as-key {
  width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center;
  border: 1px solid var(--border); font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--muted);
}
.as-option.selected .as-key { background: var(--primary); border-color: var(--primary); color: #fff; }
.as-text { padding-top: 2px; }
.as-option.unknown { margin-top: 6px; background: transparent; border-style: dashed; }
.as-option.unknown.selected { background: #FFF4EC; border-style: solid; }

.as-na { margin-top: 16px; background: transparent; font-size: 16px; color: var(--muted); border-color: transparent; padding-left: 0; }
.as-na:hover { border-color: transparent; color: var(--fg); }
.as-na.selected { color: var(--fg); padding-left: 16px; }
.as-na strong { color: var(--fg); font-weight: 600; }
.as-check { width: 18px; height: 18px; border: 1.5px solid var(--border); flex-shrink: 0; position: relative; background: #fff; }
.as-na.selected .as-check { background: var(--primary); border-color: var(--primary); }
.as-na.selected .as-check::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.as-actions { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.as-actions .btn:disabled { opacity: 0.4; cursor: not-allowed; }
.as-hint { font-size: 15px; color: var(--muted); }

/* results */
.as-results { max-width: 900px; }
.as-results-head { margin-bottom: 40px; }
.as-results-head h1 { margin-bottom: 20px; }
.as-priority { border-top: 2px solid var(--fg); padding: 32px 0 40px; }
.as-rank {
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 8px;
}
.as-priority h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 8px; }
.as-basis { font-size: 15px; color: var(--muted); }
.as-priority dl { display: grid; grid-template-columns: 180px 1fr; margin: 24px 0 0; }
.as-priority dt, .as-priority dd { margin: 0; padding: 14px 0; border-top: 1px solid var(--border); }
.as-priority dt {
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); padding-top: 18px;
}
.as-priority dd { font-size: 18px; max-width: var(--measure); }
.as-priority .as-step { font-weight: 600; }
.as-mode { display: inline-block; margin-top: 6px; font-size: 16px; color: var(--muted); font-style: italic; }
@media (max-width: 720px) {
  .as-priority dl { grid-template-columns: 1fr; }
  .as-priority dt { border-top: none; padding-bottom: 0; }
  .as-priority dd { padding-top: 4px; }
  .as-priority dt:first-child { border-top: 1px solid var(--border); }
}

.as-empty { border-top: 2px solid var(--fg); padding: 32px 0; }
.as-empty h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }
.as-section { border-top: 1px solid var(--fg); padding: 32px 0; margin-top: 16px; }
.as-section h3 { margin-bottom: 10px; }
.as-list { list-style: none; padding: 0; margin: 16px 0 0; }
.as-list li { padding: 16px 0; border-top: 1px solid var(--border); }
.as-list p { margin: 6px 0 0; font-size: 17px; }
.as-mini {
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary); margin-right: 6px;
}

.as-next {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px);
  background: var(--surface-alt); border: 1px solid var(--border); padding: clamp(24px, 4vw, 40px); margin-top: 32px;
}
.as-next h3 { margin-bottom: 12px; }
.as-next .actions { margin-top: 20px; }
.as-send { display: grid; gap: 8px; align-content: start; }
.as-send-title { font-weight: 600; margin: 0; }
.as-send-title span { font-weight: 400; color: var(--muted); }
.as-send .as-note { margin: 0 0 6px; }
.as-send input { padding: 12px 14px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 16px; min-width: 0; }
.as-send input:focus { outline: none; border-color: var(--fg); }
.as-msg { margin: 4px 0 0; font-size: 15px; }
.as-msg.error { color: #B42318; }
@media (max-width: 760px) { .as-next { grid-template-columns: 1fr; } }

.as-restart { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; }

/* ---------- Admin: assessment results ---------- */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.admin-tag { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.admin { padding-top: 40px; padding-bottom: 80px; font-size: 16px; }
.admin h1 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 8px; }
.admin-login { max-width: 420px; margin: 8vh auto; display: grid; gap: 12px; }
.admin-login input { padding: 14px 16px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 17px; }
.admin-login input:focus { outline: none; border-color: var(--fg); }
.admin-error { color: #B42318; min-height: 1.4em; margin: 0; }

.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.admin-head p { margin: 0; font-size: 15px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--fg); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.admin-stat { padding: 18px 20px 18px 0; }
.admin-stat + .admin-stat { border-left: 1px solid var(--border); padding-left: 20px; }
.admin-stat span { display: block; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.admin-stat strong { display: block; font-family: var(--display); font-size: clamp(22px, 2.6vw, 34px); line-height: 1.1; margin-top: 6px; }
@media (max-width: 760px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-stat:nth-child(3) { border-left: none; padding-left: 0; }
}

.admin-breakdowns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
@media (max-width: 960px) { .admin-breakdowns { grid-template-columns: 1fr; } }
.admin-card { border: 1px solid var(--border); background: #fff; padding: 18px 20px; }
.admin-card h2 { font-family: var(--display); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.admin-card p { margin: 0; font-size: 15px; }
.admin-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-bars li { display: grid; grid-template-columns: 140px 1fr 32px; gap: 10px; align-items: center; font-size: 14px; }
.admin-bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-bar { height: 8px; background: var(--surface-alt); }
.admin-bar span { display: block; height: 100%; background: var(--primary); }
.admin-bar-n { text-align: right; font-weight: 600; }

.admin-filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 12px; }
.admin-filters label { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; }
.admin-filters select, .admin-filters input[type="search"] {
  font: inherit; font-family: var(--body); font-weight: 400; font-size: 15px; letter-spacing: 0;
  padding: 8px 10px; border: 1px solid var(--border); background: #fff; color: var(--fg);
}
.admin-search { margin-left: auto; }
.admin-search input { width: 260px; max-width: 100%; }
.admin-check input { accent-color: var(--primary); width: 16px; height: 16px; }
.admin-count { font-size: 14px; margin: 0 0 8px; }

.admin-table-wrap { border-top: 2px solid var(--fg); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin-table th {
  text-align: left; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); padding: 12px 12px 10px 0; border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-row:hover td, .admin-row.open td { background: var(--surface-alt); }
.admin-row td:first-child { padding-left: 8px; white-space: nowrap; }
.admin-empty { padding: 32px 8px !important; }
.admin-pill { display: inline-block; margin: 0 6px 6px 0; padding: 3px 8px; border: 1px solid var(--border); background: #fff; font-size: 13px; white-space: nowrap; }
.admin-pill b { color: var(--primary); margin-left: 4px; }

.admin-detail td { background: #fff; padding: 24px 20px; }
.admin-detail-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; }
.admin-detail h3 { font-family: var(--display); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.admin-detail h3:not(:first-child) { margin-top: 20px; }
.admin-detail p { font-size: 15px; }
.admin-plist { padding-left: 0; list-style: none; margin: 0; }
.admin-plist li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.admin-meta { font-size: 13px; margin-top: 24px; }
.admin-answers { list-style: none; padding: 0; margin: 0; }
.admin-answers li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.admin-answers p { margin: 2px 0 0; font-size: 15px; max-width: none; }
.admin-qn { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.admin-a { color: var(--fg); }
.admin-key { display: inline-grid; place-items: center; width: 20px; height: 20px; font-family: var(--display); font-size: 11px; color: #fff; margin-right: 4px; }
.admin-key.kA { background: #2F7A4F; } .admin-key.kB { background: #8A7E2F; } .admin-key.kC { background: #C46A1A; } .admin-key.kD { background: #B42318; }
.admin-unknown { font-style: italic; color: var(--primary); }

@media (max-width: 760px) {
  .admin-search { margin-left: 0; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-row { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .admin-table td { border: none; padding: 4px 8px; }
  .admin-table td[data-label]::before { content: attr(data-label); display: block; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
  .admin-detail-grid { grid-template-columns: 1fr; }
}

[hidden] { display: none !important; }

/* ---------- About: areas of experience ---------- */

.experience { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--fg); }
.experience li { padding: 20px 0; border-bottom: 1px solid var(--border); }
.experience h3 { font-size: 22px; margin-bottom: 6px; }
.experience p { font-size: 17px; margin: 0; }

/* ---------- Operations Review details ---------- */

.facts { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.04em;
  padding: 6px 12px; border: 1px solid var(--border); background: var(--surface);
}
.small-note { font-size: 15px; margin-top: 16px; }
.service-body h3.sub {
  font-family: var(--display); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 32px 0 4px;
}
.service-body .checklist li strong { font-weight: 600; }
.service-body .actions { margin-top: 32px; }
.topic-note {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.04em;
  padding: 8px 14px; border-left: 3px solid var(--primary); background: var(--surface-alt); margin-bottom: 24px;
}

/* ---------- Contact: process choices ---------- */

.choices { border: none; padding: 0; margin: 0 0 22px; }
.choices legend { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; margin-bottom: 10px; padding: 0; }
.choices legend small { display: block; font-family: var(--body); font-weight: 400; color: var(--muted); letter-spacing: 0; font-size: 15px; margin-top: 2px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 13px 14px; border: 1px solid var(--border); background: #fff; font-size: 16px; line-height: 1.35;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.choice:hover { border-color: var(--fg); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.choice-box { width: 18px; height: 18px; flex-shrink: 0; border: 1.5px solid var(--border); background: #fff; position: relative; }
.choice:has(input:checked) { border-color: var(--primary); background: #FFF4EC; box-shadow: inset 3px 0 0 var(--primary); }
.choice:has(input:checked) .choice-box { background: var(--primary); border-color: var(--primary); }
.choice:has(input:checked) .choice-box::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.other-field { margin: 12px 0 0; }
/* choice cards sit inside .field, so override the generic .field label styles */
.field.choices .choice {
  display: flex; margin: 0; font-family: var(--body); font-weight: 400; font-size: 16px; letter-spacing: 0;
}

/* ---------- Services: collapsible sub-sections ---------- */

.sub-acc { border-top: 1px solid var(--fg); margin-top: 28px; }
.sub-acc + .sub-acc { margin-top: 0; border-top-color: var(--border); }
.sub-acc:last-of-type { border-bottom: 1px solid var(--border); }
.sub-acc > summary {
  display: flex; align-items: center; gap: 12px; padding: 16px 0;
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
}
.sub-acc > summary > span:first-child { flex: 1; }
.sub-acc > summary:hover { color: var(--primary); }
.sub-count { font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.sub-acc .checklist { margin: 0 0 16px; border-top: none; }
.sub-acc .checklist li:last-child { border-bottom: none; }

/* ---------- Quick audit prompt (centered modal) ---------- */

.audit-modal {
  width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto;
  padding: clamp(32px, 5vw, 56px); border: none; border-top: 4px solid var(--primary);
  background: var(--fg); color: var(--surface);
  box-shadow: 0 40px 100px rgba(26, 20, 16, 0.5);
}
.audit-modal[open] { animation: auditModalIn 0.35s ease; }
.audit-modal::backdrop { background: rgba(26, 20, 16, 0.6); backdrop-filter: blur(4px); animation: fadeIn 0.35s ease; }
@keyframes auditModalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .audit-modal[open], .audit-modal::backdrop { animation: none; } }

.audit-modal-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 1px solid rgba(255,255,255,0.2); color: #D9D3C9; cursor: pointer;
}
.audit-modal-close:hover { border-color: #fff; color: #fff; }
.audit-modal-kicker {
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); margin: 0 48px 16px 0;
}
.audit-modal-title { font-size: clamp(32px, 5vw, 48px); line-height: 1.05; margin: 0 0 20px; color: #fff; }
.audit-modal-text { font-size: 18px; line-height: 1.55; color: #D9D3C9; margin: 0 0 24px; }
.audit-modal-points { list-style: none; padding: 0; margin: 0 0 32px; border-top: 1px solid rgba(255,255,255,0.15); }
.audit-modal-points li {
  position: relative; padding: 12px 0 12px 28px; border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 16px; color: #EDE7DE;
}
.audit-modal-points li::before { content: ""; position: absolute; left: 0; top: 23px; width: 14px; height: 2px; background: var(--primary); }
.audit-modal-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.audit-modal-later {
  background: none; border: none; padding: 0; cursor: pointer; color: #D9D3C9;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em;
}
.audit-modal-later:hover { color: #fff; }
@media (max-width: 560px) {
  .audit-modal-text { font-size: 16px; }
  .audit-modal-actions .btn { width: 100%; text-align: center; }
  .audit-modal-actions { gap: 16px; justify-content: center; }
}

.admin-source { font-size: 13px; }

/* ---------- Phones: shorter pages ---------- */
.demo-open { display: none; }
@media (max-width: 760px) {
  section { padding: 36px 0; }
  .hero { padding-top: 24px; }
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .section-head { margin-bottom: 24px; }
  .section-head h2 { margin-bottom: 12px; }
  .actions { margin-top: 22px; }
  h1[style], h2[style] { margin-bottom: 16px !important; }
  .hero h1 { margin-bottom: 16px; }
  .lead { font-size: 18px; }
  .hero .audience { font-size: 16px; margin-top: 16px; }
  .flow-illustration { display: none; }
  .split { gap: 24px; }
  .photo { aspect-ratio: 4 / 3; }
  .photo img { object-position: center 30%; }
  .photo.thumb { width: 140px; aspect-ratio: 1; }
  .split p { font-size: 16.5px; }
  .experience li { padding-block: 10px; }
  .experience h3 { font-size: 18px; margin-bottom: 2px; }
  .experience p { font-size: 15.5px; line-height: 1.45; margin: 0; }
  .audit-cta h2, .closing h2 { font-size: 34px; margin-bottom: 16px; }
  .demo-label { margin-bottom: 14px; }
  /* The example workflow demo opens on request (the button sits above it) */
  .demo-open { display: inline-flex; }
  #examples .wf { display: none; }
  #examples .wf.open { display: grid; }
  .process { grid-template-columns: 1fr 1fr; }
  .process > div, .process > div + div { padding: 14px 12px 14px 0; border-left: 0; border-bottom: 1px solid var(--border); }
  .process > div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--border); }
  .process h3 { margin: 6px 0; font-size: 20px; }
  .process p { font-size: 15px; line-height: 1.45; }
  .site-footer { padding: 28px 0; }
  .site-footer nav { flex-wrap: wrap; gap: 6px 20px; }
  .panel-label, .foot-label, .notes-label, .notes-problem span, .notes-block .notes-label { font-size: 12px; }
}
/* Touch screens: 44px tap areas on small text links */
@media (pointer: coarse) {
  .site-footer nav a, .text-link, .expand-all { position: relative; }
  .site-footer nav a::before, .text-link::before, .expand-all::before { content: ""; position: absolute; inset: -12px -6px; }
}
