:root {
  --theme-font-family: Georgia, 'Times New Roman', serif;
  --theme-heading-family: Georgia, 'Times New Roman', serif;
  --theme-helper-family: Georgia, 'Times New Roman', serif;
  --theme-header-family: Georgia, 'Times New Roman', serif;
  --theme-footer-family: Georgia, 'Times New Roman', serif;
  --theme-base-size: 16px;
  --theme-helper-size: 14px;
  --theme-header-size: 16px;
  --theme-footer-size: 15px;
  --theme-fluid-min-scale: 0.72;
  --theme-fluid-max-scale: 1.42;
  --theme-fluid-bias: 0.95vw;
  --theme-base-size-fluid: clamp(calc(var(--theme-base-size) * var(--theme-fluid-min-scale)), calc(calc(var(--theme-base-size) * 0.58) + 0.9vw), calc(var(--theme-base-size) * var(--theme-fluid-max-scale)));
  --theme-helper-size-fluid: clamp(calc(var(--theme-helper-size) * var(--theme-fluid-min-scale)), calc(calc(var(--theme-helper-size) * 0.56) + 0.8vw), calc(var(--theme-helper-size) * var(--theme-fluid-max-scale)));
  --theme-header-title-size-fluid: clamp(calc(var(--theme-header-title-size, var(--theme-header-size)) * var(--theme-fluid-min-scale)), calc(calc(var(--theme-header-title-size, var(--theme-header-size)) * 0.52) + 1.4vw), calc(var(--theme-header-title-size, var(--theme-header-size)) * var(--theme-fluid-max-scale)));
  --theme-header-size-fluid: clamp(calc(var(--theme-header-size) * var(--theme-fluid-min-scale)), calc(calc(var(--theme-header-size) * 0.5) + 1.05vw), calc(var(--theme-header-size) * var(--theme-fluid-max-scale)));
  --theme-nav-font-size-fluid: clamp(calc(var(--theme-nav-font-size) * var(--theme-fluid-min-scale)), calc(calc(var(--theme-nav-font-size) * 0.54) + 1vw), calc(var(--theme-nav-font-size) * var(--theme-fluid-max-scale)));
  --theme-footer-heading-size-fluid: clamp(calc(var(--theme-footer-heading-size, var(--theme-footer-size)) * var(--theme-fluid-min-scale)), calc(calc(var(--theme-footer-heading-size, var(--theme-footer-size)) * 0.5) + 1vw), calc(var(--theme-footer-heading-size, var(--theme-footer-size)) * var(--theme-fluid-max-scale)));
  --theme-footer-size-fluid: clamp(calc(var(--theme-footer-size) * var(--theme-fluid-min-scale)), calc(calc(var(--theme-footer-size) * 0.48) + 0.95vw), calc(var(--theme-footer-size) * var(--theme-fluid-max-scale)));
  --theme-heading-scale: 1;
  --theme-content-width: 1100px;
  --theme-space-scale: 1;
  --theme-surface-radius: 14px;
  --theme-surface-padding: 1.5rem;
  --theme-button-radius: 999px;
  --theme-button-background: #111827;
  --theme-button-text: #ffffff;
  --theme-button-border: #111827;
  --theme-button-font-weight: 500;
  --theme-text: #111827;
  --theme-helper-text: #64748b;
  --theme-header-text: #111827;
  --theme-footer-text: #111827;
  --theme-background: #f7f8fa;
  --theme-surface: #ffffff;
  --theme-surface-panel-background: #ffffff;
  --theme-accent: #111827;
  --theme-accent-contrast: #ffffff;
  --theme-muted: #64748b;
  --theme-border: #e5e7eb;
  --theme-nav-font-size: 1rem;
  --theme-header-spacing: 1rem;
  --theme-footer-background: transparent;
  --theme-footer-border: rgba(17, 24, 39, 0.08);
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--theme-font-family);
  background: var(--theme-background);
  color: var(--theme-text);
}

body {
  font-size: var(--theme-base-size);
}

body:not(.admin-body) {
  font-size: var(--theme-base-size-fluid);
}

body,
input,
textarea,
select,
button {
  font-family: var(--theme-font-family);
}

.admin-main,
.admin-main p,
.admin-main li,
.admin-main small,
.admin-main td,
.admin-main th,
.admin-main label,
.admin-main div,
.admin-main span,
.admin-main strong,
.panel,
.panel p,
.panel li,
.panel small,
.panel td,
.panel th,
.panel label,
.panel div,
.panel span,
.panel strong,
.site-header,
.site-header p,
.site-header li,
.site-header small,
.site-header label,
.site-header div,
.site-header span,
.shell,
.shell p,
.shell li,
.shell small,
.shell td,
.shell th,
.shell label,
.shell div,
.shell span,
.shell strong {
  font-family: var(--theme-font-family);
}

.shell {
  max-width: min(720px, calc(100vw - 2rem));
  margin: calc(12vh * var(--theme-space-scale)) auto;
  padding: calc(2rem * var(--theme-space-scale));
}

.shell-wide {
  max-width: min(var(--theme-content-width), calc(100vw - 2rem));
}

.site-header {
  border-bottom: 0;
  background: var(--theme-header-background);
  backdrop-filter: blur(10px);
  color: var(--theme-header-text);
  font-family: var(--theme-header-family);
  font-size: var(--theme-header-size);
}

.site-johanodin {
  background: var(--theme-background);
  color: var(--theme-text);
}

.nav-shell {
  margin: 0 auto;
  max-width: min(var(--theme-content-width), calc(100vw - 2rem));
  padding-top: calc(var(--theme-header-spacing) * var(--theme-space-scale));
  padding-bottom: calc(var(--theme-header-spacing) * var(--theme-space-scale));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brandmark {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--theme-header-text);
  font-family: var(--theme-header-family);
}

.brandmark-copy {
  display: grid;
  gap: 0.08rem;
}

.brandmark-title {
  display: block;
  font-family: var(--theme-header-title-family, var(--theme-header-family));
  font-size: var(--theme-header-title-size-fluid);
  line-height: 1.1;
  color: var(--theme-header-title-text, var(--theme-header-text));
}

.brandmark-tagline {
  display: block;
  font-family: var(--theme-header-family);
  font-size: var(--theme-header-size-fluid);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.3;
  color: color-mix(in srgb, var(--theme-header-text) 74%, transparent);
}

