:root {
  --ink: #15131d;
  --muted: #6f6b7c;
  --line: #e6e3ec;
  --soft: #f7f6f9;
  --accent: #5b35f2;
  --accent-soft: #f1edff;
  --danger: #c92a2a;
  --shadow: 0 18px 48px rgba(35, 27, 58, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 3px; }

.site-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(230, 227, 236, .85);
  background: rgba(255, 255, 255, .94);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
}

.brand-logo-link {
  line-height: 0;
}
.brand-logo {
  width: 122px;
  height: auto;
  display: block;
  object-fit: contain;
}

.home-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 76px 0 88px;
}
.home-intro {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-intro h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.home-intro > p:last-child {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 18px;
}

.search-zone {
  width: min(840px, 100%);
  margin: 0 auto 54px;
  position: relative;
}
.search-box {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.search-icon {
  width: 26px;
  height: 26px;
  display: grid;
  color: var(--muted);
}
.search-icon svg { width: 100%; height: 100%; }
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 17px;
}
.search-box input::placeholder { color: #9691a0; }
.search-box kbd {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
}
.search-hint {
  margin: 10px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.search-results {
  width: 100%;
  max-height: 460px;
  overflow: auto;
  position: absolute;
  left: 0;
  top: 78px;
  z-index: 30;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(35, 27, 58, .16);
}
.search-result {
  display: block;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result.active { background: var(--accent-soft); }
.search-result strong { display: block; margin-bottom: 2px; font-size: 15px; }
.search-result span { display: block; color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.search-result p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.search-empty { padding: 22px; color: var(--muted); text-align: center; }

.link-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.link-cards.home { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.link-cards.list { grid-template-columns: 1fr; gap: 10px; }
.link-card {
  min-height: 168px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
a.link-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(35, 27, 58, .08);
}
.link-cards.list .link-card { min-height: 0; padding: 18px 20px; }
.link-card.disabled { color: #76717f; background: var(--soft); }
.link-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
}
.link-card-icon svg { width: 25px; height: 25px; }
.link-card h3 { margin: 1px 0 8px; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.link-card p { margin: 0; color: var(--muted); font-size: 14px; }
.card-action { display: inline-block; margin-top: 18px; color: var(--accent); font-size: 13px; font-weight: 800; }
.coming-soon {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #6d6875;
  background: #ebe9ee;
  font-size: 11px;
  font-weight: 800;
}

.page-shell {
  width: min(940px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 90px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs i { font-style: normal; opacity: .55; }
.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: start;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.page-header time {
  padding-top: 6px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}
.title-flags { min-height: 26px; display: flex; align-items: center; gap: 9px; }
.title-flags .eyebrow { margin: 0; }
.placeholder-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6d6875;
  background: #efedf1;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.page-lead { max-width: 730px; margin: 16px 0 0; color: var(--muted); font-size: 18px; }
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.page-meta span {
  padding: 9px 12px;
  border-radius: 10px;
  color: #55505f;
  background: var(--soft);
  font-size: 12px;
}
.page-content { margin-top: 34px; }
.content-block { margin: 0 0 20px; }
.content-block h2 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.035em; }
.content-block h3 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.prose { color: #34303b; font-size: 16px; }
.prose p { margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 10px 0 18px; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose h3, .prose h4 { margin: 22px 0 10px; color: var(--ink); }
.prose h4 { font-size: 17px; }
.prose a { color: var(--accent); }
.prose code { padding: 2px 5px; border-radius: 5px; background: var(--soft); }
.divider { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.placeholder-inline {
  padding: 18px;
  border: 1px dashed #ccc7d3;
  border-radius: 13px;
  color: var(--muted);
  background: var(--soft);
}

.callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 19px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
}
.callout.warning {
  border-color: #f3c68a;
  border-left-color: #e58b16;
  background: #fff7e8;
}
.callout strong { display: block; margin-bottom: 5px; }
.callout p { margin: 0; color: #4f4958; font-size: 14px; }
.small-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.small-button.secondary { color: var(--accent); background: #fff; }
.button-row { display: flex; gap: 9px; }

.accordion {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.accordion summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 800;
  list-style-position: inside;
}
.accordion[open] summary { border-bottom: 1px solid var(--line); background: var(--soft); }
.accordion > div { padding: 20px; }

.copy-message {
  overflow: hidden;
  border: 1px solid #dcd8e5;
  border-radius: 14px;
  background: #fbfaff;
}
.copy-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid #e6e2ee;
  background: var(--accent-soft);
}
.copy-toggle {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.copy-toggle span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
}
.copy-button {
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, white);
  border-radius: 8px;
  color: var(--accent);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}
.copy-panel[hidden] { display: none; }
.copy-text {
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #2f2b36;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.copy-state { display: block; height: 0; color: var(--accent); font-size: 11px; }

.media-block { margin-left: 0; margin-right: 0; }
.media-block img, .media-block video {
  width: 100%;
  max-height: 620px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #111;
}
.media-block figcaption { display: grid; gap: 3px; margin-top: 9px; color: var(--muted); font-size: 13px; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th:last-child, td:last-child { border-right: 0; }
th { color: #4f4958; background: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td { font-size: 14px; }

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.role-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}
a.role-card:hover { border-color: var(--accent); }
.role-card.disabled { background: var(--soft); }
.role-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}
.role-icon svg { width: 24px; height: 24px; }
.role-card h3 { margin: 18px 0 8px; font-size: 19px; }
.role-card p { margin: 0; color: var(--muted); font-size: 13px; }
.role-card .card-action { margin-top: auto; padding-top: 18px; }

.stage-plan { display: grid; gap: 10px; }
.stage-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 150px 22px;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}
a.stage-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.stage-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--accent);
  font-size: 20px;
  font-weight: 900;
}
.stage-main { display: grid; gap: 3px; }
.stage-main strong { font-size: 17px; }
.stage-main span { color: var(--muted); font-size: 13px; }
.stage-owner { color: var(--muted); font-size: 12px; font-weight: 750; }
.stage-arrow { color: var(--accent); font-weight: 900; }

.mechanic-catalog { display: grid; gap: 18px; }
.mechanic-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(35, 27, 58, .04);
}
.mechanic-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mechanic-title {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 21px 22px;
  background: linear-gradient(135deg, var(--accent-soft), #fff);
}
.mechanic-title > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--accent);
  background: #fff;
}
.mechanic-title svg { width: 25px; height: 25px; }
.mechanic-title h2 { margin: 0; font-size: 23px; line-height: 1.15; letter-spacing: -.03em; }
.mechanic-card dl { margin: 0; }
.mechanic-card dl > div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.mechanic-card dt, .mechanic-card dd { margin: 0; padding: 13px 16px; }
.mechanic-card dt { font-size: 13px; font-weight: 850; background: var(--soft); }
.mechanic-card dd { color: #4e4857; font-size: 14px; }

@media (max-width: 860px) {
  .link-cards.home, .role-grid { grid-template-columns: 1fr; }
  .link-cards.home .link-card { min-height: 0; }
  .page-header { grid-template-columns: 1fr; gap: 12px; }
  .page-header time { grid-row: 1; padding: 0; }
  .stage-card { grid-template-columns: 48px minmax(0, 1fr) 20px; }
  .stage-owner { grid-column: 2; }
  .stage-arrow { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 620px) {
  .site-topbar { height: 58px; padding: 0 18px; }
  .home-shell, .page-shell { width: min(100% - 28px, 940px); }
  .home-shell { padding: 46px 0 64px; }
  .home-intro { margin-bottom: 26px; }
  .home-intro h1 { font-size: 40px; }
  .home-intro > p:last-child { font-size: 16px; }
  .search-zone { margin-bottom: 38px; }
  .search-box { min-height: 60px; padding: 0 14px; border-radius: 16px; }
  .search-box kbd { display: none; }
  .link-cards { grid-template-columns: 1fr; }
  .link-card { min-height: 0; padding: 19px; }
  .page-shell { padding-top: 28px; }
  .breadcrumbs { margin-bottom: 20px; }
  .page-header h1 { font-size: 36px; }
  .page-lead { font-size: 16px; }
  .callout { grid-template-columns: 1fr; }
  .small-button { justify-self: start; }
  .stage-card { padding: 14px; gap: 12px; }
  .stage-number { width: 42px; height: 42px; }
  .mechanic-card dl > div { grid-template-columns: 1fr; }
  .mechanic-card dt { padding-bottom: 6px; }
  .mechanic-card dd { padding-top: 6px; }
  .copy-message-head { align-items: flex-start; }
}
/* 2026 redesign: internal knowledge-base home */
.internal-home {
  --ink: #10131d;
  --muted: #646a7b;
  --line: #e6e9f1;
  --soft: #f5f7fb;
  --accent: #123bd4;
  --accent-soft: #eaf0ff;
  --orange: #ff7a00;
  background: #fff;
}
.internal-home .site-topbar {
  height: 64px;
  padding: 0 max(28px, calc((100vw - 1440px) / 2));
  border-bottom-color: #edf0f6;
  position: relative;
  background: #fff;
}
.wordmark {
  gap: 0;
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -.065em;
  line-height: 1;
}
.wordmark i {
  color: #ff7a00;
  font-size: 34px;
  font-style: normal;
  line-height: .5;
}
.home-shell-redesign {
  width: min(1440px, calc(100% - 64px));
  min-height: 0;
  padding: 18px 0 64px;
}
.home-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(480px, 1.05fr);
  gap: 42px;
  align-items: center;
}
.home-hero-copy {
  max-width: 700px;
  padding: 18px 0 28px;
  position: relative;
  z-index: 2;
}
.home-hero-copy .eyebrow,
.materials-heading .eyebrow {
  margin-bottom: 14px;
  color: #123bd4;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}
.home-hero-copy h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(50px, 5vw, 78px);
  line-height: .98;
  letter-spacing: -.065em;
}
.home-hero-lead {
  max-width: 610px;
  margin: 24px 0 0;
  color: #62697b;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.5;
}
.home-hero-copy .search-zone {
  width: 100%;
  margin: 34px 0 0;
}
.home-hero-copy .search-box {
  min-height: 72px;
  border-color: #dfe4ef;
  border-radius: 20px;
  box-shadow: 0 22px 55px rgba(24, 48, 114, .11);
}
.home-hero-copy .search-icon { color: #123bd4; }
.home-hero-copy .search-hint { display: none; }
.home-hero-copy .search-results { top: 82px; }
.home-hero-visual {
  min-width: 0;
  position: relative;
  z-index: 1;
}
.home-hero-visual::before {
  content: "";
  width: 56%;
  aspect-ratio: 1;
  position: absolute;
  right: 4%;
  top: 8%;
  border-radius: 50%;
  background: #eef4ff;
  filter: blur(24px);
  z-index: -1;
}
.home-hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.home-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 34px;
}
.home-category-card {
  min-height: 128px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  gap: 16px;
  align-items: start;
  padding: 20px 20px;
  border: 1px solid #e3e7f0;
  border-radius: 22px;
  color: #111522;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(29, 45, 91, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-category-card:hover {
  border-color: #bac9ff;
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(24, 53, 148, .1);
}
.home-category-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: #123bd4;
}
.category-2 .home-category-icon,
.category-4 .home-category-icon { background: #ff7a00; }
.home-category-icon svg { width: 28px; height: 28px; }
.home-category-card h3 {
  margin: 2px 0 8px;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.home-category-card p { margin: 0; color: #6a7080; font-size: 13px; line-height: 1.45; }
.home-category-arrow { color: #123bd4; font-size: 25px; line-height: 1.2; }
.materials-section { padding-top: 4px; }
.materials-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.materials-heading h2 {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 1;
  letter-spacing: -.05em;
}
.material-tabs {
  max-width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px;
  scrollbar-width: thin;
}
.material-tab {
  flex: none;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #62697a;
  background: #f1f3f7;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.material-tab:hover { color: #123bd4; background: #eaf0ff; }
.material-tab.active { color: #fff; background: #123bd4; }
.material-grid {
  min-height: 286px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.material-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e6ef;
  border-radius: 20px;
  color: #111522;
  background: #fff;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.material-card:hover {
  border-color: #b9c8ff;
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(26, 52, 136, .1);
}
.material-cover {
  height: 156px;
  display: block;
  overflow: hidden;
  position: relative;
  background: #eaf0ff;
}
.material-cover > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.material-cover-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0e38d1, #075ef2);
}
.material-cover-fallback::before,
.material-cover-fallback::after,
.material-cover-fallback i {
  content: "";
  position: absolute;
  border-radius: 32% 68% 58% 42%;
  background: rgba(255,255,255,.13);
  transform: rotate(-18deg);
}
.material-cover-fallback::before { width: 150px; height: 95px; left: -38px; bottom: -22px; }
.material-cover-fallback::after { width: 95px; height: 76px; right: -18px; top: -20px; }
.material-cover-fallback i { width: 76px; height: 54px; right: 18px; bottom: 18px; border: 1px solid rgba(255,255,255,.36); background: rgba(255,255,255,.08); }
.material-cover-fallback b { position: relative; z-index: 2; font-size: 52px; line-height: 1; }
.material-type {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #123bd4;
  background: rgba(255,255,255,.94);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.material-card-body {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 17px;
}
.material-card-body > strong { margin: 7px 0 8px; font-size: 17px; line-height: 1.22; letter-spacing: -.02em; }
.material-state,
.material-badge { min-height: 20px; color: #72798a; font-size: 11px; font-weight: 750; }
.material-badge { width: max-content; padding: 3px 8px; border-radius: 999px; color: #fff; background: #ff7a00; }
.update-state { color: #123bd4; }
.material-description { color: #73798a; font-size: 12px; line-height: 1.45; }
.material-link { margin-top: auto; padding-top: 14px; color: #123bd4; font-size: 12px; font-weight: 850; }
.materials-empty {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 34px;
  border: 1px dashed #cbd4e8;
  border-radius: 22px;
  color: #6b7283;
  text-align: center;
  background: #f8faff;
}
.materials-empty > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: #123bd4; font-size: 23px; }
.materials-empty strong { margin-top: 8px; color: #151925; font-size: 18px; }
.materials-empty p { max-width: 430px; margin: 0; font-size: 13px; }
.admin-cover-preview { width: 100%; max-width: 260px; max-height: 150px; margin-top: 8px; object-fit: cover; border: 1px solid #e1e5ef; border-radius: 12px; }

@media (max-width: 1280px) {
  .home-shell-redesign { width: min(1180px, calc(100% - 48px)); }
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(430px, .9fr); min-height: 480px; }
  .material-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .home-hero { grid-template-columns: 1fr; gap: 0; }
  .home-hero-copy { max-width: 760px; }
  .home-hero-visual { max-width: 720px; margin: -24px auto 0; }
  .home-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -10px; }
  .materials-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 680px) {
  .internal-home .site-topbar { height: 60px; padding: 0 18px; }
  .brand-logo { width: 112px; }
  .home-shell-redesign { width: min(100% - 28px, 620px); padding: 34px 0 62px; }
  .home-hero { min-height: 0; }
  .home-hero-copy { padding-top: 0; }
  .home-hero-copy h1 { font-size: clamp(42px, 13vw, 58px); }
  .home-hero-lead { margin-top: 18px; font-size: 17px; }
  .home-hero-copy .search-zone { margin-top: 26px; }
  .home-hero-copy .search-box { min-height: 62px; border-radius: 17px; }
  .home-hero-visual { margin: 8px -8px 0; }
  .home-categories { grid-template-columns: 1fr; gap: 10px; margin: 4px 0 58px; }
  .home-category-card { min-height: 0; padding: 19px; border-radius: 18px; }
  .materials-heading { margin-bottom: 20px; }
  .materials-heading h2 { font-size: 35px; }
  .material-tabs { width: 100%; }
  .material-grid { grid-template-columns: 1fr; }
  .material-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); }
  .material-cover { height: 100%; min-height: 210px; }
  .material-card-body { min-height: 210px; padding: 16px; }
}
@media (max-width: 420px) {
  .home-hero-visual { display: none; }
  .home-categories { margin-top: 34px; }
  .material-card { grid-template-columns: 1fr; }
  .material-cover { min-height: 170px; }
  .material-card-body { min-height: 188px; }
}
.file-card {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}
.file-card:hover { border-color: var(--accent); box-shadow: 0 12px 30px rgba(20, 50, 140, .08); }
.file-card-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; color: var(--accent); background: var(--accent-soft); }
.file-card-icon svg { width: 24px; height: 24px; }
.file-card > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.file-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card small { color: var(--muted); }
.file-card-action { color: var(--accent); font-size: 12px; font-weight: 850; }
@media (max-width: 520px) { .file-card { grid-template-columns: 42px minmax(0, 1fr); } .file-card-action { grid-column: 2; } }

/* ===== Internal home v3 fixed layout ===== */
body.internal-home {
  background: linear-gradient(180deg, #f5f7fb 0%, #f7f8fc 100%);
}

.home-fixed-shell {
  width: min(1860px, calc(100vw - 40px));
  height: min(calc(100vh - 32px), 1048px);
  margin: 16px auto;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(420px, .78fr);
  gap: 28px;
  border: 1px solid #e5eaf3;
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 60px rgba(28, 41, 82, .08);
}

.home-main-column,
.home-sidebar-column {
  min-width: 0;
  min-height: 0;
}

.home-main-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 26px;
}

.home-sidebar-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding-left: 28px;
  border-left: 1px solid #e7ebf2;
}

.home-hero-compact {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .88fr);
  gap: 28px;
  align-items: center;
}

.home-hero-copy {
  max-width: 690px;
  padding: 8px 0 0;
}

.home-hero-copy .eyebrow,
.materials-heading .eyebrow {
  margin-bottom: 12px;
  color: #123bd4;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}

.home-hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(54px, 4.25vw, 102px);
  line-height: .92;
  letter-spacing: -.07em;
}

.home-hero-lead {
  max-width: 610px;
  margin: 22px 0 0;
  color: #61697a;
  font-size: clamp(18px, 1.15vw, 21px);
  line-height: 1.55;
}

.internal-home .search-zone {
  width: min(640px, 100%);
  margin: 26px 0 0;
}

.internal-home .search-box {
  min-height: 74px;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid #dce3ef;
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(30, 52, 120, .08);
}

.internal-home .search-box input {
  font-size: 18px;
}

.internal-home .search-icon {
  color: #123bd4;
}

.internal-home .search-hint {
  display: none;
}

.internal-home .search-results {
  top: 84px;
  max-height: 360px;
}

.home-hero-visual {
  min-width: 0;
  padding: 10px 0 0;
}

.home-hero-visual::before {
  right: 10%;
  top: 10%;
}

.home-hero-visual img {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
}

.home-main-bottom {
  min-height: 0;
  display: grid;
  align-items: end;
}

.home-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.home-category-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 22px;
  gap: 16px;
  align-items: start;
  padding: 22px 22px 21px;
  border: 1px solid #e2e7f0;
  border-radius: 22px;
  color: #111522;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(29, 45, 91, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.home-category-card.disabled {
  opacity: .7;
}

.home-category-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.home-category-card h3 {
  margin: 2px 0 7px;
  font-size: 18px;
  line-height: 1.12;
  letter-spacing: -.03em;
}

.home-category-card p {
  margin: 0;
  color: #697082;
  font-size: 14px;
  line-height: 1.5;
}

.home-category-arrow {
  align-self: center;
  justify-self: end;
  font-size: 24px;
}

.materials-section-home,
.materials-section-embedded {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding-top: 4px;
}

.materials-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.materials-heading h2 {
  margin: 0;
  font-size: clamp(34px, 2.7vw, 56px);
  line-height: .98;
  letter-spacing: -.05em;
}

.material-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.material-tab {
  padding: 13px 24px;
  font-size: 14px;
}

.materials-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
}

.materials-scroll::-webkit-scrollbar {
  width: 10px;
}

.materials-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(18,59,212,.22);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.material-grid-feed {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.internal-home .material-card,
.materials-section-embedded .material-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0;
  border-radius: 20px;
  border: 1px solid #e2e6ef;
}

.internal-home .material-cover,
.materials-section-embedded .material-cover {
  height: 100%;
  min-height: 102px;
}

.internal-home .material-cover-fallback,
.materials-section-embedded .material-cover-fallback {
  min-height: 102px;
}

.internal-home .material-cover-fallback b,
.materials-section-embedded .material-cover-fallback b {
  font-size: 42px;
}

.internal-home .material-card-body,
.materials-section-embedded .material-card-body {
  min-height: 102px;
  padding: 14px 16px;
}

.internal-home .material-card-body > strong,
.materials-section-embedded .material-card-body > strong {
  margin: 5px 0 5px;
  font-size: 16px;
  line-height: 1.22;
}

.internal-home .material-description,
.materials-section-embedded .material-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
}

.internal-home .material-link,
.materials-section-embedded .material-link {
  padding-top: 10px;
}

.internal-home .materials-empty,
.materials-section-embedded .materials-empty {
  min-height: 220px;
}

@media (min-width: 1181px) {
  body.internal-home {
    overflow: hidden;
  }
}

@media (max-width: 1600px) {
  .home-fixed-shell {
    width: min(1520px, calc(100vw - 32px));
    padding: 22px 24px;
    gap: 24px;
    grid-template-columns: minmax(0, 1.45fr) minmax(380px, .8fr);
  }
  .home-sidebar-column {
    padding-left: 24px;
  }
  .home-hero-copy h1 {
    font-size: clamp(48px, 4.1vw, 84px);
  }
  .home-hero-visual img {
    max-height: 360px;
  }
}

@media (max-width: 1180px) {
  body.internal-home {
    overflow: auto;
  }
  .home-fixed-shell {
    width: min(100% - 28px, 980px);
    height: auto;
    margin: 14px auto 24px;
    padding: 24px 20px;
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .home-sidebar-column {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid #e7ebf2;
    padding-top: 22px;
  }
  .home-hero-compact {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .home-hero-visual {
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  .home-fixed-shell {
    border-radius: 22px;
    padding: 18px 16px;
  }
  .home-hero-copy h1 {
    font-size: clamp(40px, 13vw, 58px);
  }
  .internal-home .search-zone {
    width: 100%;
  }
  .internal-home .search-box {
    min-height: 62px;
  }
  .home-categories {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .internal-home .material-card,
  .materials-section-embedded .material-card {
    grid-template-columns: 1fr;
  }
  .internal-home .material-cover,
  .materials-section-embedded .material-cover {
    min-height: 150px;
  }
}

/* ===== v4 layout refinements ===== */
.home-hero-compact {
  grid-template-areas:
    'copy visual'
    'search search';
  grid-template-columns: minmax(0, 1fr) minmax(380px, .92fr);
  grid-template-rows: auto auto;
  row-gap: 18px;
  align-items: end;
}

.home-hero-copy {
  grid-area: copy;
  max-width: 680px;
  padding: 34px 0 0;
}

.home-hero-visual {
  grid-area: visual;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 620px;
  padding: 8px 0 0;
}

.home-hero-visual img {
  max-height: 470px;
}

.home-hero-search {
  grid-area: search;
  width: 100%;
  margin-top: -10px;
}

.internal-home .home-hero-search .search-zone {
  width: min(100%, 980px);
  margin: 0;
}

.internal-home .home-hero-search .search-box {
  width: 100%;
  min-height: 76px;
}

.home-hero-copy .eyebrow {
  margin-bottom: 16px;
}

.home-hero-copy h1 {
  max-width: 740px;
  font-size: clamp(58px, 4.65vw, 104px);
}

.home-hero-lead {
  max-width: 640px;
  margin-top: 18px;
}

.home-main-column {
  gap: 20px;
}

.home-main-bottom {
  align-items: start;
}

.home-sidebar-column {
  padding-top: 34px;
}

.materials-section-home {
  padding-top: 0;
}

.materials-heading {
  gap: 14px;
  margin-bottom: 16px;
}

.materials-heading .eyebrow {
  margin-bottom: 14px;
}

.materials-heading h2 {
  font-size: clamp(32px, 2.55vw, 52px);
}

.materials-scroll {
  padding-right: 10px;
}

.internal-home .material-card,
.materials-section-embedded .material-card {
  min-height: 124px;
  height: 124px;
  grid-template-columns: 155px minmax(0, 1fr);
}

.internal-home .material-cover,
.materials-section-embedded .material-cover,
.internal-home .material-card-body,
.materials-section-embedded .material-card-body {
  min-height: 124px;
  height: 124px;
}

.internal-home .material-card-body,
.materials-section-embedded .material-card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: 4px;
  padding: 14px 16px 12px;
}

.internal-home .material-state,
.materials-section-embedded .material-state,
.internal-home .material-badge,
.materials-section-embedded .material-badge {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.internal-home .material-card-body > strong,
.materials-section-embedded .material-card-body > strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 2px 0 0;
  min-height: 39px;
}

.internal-home .material-description,
.materials-section-embedded .material-description {
  -webkit-line-clamp: 2;
  min-height: 34px;
}

.internal-home .material-link,
.materials-section-embedded .material-link {
  align-self: end;
  padding-top: 0;
}

@media (max-width: 1600px) {
  .home-hero-copy {
    padding-top: 26px;
  }
  .home-hero-visual img {
    max-height: 420px;
  }
}

@media (max-width: 1180px) {
  .home-hero-compact {
    grid-template-areas:
      'copy'
      'visual'
      'search';
    grid-template-columns: 1fr;
    row-gap: 14px;
  }
  .home-hero-copy,
  .home-sidebar-column {
    padding-top: 0;
  }
  .home-hero-search {
    margin-top: 0;
  }
  .internal-home .home-hero-search .search-zone {
    width: 100%;
  }
}

/* ===== v4.1 composition polish ===== */
.home-hero-compact {
  position: relative;
  padding: 0 8px 6px 12px;
  row-gap: 8px;
}

.home-hero-copy {
  padding-top: 46px;
  padding-left: 16px;
}

.home-hero-visual {
  max-width: 700px;
  margin-bottom: -34px;
  transform: translateX(8px);
}

.home-hero-visual img {
  max-height: 500px;
}

.home-hero-search {
  position: relative;
  z-index: 4;
  width: calc(100% - 18px);
  margin: -22px 0 0 10px;
}

.internal-home .home-hero-search .search-zone {
  width: 100%;
  max-width: none;
}

.internal-home .home-hero-search .search-box {
  min-height: 72px;
}

.home-sidebar-column {
  padding-top: 48px;
}

.materials-heading {
  margin-bottom: 14px;
}

/* Ten recent cards live in one scrollable column; every card has the same geometry. */
.internal-home .material-card,
.materials-section-embedded .material-card {
  height: 124px;
  min-height: 124px;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
}

.internal-home .material-cover,
.materials-section-embedded .material-cover {
  width: 176px;
  height: 99px;
  min-height: 99px;
  aspect-ratio: 16 / 9;
  justify-self: center;
  align-self: center;
  border-radius: 14px;
}

.internal-home .material-cover > img,
.materials-section-embedded .material-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.internal-home .material-cover-fallback,
.materials-section-embedded .material-cover-fallback {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.internal-home .material-card-body,
.materials-section-embedded .material-card-body {
  height: 124px;
  min-height: 124px;
  padding: 13px 15px 11px;
}

.internal-home .material-card-body > strong,
.materials-section-embedded .material-card-body > strong {
  min-height: 20px;
  -webkit-line-clamp: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.internal-home .material-description,
.materials-section-embedded .material-description {
  min-height: 34px;
  -webkit-line-clamp: 2;
}

@media (max-width: 1600px) {
  .home-hero-copy {
    padding-top: 38px;
    padding-left: 10px;
  }
  .home-hero-visual {
    max-width: 620px;
    margin-bottom: -26px;
  }
  .home-hero-visual img {
    max-height: 440px;
  }
  .home-sidebar-column {
    padding-top: 40px;
  }
  .internal-home .material-card,
  .materials-section-embedded .material-card {
    grid-template-columns: 174px minmax(0, 1fr);
  }
  .internal-home .material-cover,
  .materials-section-embedded .material-cover {
    width: 160px;
    height: 90px;
  }
}

@media (max-width: 1180px) {
  .home-hero-compact {
    padding: 0;
  }
  .home-hero-copy {
    padding: 0;
  }
  .home-hero-visual {
    margin-bottom: 0;
    transform: none;
  }
  .home-hero-search {
    width: 100%;
    margin: 0;
  }
  .home-sidebar-column {
    padding-top: 22px;
  }
}

@media (max-width: 760px) {
  .internal-home .material-card,
  .materials-section-embedded .material-card {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .internal-home .material-cover,
  .materials-section-embedded .material-cover {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 18px 18px 0 0;
  }
  .internal-home .material-card-body,
  .materials-section-embedded .material-card-body {
    height: auto;
    min-height: 150px;
  }
}

/* ===== v5 unified visual system ===== */
body.publication-page,
body.publication-home {
  background: #f3f6fb;
}

.publication-page .site-topbar,
.publication-home .site-topbar {
  height: 72px;
  justify-content: center;
  padding: 0 24px;
  border-bottom: 1px solid #e4e9f2;
  background: rgba(255,255,255,.96);
}

.publication-page .brand-logo,
.publication-home .brand-logo {
  width: 126px;
  height: auto;
  display: block;
}

.publication-page .page-shell {
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100vh - 124px);
  margin: 28px auto 44px;
  padding: 52px 68px 82px;
  border: 1px solid #e3e8f1;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(28, 43, 86, .08);
}

.publication-page .page-content {
  max-width: 100%;
}

.publication-home .home-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 28px auto 44px;
  padding: 52px 68px 82px;
  border: 1px solid #e3e8f1;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(28, 43, 86, .08);
}

/* Main internal home: one fixed desktop frame with a scrollable article rail. */
.internal-home .home-fixed-shell {
  width: min(1860px, calc(100vw - 40px));
  height: min(1048px, calc(100vh - 32px));
  margin: 16px auto;
  padding: 24px 28px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.92fr) minmax(430px, .98fr);
  gap: 26px;
  overflow: hidden;
  border: 1px solid #e2e7f0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(27, 43, 86, .09);
}

.internal-home .home-main-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
}

.internal-home .home-sidebar-column {
  min-width: 0;
  min-height: 0;
  padding: 28px 0 0 26px;
  border-left: 1px solid #e5eaf2;
}

.internal-home .home-hero-compact {
  min-height: 0;
  height: 100%;
  display: block;
  position: relative;
  padding: 0;
  overflow: hidden;
}

.internal-home .home-hero-copy {
  width: 56%;
  max-width: 660px;
  padding: 28px 0 0 20px;
  position: relative;
  z-index: 3;
}

.internal-home .home-hero-copy .eyebrow,
.internal-home .materials-heading .eyebrow {
  margin: 0 0 14px;
  color: #123bd4;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .14em;
}

.internal-home .home-hero-copy h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(58px, 4.35vw, 94px);
  line-height: .92;
  letter-spacing: -.07em;
}

.internal-home .home-hero-lead {
  max-width: 610px;
  margin: 22px 0 0;
  color: #626a7b;
  font-size: clamp(18px, 1.14vw, 21px);
  line-height: 1.55;
}

.internal-home .home-hero-visual {
  width: 57%;
  max-width: 690px;
  padding: 0;
  position: absolute;
  right: 0;
  top: 18px;
  z-index: 1;
  transform: none;
  margin: 0;
}

.internal-home .home-hero-visual img {
  width: 100%;
  max-height: 455px;
  display: block;
  object-fit: contain;
}

.internal-home .home-hero-search {
  width: min(720px, 68%);
  margin: 0;
  position: absolute;
  left: 20px;
  bottom: 10px;
  z-index: 5;
}

.internal-home .home-hero-search .search-zone {
  width: 100%;
  margin: 0;
}

.internal-home .home-hero-search .search-box {
  width: 100%;
  min-height: 70px;
  border-radius: 18px;
}

.internal-home .home-main-bottom {
  min-height: 0;
  align-items: end;
}

.internal-home .home-categories {
  gap: 16px;
}

.internal-home .home-category-card {
  min-height: 106px;
  padding: 20px 20px 18px;
}

.internal-home .materials-section-home {
  height: 100%;
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.internal-home .materials-heading {
  gap: 14px;
  margin: 0 0 14px;
}

.internal-home .materials-heading h2 {
  margin: 0;
  font-size: clamp(40px, 2.65vw, 56px);
  line-height: .95;
}

.internal-home .materials-scroll {
  min-height: 0;
  padding-right: 10px;
  overflow-y: auto;
  overflow-x: hidden;
}

.internal-home .material-grid-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.internal-home .material-card {
  width: 100%;
  height: 116px;
  min-height: 116px;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: center;
  border-radius: 18px;
}

.internal-home .material-cover {
  width: 160px;
  height: 90px;
  min-height: 90px;
  aspect-ratio: 16 / 9;
  align-self: center;
  justify-self: center;
  overflow: hidden;
  border-radius: 13px;
}

.internal-home .material-cover > img,
.internal-home .material-cover-fallback {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.internal-home .material-card-body {
  height: 116px;
  min-height: 116px;
  padding: 12px 14px 10px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 3px;
}

.internal-home .material-card-body > strong {
  min-height: 20px;
  margin: 1px 0 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
}

.internal-home .material-description {
  min-height: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.internal-home .material-link {
  padding-top: 0;
}

@media (min-width: 1241px) {
  body.internal-home {
    overflow: hidden;
  }
}

@media (max-width: 1600px) and (min-width: 1241px) {
  .internal-home .home-fixed-shell {
    width: min(1540px, calc(100vw - 32px));
    grid-template-columns: minmax(0, 1.72fr) minmax(390px, .92fr);
    padding: 22px 24px;
    gap: 22px;
  }
  .internal-home .home-sidebar-column {
    padding: 24px 0 0 22px;
  }
  .internal-home .home-hero-copy {
    padding-top: 24px;
    padding-left: 14px;
  }
  .internal-home .home-hero-visual {
    width: 55%;
  }
  .internal-home .home-hero-visual img {
    max-height: 405px;
  }
  .internal-home .home-hero-search {
    left: 14px;
    width: min(650px, 67%);
  }
  .internal-home .material-card {
    grid-template-columns: 158px minmax(0, 1fr);
  }
  .internal-home .material-cover {
    width: 144px;
    height: 81px;
  }
}

@media (max-width: 1240px) {
  body.internal-home {
    overflow: auto;
  }
  .internal-home .home-fixed-shell {
    width: min(100% - 28px, 1080px);
    height: auto;
    margin: 14px auto 28px;
    padding: 24px 22px;
    grid-template-columns: 1fr;
    gap: 26px;
    overflow: visible;
  }
  .internal-home .home-main-column {
    grid-template-rows: auto auto;
  }
  .internal-home .home-sidebar-column {
    padding: 24px 0 0;
    border-left: 0;
    border-top: 1px solid #e5eaf2;
  }
  .internal-home .home-hero-compact {
    min-height: 510px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, .85fr);
    grid-template-areas: 'copy visual' 'search search';
    grid-template-rows: auto auto;
    gap: 12px 22px;
    overflow: visible;
  }
  .internal-home .home-hero-copy {
    width: auto;
    padding: 18px 0 0;
    grid-area: copy;
  }
  .internal-home .home-hero-visual {
    width: 100%;
    max-width: 540px;
    position: static;
    grid-area: visual;
    align-self: center;
  }
  .internal-home .home-hero-visual img {
    max-height: 350px;
  }
  .internal-home .home-hero-search {
    width: min(690px, 100%);
    position: static;
    grid-area: search;
  }
  .internal-home .materials-scroll {
    max-height: 620px;
  }
}

@media (max-width: 760px) {
  .publication-page .page-shell,
  .publication-home .home-shell {
    width: min(100% - 24px, 640px);
    margin: 12px auto 26px;
    padding: 28px 20px 48px;
    border-radius: 22px;
  }
  .internal-home .home-fixed-shell {
    padding: 18px 16px;
    border-radius: 22px;
  }
  .internal-home .home-hero-compact {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-areas: 'copy' 'visual' 'search';
  }
  .internal-home .home-hero-copy h1 {
    font-size: clamp(42px, 13vw, 60px);
  }
  .internal-home .home-hero-visual {
    max-width: 470px;
    margin: 0 auto;
  }
  .internal-home .home-hero-search {
    width: 100%;
  }
  .internal-home .home-categories {
    grid-template-columns: 1fr;
  }
  .internal-home .material-card {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .internal-home .material-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 18px 18px 0 0;
  }
  .internal-home .material-card-body {
    height: auto;
    min-height: 145px;
  }
}

/* ===== v6 coherent home composition ===== */
.internal-home .home-fixed-shell {
  width: min(1860px, calc(100vw - 40px));
  height: min(1048px, calc(100vh - 32px));
  margin: 16px auto;
  padding: 24px 28px;
  grid-template-columns: minmax(0, 1.92fr) minmax(430px, .98fr);
  gap: 26px;
}

.internal-home .home-main-column {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
}

.internal-home .home-sidebar-column {
  padding: 32px 0 0 26px;
}

.internal-home .home-hero-compact {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 0;
  overflow: hidden;
}

.internal-home .home-hero-top {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(390px, 1.02fr);
  gap: 24px;
  align-items: start;
}

.internal-home .home-hero-copy {
  width: auto;
  max-width: 670px;
  padding: 32px 0 0 20px;
  position: relative;
  z-index: 3;
}

.internal-home .home-hero-copy h1 {
  max-width: 660px;
  font-size: clamp(58px, 4.35vw, 94px);
  line-height: .92;
}

.internal-home .home-hero-lead {
  max-width: 610px;
  margin-top: 22px;
}

.internal-home .home-hero-visual {
  width: 100%;
  max-width: 690px;
  padding: 18px 0 0;
  position: static;
  align-self: start;
  justify-self: end;
  transform: none;
}

.internal-home .home-hero-visual img {
  width: 100%;
  max-height: 445px;
  object-fit: contain;
}

.internal-home .home-hero-search {
  width: min(690px, 66%);
  min-width: 520px;
  margin: 0 0 0 20px;
  position: static;
  z-index: 5;
}

.internal-home .home-hero-search .search-zone,
.internal-home .home-hero-search .search-box {
  width: 100%;
}

.internal-home .home-hero-search .search-box {
  min-height: 70px;
}

.internal-home .materials-heading {
  padding: 0;
}

.internal-home .materials-heading .eyebrow {
  margin-top: 0;
}

.internal-home .material-card {
  height: 116px;
  min-height: 116px;
}

.internal-home .material-cover {
  width: 160px;
  height: 90px;
  min-height: 90px;
  aspect-ratio: 16 / 9;
}

.internal-home .material-cover > img,
.internal-home .material-cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1600px) and (min-width: 1241px) {
  .internal-home .home-fixed-shell {
    width: min(1540px, calc(100vw - 32px));
    grid-template-columns: minmax(0, 1.72fr) minmax(390px, .92fr);
    padding: 22px 24px;
    gap: 22px;
  }
  .internal-home .home-sidebar-column {
    padding: 28px 0 0 22px;
  }
  .internal-home .home-hero-top {
    grid-template-columns: minmax(0, .98fr) minmax(350px, 1.02fr);
    gap: 18px;
  }
  .internal-home .home-hero-copy {
    padding: 28px 0 0 14px;
  }
  .internal-home .home-hero-visual {
    padding-top: 14px;
  }
  .internal-home .home-hero-visual img {
    max-height: 390px;
  }
  .internal-home .home-hero-search {
    width: min(630px, 68%);
    min-width: 470px;
    margin-left: 14px;
  }
  .internal-home .material-card {
    grid-template-columns: 158px minmax(0, 1fr);
  }
  .internal-home .material-cover {
    width: 144px;
    height: 81px;
  }
}

@media (max-width: 1240px) {
  .internal-home .home-fixed-shell {
    width: min(100% - 28px, 1080px);
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .internal-home .home-sidebar-column {
    padding: 24px 0 0;
    border-left: 0;
    border-top: 1px solid #e5eaf2;
  }
  .internal-home .home-hero-compact {
    min-height: 0;
    overflow: visible;
  }
  .internal-home .home-hero-top {
    grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr);
  }
  .internal-home .home-hero-copy {
    padding: 18px 0 0;
  }
  .internal-home .home-hero-visual {
    max-width: 520px;
    padding-top: 4px;
  }
  .internal-home .home-hero-visual img {
    max-height: 340px;
  }
  .internal-home .home-hero-search {
    width: min(690px, 72%);
    min-width: 0;
    margin-left: 0;
  }
  .internal-home .materials-scroll {
    max-height: 620px;
  }
}

@media (max-width: 820px) {
  .internal-home .home-hero-top {
    grid-template-columns: 1fr;
  }
  .internal-home .home-hero-visual {
    width: min(100%, 500px);
    margin: 0 auto;
  }
  .internal-home .home-hero-search {
    width: 100%;
  }
}

/* Unified inner pages: grey canvas, centred logo and white content card. */
body.publication-page,
body.publication-home {
  min-height: 100vh;
  background: #f3f6fb;
}

.publication-page .site-topbar,
.publication-home .site-topbar {
  height: 72px;
  justify-content: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid #e4e9f2;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}

.publication-page .brand-logo,
.publication-home .brand-logo {
  width: 126px;
  height: auto;
}

.publication-page .page-shell,
.publication-home .home-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 28px auto 44px;
  padding: 52px 68px 82px;
  border: 1px solid #e3e8f1;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(28, 43, 86, .08);
}

.publication-page .page-shell {
  min-height: calc(100vh - 144px);
}

@media (max-width: 760px) {
  .publication-page .page-shell,
  .publication-home .home-shell {
    width: min(100% - 24px, 640px);
    margin: 12px auto 26px;
    padding: 28px 20px 48px;
    border-radius: 22px;
  }
}

/* v6.1 geometry corrections after full-page render check */
.internal-home .home-hero-compact {
  align-items: stretch;
}

.internal-home .home-hero-top {
  height: 100%;
  grid-template-columns: minmax(600px, 1.18fr) minmax(350px, .82fr);
  align-items: start;
  align-self: stretch;
}

.internal-home .home-hero-copy h1 {
  font-size: clamp(56px, 4vw, 84px);
}

.internal-home .home-hero-visual::before {
  display: none;
}

@media (max-width: 1600px) and (min-width: 1241px) {
  .internal-home .home-hero-top {
    grid-template-columns: minmax(520px, 1.16fr) minmax(320px, .84fr);
  }
  .internal-home .home-hero-copy h1 {
    font-size: clamp(52px, 4vw, 76px);
  }
}

@media (max-width: 1240px) {
  .internal-home .home-hero-top {
    grid-template-columns: minmax(500px, 1.18fr) minmax(280px, .82fr);
  }
  .internal-home .home-hero-copy h1 {
    font-size: clamp(48px, 6.2vw, 64px);
  }
  .internal-home .home-hero-visual {
    max-width: 410px;
  }
  .internal-home .home-hero-visual img {
    max-height: 300px;
  }
}

@media (max-width: 900px) {
  .internal-home .home-hero-top {
    grid-template-columns: 1fr;
  }
  .internal-home .home-hero-visual {
    display: none;
  }
}

.internal-home .home-hero-compact {
  grid-template-columns: minmax(0, 1fr);
}

.internal-home .home-hero-compact,
.internal-home .home-hero-top {
  grid-template-areas: none;
}

.internal-home .home-hero-copy,
.internal-home .home-hero-visual,
.internal-home .home-hero-search {
  grid-area: auto;
}

/* ===== v6.2 front-only layout locked to the approved reference ===== */
@media (min-width: 1241px) {
  body.internal-home {
    overflow: hidden;
    background: #f3f6fb;
  }

  .internal-home .home-fixed-shell {
    width: calc(100vw - 56px);
    max-width: 1864px;
    height: calc(100vh - 20px);
    max-height: 1060px;
    margin: 10px auto;
    padding: 24px 26px;
    display: grid;
    grid-template-columns: minmax(0, 2.02fr) minmax(520px, 1fr);
    gap: 26px;
    overflow: hidden;
    border: 1px solid #e2e7f0;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(27, 43, 86, .09);
  }

  .internal-home .home-main-column {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: 468px auto;
    align-content: start;
    gap: 18px;
  }

  .internal-home .home-sidebar-column {
    min-width: 0;
    min-height: 0;
    padding: 34px 0 0 24px;
    border-left: 1px solid #e5eaf2;
  }

  .internal-home .home-hero-compact {
    height: 468px;
    min-height: 468px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0;
    overflow: hidden;
  }

  .internal-home .home-hero-top {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(460px, .98fr);
    gap: 18px;
    align-items: start;
  }

  .internal-home .home-hero-copy {
    width: auto;
    max-width: 650px;
    padding: 34px 0 0 26px;
    position: relative;
    z-index: 3;
  }

  .internal-home .home-hero-copy .eyebrow,
  .internal-home .materials-heading .eyebrow {
    margin: 0 0 15px;
    color: #123bd4;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .internal-home .home-hero-copy h1 {
    max-width: 610px;
    margin: 0;
    font-size: clamp(64px, 4vw, 78px);
    line-height: .94;
    letter-spacing: -.066em;
  }

  .internal-home .home-hero-lead {
    max-width: 600px;
    margin: 26px 0 0;
    color: #62697b;
    font-size: 20px;
    line-height: 1.55;
  }

  .internal-home .home-hero-visual {
    width: 100%;
    max-width: 570px;
    padding: 10px 0 0;
    position: static;
    align-self: start;
    justify-self: end;
    transform: none;
  }

  .internal-home .home-hero-visual::before {
    display: none;
  }

  .internal-home .home-hero-visual img {
    width: 100%;
    max-height: 392px;
    display: block;
    object-fit: contain;
  }

  .internal-home .home-hero-search {
    width: min(760px, 72%);
    min-width: 620px;
    margin: 0;
    position: static;
    z-index: 5;
  }

  .internal-home .home-hero-search .search-zone,
  .internal-home .home-hero-search .search-box {
    width: 100%;
  }

  .internal-home .home-hero-search .search-zone {
    margin: 0;
  }

  .internal-home .home-hero-search .search-box {
    min-height: 64px;
    padding: 0 18px;
    border: 1px solid #dce3ef;
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(30, 52, 120, .08);
  }

  .internal-home .home-hero-search .search-box input {
    font-size: 17px;
  }

  .internal-home .home-main-bottom {
    min-height: 0;
    display: block;
  }

  .internal-home .home-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
  }

  .internal-home .home-category-card {
    height: 104px;
    min-height: 104px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 22px;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid #e2e7f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(29, 45, 91, .035);
  }

  .internal-home .home-category-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .internal-home .home-category-card h3 {
    margin: 0 0 5px;
    font-size: 17px;
    line-height: 1.15;
  }

  .internal-home .home-category-card p {
    margin: 0;
    color: #697082;
    font-size: 13px;
    line-height: 1.45;
  }

  .internal-home .home-category-arrow {
    align-self: center;
    justify-self: end;
    font-size: 23px;
  }

  .internal-home .materials-section-home {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 0;
  }

  .internal-home .materials-heading {
    display: grid;
    gap: 14px;
    margin: 0 0 14px;
    padding: 0;
  }

  .internal-home .materials-heading h2 {
    margin: 0;
    font-size: clamp(42px, 2.7vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
  }

  .internal-home .material-tabs {
    display: flex;
    gap: 10px;
    padding: 0;
    overflow-x: auto;
  }

  .internal-home .material-tab {
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
  }

  .internal-home .materials-scroll {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
  }

  .internal-home .material-grid-feed {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .internal-home .material-card {
    height: 108px;
    min-height: 108px;
    display: grid;
    grid-template-columns: 164px minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    border: 1px solid #e2e6ef;
    border-radius: 18px;
    background: #fff;
  }

  .internal-home .material-cover {
    width: 150px;
    height: 84px;
    min-height: 84px;
    aspect-ratio: 16 / 9;
    align-self: center;
    justify-self: center;
    overflow: hidden;
    border-radius: 13px;
  }

  .internal-home .material-cover > img,
  .internal-home .material-cover-fallback {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }

  .internal-home .material-card-body {
    height: 108px;
    min-height: 108px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    align-content: start;
    gap: 3px;
    padding: 12px 14px 10px;
  }

  .internal-home .material-card-body > strong {
    min-height: 19px;
    margin: 1px 0 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 16px;
    line-height: 1.2;
  }

  .internal-home .material-state,
  .internal-home .material-badge {
    min-height: 17px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 10px;
  }

  .internal-home .material-description {
    min-height: 31px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #73798a;
    font-size: 11px;
    line-height: 1.4;
  }

  .internal-home .material-link {
    align-self: end;
    padding: 0;
    font-size: 11px;
  }
}

@media (min-width: 1241px) and (max-height: 900px) {
  .internal-home .home-main-column {
    grid-template-rows: 450px auto;
  }

  .internal-home .home-hero-compact {
    height: 450px;
    min-height: 450px;
  }

  .internal-home .home-hero-copy {
    padding-top: 32px;
  }

  .internal-home .home-hero-visual img {
    max-height: 372px;
  }

  .internal-home .home-category-card {
    height: 98px;
    min-height: 98px;
  }
}

@media (min-width: 1241px) and (max-width: 1600px) {
  .internal-home .home-fixed-shell {
    grid-template-columns: minmax(0, 1.86fr) minmax(440px, 1fr);
    padding: 22px 24px;
    gap: 22px;
  }

  .internal-home .home-sidebar-column {
    padding-left: 22px;
  }

  .internal-home .home-hero-top {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr);
  }

  .internal-home .home-hero-copy {
    padding-left: 18px;
  }

  .internal-home .home-hero-copy h1 {
    font-size: clamp(58px, 4.2vw, 72px);
  }

  .internal-home .home-hero-visual {
    max-width: 500px;
  }

  .internal-home .home-hero-search {
    width: min(700px, 73%);
    min-width: 560px;
  }

  .internal-home .material-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .internal-home .material-cover {
    width: 136px;
    height: 76px;
  }
}

@media (max-width: 1240px) {
  .internal-home .home-fixed-shell {
    width: min(100% - 28px, 1080px);
    height: auto;
    margin: 14px auto 28px;
    padding: 24px 22px;
    grid-template-columns: 1fr;
    gap: 26px;
    overflow: visible;
  }

  .internal-home .home-main-column {
    grid-template-rows: auto auto;
  }

  .internal-home .home-sidebar-column {
    padding: 24px 0 0;
    border-left: 0;
    border-top: 1px solid #e5eaf2;
  }

  .internal-home .home-hero-compact {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .internal-home .home-hero-top {
    grid-template-columns: minmax(0, 1fr) minmax(330px, .82fr);
  }

  .internal-home .home-hero-copy {
    padding: 18px 0 0;
  }

  .internal-home .home-hero-visual {
    max-width: 520px;
    padding-top: 4px;
  }

  .internal-home .home-hero-search {
    width: min(690px, 72%);
    min-width: 0;
    margin: 0;
  }

  .internal-home .materials-scroll {
    max-height: 620px;
  }
}

/* ===== v6.3 final home composition: matched to the approved first layout ===== */
@media (min-width: 1241px) {
  .internal-home .home-main-column {
    grid-template-rows: 505px auto;
  }

  .internal-home .home-hero-compact {
    height: 505px;
    min-height: 505px;
  }

  .internal-home .home-hero-top {
    grid-template-columns: minmax(0, .92fr) minmax(500px, 1.08fr);
    gap: 4px;
  }

  .internal-home .home-hero-copy {
    max-width: 650px;
    padding: 34px 0 0 26px;
  }

  .internal-home .home-hero-copy .eyebrow {
    margin-bottom: 60px;
  }

  .internal-home .home-hero-copy h1 {
    max-width: 610px;
  }

  .internal-home .home-hero-lead {
    margin-top: 27px;
  }

  .internal-home .home-hero-visual {
    width: 100%;
    max-width: 650px;
    padding-top: 0;
    align-self: start;
    justify-self: end;
    transform: translateY(-4px);
  }

  .internal-home .home-hero-visual img {
    width: 100%;
    max-height: 438px;
  }

  .internal-home .home-hero-search {
    width: min(850px, 80%);
    min-width: 700px;
  }
}

@media (min-width: 1241px) and (max-height: 900px) {
  .internal-home .home-main-column {
    grid-template-rows: 485px auto;
  }

  .internal-home .home-hero-compact {
    height: 485px;
    min-height: 485px;
  }

  .internal-home .home-hero-copy .eyebrow {
    margin-bottom: 48px;
  }

  .internal-home .home-hero-visual img {
    max-height: 414px;
  }
}

@media (min-width: 1241px) and (max-width: 1600px) {
  .internal-home .home-hero-top {
    grid-template-columns: minmax(0, .94fr) minmax(420px, 1.06fr);
  }

  .internal-home .home-hero-copy {
    padding-left: 18px;
  }

  .internal-home .home-hero-copy .eyebrow {
    margin-bottom: 48px;
  }

  .internal-home .home-hero-visual {
    max-width: 590px;
  }

  .internal-home .home-hero-visual img {
    max-height: 410px;
  }

  .internal-home .home-hero-search {
    width: min(780px, 80%);
    min-width: 620px;
  }
}

/* ===== v7 visual editor/public media additions ===== */
.home-hero-visual img {
  transform: translate(var(--hero-x, 0px), var(--hero-y, 0px)) scale(var(--hero-scale, 1));
  transform-origin: center center;
}

.home-extra-content {
  width: min(1180px, calc(100% - 40px));
  margin: 26px auto 70px;
}
.home-extra-card {
  padding: clamp(28px, 4vw, 64px);
  border: 1px solid #e2e7f0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(25, 39, 78, .08);
}

.page-content .media-block {
  width: 100%;
}
.page-content .media-size-compact { width: min(480px, 100%); }
.page-content .media-size-standard { width: min(760px, 100%); }
.page-content .media-size-wide { width: min(980px, calc(100% + 80px)); }
.page-content .media-size-full { width: min(1180px, calc(100% + 240px)); }
.page-content .media-align-left { margin-left: 0; margin-right: auto; }
.page-content .media-align-center { margin-left: auto; margin-right: auto; }
.page-content .media-align-right { margin-left: auto; margin-right: 0; }
.page-content .media-fit-cover img,
.page-content .media-fit-cover video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.page-content .media-fit-contain img,
.page-content .media-fit-contain video { object-fit: contain; }

@media (max-width: 760px) {
  .home-extra-content { width: min(100% - 24px, 620px); margin-top: 16px; }
  .home-extra-card { padding: 22px 16px; border-radius: 20px; }
  .page-content .media-size-wide,
  .page-content .media-size-full { width: 100%; }
}

/* v9 editor-controlled positioning and uploaded icons */
.home-hero-copy,
.home-hero-search,
.home-main-bottom { transform: translateY(var(--home-section-y, 0)); }
.block-position-offset { transform: translateY(var(--block-offset-y, 0)); }
.custom-icon-image { width: 100%; height: 100%; object-fit: contain; display: block; }


/* v10: search dropdown must overlay the cards instead of being clipped by the fixed hero. */
.search-results[hidden] { display: none !important; }
@media (min-width: 1241px) {
  .internal-home .home-hero-compact {
    position: relative;
    z-index: 20;
    overflow: visible;
  }
  .internal-home .home-hero-search,
  .internal-home .home-hero-search .search-zone,
  .internal-home .search-results {
    position: relative;
    z-index: 100;
  }
  .internal-home .search-results {
    position: absolute;
  }
  .internal-home .home-main-bottom {
    position: relative;
    z-index: 1;
  }
}


/* v10.01 external HORECA visual system */
body[data-publication-id="external-horeca"] {
  --external-green: #0f8f67;
  background: linear-gradient(180deg, #fbfefd 0, #fff 560px);
}
body[data-publication-id="external-horeca"].publication-home .home-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
  gap: 24px 42px;
  align-items: center;
  padding-top: 54px;
}
body[data-publication-id="external-horeca"].publication-home .home-intro {
  max-width: none;
  margin: 0;
  text-align: left;
}
body[data-publication-id="external-horeca"].publication-home .home-intro h1 { font-size: clamp(42px, 5.2vw, 68px); }
body[data-publication-id="external-horeca"].publication-home .home-intro > p:last-child { margin-left: 0; }
body[data-publication-id="external-horeca"].publication-home .home-shell > .media-block:first-of-type {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  width: 100%;
}
body[data-publication-id="external-horeca"].publication-home .home-shell > .media-block:first-of-type img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 32px;
  box-shadow: 0 28px 70px rgba(15, 143, 103, .18);
}
body[data-publication-id="external-horeca"].publication-home .home-shell > .callout:first-of-type { grid-column: 1; margin: 0; }
body[data-publication-id="external-horeca"].publication-home .search-zone,
body[data-publication-id="external-horeca"].publication-home .link-cards,
body[data-publication-id="external-horeca"].publication-home .home-shell > .warning { grid-column: 1 / -1; }
body[data-publication-id="external-horeca"].publication-home .search-zone { margin: 24px 0 6px; width: 100%; }
body[data-publication-id="external-horeca"].publication-home .link-cards.home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body[data-publication-id="external-horeca"].publication-home .link-cards.home .link-card {
  min-height: 208px;
  grid-template-columns: 58px minmax(0,1fr);
  background: linear-gradient(145deg, #fff, #f8fcfa);
}
body[data-publication-id="external-horeca"] .custom-icon-image { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
body[data-publication-id="external-horeca"] .link-card-icon:has(.custom-icon-image) { overflow: hidden; padding: 0; background: #eff7f4; }
body[data-publication-id="external-horeca"] .link-card-icon:has(.custom-icon-image) { width: 58px; height: 58px; border-radius: 17px; }
body[data-publication-id="external-horeca"] .page-header { padding: 8px 0 28px; }
body[data-publication-id="external-horeca"] .page-lead { max-width: 760px; }
body[data-publication-id="external-horeca"] .page-content > .media-block:first-child { margin-top: 0; }
body[data-publication-id="external-horeca"] .page-content > .media-block:first-child img {
  width: 100%;
  max-height: 370px;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 22px 58px rgba(18, 35, 29, .12);
}
.page-shell[data-page-id^="external-task-"] { width: min(1080px, calc(100% - 48px)); }
.page-shell[data-page-id^="external-task-"] .link-cards.grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.page-shell[data-page-id^="external-task-"] .link-card { min-height: 150px; }
.page-shell[data-page-id^="external-mechanic-"] { width: min(1080px, calc(100% - 48px)); }
.page-shell[data-page-id^="external-mechanic-"] .page-content {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  gap: 18px;
  align-items: start;
}
.page-shell[data-page-id^="external-mechanic-"] .page-content > * { margin: 0; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(1) img { height: 100%; min-height: 330px; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(2) { grid-column: 2; grid-row: 1; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(3) { grid-column: 2; grid-row: 2; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(4) { grid-column: 1 / -1; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(5) { grid-column: 1; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(6) { grid-column: 2; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(7) { grid-column: 1 / -1; }
.page-shell[data-page-id^="external-mechanic-"] .callout.info {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  background: linear-gradient(145deg, var(--accent-soft), #fff);
}
.page-shell[data-page-id^="external-mechanic-"] .copy-message { border-radius: 22px; }
.page-shell[data-page-id^="external-mechanic-"] .rich-text {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.page-shell[data-page-id^="external-mechanic-"] .rich-text h3 { margin-top: 22px; }
.page-shell[data-page-id^="external-mechanic-"] .rich-text h3:first-child { margin-top: 0; }
.page-shell[data-page-id^="external-mechanic-"] .warning { height: 100%; }
body[data-publication-id="external-horeca"] .table-scroll { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
body[data-publication-id="external-horeca"] .table-scroll table { margin: 0; }
body[data-publication-id="external-horeca"] .copy-message { background: #111827; color: #fff; border-color: #111827; }
body[data-publication-id="external-horeca"] .copy-message .copy-button,
body[data-publication-id="external-horeca"] .copy-message .copy-toggle { color: #fff; }
body[data-publication-id="external-horeca"] .copy-message .copy-panel { border-color: rgba(255,255,255,.18); }
body[data-publication-id="external-horeca"] .copy-message pre { color: #f8fafc; }
@media (max-width: 900px) {
  body[data-publication-id="external-horeca"].publication-home .home-shell { grid-template-columns: 1fr; }
  body[data-publication-id="external-horeca"].publication-home .home-shell > .media-block:first-of-type { grid-column: 1; grid-row: auto; }
  body[data-publication-id="external-horeca"].publication-home .link-cards.home { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-shell[data-page-id^="external-mechanic-"] .page-content { grid-template-columns: 1fr; }
  .page-shell[data-page-id^="external-mechanic-"] .page-content > * { grid-column: 1 !important; grid-row: auto !important; }
  .page-shell[data-page-id^="external-mechanic-"] .page-content > :nth-child(1) img { min-height: 0; }
}
@media (max-width: 620px) {
  body[data-publication-id="external-horeca"].publication-home .link-cards.home,
  .page-shell[data-page-id^="external-task-"] .link-cards.grid { grid-template-columns: 1fr; }
  body[data-publication-id="external-horeca"].publication-home .home-shell { width: min(100% - 28px, 1180px); padding-top: 34px; }
  body[data-publication-id="external-horeca"].publication-home .home-intro h1 { font-size: 42px; }
}

/* v10.01 compact mechanism layout fixes */
.page-shell[data-page-id^="external-mechanic-"] .page-content > * { min-width: 0; }
.page-shell[data-page-id^="external-mechanic-"] .page-content > .media-block:first-child {
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch;
}
.page-shell[data-page-id^="external-mechanic-"] .page-content > .media-block:first-child img {
  width: 100%;
  max-width: 100%;
}
.page-shell[data-page-id^="external-mechanic-"] .table-scroll {
  width: 100%;
  min-width: 0;
}
.page-shell[data-page-id^="external-mechanic-"] .table-scroll table {
  width: 100%;
  table-layout: fixed;
}
.page-shell[data-page-id^="external-mechanic-"] .table-scroll th:first-child,
.page-shell[data-page-id^="external-mechanic-"] .table-scroll td:first-child { width: 34%; }
.page-shell[data-page-id^="external-mechanic-"] .table-scroll td,
.page-shell[data-page-id^="external-mechanic-"] .table-scroll th {
  overflow-wrap: anywhere;
  word-break: normal;
}
body[data-publication-id="external-horeca"] .copy-message .copy-button {
  border-color: rgba(255,255,255,.34);
  background: rgba(255,255,255,.1);
}
body[data-publication-id="external-horeca"] .copy-message-head {
  background: transparent;
  border-bottom-color: rgba(255,255,255,.16);
}
.page-shell[data-page-id^="external-mechanic-"] .table-scroll table { min-width: 0; }
@media (max-width: 620px) {
  .page-shell[data-page-id^="external-mechanic-"] .table-scroll th,
  .page-shell[data-page-id^="external-mechanic-"] .table-scroll td { padding: 11px 10px; font-size: 12px; }
  .page-shell[data-page-id^="external-mechanic-"] .table-scroll th:first-child,
  .page-shell[data-page-id^="external-mechanic-"] .table-scroll td:first-child { width: 38%; }
}


/* v10.2 external HORECA redesigned in Proryv style */
body[data-publication-id="external-horeca"] {
  --accent: #123bd4;
  --accent-soft: #eaf0ff;
  background: linear-gradient(180deg, #f5f8ff 0, #ffffff 520px);
}
body[data-publication-id="external-horeca"] .site-topbar {
  border-bottom-color: #dbe4f2;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
}
body[data-publication-id="external-horeca"].internal-home .home-fixed-shell {
  width: min(1880px, calc(100% - 40px));
}
body[data-publication-id="external-horeca"].internal-home .home-hero-copy .eyebrow,
body[data-publication-id="external-horeca"].internal-home .materials-heading .eyebrow {
  color: #123bd4;
}
body[data-publication-id="external-horeca"].internal-home .home-categories.home-categories-extended {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body[data-publication-id="external-horeca"] .category-2 .home-category-icon,
body[data-publication-id="external-horeca"] .category-4 .home-category-icon,
body[data-publication-id="external-horeca"] .category-6 .home-category-icon {
  background: #ff7a00;
}
body[data-publication-id="external-horeca"] .home-category-card { min-height: 168px; }
body[data-publication-id="external-horeca"] .materials-scroll { scrollbar-color: #b9c8ef transparent; }
body[data-publication-id="external-horeca"].internal-home .home-extra-content,
body[data-publication-id="external-horeca"].internal-home .home-fixed-shell {
  width: min(1880px, calc(100% - 40px));
}
body[data-publication-id="external-horeca"].internal-home .home-extra-card {
  border-color: #d9e3f3;
  box-shadow: 0 18px 42px rgba(23, 43, 99, .06);
}

body[data-publication-id="external-horeca"] .page-shell[data-page-id^="external-task-"],
body[data-publication-id="external-horeca"] .page-shell[data-page-id^="external-mechanic-"],
body[data-publication-id="external-horeca"] .page-shell[data-page-id="external-filter"],
body[data-publication-id="external-horeca"] .page-shell[data-page-id="external-measurement"] {
  width: min(1480px, calc(100% - 40px));
  margin: 26px auto 56px;
  padding: 26px 30px 34px;
  border: 1px solid #d9e3f3;
  border-radius: 32px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 70px rgba(23, 43, 99, .06);
}
body[data-publication-id="external-horeca"] .page-header { padding-top: 4px; border-bottom-color: #dbe4f2; }
body[data-publication-id="external-horeca"] .page-content { display: grid; gap: 18px; }
body[data-publication-id="external-horeca"] .page-content > * { margin: 0; }
body[data-publication-id="external-horeca"] .callout.info {
  border-color: #c9d8fb;
  background: linear-gradient(145deg, #eff4ff, #ffffff);
}
body[data-publication-id="external-horeca"] .callout.warning {
  border-color: #ffd9b6;
  background: linear-gradient(145deg, #fff6ef, #ffffff);
}
body[data-publication-id="external-horeca"] .rich-text,
body[data-publication-id="external-horeca"] .copy-message,
body[data-publication-id="external-horeca"] .table-scroll,
body[data-publication-id="external-horeca"] .accordion { border-radius: 22px; }
body[data-publication-id="external-horeca"] .copy-message {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
body[data-publication-id="external-horeca"] .copy-message .copy-button,
body[data-publication-id="external-horeca"] .copy-message .copy-toggle { color: #fff; }
body[data-publication-id="external-horeca"] .copy-message .copy-panel { border-color: rgba(255,255,255,.14); }
body[data-publication-id="external-horeca"] .copy-message pre { color: #f8fafc; }
body[data-publication-id="external-horeca"] .link-cards.grid,
body[data-publication-id="external-horeca"] .link-cards.list { gap: 18px; }
body[data-publication-id="external-horeca"] .link-cards.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-publication-id="external-horeca"] .link-card { min-height: 156px; align-items: start; }
body[data-publication-id="external-horeca"] .link-cards.list .link-card { min-height: 0; }
body[data-publication-id="external-horeca"] .link-card-icon { background: #eaf0ff; color: #123bd4; }
body[data-publication-id="external-horeca"] .link-cards.grid .link-card:nth-child(even) .link-card-icon,
body[data-publication-id="external-horeca"] .link-cards.list .link-card:nth-child(even) .link-card-icon { background: #fff0e5; color: #ff7a00; }
body[data-publication-id="external-horeca"] .link-card h3 { font-size: 18px; line-height: 1.15; }
body[data-publication-id="external-horeca"] .button-row .small-button.secondary { border-color: #123bd4; color: #123bd4; }

@media (max-width: 1280px) {
  body[data-publication-id="external-horeca"].internal-home .home-categories.home-categories-extended { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body[data-publication-id="external-horeca"] .page-shell[data-page-id^="external-task-"],
  body[data-publication-id="external-horeca"] .page-shell[data-page-id^="external-mechanic-"],
  body[data-publication-id="external-horeca"] .page-shell[data-page-id="external-filter"],
  body[data-publication-id="external-horeca"] .page-shell[data-page-id="external-measurement"] {
    width: min(100% - 20px, 1480px);
    padding: 22px 18px 28px;
    border-radius: 24px;
  }
  body[data-publication-id="external-horeca"] .link-cards.grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body[data-publication-id="external-horeca"].internal-home .home-categories.home-categories-extended { grid-template-columns: 1fr; }
}
