/* Improvize design system — spruce / mist / teal / coral / amber */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-grotesque-var.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/public-sans-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --spruce: #10201b;
  --pine: #173028;
  --mist: #f4f7f2;
  --card: #ffffff;
  --ink: #17251f;
  --muted: #56655d;
  --line: #dde5da;
  --teal: #12a5a0;
  --teal-deep: #0b7a76;
  --teal-soft: rgba(18, 165, 160, 0.14);
  --coral: #ff6a4d;
  --coral-deep: #c6472e;
  --coral-soft: rgba(255, 106, 77, 0.14);
  --amber: #f0a62b;
  --amber-deep: #8a5d0d;
  --amber-soft: rgba(240, 166, 43, 0.17);
  --display: "Bricolage Grotesque", "Avenir Next", "Trebuchet MS", sans-serif;
  --body-font: "Public Sans", "Seravek", -apple-system, system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
  --radius: 14px;
  --pad-x: clamp(20px, 5vw, 72px);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--mist);
  color: var(--ink);
  font-family: var(--body-font);
  line-height: 1.55;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  text-wrap: balance;
}

img {
  max-width: 100%;
}

/* ---------- Header & footer ---------- */

.site-header {
  align-items: center;
  background: rgba(244, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px var(--pad-x);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: flex;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  gap: 10px;
}

.brand-mark {
  display: block;
}

.site-nav {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
  gap: 24px;
}

.site-nav a:hover {
  color: var(--ink);
}

.nav-pill {
  background: var(--spruce);
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  padding: 8px 18px;
}

.nav-pill:hover {
  color: #fff;
  opacity: 0.9;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  font-size: 13.5px;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  padding: 28px var(--pad-x);
}

.site-footer-admin {
  color: inherit;
  justify-self: center;
}

.site-footer-admin:hover {
  color: var(--ink);
}

.site-footer > span:last-child {
  justify-self: end;
  text-align: right;
}

.site-footer strong {
  color: var(--ink);
}

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

.eyebrow {
  color: var(--teal-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.chip {
  border-radius: 999px;
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  text-transform: uppercase;
}

.chip.teal {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.chip.coral {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.chip.amber {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

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

.button {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  justify-content: center;
  padding: 12px 24px;
}

.button.primary {
  background: var(--coral);
  box-shadow: 0 8px 22px rgba(255, 106, 77, 0.35);
  color: #fff7f3;
}

.button.primary:hover {
  background: #f05a3d;
}

.button.ghost {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.button.ghost.light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #eaf3ec;
}

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

.hero {
  align-items: center;
  background:
    linear-gradient(rgba(244, 247, 242, 0) 60%, var(--mist)),
    repeating-linear-gradient(0deg, rgba(18, 165, 160, 0.055) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(18, 165, 160, 0.055) 0 1px, transparent 1px 34px);
  display: grid;
  gap: 48px;
  grid-template-columns: 1.05fr 0.95fr;
  padding: 24px var(--pad-x) 84px;
}

.hero h1 {
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.04;
  margin-bottom: 0;
}

.hero-body {
  color: var(--muted);
  font-size: 17.5px;
  margin-top: 20px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-visual img {
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(16, 32, 27, 0.35);
  display: block;
  width: 100%;
}

/* ---------- Sections ---------- */

.section {
  padding: 68px var(--pad-x);
}

.section-heading {
  margin-bottom: 36px;
  max-width: 680px;
}

.section h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.1;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  margin-top: 12px;
}

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

.service-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto 1fr auto;
  padding: 26px 24px;
}

.service-card .glyph {
  align-items: center;
  border-radius: 12px;
  display: flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.service-card .glyph img {
  max-height: 32px;
  max-width: 32px;
}

.service-card.teal .glyph {
  background: var(--teal-soft);
}

.service-card.coral .glyph {
  background: var(--coral-soft);
}

.service-card.amber .glyph {
  background: var(--amber-soft);
}

.service-card h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 0;
}

.service-card-body {
  color: var(--muted);
  font-size: 14.5px;
}

.service-card-body > p {
  margin: 0 0 14px;
}

.service-card-body > p:last-child {
  margin-bottom: 0;
}

.service-card ul {
  display: grid;
  gap: 7px;
  font-size: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-card ul li {
  padding-left: 20px;
  position: relative;
}

.service-card ul li::before {
  content: "→";
  font-family: var(--mono);
  left: 0;
  position: absolute;
}

.service-card.teal ul li::before {
  color: var(--teal);
}

.service-card.coral ul li::before {
  color: var(--coral);
}

.service-card.amber ul li::before {
  color: var(--amber);
}

.card-link {
  color: var(--teal-deep);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Flexible blocks: image + text, image, diagram, text ---------- */

.split-section {
  align-items: center;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 48px;
  grid-template-columns: 0.95fr 1.05fr;
}

.split-section.image-left .split-copy {
  order: 2;
}

.split-section.image-left .split-figure {
  order: 1;
}

.split-section.image-full {
  grid-template-columns: 1fr;
}

.split-copy h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.split-summary {
  color: var(--muted);
  margin-top: 14px;
  max-width: 52ch;
}

.prose-inline {
  color: var(--muted);
  max-width: 62ch;
}

.figure-plate {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.figure-plate img {
  border-radius: 8px;
  display: block;
  width: 100%;
}

.figure-plate.wide {
  padding: 24px;
}

.figcap {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  margin-top: 10px;
}

.image-section .figure-plate,
.text-section .prose-inline {
  margin-top: 8px;
}

.diagram-block {
  padding: 0 var(--pad-x) 68px;
}

.diagram-title {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.figure-plate.diagram pre {
  margin: 0;
  overflow-x: auto;
}

.figure-plate.diagram .mermaid,
.prose .mermaid {
  display: flex;
  justify-content: center;
}

.figure-plate.diagram .mermaid svg,
.prose .mermaid svg {
  height: auto;
  max-width: 100%;
}

/* ---------- Industry (dark band) ---------- */

.testimonial-section,
.industry-section {
  background: linear-gradient(160deg, var(--spruce), var(--pine));
  color: #eaf3ec;
}

.industry-section {
  padding: 34px var(--pad-x);
}

.testimonial-section {
  padding: 14px var(--pad-x) 18px;
}

.testimonial-section .eyebrow,
.industry-section .eyebrow {
  color: #7fd6cb;
}

.testimonial-section .eyebrow {
  margin-bottom: 8px;
}

.testimonial-strip {
  display: flex;
  gap: 12px;
  margin-right: calc(-1 * var(--pad-x));
  overflow-x: auto;
  padding: 0 var(--pad-x) 4px 0;
  scroll-snap-type: x proximity;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  flex: 0 0 min(660px, 82vw);
  padding: 14px 16px;
  scroll-snap-align: start;
}

.testimonial-preview {
  color: #a9bdb1;
  font-size: 14px;
  margin: 0 0 8px;
}

.testimonial-title-row {
  align-items: baseline;
  display: flex;
  gap: 10px;
}

.testimonial-title-row h3 {
  color: #eaf3ec;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  min-width: 0;
}

.testimonial-title-row a {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.industry-section h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.industry-copy > p:not(.eyebrow) {
  color: #a9bdb1;
  max-width: 48ch;
}

.industry-grid {
  display: grid;
  gap: 44px;
  grid-template-columns: 0.9fr 1.1fr;
}

.tool-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.tool-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px;
}

.tool-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tool-name b {
  font-family: var(--display);
  font-size: 17px;
}

.tool-name small {
  color: #a9bdb1;
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.tool-row .launch {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.industry-search {
  align-items: stretch;
  flex-direction: column;
}

.industry-search-head {
  display: flex;
  justify-content: flex-end;
}

.industry-search .launch {
  font-size: 14px;
}

.industry-search-list {
  display: grid;
  gap: 3px;
  max-height: 220px;
  overflow-y: auto;
}

.industry-search-list a,
.industry-search-list span,
.industry-search-item {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: #eaf3ec;
  font-size: 13px;
  text-align: left;
  padding: 8px 2px;
}

.industry-search-item {
  cursor: pointer;
  font: inherit;
}

.industry-search-item:hover,
.industry-search-item:focus-visible {
  color: var(--amber);
}

.industry-preview-card {
  margin-top: 4px;
}

.industry-articles {
  display: grid;
  gap: 12px;
}

.industry-link-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 16px 18px;
}

.industry-link-card h3 {
  font-size: 18px;
  margin: 3px 0 7px;
}

.industry-link-card h3 a {
  color: #eaf3ec;
}

.industry-preview,
.industry-empty {
  color: #a9bdb1;
  font-size: 14px;
  margin: 0;
}

.industry-card-meta {
  color: #7fd6cb;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.industry-commentary {
  border-left: 2px solid var(--amber);
  color: #f6cf84;
  font-size: 13px;
  margin: 10px 0 0;
  padding-left: 10px;
}


/* ---------- Articles ---------- */

.article-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.article-card .thumb {
  display: block;
  height: 156px;
  overflow: hidden;
}

.article-card .thumb img,
.thumb-fallback {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.article-card[data-preview-position="top"] .thumb img {
  object-position: top;
}

.article-card[data-preview-position="middle"] .thumb img {
  object-position: center;
}

.article-card[data-preview-position="bottom"] .thumb img {
  object-position: bottom;
}

.thumb-fallback.teal {
  background: radial-gradient(circle at 75% 25%, rgba(18, 165, 160, 0.85), transparent 60%), var(--spruce);
}

.thumb-fallback.coral {
  background: radial-gradient(circle at 25% 80%, rgba(255, 106, 77, 0.75), transparent 55%), var(--spruce);
}

.thumb-fallback.amber {
  background: radial-gradient(circle at 70% 70%, rgba(240, 166, 43, 0.8), transparent 55%), var(--spruce);
}

.article-body {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.article-body .chip {
  justify-self: start;
}

.article-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.article-card h3 a:hover {
  color: var(--teal-deep);
}

.article-body p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.article-body .meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
}

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

.closing-cta {
  align-items: center;
  background: var(--spruce);
  border-radius: 18px;
  color: #eaf3ec;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 var(--pad-x) 68px;
  overflow: hidden;
  padding: 40px 44px;
  position: relative;
}

.closing-cta::before {
  background:
    radial-gradient(circle at 85% 20%, rgba(18, 165, 160, 0.35), transparent 55%),
    radial-gradient(circle at 70% 90%, rgba(255, 106, 77, 0.22), transparent 45%);
  content: "";
  inset: 0;
  position: absolute;
}

.closing-cta h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  margin: 0;
  max-width: 24ch;
  position: relative;
}

.closing-cta .button {
  position: relative;
}

/* ---------- Detail pages ---------- */

.detail-page {
  margin: 0 auto;
  max-width: 880px;
  padding: 56px var(--pad-x) 80px;
}

.back-link {
  color: var(--teal-deep);
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 26px;
}

.detail-page .chip {
  margin-bottom: 14px;
}

.detail-page h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.06;
}

.detail-summary {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  max-width: 62ch;
}

.detail-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.detail-cover {
  margin: 28px 0 0;
}

.detail-cover img {
  border-radius: var(--radius);
  display: block;
  width: 100%;
}

.prose {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 28px;
  padding: 32px;
}

.prose img {
  border-radius: 8px;
}

.prose pre {
  overflow-x: auto;
}

/* ---------- Idea Finder ---------- */

.idea-finder,
.planned-tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 28px;
  padding: 24px;
}

.planned-tool {
  color: var(--muted);
}

.idea-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.search-line {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 150px auto;
}

.idea-results {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.result-card {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.result-card h2 {
  font-size: 18px;
  margin: 0 0 6px;
}

.result-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ---------- Forms ---------- */

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #cdd8d0;
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
  padding: 10px 13px;
  width: 100%;
}

textarea {
  line-height: 1.6;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.form-error {
  background: #ffe9e3;
  border: 1px solid #ef9c88;
  border-radius: 9px;
  color: var(--coral-deep);
  padding: 12px 14px;
}

.login-page {
  max-width: 460px;
}

.login-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 24px;
}

/* ---------- Improvize Studio (admin) ---------- */

.studio-body {
  background: #eef2ec;
}

.studio {
  margin: 0 auto;
  max-width: 1320px;
  padding: 24px clamp(16px, 3vw, 40px) 64px;
}

.studio-top {
  align-items: center;
  background: var(--spruce);
  border-radius: var(--radius);
  color: #eaf3ec;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 24px;
}

.studio-brand {
  align-items: baseline;
  display: flex;
  gap: 12px;
}

.studio-brand h1 {
  font-size: 20px;
  margin: 0;
}

.studio-brand span {
  color: #7fd6cb;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.studio-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.studio-actions .button {
  font-size: 13.5px;
  padding: 8px 16px;
}

.studio .form-error {
  margin-top: 16px;
}

.studio-workspace {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 300px minmax(0, 1fr);
  margin-top: 20px;
}

.outline {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-height: 80vh;
  overflow: auto;
  padding: 16px 14px 22px;
  position: sticky;
  top: 84px;
}

.outline-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 6px;
}

.outline-head strong {
  font-family: var(--display);
  font-size: 14px;
}

.add-link {
  color: var(--teal-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.outline-section {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  margin: 16px 6px 7px;
  text-transform: uppercase;
}

.outline-item {
  align-items: center;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  gap: 9px;
  margin-bottom: 6px;
  padding: 9px 11px;
}

.outline-item.active {
  background: #ffffff;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(18, 165, 160, 0.22);
}

.outline-item.nested {
  margin-left: 14px;
}

.outline-item.not-live {
  opacity: 0.7;
}

.outline-note {
  color: var(--muted);
  flex-basis: 100%;
  font-size: 10px;
  line-height: 1.25;
}

.outline-settings {
  border-top: 1px solid var(--line);
  margin-top: 14px;
}

.outline-item .name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kind-chip {
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2.5px 7px;
  text-transform: uppercase;
}

.kind-chip.hero {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.kind-chip.cards {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.kind-chip.imgtxt {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.kind-chip.diagram {
  background: rgba(23, 48, 40, 0.1);
  color: var(--pine);
}

.kind-chip.text {
  background: #edf0ec;
  color: var(--muted);
}

.kind-chip.cta {
  background: var(--spruce);
  color: #cfe7d9;
}

.status-dot {
  background: #4caf7a;
  border-radius: 50%;
  flex: none;
  height: 7px;
  width: 7px;
}

.status-dot.draft {
  background: #c9b037;
}

.outline-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 0 6px;
}

.editor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px 32px;
}

.crumbs {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  margin-bottom: 6px;
}

.editor h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

.editor-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  font-weight: 700;
}

.field label small {
  color: var(--muted);
  font-weight: 500;
}

.field-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.delete-block-form {
  align-items: center;
  border: 1px solid #ef9c88;
  border-radius: 9px;
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
}

.delete-block-form .button {
  border-color: var(--coral-deep);
  color: var(--coral-deep);
  flex: none;
}

.delete-block-form small {
  color: var(--muted);
}

.industry-filters,
.industry-url-row,
.industry-danger-actions,
.industry-pagination {
  align-items: center;
  display: flex;
  gap: 12px;
}

.industry-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  margin: 22px 0 10px;
}

.industry-filters input,
.industry-filters select {
  min-width: 0;
  width: 100%;
}

.industry-no-testimonials {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.industry-no-testimonials input {
  height: 14px;
  margin: 0;
  padding: 0;
  width: 14px;
}

.industry-count {
  color: var(--muted);
  font-size: 13px;
}

.industry-table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 14px;
  overflow-x: auto;
}

.industry-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 980px;
  width: 100%;
}

.industry-table th,
.industry-table td {
  border-bottom: 1px solid var(--line);
  max-width: 260px;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.industry-table th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.industry-status {
  border-radius: 999px;
  font-size: 11px;
  padding: 3px 7px;
}

.industry-status.published { background: var(--teal-soft); color: var(--teal-deep); }
.industry-status.draft { background: var(--amber-soft); color: var(--amber-deep); }
.industry-status.archived { background: #edf0ec; color: var(--muted); }

.industry-pagination {
  justify-content: flex-end;
  margin-top: 16px;
}

.industry-editor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 24px;
}

.industry-url-row input { flex: 1; }

.industry-url-row .button,
.industry-danger-actions .button { flex: none; }

.industry-featured {
  align-items: center;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  padding-top: 28px;
}

.industry-featured input { width: auto; }

.industry-danger-actions {
  border: 1px solid #ef9c88;
  border-radius: 9px;
  margin-top: 18px;
  padding: 12px;
}

.industry-danger-actions form + form .button {
  border-color: var(--coral-deep);
  color: var(--coral-deep);
}

.image-panel {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 16px;
  grid-template-columns: 190px minmax(0, 1fr);
  padding: 14px;
}

.image-preview {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 130px;
  overflow: hidden;
}

.image-preview img {
  display: block;
  max-height: 160px;
  object-fit: contain;
  width: 100%;
}

.no-image {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.image-meta {
  display: grid;
  gap: 12px;
}

.media-library {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 20px;
}

.media-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.media-head strong {
  font-family: var(--display);
  font-size: 15px;
}

.media-head span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.media-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.media-thumb {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.media-thumb:hover {
  border-color: var(--teal);
}

.media-thumb img {
  aspect-ratio: 5 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.media-thumb span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  overflow: hidden;
  padding: 6px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-upload {
  align-content: center;
  border: 1.5px dashed #afbcae;
  border-radius: 9px;
  display: grid;
  gap: 8px;
  padding: 12px;
  text-align: center;
}

.media-upload label b {
  color: var(--teal-deep);
  display: block;
  font-size: 12.5px;
}

.media-upload label span {
  color: var(--muted);
  font-size: 10.5px;
}

.media-upload input[type="file"],
.media-upload input {
  font-size: 11px;
  padding: 6px 8px;
}

.media-upload .button {
  font-size: 12.5px;
  padding: 7px 14px;
}

/* ---------- Reception ---------- */

.contact-nav {
  background: var(--teal-deep);
}

.reception-page {
  margin: 0 auto;
  max-width: 1020px;
  padding: 64px var(--pad-x) 80px;
}

.reception-intro {
  margin-bottom: 30px;
  max-width: 660px;
}

.reception-intro h1 {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.05;
  margin-bottom: 14px;
}

.reception-intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
}

.reception-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(16, 32, 27, 0.1);
  overflow: hidden;
}

.reception-head {
  align-items: center;
  background: linear-gradient(120deg, #eef8f5, #fff9ef);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
}

.reception-person {
  align-items: center;
  display: flex;
  gap: 11px;
}

.reception-person span:not(.avatar) {
  display: grid;
  line-height: 1.15;
}

.reception-person small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.avatar {
  align-items: center;
  background: var(--teal-deep);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.presence-pill,
.status-chip {
  background: var(--teal-soft);
  border-radius: 999px;
  color: var(--teal-deep);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 9px;
  text-transform: uppercase;
}

.chat-log {
  background: #fbfcfa;
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-height: 460px;
  min-height: 290px;
  overflow-y: auto;
  padding: 22px;
}

.chat-line {
  display: flex;
}

.chat-message {
  border-radius: 14px;
  max-width: min(78%, 620px);
  padding: 10px 13px;
}

.chat-message > :first-child {
  margin-top: 0;
}

.chat-message > :last-child {
  margin-bottom: 0;
}

.chat-line.visitor {
  justify-content: flex-end;
}

.chat-line.visitor .chat-message {
  background: var(--spruce);
  color: #fff;
}

.chat-line.receptionist .chat-message,
.chat-line.human .chat-message {
  background: var(--teal-soft);
}

.chat-line.human .chat-message {
  background: var(--amber-soft);
}

.chat-line.system .chat-message {
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  margin: 0 auto;
  padding: 3px 8px;
  text-align: center;
}

.chat-line.handoff-confirmation {
  justify-content: center;
  margin: 4px 0;
}

.chat-line.handoff-confirmation .chat-message {
  background: var(--coral-soft);
  border: 1px solid rgba(198, 71, 46, 0.28);
  box-shadow: 0 4px 12px rgba(198, 71, 46, 0.12);
  color: var(--coral-deep);
  font-weight: 600;
  max-width: min(90%, 580px);
  text-align: center;
}

.typing-indicator {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  padding: 9px 22px 0;
}

.chat-form,
.email-form {
  align-items: center;
  display: flex;
  gap: 10px;
}

.chat-form {
  border-top: 1px solid var(--line);
  padding: 16px 22px;
}

.chat-form textarea,
.email-form input {
  background: #fff;
  border: 1px solid #cbd8ce;
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

.chat-form textarea:focus,
.email-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
  outline: none;
}

.chat-form .button,
.email-form .button {
  flex: 0 0 auto;
  padding: 10px 16px;
}

.human-request {
  border-top: 1px solid var(--line);
  padding: 18px 22px 22px;
}

.human-request > p:first-child {
  font-family: var(--display);
  font-weight: 600;
  margin-bottom: 8px;
}

.privacy-note {
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0 0;
}

.privacy-note a,
.back-link {
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reception-admin-list,
.admin-reception-detail {
  margin: 0 auto;
  max-width: 950px;
}

.reception-session-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.reception-session-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 15px 17px;
}

.reception-session-row:last-child {
  border-bottom: 0;
}

.reception-session-row:hover {
  background: #f9fcf8;
}

.reception-session-row span:first-child {
  display: grid;
  min-width: 0;
}

.reception-session-row small,
.reception-session-row time {
  color: var(--muted);
  font-size: 12px;
}

.reception-session-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip.waiting_human {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.status-chip.closed {
  background: #edf0ed;
  color: var(--muted);
}

.admin-chat-log {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 22px 0 14px;
}

.reception-detail-status {
  align-items: center;
  display: flex;
  gap: 10px;
}

.reception-detail-status .detail-meta {
  margin: 0;
}

.reception-detail-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.reception-detail-nav .back-link {
  margin-bottom: 0;
}

.reception-record-nav {
  color: var(--teal-deep);
  display: flex;
  gap: 7px;
}

.reception-record-nav [aria-disabled="true"] {
  color: var(--muted);
}

.delete-reception-form {
  margin-left: auto;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  margin-bottom: 28px;
}

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

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero,
  .split-section,
  .industry-grid {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .split-section.image-left .split-copy {
    order: 1;
  }

  .split-section.image-left .split-figure {
    order: 2;
  }

  .studio-workspace,
  .field-grid,
  .field-grid.four,
  .image-panel {
    grid-template-columns: 1fr;
  }

  .outline {
    max-height: none;
    position: static;
  }

  .search-line {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hero {
    padding-top: 24px;
  }

  .closing-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .reception-session-row {
    grid-template-columns: 1fr auto;
  }

  .reception-session-row time {
    display: none;
  }
}

@media (max-width: 560px) {
  .reception-page {
    padding-bottom: 46px;
    padding-top: 42px;
  }

  .reception-head,
  .chat-form,
  .email-form {
    align-items: stretch;
    flex-direction: column;
  }

  .reception-head {
    gap: 10px;
  }

  .chat-form .button,
  .email-form .button {
    width: 100%;
  }

  .presence-pill {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