.header-title-text {
  font-family: var(--theme-header-title-family, var(--theme-header-family));
  font-size: var(--theme-header-title-size-fluid);
  color: var(--theme-header-title-text, var(--theme-header-text));
}

.header-tagline-text {
  font-family: var(--theme-header-family);
  font-size: var(--theme-header-size-fluid);
  color: var(--theme-header-text);
}

.brandmark-logo {
  display: block;
  max-height: var(--theme-logo-height);
  width: auto;
}

.admin-brand-logo {
  display: block;
  max-width: 180px;
  max-height: calc(var(--theme-logo-height) + 12px);
  width: auto;
}

.site-nav {
  display: flex;
  gap: var(--theme-nav-gap);
  flex-wrap: wrap;
}

.site-nav a,
.admin-nav a {
  display: inline-flex;
  align-items: center;
  padding: var(--theme-nav-padding-y) var(--theme-nav-padding-x);
  border-radius: var(--theme-nav-radius);
  border: 1px solid var(--theme-nav-border);
  background: var(--theme-nav-background);
  font-size: var(--theme-nav-font-size);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.site-nav a {
  text-decoration: none;
  color: var(--theme-nav-text, var(--theme-header-text));
  font-family: var(--theme-nav-family, var(--theme-header-family));
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.admin-nav a {
  font-family: var(--theme-nav-family, var(--theme-header-family));
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.site-header a,
.site-header p,
.site-header .muted,
.site-header .eyebrow {
  color: inherit;
  font-family: inherit;
}

.johan-site-header {
  background: var(--theme-header-background);
  border-bottom-color: var(--theme-header-border);
}

.johan-site-header .nav-shell,
.johan-site-header .johan-brand {
  border-bottom: 0;
  box-shadow: none;
}

.johan-nav-shell {
  align-items: end;
}

.johan-brand p {
  margin: 0.35rem 0 0;
  font-family: var(--theme-header-family);
  font-size: var(--theme-header-size-fluid);
  line-height: 1.3;
  color: color-mix(in srgb, var(--theme-header-text) 74%, transparent);
}

.johan-site-nav a {
  position: relative;
  color: var(--theme-nav-text, var(--theme-header-text));
  font-family: var(--theme-nav-family, var(--theme-header-family));
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.johan-site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: color-mix(in srgb, var(--theme-accent) 70%, transparent);
  opacity: var(--theme-nav-underline-opacity);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 140ms ease;
}

.site-nav a:hover,
.admin-nav a:hover {
  background: var(--theme-nav-hover-background);
  border-color: var(--theme-nav-hover-border);
  color: var(--theme-nav-hover-text, var(--theme-nav-text, var(--theme-header-text)));
}

.admin-sidebar .admin-nav a:hover {
  background: color-mix(in srgb, var(--theme-accent-contrast) 12%, transparent);
  border-color: color-mix(in srgb, var(--theme-accent-contrast) 24%, transparent);
  color: var(--theme-accent-contrast);
}

.johan-site-nav a:hover::after {
  transform: scaleX(1);
}

.eyebrow {
  font-family: var(--theme-heading-family, var(--theme-font-family));
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
}

h1 {
  font-family: var(--theme-heading-family, var(--theme-font-family));
  font-size: calc(3rem * var(--theme-heading-scale));
  line-height: 1.1;
  margin: 0 0 1rem;
}

h2,
h3,
h4,
h5,
h6,
.brandmark,
.eyebrow,
.field > span,
.table th,
.status-pill,
.admin-sidebar h2,
.admin-header h1,
.stat-card h2,
.seo-preview-title,
.social-preview-title {
  font-family: var(--theme-heading-family, var(--theme-font-family));
  letter-spacing: var(--theme-heading-tracking);
  text-transform: var(--theme-heading-case);
}

.panel h1,
.panel h2,
.panel h3,
.panel h4,
.panel h5,
.panel h6,
.admin-header h1,
.admin-header h2,
.site-header h1,
.site-header h2,
.site-header h3,
.shell h1,
.shell h2,
.shell h3,
.shell h4 {
  font-family: var(--theme-heading-family, var(--theme-font-family));
  letter-spacing: var(--theme-heading-tracking);
  text-transform: var(--theme-heading-case);
}

h1 {
  letter-spacing: var(--theme-heading-tracking);
  text-transform: var(--theme-heading-case);
  font-variant-caps: normal;
}

:root[style*="--theme-heading-case: none"] h1,
:root[style*="--theme-heading-case: none"] h2,
:root[style*="--theme-heading-case: none"] h3,
:root[style*="--theme-heading-case: none"] h4,
:root[style*="--theme-heading-case: none"] h5,
:root[style*="--theme-heading-case: none"] h6 {
  font-variant-caps: normal;
}

p {
  font-size: 1.1rem;
  line-height: var(--theme-body-line-height);
}

body:not(.admin-body) main p,
body:not(.admin-body) main li,
body:not(.admin-body) article p,
body:not(.admin-body) article li,
body:not(.admin-body) section p,
body:not(.admin-body) section li {
  font-size: var(--theme-base-size-fluid);
}

a {
  color: var(--theme-text);
}

a:hover {
  color: var(--theme-accent);
}

.button:hover {
  color: var(--theme-button-text);
}

.actions {
  display: flex;
  gap: 1rem;
  margin-top: calc(2rem * var(--theme-space-scale));
  flex-wrap: wrap;
}

.actions-compact {
  margin-top: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--theme-button-padding-y) var(--theme-button-padding-x);
  border: 1px solid var(--theme-button-border);
  background: var(--theme-button-background);
  color: var(--theme-button-text);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-size: var(--theme-button-font-size);
  font-weight: var(--theme-button-font-weight);
  border-radius: var(--theme-button-radius);
}

.button-secondary {
  background: transparent;
  color: var(--theme-text);
  border-color: var(--theme-border);
}

.button-secondary:hover {
  color: var(--theme-accent);
  border-color: color-mix(in srgb, var(--theme-accent) 35%, var(--theme-border));
}

.admin-sidebar .button-secondary:hover {
  color: var(--theme-accent-contrast);
  background: color-mix(in srgb, var(--theme-accent-contrast) 10%, transparent);
  border-color: color-mix(in srgb, var(--theme-accent-contrast) 28%, transparent);
}

.button-danger {
  background: #7c1d12;
  border-color: #7c1d12;
  color: #fff8f5;
}

.button-small {
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
}

.admin-body {
  background: var(--theme-background);
  min-height: 100vh;
}

.auth-shell {
  max-width: 520px;
  margin: 10vh auto;
  padding: 1.5rem;
}

.auth-card,
.panel {
  background: var(--theme-surface-panel-background, var(--theme-surface));
  border: 1px solid var(--theme-surface-border);
  padding: calc(var(--theme-surface-padding) * var(--theme-space-scale));
  box-shadow: var(--theme-surface-shadow);
  border-radius: var(--theme-surface-radius);
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  padding: calc(2rem * var(--theme-space-scale));
  background: var(--theme-accent);
  color: var(--theme-accent-contrast);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-sidebar .button-secondary {
  border-color: color-mix(in srgb, var(--theme-accent-contrast) 24%, transparent);
  color: var(--theme-accent-contrast);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-nav a {
  text-decoration: none;
  color: inherit;
}

.admin-main {
  padding: calc(2rem * var(--theme-space-scale));
  display: grid;
  gap: 1.5rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.stack {
  display: grid;
  gap: calc(1rem * var(--theme-space-scale));
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field input {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  font: inherit;
}

.field input[type="url"],
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  box-sizing: border-box;
}

.field input[type="color"] {
  width: 5.25rem;
  min-height: 3rem;
  padding: 0.3rem;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--theme-surface);
  box-sizing: border-box;
  cursor: pointer;
}

.field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.field input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

.field input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}

.field textarea,
.field select {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  font: inherit;
}

.field small {
  color: var(--theme-helper-text);
  font-family: var(--theme-helper-family);
  font-size: var(--theme-helper-size);
  line-height: 1.55;
}

.muted,
code {
  color: var(--theme-helper-text);
}

.muted {
  font-family: var(--theme-helper-family);
  font-size: var(--theme-helper-size);
  line-height: 1.55;
}

.checkbox {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.permission-grid {
  display: grid;
  gap: 0.85rem;
  border: 1px solid var(--theme-border);
  padding: calc(1rem * var(--theme-space-scale));
}

.alert {
  padding: 1rem 1.1rem;
  background: #eef2ff;
  border-left: 4px solid #4f46e5;
}

.alert-error {
  background: #fef2f2;
  border-left-color: #dc2626;
}

.panel-danger {
  border-color: rgba(124, 29, 18, 0.22);
}

.panel-subtle {
  background: color-mix(in srgb, var(--theme-background) 65%, var(--theme-surface));
}

.type-chooser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.compact-type-chooser {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.type-card {
  display: grid;
  gap: 0.35rem;
  padding: calc(1rem * var(--theme-space-scale));
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-surface-radius);
  text-decoration: none;
  background: color-mix(in srgb, var(--theme-background) 70%, var(--theme-surface));
}

.type-card span,
.type-card small {
  color: var(--theme-muted);
}

.type-card.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  background: #eff6ff;
}

.type-card.is-disabled {
  opacity: 0.65;
}

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

.field-grid-single-branding {
  grid-template-columns: 1fr;
}

.field select {
  min-width: 0;
}

.template-settings-group {
  display: grid;
  gap: calc(1rem * var(--theme-space-scale));
  padding: calc(1.25rem * var(--theme-space-scale));
}

.template-settings-group:first-of-type {
  margin-top: 0;
}

.template-settings-heading {
  display: grid;
  gap: 0.35rem;
}

.template-settings-heading h4 {
  margin: 0;
}

.template-settings-heading p {
  margin: 0;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.preset-card {
  display: grid;
  gap: 1rem;
  align-content: space-between;
  padding: calc(var(--theme-surface-padding) * 0.9);
  background: var(--theme-surface-panel-background, var(--theme-surface));
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--theme-surface-radius);
  box-shadow: var(--theme-surface-shadow);
}

.preset-card .button {
  width: 100%;
}

.preset-card-copy {
  display: grid;
  gap: 0.5rem;
}

.preset-card-copy h4,
.preset-card-copy p {
  margin: 0;
}

.preset-save-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--theme-surface-border);
}

.saved-preset-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.saved-preset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(var(--theme-surface-padding) * 0.8);
  background: var(--theme-surface-panel-background, var(--theme-surface));
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--theme-surface-radius);
}

