:root {
  --ink: #14201d;
  --muted: #62706b;
  --paper: #f5f3ed;
  --surface: #fffefa;
  --line: #dcded8;
  --green: #145c4a;
  --green-dark: #0b4436;
  --mint: #dff3e9;
  --orange: #ef8a4c;
  --danger: #a23931;
  --shadow: 0 18px 45px rgb(26 55 47 / 8%);
  --shell-gutter: clamp(1rem, 2vw, 3rem);
  --shell-max-width: 1760px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
/* Wide tables own their horizontal scrollbars; the page stays within the viewport. */
html { min-height: 100%; overflow-x: clip; }
body { display: flex; flex-direction: column; margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: clip; background: radial-gradient(circle at 90% 0, #e5efe6 0, transparent 36rem), var(--paper); }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; }
code, pre { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
code { font-size: .86em; overflow-wrap: anywhere; }

.shell { width: min(var(--shell-max-width), calc(100% - 2 * var(--shell-gutter))); min-width: 0; margin-inline: auto; }
.site-header { border-bottom: 1px solid rgb(20 32 29 / 10%); background: rgb(255 254 250 / 86%); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.header-inner { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: .75rem; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.03em; font-size: 1.15rem; }
.brand-mark { display: block; width: 34px; height: 34px; object-fit: contain; }
.header-actions { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: 1rem; min-width: 0; }
nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .7rem clamp(.75rem, 1.25vw, 1.5rem); min-width: 0; }
nav a { color: var(--ink); text-decoration: none; font-size: .94rem; font-weight: 650; }
nav a:hover { color: var(--green); }
.nav-form, .compact-form { margin: 0; }
.nav-button { border: 0; background: transparent; color: var(--ink); padding: 0; cursor: pointer; font-size: .94rem; font-weight: 650; }
.nav-button:hover { color: var(--green); }
.language-picker { position: relative; flex: none; border: 0; margin: 0; padding: 0; }
.language-picker summary { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 52px; height: 40px; padding: 0 .65rem; border: 1px solid #c9d8d1; border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; list-style: none; white-space: nowrap; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--green); border-bottom: 1.5px solid var(--green); transform: rotate(45deg) translateY(-2px); }
.language-picker summary:hover, .language-picker[open] summary { border-color: var(--green); background: #f2faf6; }
.language-flag { display: block; width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgb(20 32 29 / 16%); }
.language-auto-icon { display: block; width: 20px; height: 20px; }
.language-picker summary:focus-visible, .language-option:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: .25rem; }
.language-options { position: absolute; top: calc(100% + .5rem); right: 0; z-index: 30; display: grid; gap: .1rem; min-width: 15.5rem; padding: .4rem; background: var(--surface); border: 1px solid rgb(20 32 29 / 16%); border-radius: .65rem; box-shadow: 0 12px 32px rgb(20 32 29 / 13%); }
.language-option { display: flex; gap: .6rem; align-items: center; width: 100%; padding: .6rem .7rem; border: 0; border-radius: .35rem; background: transparent; color: var(--ink); font-size: .9rem; text-align: left; cursor: pointer; }
.language-option:hover, .language-option.selected { background: rgb(20 92 74 / 9%); }
.language-option.selected { font-weight: 700; }
.language-option.selected::after { content: "✓"; margin-left: auto; color: var(--green); }
.language-option-auto { border-bottom: 1px solid var(--line); border-radius: .35rem .35rem 0 0; margin-bottom: .15rem; }
main.shell { flex: 1 0 auto; padding-block: clamp(1.5rem, 2.5vw, 3.5rem) clamp(2.5rem, 3vw, 5rem); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer .shell { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.1rem, 4.8vw, 4.6rem); line-height: .98; letter-spacing: -.055em; margin-bottom: 1.2rem; }
h2 { letter-spacing: -.03em; }
.eyebrow { color: var(--green); font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; margin-bottom: .85rem; }
.hero { min-height: 470px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .75fr); gap: clamp(2rem, 4vw, 5rem); align-items: center; }
.hero > div:first-child { max-width: 900px; }
.hero-copy { max-width: 700px; color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.3rem); line-height: 1.65; }
.hero-actions, .form-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.7rem; }
.button { display: inline-flex; min-height: 42px; padding: .67rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); align-items: center; justify-content: center; text-decoration: none; font-weight: 720; cursor: pointer; }
.button:hover { border-color: #aab6b1; color: var(--green); }
.button.primary { background: var(--green); color: white; border-color: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.danger { color: var(--danger); border-color: var(--danger); }
.button.danger:hover { background: var(--danger); color: white; }
.button.microsoft-login { width: 100%; background: #2f2f2f; color: white; border-color: #2f2f2f; }
.button.microsoft-login:hover { background: #111; color: white; border-color: #111; }
.login-separator { display: flex; align-items: center; gap: .8rem; margin: 1rem 0; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.login-separator::before, .login-separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.version-card { background: var(--green); color: white; border-radius: 24px; padding: 2rem; transform: rotate(1.5deg); box-shadow: 0 24px 65px rgb(10 68 53 / 20%); }
.version-card > span { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: #c9e7dd; }
.version-card > strong { display: block; font-size: 2.15rem; margin: .5rem 0 1.8rem; }
.version-card > div { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgb(255 255 255 / 20%); padding-top: 1rem; }
.version-card b { display: grid; place-items: center; width: 44px; height: 44px; background: var(--orange); border-radius: 50%; font-size: 1.3rem; }
.version-card p { color: #d6ebe4; line-height: 1.55; margin: 1.5rem 0 0; font-size: .9rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.feature-grid article { padding: 2rem; }
.feature-grid article + article { border-left: 1px solid var(--line); }
.feature-grid h2 { font-size: 1.2rem; margin: .8rem 0; }
.feature-grid p { color: var(--muted); line-height: 1.6; margin: 0; }
.feature-number { color: var(--orange); font-size: .78rem; font-weight: 800; }
.content-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1rem, 1.5vw, 2rem); box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.architecture-card { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; margin-top: 1.2rem; }
.architecture-card p:last-child { color: var(--muted); line-height: 1.65; }
.page-heading, .section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
.page-heading > div, .section-heading > div { min-width: 0; overflow-wrap: anywhere; }
.page-heading { margin-bottom: 2rem; }
.page-heading h1 { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: .6rem; }
.page-heading p:last-child, .section-heading p { color: var(--muted); margin-bottom: 0; }
.notice { background: var(--mint); border: 1px solid #b5dcca; border-radius: 10px; color: var(--green-dark); padding: .9rem 1rem; margin-bottom: 1.2rem; }
.relationship-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 1.5rem 3rem; align-items: center; }
.relationship-card p { color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.relationship-flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.relationship-flow span { display: grid; gap: .2rem; }
.relationship-flow strong { color: var(--green-dark); }
.relationship-flow small, .relation-label { color: var(--muted); font-size: .76rem; }
.relationship-flow b { color: var(--orange); font-size: .8rem; white-space: nowrap; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.admin-grid > *, .form-grid > *, .architecture-card > *, .relationship-card > * { min-width: 0; }
.admin-column { min-width: 0; }
.admin-column > .content-card:last-child { margin-bottom: 0; }
.site-editor-grid { margin-bottom: 1.2rem; }
.stack-form { display: grid; gap: .85rem; }
label { display: grid; gap: .38rem; font-size: .88rem; font-weight: 670; }
input, select, textarea { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #c9cfca; border-radius: 8px; background: white; color: var(--ink); padding: .65rem .75rem; }
fieldset { min-width: 0; }
textarea { min-height: 88px; resize: vertical; }
.guide-editor { min-height: 260px; font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: .82rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgb(20 92 74 / 22%); outline-offset: 2px; border-color: var(--green); }
.check { display: flex; align-items: flex-start; gap: .6rem; }
.check input { width: 18px; min-height: 18px; height: 18px; margin-top: .1rem; accent-color: var(--green); }
.important-check { background: var(--mint); padding: 1rem; border-radius: 9px; }
.inline-form { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; align-items: start; }
.inline-form > input, .inline-form > select, .inline-form > label { flex: 1 1 220px; min-width: 0; }
.policy-assignment-form { align-items: center; }
.policy-assignment-form select { flex: 1 1 360px; min-width: 0; }
.policy-assignment-form .button { flex: 0 0 auto; white-space: nowrap; }
.policy-assignment-form.table-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; width: 100%; margin: 0; }
.policy-assignment-form.table-form select { width: 100%; min-width: 0; }
.partner-picker { display: grid; gap: 1rem; margin-top: 1rem; }
.partner-picker fieldset { border: 0; padding: 0; margin: 0; }
.partner-picker legend { font-weight: 750; margin-bottom: .65rem; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .65rem; }
.partner-option { border: 1px solid var(--line); border-radius: 9px; padding: .75rem; background: #fff; }
.catalog-picker { align-items: end; }
.catalog-picker label { flex: 1 1 420px; }
.catalog-picker .button { flex: 0 0 auto; white-space: nowrap; }
.integration-form select { flex: 1.2; }
.integration-form input { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.form-grid .wide { grid-column: 1 / -1; }
.theme-fields { display: grid; gap: .9rem; margin: .25rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.theme-fields legend { padding: 0 .35rem; color: var(--ink); font-weight: 750; }
.theme-fields > .hint { margin: -.25rem 0 .15rem; }
.theme-color { display: grid; gap: .4rem; }
.color-field { display: grid; grid-template-columns: 52px minmax(130px, 1fr) auto; gap: .6rem; align-items: center; }
.color-picker-toggle { display: grid; place-items: center; width: 52px; height: 42px; padding: 5px; border: 1px solid #c9cfca; border-radius: 8px; background: var(--surface); cursor: pointer; }
.color-picker-toggle:hover, .color-picker-toggle[aria-expanded="true"] { border-color: var(--green); background: #f2faf6; }
.color-picker-swatch { display: block; width: 100%; height: 100%; border: 1px solid rgb(20 32 29 / 15%); border-radius: 4px; background: var(--green); }
.color-picker-panel { --picker-hue: 165; --picker-saturation: 64%; display: grid; gap: .65rem; padding: .9rem 1rem; border: 1px solid #b5dcca; border-radius: 9px; background: #f7fbf8; }
.color-picker-panel[hidden] { display: none; }
.color-picker-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .83rem; }
.color-picker-heading code { color: var(--muted); }
.color-picker-panel label { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: .8rem; font-size: .8rem; }
.color-picker-panel input[type="range"] { appearance: none; width: 100%; min-height: 16px; height: 16px; margin: 0; padding: 0; border: 1px solid rgb(20 32 29 / 16%); border-radius: 999px; cursor: pointer; }
.color-picker-panel input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border: 3px solid white; border-radius: 50%; background: var(--ink); box-shadow: 0 1px 5px rgb(20 32 29 / 35%); }
.color-picker-panel input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid white; border-radius: 50%; background: var(--ink); box-shadow: 0 1px 5px rgb(20 32 29 / 35%); }
.color-picker-panel [data-theme-color-channel="h"] { background: linear-gradient(to right, #dd5050, #e4c54e, #5ab967, #50b9bb, #5369c2, #b85db9, #dd5050); }
.color-picker-panel [data-theme-color-channel="s"] { background: linear-gradient(to right, hsl(var(--picker-hue) 0% 50%), hsl(var(--picker-hue) 100% 50%)); }
.color-picker-panel [data-theme-color-channel="l"] { background: linear-gradient(to right, #000, hsl(var(--picker-hue) var(--picker-saturation) 50%), #fff); }
.color-field .color-clear { white-space: nowrap; }
.form-card { max-width: 700px; }
.account-shell { display: grid; place-items: start center; }
.account-shell .form-card { width: min(100%, 620px); }
.validation { color: var(--danger); font-size: .82rem; }
.validation-summary-valid { display: none; }
.hint, .muted { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.form-help { position: relative; width: fit-content; margin: 0 0 .8rem auto; padding: 0; border: 0; z-index: 10; }
.form-help summary { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #a9c8bd; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-family: Georgia, serif; font-size: 1rem; font-weight: 800; line-height: 1; list-style: none; cursor: pointer; }
.form-help summary::-webkit-details-marker { display: none; }
.form-help summary:hover { border-color: var(--green); background: #cfecdf; }
.form-help[open] summary { background: var(--green); color: white; }
.form-help-card { position: absolute; top: calc(100% + .55rem); right: 0; width: min(440px, calc(100vw - 3rem)); max-height: min(70vh, 620px); overflow: auto; padding: 1.15rem; border: 1px solid #b5dcca; border-radius: 12px; background: var(--surface); box-shadow: 0 22px 55px rgb(10 68 53 / 18%); }
.form-help-card h3 { margin-bottom: .45rem; color: var(--green-dark); font-size: 1.05rem; }
.form-help-card > p { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.form-help-card dl { display: grid; gap: .75rem; margin: 0; }
.form-help-card dl div { padding-top: .7rem; border-top: 1px solid var(--line); }
.form-help-card dt { font-size: .82rem; font-weight: 800; }
.form-help-card dd { margin: .2rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.field-help { margin: -.45rem 0 0; }
.manageable-list, .integration-list { list-style: none; padding: 0; margin: 0; }
.integration-list { display: grid; gap: .7rem; }
.integration-list li { padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.integration-list small { display: block; margin-top: .25rem; color: var(--muted); line-height: 1.45; }
.manageable-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.manageable-list li > span { min-width: 0; overflow-wrap: anywhere; }
.manageable-list small { display: block; color: var(--muted); margin-top: .25rem; }
.site-status-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .7rem; margin-bottom: .75rem; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; }
.site-status-bar > div { display: flex; align-items: center; gap: .6rem; }
.site-status-bar form { margin: 0; }
.domain-list li { flex-wrap: wrap; }
.domain-info { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0; }
.domain-info code { overflow-wrap: anywhere; }
.link-button { border: 0; background: transparent; color: var(--green); padding: .25rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.link-button.danger { color: var(--danger); }
.link-stack, .relation-list { display: grid; gap: .35rem; }
.relation-list { list-style: none; padding: 0; margin: 0; }
.relation-list li { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: baseline; }
.relation-list code { color: var(--muted); font-size: .76rem; }
.table-actions { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.table-actions form { margin: 0; }
.table-description { display: block; max-width: 38rem; color: var(--muted); line-height: 1.4; margin-top: .35rem; }
.edit-panel { border: 1px solid #b5dcca; border-radius: 12px; background: #f7fbf9; margin-top: 1.4rem; padding: 1rem; scroll-margin-top: 1rem; }
.edit-panel summary { font-size: 1.05rem; }
.policy-preview { margin-top: 1rem; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #fff; }
.policy-preview h3 { margin: .15rem 0 .5rem; }
.policy-preview .eyebrow { margin: 0; }
.policy-preview details { margin-top: .8rem; }
.policy-body-preview { white-space: pre-line; color: var(--muted); line-height: 1.65; padding-top: .65rem; }
.policy-editor-panel { margin-top: 1rem; }
.partner-integration-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.partner-integration-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #fff; }
.partner-integration-card > header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.partner-integration-card h3 { margin: .15rem 0 0; }
.partner-integration-card .eyebrow { margin: 0; }
.compact-list { margin: .75rem 0 1rem; }
.integration-picker { display: grid; gap: .8rem; border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .9rem; }
.integration-picker fieldset { border: 0; padding: 0; margin: 0; }
.integration-picker legend { font-weight: 750; margin-bottom: .65rem; }
.integration-options { display: grid; gap: .6rem; }
.integration-option { border: 1px solid var(--line); border-radius: 9px; padding: .75rem; background: var(--surface); }
.integration-option small { display: block; color: var(--muted); margin-top: .2rem; }
.all-selected { margin: .8rem 0 0; color: var(--muted); }
.integration-publication-state { font-weight: 700; }
.integration-publication-state.published { color: var(--green); }
.integration-publication-state.draft { color: #8a5a20; }
.manageable-list li.integration-item { display: block; }
.integration-item.editing { margin-inline: -.55rem; padding-inline: .55rem; border-radius: 10px; background: #f7fbf9; }
.integration-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.integration-row > span { min-width: 0; }
.integration-actions { flex-wrap: nowrap; }
.recaptcha-key-form { display: grid; gap: .45rem; margin-top: .85rem; padding: .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.recaptcha-key-controls { display: flex; flex-wrap: wrap; align-items: start; gap: .6rem; }
.recaptcha-key-controls input { flex: 1 1 260px; min-width: 0; }
.recaptcha-key-controls .button { flex: 0 0 auto; }
.recaptcha-key-form .hint { margin: 0; }
.integration-guide-toggle { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #a9c8bd; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-family: Georgia, serif; font-size: .9rem; font-weight: 800; line-height: 1; cursor: pointer; }
.integration-guide-toggle:hover { border-color: var(--green); background: #cfecdf; }
.integration-guide-toggle[aria-expanded="true"] { background: var(--green); color: white; }
.integration-guide-panel { margin: .8rem 0 .2rem; padding: 1.1rem; border: 1px solid #b5dcca; border-left: 4px solid var(--green); border-radius: 12px; background: #f7fbf9; }
.integration-guide-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.integration-guide-heading .eyebrow { margin-bottom: .2rem; }
.integration-guide-heading h4 { margin: 0; font-size: 1.15rem; }
.integration-guide-section { margin-top: 1rem; }
.integration-guide-section + .integration-guide-section { padding-top: 1rem; border-top: 1px solid var(--line); }
.integration-guide-section h3,
.integration-guide-section h4,
.integration-guide-section h5 { margin: 0 0 .55rem; color: var(--green-dark); }
.integration-guide-section p { margin-bottom: .7rem; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.integration-guide-section ol,
.integration-guide-section ul { display: grid; gap: .4rem; margin: .7rem 0 0; padding-left: 1.3rem; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.integration-guide-section pre { max-height: 360px; margin: .7rem 0; padding: .9rem; font-size: .78rem; white-space: pre-wrap; }
.integration-guide-markdown > :last-child { margin-bottom: 0; }
.integration-item > .edit-panel { margin: .8rem 0 .15rem; scroll-margin-top: 6rem; }
.compact-actions { margin-top: .25rem; }
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.table-wrap:focus-visible { outline: 3px solid rgb(20 92 74 / 22%); outline-offset: 2px; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
th, td { padding: .85rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.policy-site-table td { height: 72px; vertical-align: middle; }
.policy-library-table tbody tr { height: 56px; }
.policy-library-table td { vertical-align: middle; }
.policy-library-table .table-actions { min-height: 32px; flex-wrap: nowrap; }
.policy-library-table .link-button,
.policy-library-table .table-actions > .muted { display: inline-flex; align-items: center; min-height: 32px; padding: .25rem; white-space: nowrap; }
.status { display: inline-flex; border-radius: 999px; padding: .3rem .55rem; background: #eceeea; font-size: .76rem; }
.status.active { background: var(--mint); color: var(--green); }
pre { overflow: auto; padding: 1rem; border-radius: 10px; background: #101d19; color: #d9eee7; line-height: 1.55; }
.setup-steps { display: grid; gap: .55rem; margin: 1rem 0 0; padding-left: 1.35rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.setup-steps strong { color: var(--ink); }
details { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1rem; }
summary { color: var(--green); font-weight: 750; cursor: pointer; }
.publish-action { display: flex; gap: 1rem; align-items: center; border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.2rem; }
.publish-action span { color: var(--muted); font-size: .86rem; }
.publish-card { container-type: inline-size; padding: 1.25rem 1.4rem; }
.publish-heading { align-items: flex-start; gap: 1rem; }
.publish-heading h2 { margin-bottom: .35rem; }
.publish-heading p { font-size: .86rem; }
.publish-heading .form-help { flex: 0 0 auto; width: auto; margin: 0; }
.publish-settings { display: grid; grid-template-columns: minmax(0, .45fr) minmax(0, 1fr) minmax(0, .8fr) auto; gap: .7rem; align-items: end; margin-top: 1rem; }
.publish-settings .button { white-space: nowrap; }
.publish-validation { grid-column: 1 / -1; }
.publish-reconsent { min-height: 42px; padding: .6rem .75rem; align-items: center; }
.publish-reconsent input { margin-top: 0; }
.publish-reconsent span { display: grid; gap: .1rem; }
.publish-reconsent small { color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.25; }
.publish-card .publish-action { justify-content: space-between; padding-top: .8rem; margin-top: .8rem; }
.policy-page { max-width: 980px; margin-inline: auto; }
.policy-page h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.policy-page .lead { color: var(--muted); max-width: 760px; font-size: 1.08rem; line-height: 1.7; white-space: pre-line; }
.policy-meta { color: var(--muted); font-size: .85rem; margin-bottom: 3rem; }
.empty-state { text-align: center; padding: 3rem 1rem; }

/* Keep dense editors usable on smaller laptops, independently of viewport height. */
@media (max-width: 1100px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .site-editor-grid .admin-column { display: contents; }
  .site-editor-grid .content-card { margin-bottom: 0; }
  .relationship-card { grid-template-columns: minmax(0, 1fr); }
}

@container (max-width: 800px) {
  .publish-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publish-settings .button { justify-self: start; }
}

@container (max-width: 480px) {
  .publish-settings { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-block: 2rem; }
  .version-card { transform: none; }
  .feature-grid, .admin-grid, .architecture-card, .relationship-card { grid-template-columns: minmax(0, 1fr); }
  .feature-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .wide { grid-column: auto; }
  .color-field { grid-template-columns: 52px 1fr; }
  .color-field .color-clear { grid-column: 1 / -1; }
  .page-heading, .section-heading { align-items: flex-start; flex-direction: column; }
  .publish-heading { flex-direction: row; }
  .publish-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publish-settings .button { justify-self: start; }
}

@media (max-width: 560px) {
  .header-inner { align-items: stretch; flex-direction: column; padding-block: 1rem; }
  .header-actions { align-items: flex-start; justify-content: space-between; }
  nav { gap: .7rem 1rem; justify-content: flex-start; }
  main.shell { padding-top: 2rem; }
  .inline-form, .publish-action { align-items: stretch; flex-direction: column; }
  .inline-form > input, .inline-form > select, .inline-form > label,
  .policy-assignment-form select, .catalog-picker label { flex-basis: auto; }
  .policy-assignment-form.table-form { grid-template-columns: 1fr; }
  .site-footer .shell { align-items: flex-start; flex-direction: column; justify-content: center; }
  .form-help { width: 100%; }
  .form-help summary { margin-left: auto; }
  .form-help-card { position: static; width: 100%; margin-top: .65rem; }
  .integration-row { align-items: flex-start; }
  .integration-actions { flex-wrap: wrap; justify-content: flex-end; }
  .integration-guide-panel { padding: .9rem; }
  .integration-guide-heading { align-items: flex-start; }
  .integration-guide-section pre { font-size: .72rem; }
  .publish-settings { grid-template-columns: minmax(0, 1fr); }
}

/* Site overview: each site has its own row, ordered by display name. */
.site-overview-filters { display: flex; flex-wrap: wrap; gap: .6rem; }
.site-overview-summary { margin: .9rem 0; }
.site-sort-link { display: inline-flex; align-items: center; gap: .25rem; color: inherit; text-decoration: none; white-space: nowrap; }
.site-sort-link:hover, .site-sort-link.active { color: var(--green); }
.site-sort-indicator { font-size: .95rem; line-height: 1; opacity: .45; }
.site-sort-link:hover .site-sort-indicator, .site-sort-link.active .site-sort-indicator { opacity: 1; }
.site-overview-table { min-width: 68rem; }
.site-overview-table code { overflow-wrap: anywhere; }
.site-overview-table td:first-child { min-width: 230px; }
.site-group-heading th { background: var(--surface-soft, #f3f6f5); }
.site-group-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-group-title h2 { margin: 0; font-size: 1.1rem; }
.site-group-title small { color: var(--muted); font-weight: 400; }
.site-domain-summary { list-style: none; padding: 0; margin: 0; }
.site-last-connection time { white-space: nowrap; }
.site-manage-link { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 6px; }
.site-manage-link:hover { background: var(--mint); }
.site-manage-link:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
