.entities-page {
  --entity-border: #e7e0ed;
  --entity-subtle: #f8f5fc;
  background: #fff;
}

.entities-page :is(h1, h2) { text-wrap: balance; }
.entities-page :is(a, button):focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
.entities-hero, .entities-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(32px, 5vw, 78px); }
.entities-hero { padding-block: clamp(52px, 7vw, 100px) clamp(48px, 6vw, 86px); }
.entities-hero .eyebrow { color: var(--purple); font-size: 13px; margin-bottom: 18px; }
.entities-hero h1 { margin: 0 0 24px; font-size: clamp(38px, 4.2vw, 60px); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; }
.entities-hero h1 > span { display: block; color: var(--purple); }
.entities-hero-copy > p, .entities-section-copy > p { color: var(--muted); font-size: 17px; line-height: 1.65; text-wrap: pretty; margin: 0 0 26px; }
.entities-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.entities-actions .button { font-size: 14px; min-height: 46px; }
.entities-actions .text-link { font-size: 14px; }

.entity-overview, .entity-workspace { margin: 0; min-width: 0; }
.entity-overview { --overview-rule: #d9cce9; --overview-text: #30263b; padding: clamp(14px, 2vw, 28px); border: 1px solid #e8dff2; border-radius: 28px; background: radial-gradient(ellipse at 46% 22%, #fcfafd, #f1eaf9 85%); }
.entity-overview-window, .entity-workspace-window { border: 1px solid #e2d8ec; border-radius: 17px; background: #fff; box-shadow: 0 15px 40px #4630570c; }
.entity-overview-window { padding: 0 13px 17px; color: var(--overview-text); }
.entity-overview-heading { display: flex; align-items: center; gap: 8px; min-height: 49px; padding-inline: 3px; border-bottom: 1px solid #ede8f1; color: #6f5288; font-size: 12px; font-weight: 650; }
.entity-account-node { position: relative; display: flex; align-items: center; gap: 10px; width: fit-content; margin: 18px auto 0; padding: 8px 14px; border: 1px solid #e5daef; border-radius: 10px; background: #f9f5fc; }
.entity-account-node::after { content: ""; position: absolute; top: 100%; left: 50%; height: 17px; border-left: 1px solid var(--overview-rule); }
.entity-account-node strong, .entity-branch-node strong { display: block; font-size: 13px; font-weight: 650; line-height: 1.25; }
.entity-account-node small, .entity-branch-node small { display: block; margin-top: 4px; color: #685b74; font-size: 10px; line-height: 1.3; }
.entity-overview-branches, .entity-library-nodes, .entity-workspace-libraries ul { list-style: none; padding: 0; margin: 0; }
.entity-overview-branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 32px; }
.entity-branch { position: relative; min-width: 0; padding: 7px; border: 1px solid var(--entity-tint); border-radius: 9px; background: var(--entity-bg); }
.entity-branch::before { content: ""; position: absolute; top: -17px; left: -5px; right: -5px; height: 16px; border-top: 1px solid var(--overview-rule); }
.entity-branch:first-child::before { left: 50%; }
.entity-branch:last-child::before { right: 50%; }
.entity-branch::after { content: ""; position: absolute; top: -17px; left: 50%; height: 16px; border-left: 1px solid var(--overview-rule); }
.entity-theme-sweden { --entity-tint: #d4e6df; --entity-bg: #f0f7f3; --entity-accent: #2c6b54; }
.entity-theme-germany { --entity-tint: #efdfd1; --entity-bg: #fcf5ef; --entity-accent: #875331; }
.entity-theme-product { --entity-tint: #e4ddf5; --entity-bg: #f6f2fd; --entity-accent: #674da0; }
.entity-branch-node { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 6px; min-height: 56px; padding: 6px 3px; }
.entity-branch-node > svg { color: var(--entity-accent); }
.entity-branch-node small > span { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #3c856a; vertical-align: 1px; }
.entity-library-nodes { display: grid; gap: 4px; }
.entity-library-nodes > li { display: flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 5px; border-radius: 5px; background: #fff; font-size: 10px; line-height: 1.3; overflow-wrap: anywhere; }
.entity-library-nodes svg { flex-shrink: 0; color: var(--entity-accent); }
.entity-overview figcaption, .entity-workspace figcaption { margin: 13px 0 0; color: #6f647b; font-size: 12px; text-align: center; line-height: 1.5; }
.entity-overview-capture { padding: clamp(10px, 1.6vw, 20px); }
.entity-overview-capture > img { display: block; width: 100%; height: auto; border: 1px solid #e2d8ec; border-radius: 15px; }
.entity-overview-capture figcaption a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }

.entities-workspace-section { background: #f4f7f5; }
.entities-workspace-section, .entities-governance, .entities-choices, .entities-questions { padding-block: clamp(48px, 7vw, 92px); }
.entities-page :is(.entities-section-copy, .entities-governance, .entities-choices, .entities-questions) h2 { margin: 0 0 22px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 650; line-height: 1.12; letter-spacing: -.03em; }
.entities-section-copy > p { margin-bottom: 0; }
.entity-workspace-window { overflow: hidden; border-color: #dfe6e0; }
.entity-workspace-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 13px; }
.entity-workspace-header > strong { font-size: 12px; white-space: nowrap; }
.entity-picker { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
.entity-picker button { min-height: 36px; padding: 4px 9px; border: 1px solid #e4e7e4; border-radius: 7px; background: #fff; color: #544b5d; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.entity-picker button:hover, .entity-picker button[aria-pressed="true"] { border-color: var(--entity-tint); background: var(--entity-bg); color: var(--entity-accent); }
.entity-picker button[aria-pressed="true"] { box-shadow: inset 0 -2px var(--entity-accent); }
.entity-workspace-banner { display: grid; grid-template-columns: 1fr .8fr; min-height: 166px; background: var(--entity-bg); }
.entity-workspace-banner > img { grid-column: 2; grid-row: 1; width: 100%; height: 100%; min-height: 166px; max-height: 225px; object-fit: cover; }
.entity-workspace-banner > div { grid-column: 1; grid-row: 1; align-self: center; padding: 20px; color: var(--entity-accent); }
.entity-workspace-banner span { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 11px; font-weight: 650; }
.entity-workspace-banner strong { display: block; font-size: clamp(20px, 2.5vw, 34px); font-weight: 650; line-height: 1.12; letter-spacing: -.035em; }
.entity-workspace-libraries { padding: 13px 15px 17px; }
.entity-workspace-libraries > small { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.entity-workspace-libraries ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.entity-workspace-libraries li { display: flex; align-items: center; gap: 7px; min-width: 0; border: 1px solid var(--entity-tint); border-radius: 7px; padding: 8px; background: var(--entity-bg); font-size: 11px; line-height: 1.4; }
.entity-workspace-libraries svg { flex-shrink: 0; color: var(--entity-accent); }

.entities-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(15px, 2.5vw, 38px); margin-top: 34px; }
.entities-card-grid > div > svg { margin-bottom: 14px; color: var(--purple); }
.entities-card-grid h3, .entities-questions h3 { margin: 0 0 9px; font-size: 20px; font-weight: 650; line-height: 1.3; letter-spacing: -.015em; }
.entities-card-grid p, .entities-questions p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.entities-governance-item { padding-top: 18px; border-top: 1px solid var(--entity-border); }
.entities-choices { background: var(--entity-subtle); }
.entities-choices .entities-card-grid > div { padding: clamp(18px, 2.3vw, 30px); border: 1px solid var(--entity-border); border-radius: 16px; background: #fff; }
.entities-choices .entities-card-grid > .entities-choice-highlight { border-color: #ceb8e7; background: #f1e8fb; }
.entities-card-grid .text-link { margin-top: 15px; font-size: 14px; }
.entities-questions { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 40px; }
.entities-questions > div > div + div { margin-top: 21px; padding-top: 21px; border-top: 1px solid var(--entity-border); }
.entities-closing h2 { max-width: 720px; }

@media (max-width: 900px) {
  .entities-hero, .entities-split { grid-template-columns: 1fr; }
  .entities-hero-copy, .entities-section-copy { max-width: 620px; }
  .entities-hero > figure, .entities-split > figure { width: min(100%, 640px); margin-inline: auto; }
}

@media (max-width: 640px) {
  .entities-card-grid, .entities-questions { grid-template-columns: 1fr; }
  .entities-questions { gap: 0; }
  .entities-card-grid { margin-top: 22px; }
}

@media (max-width: 460px) {
  .entities-hero h1 { font-size: clamp(34px, 8.5vw, 39px); }
  .entity-overview { padding: 10px; border-radius: 19px; }
  .entity-overview-window { padding-inline: 7px; }
  .entity-overview-branches { gap: 4px; }
  .entity-branch { padding: 4px; }
  .entity-branch::before { left: -3px; right: -3px; }
  .entity-branch-node { display: block; padding: 4px 0 6px; min-height: 62px; }
  .entity-branch-node > svg { display: none; }
  .entity-branch-node strong { font-size: 11px; overflow-wrap: anywhere; }
  .entity-branch-node small, .entity-library-nodes > li { font-size: 9px; }
  .entity-library-nodes svg { display: none; }
  .entity-picker { width: 100%; margin-left: 0; }
  .entity-picker button { flex: 1 1 auto; }
  .entity-workspace-banner > div { padding: 12px; }
}