.saved-preset-copy {
  display: grid;
  gap: 0.35rem;
}

.saved-preset-copy h4,
.saved-preset-copy p {
  margin: 0;
}

.template-settings-group .field-grid:last-child {
  margin-bottom: 0;
}

.template-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}

.template-section-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-background) 65%, var(--theme-surface));
  text-decoration: none;
  color: var(--theme-text);
  font-family: var(--theme-helper-family);
  font-size: var(--theme-helper-size);
}

.template-section-nav a:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 28%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-accent) 8%, var(--theme-surface));
}

.templates-editor:has(#template-section-branding:target) .template-section-nav a[href="#template-section-branding"],
.templates-editor:has(#template-section-header:target) .template-section-nav a[href="#template-section-header"],
.templates-editor:has(#template-section-footer:target) .template-section-nav a[href="#template-section-footer"],
.templates-editor:has(#template-section-headings:target) .template-section-nav a[href="#template-section-headings"],
.templates-editor:has(#template-section-body:target) .template-section-nav a[href="#template-section-body"],
.templates-editor:has(#template-section-helper:target) .template-section-nav a[href="#template-section-helper"],
.templates-editor:has(#template-section-surfaces:target) .template-section-nav a[href="#template-section-surfaces"],
.templates-editor:has(#template-section-layout:target) .template-section-nav a[href="#template-section-layout"],
.templates-editor:has(#template-section-navigation:target) .template-section-nav a[href="#template-section-navigation"],
.templates-editor:has(#template-section-buttons:target) .template-section-nav a[href="#template-section-buttons"] {
  border-color: color-mix(in srgb, var(--theme-accent) 58%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-accent) 16%, var(--theme-surface));
  color: var(--theme-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-accent) 24%, transparent);
}

.templates-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.templates-editor-form,
.templates-editor-preview {
  min-width: 0;
}

.templates-preview-shell {
  position: sticky;
  top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.template-preview-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--theme-surface-radius);
  padding: 0.35rem 0;
}

.template-preview-group,
.template-preview-inline,
.template-preview-link .field-grid > .panel {
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.template-preview-link:hover .template-preview-group {
  border-color: color-mix(in srgb, var(--theme-accent) 24%, transparent);
  background: color-mix(in srgb, var(--theme-accent) 4%, transparent);
}

.template-preview-link:hover .template-preview-inline,
.template-preview-link:hover .field-grid > .panel {
  border-color: color-mix(in srgb, var(--theme-accent) 24%, var(--theme-border));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.template-settings-group {
  scroll-margin-top: 1.5rem;
}

.template-settings-group:target {
  border-color: color-mix(in srgb, var(--theme-accent) 58%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-accent) 6%, var(--theme-surface));
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  outline: 2px solid color-mix(in srgb, var(--theme-accent) 42%, transparent);
}

.template-settings-group:target .template-settings-heading h4,
.template-settings-group:target .template-settings-heading .eyebrow {
  color: var(--theme-accent);
}

.template-settings-group:target .template-settings-heading {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 24%, var(--theme-border));
}

.template-preview-canvas {
  display: grid;
  gap: 1rem;
  padding: calc(1rem * var(--theme-space-scale));
  background: color-mix(in srgb, var(--theme-background) 55%, var(--theme-surface));
  border: 1px solid var(--theme-surface-border);
  border-radius: calc(var(--theme-surface-radius) + 6px);
}

.template-preview-site {
  display: grid;
  gap: 1rem;
  padding: calc(1rem * var(--theme-space-scale));
  background: var(--theme-background);
  border: 1px solid var(--theme-surface-border);
  border-radius: calc(var(--theme-surface-radius) + 2px);
}

.template-preview-section {
  padding: calc(0.75rem * var(--theme-space-scale));
  border: 1px solid transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-text) 8%, var(--theme-border));
  border-radius: var(--theme-surface-radius);
}

.template-preview-section:last-child {
  border-bottom: 0;
}

.template-preview-inline {
  margin: 0;
  padding: calc(var(--theme-surface-padding) * var(--theme-space-scale));
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--theme-surface-radius);
  background: var(--theme-surface-panel-background, var(--theme-surface));
  box-shadow: var(--theme-surface-shadow);
  color: var(--theme-surface-panel-text);
  font-family: var(--theme-panel-family);
  font-size: var(--theme-panel-size);
}

.template-preview-inline-subtle {
  background: color-mix(in srgb, var(--theme-background) 65%, var(--theme-surface));
}

.template-preview-inline-accent {
  background: var(--theme-surface-accent-background);
  border-color: var(--theme-surface-accent-border);
  color: var(--theme-surface-accent-text);
  font-family: var(--theme-accent-family);
  font-size: var(--theme-accent-size);
}

.template-preview-inline-accent .eyebrow,
.template-preview-inline-accent h3,
.template-preview-inline-accent p {
  color: inherit;
}

.template-preview-inline-accent h3 {
  font-family: var(--theme-accent-family);
  font-size: calc(var(--theme-accent-size) * 1.18);
  letter-spacing: normal;
  text-transform: none;
}

.template-preview-inline-accent p {
  font-size: inherit;
  line-height: var(--theme-body-line-height);
}

.template-preview-inline h3,
.template-preview-inline p,
.template-preview-inline .eyebrow {
  color: inherit;
}

.template-preview-inline h3 {
  font-family: var(--theme-panel-family);
  font-size: calc(var(--theme-panel-size) * 1.18);
  letter-spacing: normal;
  text-transform: none;
}

.template-preview-topbar,
.template-preview-footer {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: calc(var(--theme-header-spacing) * 0.95) calc(var(--theme-header-spacing) + 0.1rem);
  border-radius: var(--theme-surface-radius);
}

.template-preview-topbar {
  background: var(--theme-header-background);
  border: 1px solid var(--theme-header-border);
  color: var(--theme-header-text);
  font-family: var(--theme-header-family);
  font-size: var(--theme-header-size);
}

.template-preview-footer {
  background: var(--theme-footer-background);
  border: 1px solid var(--theme-footer-border);
  color: var(--theme-footer-text);
  font-family: var(--theme-footer-family);
  font-size: var(--theme-footer-size);
}

.template-preview-footer-copy {
  display: grid;
  gap: 0.15rem;
}

.template-preview-footer-copy p {
  margin: 0;
}

.template-preview-brandmark {
  color: var(--theme-header-text);
  text-decoration: none;
}

.template-preview-topbar a,
.template-preview-topbar p,
.template-preview-topbar .muted,
.template-preview-footer a,
.template-preview-footer p,
.template-preview-footer .muted {
  color: inherit;
  font-family: inherit;
}

.template-preview-status {
  padding: 0.8rem 1rem;
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--theme-surface-radius);
  background: color-mix(in srgb, var(--theme-background) 68%, var(--theme-surface));
}

.template-preview-status-label {
  display: none;
  font-family: var(--theme-helper-family);
  font-size: var(--theme-helper-size);
  color: var(--theme-helper-text);
}

.template-preview-status-label.is-default {
  display: inline;
}

.template-preview-sitebar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--theme-surface-border);
  background: var(--theme-surface);
  border-radius: var(--theme-surface-radius);
}

.template-preview-sitebar .muted {
  margin-left: 0.4rem;
}

.template-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent) 24%, var(--theme-surface));
  border: 1px solid color-mix(in srgb, var(--theme-accent) 16%, var(--theme-border));
}

.template-preview-layout-lines {
  display: grid;
  gap: 0.7rem;
}

.template-preview-layout-lines span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-text) 10%, var(--theme-surface));
}

.template-preview-layout-lines span:nth-child(1) {
  width: 100%;
}

.template-preview-layout-lines span:nth-child(2) {
  width: 82%;
}

.template-preview-layout-lines span:nth-child(3) {
  width: 68%;
}

.templates-editor:has(#template-section-branding:target) .template-preview-status-label,
.templates-editor:has(#template-section-header:target) .template-preview-status-label,
.templates-editor:has(#template-section-footer:target) .template-preview-status-label,
.templates-editor:has(#template-section-headings:target) .template-preview-status-label,
.templates-editor:has(#template-section-body:target) .template-preview-status-label,
.templates-editor:has(#template-section-helper:target) .template-preview-status-label,
.templates-editor:has(#template-section-surfaces:target) .template-preview-status-label,
.templates-editor:has(#template-section-layout:target) .template-preview-status-label,
.templates-editor:has(#template-section-navigation:target) .template-preview-status-label,
.templates-editor:has(#template-section-buttons:target) .template-preview-status-label {
  display: none;
}

.templates-editor:has(#template-section-branding:target) .template-preview-status-label.is-branding,
.templates-editor:has(#template-section-header:target) .template-preview-status-label.is-header,
.templates-editor:has(#template-section-footer:target) .template-preview-status-label.is-footer,
.templates-editor:has(#template-section-headings:target) .template-preview-status-label.is-headings,
.templates-editor:has(#template-section-body:target) .template-preview-status-label.is-body,
.templates-editor:has(#template-section-helper:target) .template-preview-status-label.is-helper,
.templates-editor:has(#template-section-surfaces:target) .template-preview-status-label.is-surfaces,
.templates-editor:has(#template-section-layout:target) .template-preview-status-label.is-layout,
.templates-editor:has(#template-section-navigation:target) .template-preview-status-label.is-navigation,
.templates-editor:has(#template-section-buttons:target) .template-preview-status-label.is-buttons {
  display: inline;
}

.templates-editor:has(#template-section-branding:target) .preview-link-branding .template-preview-group,
.templates-editor:has(#template-section-header:target) .preview-link-header .template-preview-topbar,
.templates-editor:has(#template-section-footer:target) .preview-link-footer .template-preview-footer,
.templates-editor:has(#template-section-headings:target) .preview-link-headings .template-preview-group,
.templates-editor:has(#template-section-body:target) .preview-link-body .template-preview-group,
.templates-editor:has(#template-section-helper:target) .preview-link-helper .template-preview-group,
.templates-editor:has(#template-section-surfaces:target) .preview-link-surfaces .template-preview-group,
.templates-editor:has(#template-section-layout:target) .preview-link-layout .template-preview-group,
.templates-editor:has(#template-section-navigation:target) .preview-link-navigation .template-preview-group,
.templates-editor:has(#template-section-buttons:target) .preview-link-buttons .template-preview-group,
.templates-editor:has(#template-section-branding:target) .preview-link-branding .field-grid > .panel,
.templates-editor:has(#template-section-surfaces:target) .preview-link-surfaces .field-grid > .template-preview-inline {
  border-color: color-mix(in srgb, var(--theme-accent) 58%, var(--theme-border));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  outline: 2px solid color-mix(in srgb, var(--theme-accent) 34%, transparent);
}

.templates-editor:has(#template-section-branding:target) .preview-link-branding .template-preview-group,
.templates-editor:has(#template-section-header:target) .preview-link-header .template-preview-topbar,
.templates-editor:has(#template-section-footer:target) .preview-link-footer .template-preview-footer,
.templates-editor:has(#template-section-headings:target) .preview-link-headings .template-preview-group,
.templates-editor:has(#template-section-body:target) .preview-link-body .template-preview-group,
.templates-editor:has(#template-section-helper:target) .preview-link-helper .template-preview-group,
.templates-editor:has(#template-section-surfaces:target) .preview-link-surfaces .template-preview-group,
.templates-editor:has(#template-section-layout:target) .preview-link-layout .template-preview-group,
.templates-editor:has(#template-section-navigation:target) .preview-link-navigation .template-preview-group,
.templates-editor:has(#template-section-buttons:target) .preview-link-buttons .template-preview-group {
  background: color-mix(in srgb, var(--theme-accent) 7%, transparent);
}

.media-thumb {
  width: 110px;
  height: 82px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  background: color-mix(in srgb, var(--theme-background) 70%, var(--theme-surface));
}

.article-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.article-image-large {
  margin-bottom: 1.5rem;
}

.block-preview {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--theme-border);
}

.seo-preview {
  padding: calc(1rem * var(--theme-space-scale)) calc(1.1rem * var(--theme-space-scale));
  border-radius: var(--theme-surface-radius);
  border: 1px solid var(--theme-border);
  background: color-mix(in srgb, var(--theme-background) 70%, var(--theme-surface));
}

.seo-preview-label {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-muted);
}

.seo-preview-card {
  padding: 1rem;
  border-radius: 12px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
}

.seo-preview-title,
.seo-preview-url,
.seo-preview-description {
  margin: 0;
}

.seo-preview-title {
  color: var(--theme-accent);
  font-size: 1.1rem;
  line-height: 1.35;
}

.seo-preview-url {
  margin-top: 0.35rem;
  color: var(--theme-helper-text);
  font-size: 0.92rem;
  word-break: break-all;
}

.seo-preview-description {
  margin-top: 0.55rem;
  color: var(--theme-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.social-preview {
  padding: calc(1rem * var(--theme-space-scale)) calc(1.1rem * var(--theme-space-scale));
  border-radius: var(--theme-surface-radius);
  border: 1px solid var(--theme-border);
  background: color-mix(in srgb, var(--theme-background) 70%, var(--theme-surface));
}

.social-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
}

.social-preview-image {
  width: 100%;
  min-height: 148px;
  object-fit: cover;
  border-radius: 10px;
  background: color-mix(in srgb, var(--theme-background) 40%, var(--theme-surface));
}

.social-preview-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--theme-muted);
  font-size: 0.92rem;
  text-align: center;
  border: 1px dashed color-mix(in srgb, var(--theme-muted) 45%, transparent);
}

.social-preview-body {
  min-width: 0;
}

.social-preview-domain,
.social-preview-title,
.social-preview-description,
.social-preview-url {
  margin: 0;
}

.social-preview-domain {
  color: var(--theme-helper-text);
  font-size: var(--theme-helper-size);
  font-family: var(--theme-helper-family);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.social-preview-title {
  margin-top: 0.35rem;
  color: var(--theme-text);
  font-size: 1.05rem;
  line-height: 1.4;
}

.social-preview-description {
  margin-top: 0.45rem;
  color: var(--theme-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.social-preview-url {
  margin-top: 0.65rem;
  color: var(--theme-helper-text);
  font-size: 0.9rem;
  word-break: break-all;
}

@media (max-width: 860px) {
  .social-preview-card {
    grid-template-columns: 1fr;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 0.9rem 0.6rem;
  border-bottom: 1px solid var(--theme-border);
  vertical-align: top;
}

.table th {
  color: var(--theme-helper-text);
}

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

.stat-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  padding: calc(1.25rem * var(--theme-space-scale));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  border-radius: var(--theme-surface-radius);
}

.stat-card h2 {
  margin: 0.1rem 0 0.5rem;
  font-size: 2.4rem;
}

.filter-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-field {
  min-width: 220px;
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mini-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.mini-actions form {
  margin: 0;
}

.row-action-link,
.row-action-button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--theme-text);
  font: inherit;
  font-family: var(--theme-helper-family);
  font-size: var(--theme-helper-size);
  text-decoration: none;
  cursor: pointer;
}

.row-action-link:hover,
.row-action-button:hover {
  color: var(--theme-accent);
}

.row-action-danger:hover {
  color: #b91c1c;
}

.row-actions-inline {
  white-space: nowrap;
}

.row-actions-inline form {
  display: inline;
  margin: 0;
}

.block-list-type strong,
.block-list-title strong {
  display: block;
}

.block-list-type strong {
  text-transform: capitalize;
}

.block-list-title strong {
  color: var(--theme-text);
}

.block-list-meta,
.block-list-preview {
  margin-top: 0.25rem;
  color: var(--theme-helper-text);
  font-size: var(--theme-helper-size);
  line-height: 1.55;
}

.block-list-mini {
  display: grid;
  gap: 0.18rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--theme-border) 82%, transparent);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--theme-surface) 88%, var(--theme-background));
}

.block-list-mini-eyebrow {
  color: var(--theme-helper-text);
  font-family: var(--theme-helper-family);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.block-list-mini-title {
  color: var(--theme-text);
  line-height: 1.35;
}

.block-list-mini-chip {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
  color: var(--theme-text);
  font-size: 0.74rem;
}

.block-list-preview {
  max-width: 48rem;
}

.split-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.article-section {
  margin-top: 2rem;
}

.article-section-image {
  margin: 1rem 0 1.25rem;
}

.article-section-link {
  margin-top: 1rem;
}

.article-section-panel {
  margin-top: 1.5rem;
}

.article-section-preview {
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-surface-radius);
  padding: calc(1rem * var(--theme-space-scale));
  background: var(--theme-surface);
}

.article-section-preview h3 {
  margin-top: 0;
}

.grouped-options {
  min-width: 0;
}

.grouped-options legend {
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.grouped-options .checkbox {
  margin-bottom: 0.45rem;
}

.taxonomy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
}

.taxonomy-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--surface-border-color, #d6dae2);
  background: var(--surface-panel-background, #fff);
  color: var(--text-color, #1f2937);
  text-decoration: none;
  font-size: 0.92em;
}

.taxonomy-chip:hover {
  border-color: var(--accent-color, #1f4ed8);
  color: var(--accent-color, #1f4ed8);
}

.taxonomy-chip-muted {
  opacity: 0.85;
}

.traffic-visit-list {
  display: grid;
  gap: 0.9rem;
}

.traffic-visit-card {
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-surface-radius);
  padding: calc(0.95rem * var(--theme-space-scale));
  background: var(--theme-surface);
}

.traffic-visit-card-suspicious {
  border-color: color-mix(in srgb, #b45309 50%, var(--theme-border));
  background: color-mix(in srgb, #fff7ed 55%, var(--theme-surface));
}

.traffic-visit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.traffic-visit-primary {
  min-width: 0;
}

.traffic-visit-path {
  margin-bottom: 0.45rem;
}

.traffic-visit-meta-stack {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.traffic-visit-meta-row {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.traffic-visit-meta-key {
  font-family: var(--theme-font-family);
  font-size: var(--theme-helper-size);
  color: var(--theme-helper-text);
  text-transform: none;
  letter-spacing: normal;
}

.traffic-visit-meta-value {
  min-width: 0;
  font-family: var(--theme-font-family);
  font-size: 0.97rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.traffic-visit-meta-value code {
  font-family: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.traffic-visit-path,
.traffic-visit-path code,
.traffic-visit-meta-key,
.traffic-visit-meta-value,
.traffic-visit-meta-value code,
.traffic-inline-action,
.traffic-visit-state,
.traffic-flag {
  font-family: var(--theme-font-family);
  color: var(--theme-text);
}

.traffic-visit-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.traffic-visit-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.traffic-visit-meta-row-detail {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed color-mix(in srgb, var(--theme-border) 75%, transparent);
}

@media (max-width: 860px) {
  .traffic-visit-top {
    flex-direction: column;
  }

  .traffic-visit-actions {
    align-items: flex-start;
  }

  .traffic-visit-meta-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.traffic-inline-form {
  margin: 0;
}

.traffic-inline-action {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--theme-text);
  font: inherit;
  font-size: var(--theme-helper-size);
  cursor: pointer;
}

.traffic-inline-action:hover {
  text-decoration: underline;
}

.traffic-visit-state {
  font-size: var(--theme-helper-size);
  color: var(--theme-helper-text);
}

.traffic-flag {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: var(--theme-helper-size);
  border: 1px solid transparent;
}

.traffic-flag-warning {
  color: #92400e;
  background: #ffedd5;
  border-color: #fdba74;
}

.admin-domain-switcher {
  margin: 0 0 1rem;
}

.admin-domain-switcher .field {
  gap: 0.35rem;
}

.admin-domain-switcher select {
  width: 100%;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1.1rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-background) 72%, var(--theme-surface));
  color: var(--theme-text);
  text-decoration: none;
  font-size: 0.92rem;
}

.tag-chip span {
  color: var(--theme-helper-text);
  font-size: 0.86em;
}

.tag-chip.is-active,
.tag-chip:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 48%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-accent) 10%, var(--theme-surface));
}

.row-action-separator {
  color: var(--theme-helper-text);
  margin: 0 0.2rem;
}

.status-pill {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1.4;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.status-draft {
  background: color-mix(in srgb, var(--theme-background) 82%, var(--theme-surface));
  border-color: var(--theme-border);
}

.status-published {
  background: color-mix(in srgb, var(--theme-accent) 12%, var(--theme-surface));
  border-color: color-mix(in srgb, var(--theme-accent) 26%, var(--theme-border));
}

.simple-list {
  margin: 0;
  padding-left: 1.25rem;
}

.article-list {
  display: grid;
  gap: 1rem;
}

.article-compact-list,
.article-editorial-list {
  display: grid;
  gap: 0.9rem;
}

.article-compact-item {
  display: grid;
  gap: 0.3rem;
}

.article-compact-item h3,
.article-editorial-feature h3 {
  margin: 0;
}

.article-editorial {
  display: grid;
  gap: 1rem;
}

.article-editorial-feature {
  display: grid;
  gap: 0.75rem;
}

.article-card {
  display: grid;
  gap: 0.55rem;
}

.article-card-date {
  margin: 0;
  font-size: 0.76em;
}

.article-card h3 {
  margin: 0;
}

.article-card h3 a {
  text-decoration: none;
}

.article-card h3 a:hover {
  text-decoration: none;
}

.article-title-small {
  font-size: 1rem;
}

.article-title-normal {
  font-size: 1.2rem;
}

.article-title-large {
  font-size: 1.45rem;
}

.article-tone-muted p:not(.eyebrow):not(.article-card-date):not(.muted) {
  color: var(--theme-helper-text);
}

.article-tone-strong p:not(.eyebrow):not(.article-card-date):not(.muted) {
  color: var(--theme-text);
  font-weight: 500;
}

.article-card-excerpt {
  margin: 0;
}

.article-body {
  max-width: var(--theme-body-measure);
}

.johan-home {
  margin: calc(1.25rem * var(--theme-space-scale)) auto 0;
  padding-top: 0;
}

.johan-hero {
  display: block;
}

.johan-hero-stacked {
  text-align: center;
}

.johan-panel,
.johan-article-header {
  background: var(--theme-hero-background);
  border: 1px solid var(--theme-hero-border);
  box-shadow: var(--theme-hero-shadow);
  border-radius: var(--theme-surface-radius);
}

.johan-hero > div {
  padding: 1rem 0;
}

.johan-article-header {
  padding: 1.5rem;
}

.johan-hero h1,
.johan-section-heading h1,
.johan-article h1 {
  color: var(--theme-text);
  letter-spacing: -0.03em;
}

.johan-home .lead,
.johan-content-shell .lead {
  color: var(--theme-helper-text);
}

.johan-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.johan-home > .johan-grid:first-child {
  margin-top: 0;
}

.johan-main-column,
.johan-side-column,
.johan-stack,
.johan-link-grid {
  display: grid;
  gap: 1rem;
}

.johan-link-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.johan-link-list li {
  display: grid;
  gap: 0.2rem;
}

.johan-link-list span {
  color: var(--theme-helper-text);
  font-size: 0.95rem;
}

.johan-link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.johan-section-heading {
  margin-bottom: 1.25rem;
}

.johan-content-shell {
  margin-top: 5vh;
}

.johan-article {
  display: grid;
  gap: 1rem;
  max-width: 860px;
}

.johan-footer {
  margin-top: 6rem;
}

.johan-footer .footer-inner {
  border-top: 0;
}

.site-johanodin .button {
  background: var(--theme-button-background);
  border-color: var(--theme-button-border);
  color: var(--theme-button-text);
  border-radius: var(--theme-button-radius);
}

.site-johanodin .button-secondary {
  background: transparent;
  color: var(--theme-text);
  border-color: var(--theme-border);
}

.site-johanodin .panel,
.site-johanodin .johan-panel,
.site-johanodin .johan-article-header {
  backdrop-filter: none;
}

.site-johanodin .eyebrow {
  color: var(--theme-helper-text);
}

.site-johanodin .muted {
  color: var(--theme-helper-text);
}

.johan-cta-accent {
  background: color-mix(in srgb, var(--theme-accent) 10%, var(--theme-surface));
  border-color: color-mix(in srgb, var(--theme-accent) 24%, var(--theme-border));
}

.johan-quote .quote-card {
  background: color-mix(in srgb, var(--theme-background) 72%, var(--theme-surface));
}

.johan-notice-info {
  background: color-mix(in srgb, var(--theme-accent) 10%, var(--theme-surface));
}

.johan-notice-success {
  background: color-mix(in srgb, #16a34a 10%, var(--theme-surface));
}

.johan-notice-warning {
  background: color-mix(in srgb, #d97706 10%, var(--theme-surface));
}

.cta-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent) 92%, #000000 8%) 0%, color-mix(in srgb, var(--theme-accent) 78%, #1f2937 22%) 100%);
  color: var(--theme-accent-contrast);
  padding: calc(2rem * var(--theme-space-scale));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  border-radius: calc(var(--theme-surface-radius) + 4px);
}

.cta-card-neutral {
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent) 92%, #000000 8%) 0%, color-mix(in srgb, var(--theme-accent) 78%, #1f2937 22%) 100%);
}

.cta-card-accent {
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent) 70%, #0f172a 30%) 0%, color-mix(in srgb, var(--theme-accent) 86%, #ffffff 14%) 100%);
}

.cta-card .eyebrow,
.cta-card p,
.cta-card h2 {
  color: inherit;
}

.cta-block-narrow .cta-card,
.cta-block-narrow.johan-cta {
  max-width: 42rem;
}

.cta-block-style-plain {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.cta-card-plain {
  background: transparent;
  color: var(--theme-text);
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

.cta-card-plain .eyebrow,
.cta-card-plain p,
.cta-card-plain h2 {
  color: inherit;
}

.quote-card {
  margin: 0;
  padding: calc(1.5rem * var(--theme-space-scale)) calc(1.6rem * var(--theme-space-scale));
  border-left: 4px solid color-mix(in srgb, var(--theme-accent) 32%, transparent);
  background: color-mix(in srgb, var(--theme-background) 72%, var(--theme-surface));
  border-radius: 0 var(--theme-surface-radius) var(--theme-surface-radius) 0;
}

.quote-card p {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.7;
}

.quote-card footer {
  margin-top: 1rem;
  color: var(--theme-helper-text);
  font-size: var(--theme-helper-size);
  font-family: var(--theme-helper-family);
}

.quote-block-style-plain {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.quote-card-plain {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

.notice-block {
  padding: calc(1.25rem * var(--theme-space-scale)) calc(1.4rem * var(--theme-space-scale));
  border-radius: var(--theme-surface-radius);
  border: 1px solid var(--theme-border);
}

.notice-block-style-plain {
  padding: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.notice-block-info {
  background: color-mix(in srgb, var(--theme-accent) 10%, var(--theme-surface));
  border-color: color-mix(in srgb, var(--theme-accent) 18%, var(--theme-border));
}

.notice-block-success {
  background: color-mix(in srgb, #16a34a 10%, var(--theme-surface));
  border-color: color-mix(in srgb, #16a34a 18%, var(--theme-border));
}

.notice-block-warning {
  background: color-mix(in srgb, #d97706 10%, var(--theme-surface));
  border-color: color-mix(in srgb, #d97706 22%, var(--theme-border));
}

.image-text-block {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.2fr);
  gap: 1.25rem;
  align-items: center;
}

.image-text-right {
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.95fr);
}

.image-text-right .image-text-media {
  order: 2;
}

.image-text-right .image-text-content {
  order: 1;
}

.image-text-media img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--theme-surface-radius);
}

.image-text-style-plain {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.image-text-style-plain .image-text-content {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.section-block {
  margin-top: calc(3rem * var(--theme-space-scale));
}

.hero-block-stacked {
  text-align: center;
}

.hero-block-narrow .hero-block-inner,
.hero-block-narrow.johan-hero > div {
  max-width: 42rem;
  margin-inline: auto;
}

.hero-block-style-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.text-block-narrow .panel,
.text-block-narrow .richtext,
.johan-text-block-narrow .richtext,
.quote-block-narrow .quote-card {
  max-width: 42rem;
}

.text-block-style-plain {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.text-block-style-plain .text-block-body {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.section-heading h2,
.panel h3 {
  margin: 0;
}

.lead {
  font-size: clamp(1rem, calc(0.9rem + 0.9vw), 1.25rem);
  color: rgba(17, 24, 39, 0.72);
}

.richtext {
  font-size: var(--theme-base-size-fluid);
  line-height: calc(var(--theme-body-line-height) + 0.1);
  max-width: var(--theme-body-measure);
}

.muted {
  color: var(--theme-helper-text);
}

.site-footer {
  border-top: 0;
  background: var(--theme-footer-background);
  margin-top: 4rem;
  color: var(--theme-footer-text);
  font-family: var(--theme-footer-family);
  font-size: var(--theme-footer-size);
}

.site-footer .footer-heading-text {
  font-family: var(--theme-footer-heading-family, var(--theme-footer-family));
  font-size: var(--theme-footer-heading-size-fluid);
  color: var(--theme-footer-heading-text, var(--theme-footer-text));
}

.site-footer .footer-body-text {
  font-family: var(--theme-footer-family);
  font-size: var(--theme-footer-size-fluid);
  color: var(--theme-footer-text);
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--theme-nav-gap) * 0.7);
  margin: 0 0 calc(0.8rem * var(--theme-space-scale));
}

.footer-menu a {
  color: inherit;
  text-decoration: none;
  font-family: var(--theme-nav-family, var(--theme-footer-family));
  font-size: min(var(--theme-nav-font-size-fluid), var(--theme-footer-size-fluid));
}

.footer-menu a:hover {
  color: var(--theme-nav-hover-text, var(--theme-accent));
}

.site-nav a,
.johan-site-nav a {
  font-size: var(--theme-nav-font-size-fluid);
}

.site-footer a,
.site-footer p,
.site-footer .muted,
.site-footer .eyebrow {
  color: inherit;
  font-family: inherit;
}

.footer-inner {
  margin: 0 auto;
  max-width: min(var(--theme-content-width), calc(100vw - 2rem));
  padding-top: calc((var(--theme-header-spacing) + 0.1rem) * var(--theme-space-scale));
  padding-bottom: calc((var(--theme-header-spacing) + 1rem) * var(--theme-space-scale));
 }

.template-preview-hero {
  padding: calc((var(--theme-surface-padding) + 0.2rem) * var(--theme-space-scale));
  background: var(--theme-hero-background);
  border: 1px solid var(--theme-hero-border);
  box-shadow: var(--theme-hero-shadow);
  border-radius: calc(var(--theme-surface-radius) + 4px);
}

.template-preview-group {
  display: grid;
  gap: calc(1rem * var(--theme-space-scale));
}

.template-preview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.template-preview-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 18%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-accent) 7%, var(--theme-surface));
  color: var(--theme-helper-text);
  font-family: var(--theme-helper-family);
  font-size: 0.76rem;
  line-height: 1;
  white-space: nowrap;
}

.template-preview-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.template-preview-compare article {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px dashed color-mix(in srgb, var(--theme-accent) 16%, var(--theme-border));
  border-radius: calc(var(--theme-surface-radius) * 0.75);
  background: color-mix(in srgb, var(--theme-background) 50%, var(--theme-surface));
}

.template-preview-compare h2,
.template-preview-compare h3,
.template-preview-compare p {
  margin: 0;
}

.template-preview-compare-text {
  margin-top: 0.65rem;
}

.template-preview-baseline {
  font-size: 1rem;
}

.template-preview-nav-compare {
  --theme-nav-font-size: 1rem;
  --theme-nav-gap: 1rem;
}

.template-preview-button-baseline {
  font-size: 1rem;
  padding: 0.85rem 1.25rem;
}

.template-preview-group .panel {
  margin: 0;
}

.template-preview-nav {
  padding: calc(1rem * var(--theme-space-scale));
  border: 1px dashed var(--theme-border);
  border-radius: var(--theme-surface-radius);
  background: color-mix(in srgb, var(--theme-background) 60%, var(--theme-surface));
}

.template-preview-logo {
  display: block;
  max-width: 220px;
  max-height: 72px;
  width: auto;
}

.template-preview-favicon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: start;
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .templates-editor {
    grid-template-columns: 1fr;
  }

  .templates-preview-shell {
    position: static;
  }

  .johan-hero,
  .johan-grid,
  .johan-link-grid,
  .image-text-block,
  .image-text-right {
    grid-template-columns: 1fr;
  }

  .shell {
    margin: calc(7vh * var(--theme-space-scale)) auto;
    padding: calc(1rem * var(--theme-space-scale));
  }

  .shell-wide,
  .footer-inner,
  .nav-shell {
    max-width: calc(100vw - 1.25rem);
  }

  .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  .site-nav {
    width: 100%;
    gap: calc(var(--theme-nav-gap) * 0.75);
  }

  .site-nav a {
    max-width: 100%;
  }

  .actions {
    gap: 0.75rem;
  }

  .johan-home,
  .johan-content-shell {
    margin-top: 2vh;
  }

  .johan-hero > div,
  .johan-hero-meta,
  .johan-article-header,
  .panel,
  .notice-block,
  .cta-card,
  .quote-card {
    padding-left: calc(1rem * var(--theme-space-scale));
    padding-right: calc(1rem * var(--theme-space-scale));
  }

  .brandmark-copy,
  .johan-brand {
    max-width: 100%;
  }

  .brandmark-title,
  .header-title-text {
    line-height: 1.15;
  }

  .brandmark-tagline,
  .header-tagline-text,
  .johan-brand p {
    line-height: 1.35;
  }
}

@media (max-width: 640px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav a {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-menu {
    flex-direction: column;
    align-items: flex-start;
  }

  .johan-link-grid {
    grid-template-columns: 1fr;
  }

  .article-image,
  .image-text-media img {
    aspect-ratio: 16 / 10;
  }
}
