:root {
  --ink: #050505;
  --paper: #ffffff;
  --muted: #666666;
  --header-height: 79px;
  --footer-height: 58px;
  --chrome-height: calc(var(--header-height) + var(--footer-height));
}

html {
  scroll-behavior: smooth;
}

::selection {
  color: var(--paper);
  background: var(--ink);
}

body {
  background:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 44px 44px;
}

.earthquake-map {
  height: clamp(25rem, 58vh, 38rem);
  min-height: 25rem;
  background: #e5e7eb;
  filter: contrast(1.03) saturate(1.12);
  transition: filter 0.3s ease;
}
.earthquake-map:hover { filter: contrast(1.05) saturate(1.2); }
.leaflet-control-zoom a, .leaflet-control-scale-line { border-color: #14213d !important; color: #14213d !important; background: rgba(255,255,255,.92) !important; }

.dashboard-hero-image {
  position: relative;
  overflow: hidden;
  min-height: 15rem;
  margin-top: 2.5rem;
  border: 1px solid var(--ink);
  background: #17222d;
}

.dashboard-hero-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.32), transparent 55%);
  content: "";
  pointer-events: none;
}

.dashboard-hero-image img {
  display: block;
  width: 100%;
  height: clamp(15rem, 30vw, 28rem);
  object-fit: cover;
  filter: grayscale(0.65) contrast(1.08);
}

.earthquake-map.is-loading::after {
  display: grid;
  height: 100%;
  place-items: center;
  color: #525252;
  content: "Cargando mapa sísmico…";
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dashboard-stat {
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1rem 1.25rem;
}

.dashboard-stat span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dashboard-stat strong {
  font-size: 2rem;
  font-weight: 900;
}

.dashboard-stat:nth-child(1) strong { color: #008f72; }
.dashboard-stat:nth-child(2) strong { color: #e76f51; }
.dashboard-stat:nth-child(3) strong { color: #14213d; }

.dashboard-action {
  min-height: 2.75rem;
  border: 1px solid #14213d;
  border-radius: 999px;
  background: #008f72;
  padding: 0.7rem 1rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.dashboard-action:disabled { cursor: not-allowed; opacity: 0.45; }
.dashboard-action-secondary { background: #14213d; }
.dashboard-action-location { background: #e76f51; color: #14213d; }
.dashboard-action-quiet { background: #fff; color: #14213d; }
.dashboard-check { display: inline-flex; align-items: center; gap: 0.4rem; color: #14213d; font-size: 0.72rem; font-weight: 900; white-space: nowrap; }
.dashboard-check input { accent-color: #008f72; }
.dashboard-speed { width: auto; min-width: 7rem; }
.dashboard-toolbar > * { min-width: 0; }
.dashboard-filters > *,
.dashboard-controls > * { min-width: 0; }
.dashboard-sort { border-bottom: 1px solid #008f72; background: transparent; padding: 0.25rem; color: #14213d; font-size: 0.75rem; font-weight: 900; }
.earthquake-timeline { background: #f7faf8; }
.earthquake-context-strip { background: #e8f7f2; color: #14213d; }
.earthquake-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; color: #52616b; font-size: 0.7rem; font-weight: 900; text-transform: uppercase; }
.earthquake-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.earthquake-source-status { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.source-pill { display: inline-flex; align-items: center; gap: 0.35rem; color: #52616b; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.source-pill i { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: #a3a3a3; }
.source-pill.is-online i { background: #008f72; box-shadow: 0 0 0 3px rgba(0, 143, 114, 0.15); }
.source-pill.is-offline { color: #a3a3a3; }
.legend-dot { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 999px; }
.legend-low { background: #14213d; }
.legend-medium { background: #008f72; }
.legend-high { background: #eab308; }
.legend-major { background: #e76f51; }
.earthquake-timeline input { accent-color: #008f72; }
.earthquake-focus-marker { animation: earthquake-focus-pulse 1.2s ease-in-out infinite; }
.earthquake-detail { border-left: 4px solid #008f72; background: #f7faf8; padding: 1rem; }
.earthquake-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.earthquake-detail-grid span { display: grid; gap: 0.15rem; }
.earthquake-detail-grid small { color: #64748b; font-size: 0.68rem; font-weight: 900; text-transform: uppercase; }
.earthquake-detail-grid b { color: #14213d; font-size: 0.9rem; }
.earthquake-detail-source { margin-top: 0.9rem; color: #64748b; font-size: 0.72rem; font-weight: 800; }
.earthquake-products { margin-top: 1.25rem; border-top: 1px solid #d5e6df; padding-top: 0.9rem; }
.earthquake-products p { margin-bottom: 0.55rem; color: #52616b; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.earthquake-products > div { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.earthquake-products a { border: 1px solid #008f72; border-radius: 999px; padding: 0.45rem 0.65rem; color: #14213d; font-size: 0.7rem; font-weight: 900; }
.earthquake-products a:hover { background: #008f72; color: #fff; }
.earthquake-products-loading, .earthquake-products-empty { color: #64748b; font-size: 0.72rem; line-height: 1.45; }
.earthquake-station-list { display: grid; gap: 0.45rem; }
.earthquake-station { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; border: 1px solid #d5e6df; background: #fff; padding: 0.55rem 0.65rem; }
.earthquake-station div { min-width: 0; display: grid; gap: 0.15rem; }
.earthquake-station strong { color: #14213d; font-size: 0.75rem; }
.earthquake-station small, .earthquake-station-note { color: #64748b; font-size: 0.68rem; line-height: 1.4; }
.earthquake-station a { flex: 0 0 auto; color: #008f72; font-size: 0.68rem; font-weight: 900; text-decoration: underline; }
.earthquake-station-note { display: block; margin-top: 0.65rem; }
.dashboard-action-alert.is-active { background: #e8f7f2; border-color: #008f72; color: #14213d; }
.dashboard-alert-threshold { min-width: 8.5rem; }
.dashboard-filter-group { display: grid; gap: 0.55rem; }
.dashboard-filter-heading { color: #64748b; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }
.dashboard-filter-group .dashboard-filters { min-width: 0; }
.dashboard-filter-group .dashboard-filters > * { min-width: 0; }
.dashboard-filter-group .dashboard-filters input { flex: 1 1 16rem; }
.dashboard-controls { min-width: 0; }
@media (min-width: 1024px) {
  .dashboard-filter-group:first-child .dashboard-filters { display: grid; grid-template-columns: minmax(16rem, 1fr) repeat(4, minmax(9rem, 0.55fr)); }
  .dashboard-filter-group:first-child .dashboard-input { max-width: none; }
}
@media (max-width: 640px) {
  .dashboard-controls > * { flex: 1 1 auto; }
  .dashboard-controls #earthquake-status { flex-basis: 100%; }
}

/* Filter layout: one predictable grid that never forces horizontal overflow. */
.dashboard-toolbar { display: flex !important; flex-direction: column; align-items: stretch; }
.dashboard-filter-group { width: 100%; }
.dashboard-filter-group .dashboard-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
.dashboard-filter-group .dashboard-filters > .dashboard-input { width: 100%; max-width: none !important; min-width: 0; }
.dashboard-filter-group .dashboard-filters #earthquake-search { grid-column: span 2; }
.dashboard-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); width: 100%; align-items: stretch; }
.dashboard-controls > * { width: 100%; min-width: 0; }
.dashboard-controls #earthquake-status { grid-column: 1 / -1; align-self: center; }
.dashboard-controls .dashboard-check { justify-content: center; }

@media (max-width: 900px) {
  .dashboard-filter-group .dashboard-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-filter-group .dashboard-filters #earthquake-search { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .dashboard-filter-group .dashboard-filters { grid-template-columns: minmax(0, 1fr); }
  .dashboard-filter-group .dashboard-filters #earthquake-search { grid-column: auto; }
  .dashboard-controls { grid-template-columns: minmax(0, 1fr); }
  .dashboard-controls #earthquake-status { text-align: left; }
}

.traffic-camera-card { overflow: hidden; border: 1px solid #14213d; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.traffic-camera-card:hover { transform: translateY(-3px); box-shadow: 4px 4px 0 #008f72; }
.traffic-camera-card img { display: block; aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: #e5e7eb; }
.traffic-camera-card div, .traffic-incident { display: grid; gap: .2rem; padding: .7rem; }
.traffic-camera-card strong, .traffic-incident strong { color: #14213d; font-size: .8rem; }
.traffic-camera-card small, .traffic-incident small { color: #64748b; font-size: .7rem; }
.traffic-incident { border-left: 3px solid #e76f51; background: #fff8f5; }
.traffic-popup-image { display: block; width: 15rem; max-width: 100%; margin-top: .5rem; }
.traffic-cluster-icon { display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 9px rgba(5,5,5,.28); color: #fff; font-size: .82rem; font-weight: 900; }
.traffic-cluster-icon span { display: grid; place-items: center; width: 100%; height: 100%; }
.traffic-cluster-tone-1 { background: #457b9d; }
.traffic-cluster-tone-2 { background: #6a4c93; }
.traffic-cluster-tone-3 { background: #bc6c25; }
.traffic-cluster-tone-4 { background: #bc4749; }
.traffic-cluster-tone-5 { background: #2a9d8f; }
.traffic-weather { margin-top: .5rem; color: #52616b; font-size: .72rem; line-height: 1.5; }
.traffic-source-strip { border: 1px solid #050505; background: #f7f4ed; padding: .9rem 1rem; }
.traffic-source-strip div { display: grid; gap: .25rem; }
.traffic-source-strip span, .traffic-coverage p { color: #6b7280; font-size: .65rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.traffic-source-strip strong { color: #050505; font-size: .8rem; }
.traffic-situation { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid #14213d; background: #e8f7f2; padding: 1rem 1.1rem; }
.traffic-situation div { display: grid; gap: .25rem; min-width: 0; }
.traffic-situation span { color: #008f72; font-size: .65rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.traffic-situation strong { color: #14213d; font-size: .95rem; }
.traffic-situation small { color: #52616b; font-size: .72rem; }
.traffic-insights-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.traffic-insights-heading > div:first-child { display: grid; gap: .25rem; }
.traffic-insights-heading span, .traffic-insight-card > span { color: #008f72; font-size: .65rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.traffic-insights-heading h2 { color: #14213d; font-size: 1.35rem; font-weight: 900; }
.traffic-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.traffic-preset { border: 1px solid #b8c7c1; border-radius: 999px; padding: .45rem .7rem; color: #52616b; font-size: .72rem; font-weight: 800; }
.traffic-preset:hover, .traffic-preset.is-active { border-color: #14213d; background: #14213d; color: #fff; }
.traffic-insight-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: .75rem; }
.traffic-insight-card { display: grid; min-height: 8rem; align-content: start; gap: .55rem; border: 1px solid #dbe5e1; background: #f7faf9; padding: 1rem; }
.traffic-insight-card strong { color: #14213d; font-size: .98rem; line-height: 1.35; }
.traffic-insight-card small { color: #64748b; font-size: .72rem; }
.traffic-insight-featured { border-color: #e76f51; background: #fff8f5; }
.traffic-insight-featured > span { color: #c2412d; }
.traffic-ranking { display: grid; gap: .45rem; }
.traffic-ranking div { display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px solid #dbe5e1; padding-bottom: .35rem; font-size: .75rem; }
.traffic-ranking strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.traffic-ranking b { color: #008f72; font-size: .75rem; }
.traffic-coverage { border-top: 1px solid #d4d4d4; padding-top: 1rem; }
.traffic-coverage-row { display: grid; grid-template-columns: 8rem minmax(0,1fr) 2rem; align-items: center; gap: .6rem; margin-top: .5rem; font-size: .7rem; }
.traffic-coverage-row i { height: .45rem; overflow: hidden; background: #e5e1d8; }
.traffic-coverage-row b { display: block; height: 100%; background: #f0b44d; }
.traffic-coverage-row strong { text-align: right; }
.traffic-filters { display: grid; grid-template-columns: minmax(14rem, 1.35fr) repeat(2, minmax(11rem, .7fr)) repeat(2, minmax(12rem, .9fr)); gap: .75rem; width: 100%; }
.traffic-filter-field { display: grid; min-width: 0; gap: .35rem; }
.traffic-filter-field > span { color: #64748b; font-size: .62rem; font-weight: 900; letter-spacing: .13em; line-height: 1; text-transform: uppercase; }
.traffic-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: .85rem; }
.traffic-camera-card { display: block; width: 100%; padding: 0; text-align: left; cursor: pointer; }
.traffic-camera-card span { display: grid; gap: .2rem; padding: .7rem; }
.traffic-selected-camera { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem); gap: 1rem; border: 2px solid #008f72; background: #e8f7f2; padding: 1rem; }
.traffic-selected-camera div { display: grid; align-content: center; gap: .3rem; }
.traffic-selected-camera p { color: #64748b; font-size: .65rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.traffic-selected-camera strong { color: #14213d; font-size: 1.15rem; }
.traffic-selected-camera small { color: #52616b; font-size: .75rem; }
.traffic-selected-camera img { grid-row: span 2; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.traffic-selected-camera a { color: #008f72; font-size: .75rem; font-weight: 900; text-decoration: underline; }
.traffic-status-ok { color: #008f72 !important; }
.traffic-status-watch { color: #eab308 !important; }
.traffic-status-high { color: #e76f51 !important; }
.traffic-incident { cursor: pointer; }
.traffic-incident { grid-template-columns: 2rem minmax(0, 1fr); align-items: start; text-align: left; }
.traffic-incident-symbol { display: grid; place-items: center; font-size: 1.2rem; line-height: 1; }
.traffic-incident-icon { display: grid !important; place-items: center; width: 34px !important; height: 34px !important; border: 2px solid #fff !important; border-radius: 50%; background: #bc4749 !important; box-shadow: 0 2px 8px rgba(5,5,5,.45); font-size: 1.1rem; line-height: 1; opacity: 1 !important; z-index: 700; }
.traffic-incident-icon span { display: block; transform: translateY(-1px); }
.traffic-selected-incident { border: 2px solid #bc4749; background: #fff8f5; padding: 1rem; }
.traffic-selected-incident div { display: grid; gap: .35rem; }
.traffic-selected-incident strong { color: #14213d; font-size: 1rem; }
.traffic-selected-incident small { color: #52616b; font-size: .72rem; line-height: 1.5; }
@media (max-width: 900px) { .traffic-filters { grid-template-columns: minmax(0, 1fr) minmax(11rem, .75fr); } }
@media (max-width: 900px) { .traffic-insight-grid { grid-template-columns: 1fr 1fr; } .traffic-insight-featured { grid-column: 1 / -1; } }
@media (max-width: 640px) { .traffic-filters, .traffic-selected-camera { grid-template-columns: 1fr; } .traffic-selected-camera img { grid-row: auto; } .traffic-toolbar-actions { align-items: flex-start; flex-direction: column; } .traffic-insights-heading { align-items: flex-start; flex-direction: column; } .traffic-insight-grid { grid-template-columns: 1fr; } .traffic-insight-featured { grid-column: auto; } .traffic-situation { align-items: flex-start; flex-direction: column; } }

@keyframes earthquake-focus-pulse {
  0%, 100% { stroke-width: 2; }
  50% { stroke-width: 6; }
}

.dashboard-input {
  min-height: 2.75rem;
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  padding: 0.7rem 1rem;
  color: var(--ink);
}

.earthquake-list {
  display: grid;
  gap: 0.5rem;
  max-height: 24rem;
  overflow-y: auto;
}

.earthquake-list-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid #d4d4d4;
  background: var(--paper);
  padding: 0.75rem;
  text-align: left;
}

.earthquake-list-item:hover {
  border-color: var(--ink);
  transform: translateX(4px);
}

.earthquake-list-item span:last-child {
  display: grid;
  gap: 0.2rem;
}

.earthquake-list-item small {
  color: var(--muted);
  font-size: 0.75rem;
}

.earthquake-magnitude {
  color: var(--magnitude-color);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .dashboard-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(32rem, auto);
    align-items: center;
    gap: 1rem;
  }

  .dashboard-filters {
    display: grid;
    grid-template-columns: minmax(12rem, 1.5fr) repeat(4, minmax(8rem, 1fr));
    align-items: center;
  }

  .dashboard-controls {
    display: grid;
    grid-template-columns: repeat(3, max-content) minmax(7rem, max-content) minmax(8rem, max-content);
    justify-content: end;
    align-items: center;
  }

  .dashboard-controls .dashboard-action,
  .dashboard-controls .dashboard-speed {
    white-space: nowrap;
  }

  .dashboard-controls #earthquake-status {
    text-align: right;
  }

  .dashboard-bottom > * {
    min-width: 0;
  }

  .dashboard-bottom > aside {
    align-self: start;
    position: sticky;
    top: 6rem;
  }
}

/* Sidebar admin: keep section headers and child links visually distinct. */
.admin-shell .admin-nav {
  gap: 0.35rem;
}

.admin-shell .admin-nav-group {
  display: block;
  margin: 0.2rem 0 0;
  padding: 0.35rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-shell .admin-nav-group summary {
  min-height: 2.4rem;
  border: 0;
  color: #a8b5c6 !important;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}

.admin-shell .admin-nav-group summary:hover,
.admin-shell .admin-nav-group[open] summary {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}

.admin-shell .admin-nav-group summary b {
  display: inline-block;
  color: var(--admin-mint) !important;
  transition: transform 160ms ease;
}

.admin-shell .admin-nav-group:not([open]) summary b {
  transform: rotate(-90deg);
}

.admin-shell .admin-nav-group a,
.admin-shell .admin-nav-group a:visited {
  display: flex;
  min-height: 2.25rem;
  align-items: center;
  margin: 0.12rem 0 0 0.65rem;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 7px 7px 0;
  padding: 0.55rem 0.75rem 0.55rem 1rem;
  color: #c1ccda !important;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.admin-shell .admin-nav-group a:hover {
  border-left-color: var(--admin-mint);
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.admin-shell .admin-nav-group a.is-active {
  border-left-color: var(--admin-mint);
  background: var(--admin-mint) !important;
  color: var(--admin-navy) !important;
  font-weight: 900;
}

@media (max-width: 900px) {
  .admin-shell .admin-nav-group {
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  .admin-shell .admin-nav-group a,
  .admin-shell .admin-nav-group a:visited {
    margin-left: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
  }
}

/* Admin workspace: stronger orientation, readable density and safe mobile flow. */
.admin-sidebar-brand {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 0.25rem 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-sidebar-brand strong {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.admin-sidebar-brand small,
.admin-sidebar-kicker {
  color: #8fa0b5;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.admin-nav-footer {
  display: grid;
  gap: 0.2rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-shell .admin-nav-footer a {
  padding: 0.55rem 0.7rem;
  color: #8fa0b5;
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-shell .admin-nav-footer a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-section-action-primary {
  border-color: var(--admin-navy) !important;
  background: var(--admin-navy) !important;
  color: #fff !important;
}

.admin-section-action-primary:hover {
  border-color: var(--admin-mint) !important;
  background: var(--admin-mint) !important;
  color: var(--admin-navy) !important;
}

.admin-intro-note {
  max-width: 42rem;
  margin-top: 0.8rem;
  color: var(--admin-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.admin-shell .admin-list-toolbar {
  align-items: center;
  gap: 1rem;
}

.admin-shell .admin-list-toolbar p {
  color: var(--admin-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.admin-shell .admin-filter-bar {
  align-items: stretch;
  background: #fff;
  padding: 0.8rem;
}

.admin-shell .admin-filter-bar input,
.admin-shell .admin-filter-bar select,
.admin-shell .admin-filter-bar button,
.admin-shell .admin-filter-bar a {
  min-height: 2.75rem;
}

.admin-shell .admin-table th,
.admin-shell .admin-table td {
  vertical-align: middle;
}

@media (max-width: 900px) {
  .admin-sidebar-brand {
    display: none;
  }

  .admin-nav-footer {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0.4rem;
    padding-top: 0.5rem;
  }

  .admin-intro-actions {
    width: 100%;
  }

  .admin-intro-actions .admin-section-action {
    flex: 1 1 12rem;
    justify-content: center;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .dashboard-toolbar {
    display: grid;
    gap: 1rem;
  }

  .dashboard-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-filters #earthquake-search {
    grid-column: 1 / -1;
  }

  .dashboard-controls {
    display: flex;
    justify-content: flex-end;
  }

  .dashboard-controls .dashboard-action,
  .dashboard-controls .dashboard-speed {
    width: auto;
    flex: 1 1 12rem;
  }
}

@media (max-width: 767px) {
  .earthquake-map {
    height: 25rem;
  }

  .dashboard-bottom > aside {
    border-top: 1px solid var(--ink);
    padding-top: 2rem;
  }

  .dashboard-toolbar .dashboard-controls {
    align-items: stretch;
  }

  .dashboard-controls .dashboard-action,
  .dashboard-controls .dashboard-speed {
    flex: 1 1 12rem;
  }

  .dashboard-check {
    flex: 1 1 12rem;
    min-height: 2.75rem;
  }

  .dashboard-controls #earthquake-status {
    flex-basis: 100%;
  }
}

.earthquake-marker-new {
  animation: earthquake-pulse 1.8s ease-out 3;
  transform-origin: center;
}

@keyframes earthquake-pulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 0.18; }
}

@media (prefers-reduced-motion: reduce) {
  .earthquake-marker-new { animation: none; }
}

/* Admin navigation: consistent labels, icon alignment and collapsible motion. */
.admin-shell .admin-nav-home,
.admin-shell .admin-nav-group > summary,
.admin-shell .admin-nav-group > .admin-nav-links > a {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.admin-shell .admin-nav-summary-label {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}

.admin-shell .admin-nav-icon {
  display: inline-grid;
  width: 1.15rem;
  min-width: 1.15rem;
  place-items: center;
  color: currentColor;
}

.admin-shell .admin-nav-icon-svg {
  width: 1rem;
  height: 1rem;
}

.admin-shell .admin-nav-group > summary b {
  transition: transform .24s ease;
}

.admin-shell .admin-nav-group:not([open]) > summary b {
  transform: rotate(-90deg);
}

.admin-shell .admin-nav-group > .admin-nav-links {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-.25rem);
  transition: grid-template-rows .28s ease, opacity .2s ease, transform .28s ease;
}

.admin-shell .admin-nav-group > .admin-nav-links > a {
  min-height: 0;
  overflow: hidden;
  transition: min-height .28s ease, padding .28s ease, color .2s ease, background .2s ease;
}

.admin-shell .admin-nav-group[open] > .admin-nav-links {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.admin-shell .admin-nav-group[open] > .admin-nav-links > a {
  min-height: 2.55rem;
}

@media (prefers-reduced-motion: reduce) {
  .admin-shell .admin-nav-group > summary b,
  .admin-shell .admin-nav-group > .admin-nav-links,
  .admin-shell .admin-nav-group > .admin-nav-links > a {
    transition: none;
  }
}

/* Language control: compact globe pill with a clear current state. */
.public-shell .language-switcher {
  margin-left: .4rem;
  border-left: 0;
  padding-left: 0;
}

.public-shell .language-switcher summary {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  padding: .42rem .68rem;
  color: var(--ink);
  font-size: .7rem;
  letter-spacing: .08em;
  box-shadow: 0 4px 12px rgba(20, 33, 61, .05);
}

.public-shell .language-switcher summary svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.public-shell .language-switcher summary b {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 180ms ease;
}

.public-shell .language-switcher[open] summary b { transform: rotate(180deg); }
.public-shell .language-switcher summary:hover,
.public-shell .language-switcher[open] summary { border-color: var(--accent); background: var(--accent-soft); }

.public-shell .language-switcher-menu {
  top: calc(100% + .65rem);
  min-width: 12rem;
  gap: .15rem;
  border-color: var(--line);
  border-radius: 12px;
  padding: .45rem;
  box-shadow: 0 18px 42px rgba(20, 33, 61, .16);
}

.public-shell .site-nav {
  overflow-x: visible;
  overflow-y: visible;
}

.public-shell .language-switcher {
  z-index: 100;
}

.public-shell .language-switcher-menu a {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 38px;
  border-radius: 8px;
  padding: .5rem .6rem;
  font-size: .74rem;
  font-weight: 700;
  text-decoration: none;
}

.public-shell .language-switcher-menu a .language-code {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-size: .62rem;
  font-weight: 900;
}

.public-shell .language-switcher-menu a svg {
  width: 15px;
  height: 15px;
  margin-left: auto;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.public-shell .language-switcher-menu a.is-active { background: var(--accent-soft); color: var(--ink); }
.public-shell .language-switcher-menu a.is-active .language-code { border-color: var(--accent); background: var(--accent); color: #fff; }

.public-shell .home-final-cta h2,
.public-shell .home-final-cta p,
.public-shell .home-final-cta a {
  color: #fff !important;
}

.public-shell .home-final-cta h2 {
  max-width: 48rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
}

.public-shell .home-final-cta > div > p:first-child {
  color: #7ee0c7 !important;
}

.public-shell .home-final-cta > div > p:last-child {
  max-width: 42rem;
  color: #d6e3df !important;
}

.public-shell .home-final-cta > a {
  background: #fff !important;
  color: var(--ink) !important;
}

/* Contrast guard for every navy panel, including content added from templates. */
.public-shell [class~="bg-[#14213d]"] h1,
.public-shell [class~="bg-[#14213d]"] h2,
.public-shell [class~="bg-[#14213d]"] h3,
.public-shell [class~="bg-[#14213d]"] h4,
.public-shell [class~="bg-[#14213d]"] p,
.public-shell [class~="bg-[#14213d]"] span,
.public-shell [class~="bg-[#14213d]"] strong,
.public-shell [class~="bg-[#14213d]"] a {
  color: #fff !important;
}

.public-shell [class~="bg-[#14213d]"] .text-emerald-300,
.public-shell [class~="bg-[#14213d]"] .text-emerald-700 {
  color: #7ee0c7 !important;
}

.public-shell [class~="bg-[#14213d]"] .text-slate-300,
.public-shell [class~="bg-[#14213d]"] .text-neutral-300 {
  color: #d6e3df !important;
}

/* Keep headings on dark cards readable despite the global heading palette. */
.public-shell .process-dark-title,
.public-shell .services-dark-title,
.public-shell .fablab-dark-title {
  color: #fff !important;
}

.public-shell .process-dark-title::selection,
.public-shell .services-dark-title::selection,
.public-shell .fablab-dark-title::selection {
  background: #7ee0c7;
  color: #14213d;
}

@media (max-width: 760px) {
  .public-shell .language-switcher { margin: .35rem 0 0; border: 0; padding: .45rem 0 0; }
  .public-shell .language-switcher summary { width: max-content; }
  .public-shell .language-switcher-menu { position: static; margin-top: .45rem; }
  .public-shell .site-nav { overflow-x: hidden; overflow-y: auto; }
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

input,
textarea,
select,
button {
  max-width: 100%;
}

h1,
h2,
h3,
p,
a,
strong,
span,
td,
th,
label {
  overflow-wrap: anywhere;
}

.site-main {
  padding-top: var(--header-height);
  padding-bottom: var(--footer-height);
}

.site-header,
.site-footer {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}

.site-nav {
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar,
.admin-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  white-space: nowrap;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 0;
  height: 3px;
  background: var(--ink);
  transform-origin: left;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  width: 18px;
  height: 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: difference;
  transition: width 180ms ease, height 180ms ease, opacity 180ms ease;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  background: var(--ink);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 260ms cubic-bezier(.7, 0, .2, 1);
}

.page-transition-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: 5.5rem;
  min-height: 4rem;
  place-items: center;
  border: 2px solid var(--paper);
  color: var(--paper);
  font-family: Manrope, Inter, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 5px 5px 0 var(--accent);
}

.page-transition-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(.18);
  transform-origin: left;
  transition: transform 220ms ease;
}

.page-transition.is-ready {
  opacity: 0;
  transform: translateY(-100%);
}

.page-transition.is-leaving {
  opacity: 1;
  transform: translateY(0);
}

.page-transition.is-leaving .page-transition-progress {
  transform: scaleX(1);
}

a,
button {
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

a:hover,
button:hover {
  transform: translateY(-1px);
}

.brand-mark {
  display: inline-grid;
  min-width: 46px;
  min-height: 46px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}

.hero-stage {
  background:
    radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.08), transparent 24rem),
    radial-gradient(circle at 10% 90%, rgba(0, 0, 0, 0.06), transparent 22rem),
    var(--paper);
}

.hero-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(112deg, transparent 0%, rgba(0, 0, 0, 0.07) 45%, transparent 58%);
  transform: translateX(-120%);
  animation: sweep 7s ease-in-out infinite;
}

.hero-canvas {
  opacity: 0.48;
}

.hero-portrait {
  transform-style: preserve-3d;
}

.hero-title {
  hyphens: none;
  overflow-wrap: normal;
  word-break: keep-all;
}

.motion-button:hover {
  box-shadow: 8px 8px 0 var(--ink);
}

.content-card {
  position: relative;
  min-height: 100%;
}

.content-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.content-tools a,
.content-tools button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.content-tools a:hover,
.content-tools button:hover {
  background: var(--ink);
  color: var(--paper);
}

.toc-panel {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1rem;
}

.toc-panel strong {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.toc-panel nav {
  display: grid;
  gap: 0.4rem;
}

.toc-panel a {
  border-left: 2px solid var(--ink);
  padding-left: 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.toc-panel a.is-nested {
  margin-left: 1rem;
}

.toc-panel a:hover {
  color: var(--ink);
}

.content-card h3 a::after {
  content: "";
  display: block;
  width: 2.4rem;
  height: 2px;
  margin-top: 1rem;
  background: currentColor;
  transform: scaleX(0.55);
  transform-origin: left;
  transition: transform 180ms ease;
}

.content-card:hover h3 a::after {
  transform: scaleX(1);
}

.empty-state {
  display: grid;
  gap: 0.4rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 2rem;
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
}

.empty-state span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.filter-panel {
  display: grid;
  gap: 1rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1rem;
}

.filter-panel strong {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.filter-panel div div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-panel a,
.active-filter-summary a {
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  padding: 0.55rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-panel a.is-active,
.filter-panel a:hover,
.active-filter-summary a.is-active,
.active-filter-summary a:hover {
  background: var(--ink);
  color: var(--paper);
}

.active-filter-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.active-filter-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archive-list {
  display: grid;
  gap: 1.25rem;
}

.archive-list section {
  display: grid;
  grid-template-columns: 8rem 1fr;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.archive-list h2 {
  border-right: 1px solid var(--ink);
  padding: 1rem;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.archive-list section > div {
  display: grid;
}

.archive-list a {
  display: grid;
  gap: 0.3rem;
  border-bottom: 1px solid var(--ink);
  padding: 1rem;
}

.archive-list a:last-child {
  border-bottom: 0;
}

.archive-list a:hover {
  background: var(--ink);
  color: var(--paper);
}

.archive-list strong {
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.archive-list span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.archive-list a:hover span {
  color: #d4d4d4;
}

.marquee {
  overflow: hidden;
}

.marquee div {
  display: flex;
  width: max-content;
  animation: marquee 24s linear infinite;
}

.marquee span {
  display: inline-flex;
  padding: 14px 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 800ms ease, transform 800ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-snap {
  position: relative;
}

.section-snap::before {
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 1px;
  content: "";
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms ease;
}

.section-snap.is-visible::before {
  transform: scaleX(1);
}

[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

[data-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

[data-stagger].is-visible > *:nth-child(2) {
  transition-delay: 80ms;
}

[data-stagger].is-visible > *:nth-child(3) {
  transition-delay: 160ms;
}

[data-stagger].is-visible > *:nth-child(4) {
  transition-delay: 240ms;
}

[data-stagger].is-visible > *:nth-child(5) {
  transition-delay: 320ms;
}

.pulse-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.55rem;
  border-radius: 999px;
  background: var(--paper);
  animation: pulse 1.4s ease-in-out infinite;
}

.magnetic {
  will-change: transform;
}

.admin-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.5rem;
}

.admin-header-actions,
.admin-list-toolbar,
.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.admin-header-actions {
  justify-content: flex-start;
}

.admin-list-toolbar {
  justify-content: space-between;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.85rem;
}

.admin-list-toolbar p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-toolbar-actions {
  justify-content: flex-end;
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(10rem, auto) auto auto;
  gap: 0.6rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.85rem;
}

.admin-filter-bar input,
.admin-filter-bar select,
.admin-filter-bar button,
.admin-filter-bar a {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 900;
}

.admin-filter-bar button,
.admin-filter-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.admin-filter-bar button {
  background: var(--ink);
  color: var(--paper);
}

.admin-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.75rem;
}

.admin-bulk-bar span {
  margin-right: 0.25rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-bulk-bar button {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.6rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-bulk-bar button:hover {
  background: var(--ink);
  color: var(--paper);
}

.admin-nav a {
  flex: 0 0 auto;
  border: 1px solid transparent;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-nav a.is-active,
.admin-nav a:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.admin-summary-card,
.admin-action-card {
  display: grid;
  min-height: 8rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1.25rem;
}

.admin-dashboard-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1.25rem;
}

.admin-dashboard-intro h2 {
  margin-top: 0.5rem;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
}

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

.admin-activity-grid section {
  border: 1px solid var(--ink);
  background: var(--paper);
}

.admin-activity-grid h2 {
  border-bottom: 1px solid var(--ink);
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-activity-grid a,
.admin-activity-grid p {
  display: block;
  border-bottom: 1px solid var(--ink);
  padding: 0.9rem 1rem;
}

.admin-activity-grid a:last-child,
.admin-activity-grid p:last-child {
  border-bottom: 0;
}

.admin-activity-grid a:hover {
  background: var(--ink);
  color: var(--paper);
}

.admin-activity-grid strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 900;
}

.admin-activity-grid span,
.admin-activity-grid p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-activity-grid a:hover span {
  color: #d4d4d4;
}

.admin-summary-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.admin-summary-card strong {
  align-self: end;
  margin-top: 1.5rem;
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
}

.admin-summary-card em {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.admin-summary-card:hover em,
.admin-summary-card:hover span {
  color: #d4d4d4;
}

.admin-summary-card-dark {
  background: var(--ink);
  color: var(--paper);
}

.admin-summary-card-dark span,
.admin-summary-card-dark em {
  color: #d4d4d4;
}

.admin-action-card {
  min-height: 6rem;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-summary-card:hover,
.admin-action-card:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.cms-module-card {
  display: grid;
  min-height: 13rem;
  gap: 1rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1.25rem;
}

.cms-module-card span {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.cms-module-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cms-module-card strong {
  align-self: end;
  width: fit-content;
  border: 1px solid var(--ink);
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cms-module-card:hover {
  background: var(--ink);
  color: var(--paper);
}

.cms-module-card:hover p {
  color: #d4d4d4;
}

.cms-module-card:hover strong {
  border-color: var(--paper);
}

.about-cv-section {
  border: 1px solid var(--ink);
  background: var(--paper);
}

.about-cv-layout {
  display: grid;
  gap: 2rem;
}

.about-cv-primary,
.about-cv-secondary {
  min-width: 0;
}

.about-cv-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
}

.about-cv-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--ink);
  padding: 1rem 1.25rem;
}

.about-cv-kicker {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.about-cv-heading h2 {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.about-cv-section-intro {
  max-width: 42rem;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.about-cv-heading span {
  display: inline-grid;
  min-width: 2rem;
  min-height: 2rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.about-cv-count {
  flex: 0 0 auto;
}

.about-cv-list {
  display: grid;
}

.about-cv-item {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1.1rem;
  border-bottom: 1px solid var(--ink);
  padding: 1.25rem;
}

.about-cv-certification {
  grid-template-columns: 3.25rem 1fr;
  gap: 1.1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.about-cv-award {
  grid-template-columns: 3.25rem 1fr;
  gap: 1.1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.about-cv-item:last-child {
  border-bottom: 0;
}

.about-cv-dot {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.45rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
}

.about-cv-marker {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-top: 0.05rem;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.about-cv-award .about-cv-marker {
  border-color: var(--warm);
  background: #fff2df;
  color: #9a5a08;
  font-size: 0.5rem;
}

.about-cv-patent {
  grid-template-columns: 3.25rem 1fr;
  gap: 1.1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.about-cv-patent .about-cv-marker {
  border-color: #385b86;
  background: #e8f0fa;
  color: #385b86;
}

.about-cv-item h3 {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.about-cv-item > div:last-child {
  min-width: 0;
}

.about-cv-org {
  margin-top: 0.35rem;
  color: var(--ink);
  font-weight: 800;
}

.about-cv-date,
.about-cv-location {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.about-cv-description {
  margin-top: 0.9rem;
  color: #262626;
  font-size: 0.94rem;
  line-height: 1.75;
}

.about-cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.about-cv-skills span {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.about-cv-link {
  display: inline-flex;
  margin-top: 1rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.about-cv-link span {
  margin-left: 0.35rem;
  font-size: 1rem;
  line-height: 0.8;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}

.admin-cv-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-cv-overview > div {
  display: flex;
  min-height: 6.5rem;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  background: var(--paper);
  padding: 1rem 1.1rem;
}

.admin-cv-overview strong {
  font-size: 2rem;
  line-height: 1;
}

.admin-cv-overview span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .admin-cv-overview {
    grid-template-columns: 1fr;
  }
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 0.9rem 1rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-align: left;
  text-transform: uppercase;
}

.admin-table td {
  border-bottom: 1px solid var(--ink);
  padding: 0.9rem 1rem;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table tr.admin-row-unread td {
  background: #f5f5f5;
}

.admin-table tr.admin-row-unread td:first-child {
  box-shadow: 4px 0 0 var(--ink) inset;
}

.admin-table strong {
  display: block;
  font-weight: 900;
}

.admin-table span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.admin-icon-button {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.admin-mini-button {
  min-height: 2.25rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0 0.7rem;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-icon-button:hover {
  background: var(--ink);
  color: var(--paper);
}

.admin-mini-button:hover {
  background: var(--ink);
  color: var(--paper);
}

.admin-icon-button-danger:hover {
  border-color: #b91c1c;
  background: #b91c1c;
  color: var(--paper);
}

.admin-section-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-section-action:hover {
  background: var(--ink);
  color: var(--paper);
}

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

.media-item {
  border: 1px solid var(--ink);
  background: var(--paper);
}

.media-item.is-active {
  box-shadow: 8px 8px 0 var(--ink);
}

.media-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1);
  border-bottom: 1px solid var(--ink);
}

.media-item-body {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.media-item-body strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 900;
}

.media-item-body span {
  display: block;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
}

.media-active-label {
  width: fit-content;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper) !important;
  padding: 0.5rem 0.75rem;
  font-family: inherit !important;
  font-size: 0.7rem !important;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.8rem;
}

.preview-banner strong,
.preview-banner span,
.preview-banner a {
  border: 1px solid var(--ink);
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-banner strong {
  background: var(--ink);
  color: var(--paper);
}

.preview-banner a:hover {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 760px) {
  :root {
    --header-height: 72px;
    --footer-height: 90px;
  }

  .site-main {
    padding-bottom: calc(var(--footer-height) + 1rem);
  }

  .hero-layout {
    min-height: auto;
  }

  .hero-title {
    font-size: 4.2rem;
    line-height: 0.88;
  }

  .admin-dashboard-intro h2 {
    font-size: 1.75rem;
  }

  .admin-nav {
    margin-top: 1.25rem;
  }

  .admin-header-actions,
  .admin-list-toolbar,
  .admin-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-header-actions > *,
  .admin-header-actions .admin-section-action,
  .admin-list-toolbar .admin-section-action,
  .admin-toolbar-actions .admin-section-action {
    width: 100%;
    justify-content: center;
  }

  .admin-summary-card,
  .admin-action-card {
    min-height: 6.25rem;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-filter-bar {
    grid-template-columns: 1fr;
  }

  .archive-list section {
    grid-template-columns: 1fr;
  }

  .archive-list h2 {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .admin-bulk-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-bulk-bar button,
  .admin-bulk-bar span {
    width: 100%;
    text-align: center;
  }

  .admin-activity-grid {
    grid-template-columns: 1fr;
  }
}

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
  max-height: 26rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.media-picker-item,
.media-document-item {
  border: 1px solid var(--ink);
  background: var(--paper);
}

.media-picker-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1);
  border-bottom: 1px solid var(--ink);
}

.media-picker-body,
.media-document-item {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
}

.media-document-item {
  grid-template-columns: 1fr auto auto;
  align-items: center;
}

.media-picker-body strong,
.media-document-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 900;
}

.media-picker-body span,
.media-document-item span {
  display: block;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
}

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

.media-picker-actions button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: var(--paper);
  font-size: 0.68rem;
  font-weight: 900;
}

.media-picker-actions button:hover {
  background: var(--ink);
  color: var(--paper);
}

.media-picker-actions form {
  display: inline-flex;
}

.media-table-file {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  align-items: center;
  gap: 0.75rem;
}

.media-table-file img,
.media-table-document {
  width: 4.5rem;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--ink);
  object-fit: cover;
  filter: grayscale(1);
}

.media-table-document {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.media-usage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.media-usage-list span {
  margin-top: 0;
  border: 1px solid var(--ink);
  padding: 0.35rem 0.5rem;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.media-assignment-form {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto;
  gap: 0.5rem;
}

.media-assignment-form select,
.media-assignment-form button {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.media-assignment-form button {
  background: var(--ink);
  color: var(--paper);
  font-weight: 900;
}

.media-url-preview img,
.content-hero-media {
  background: var(--paper);
}

.admin-account-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.admin-account-grid > section,
.admin-account-grid > form,
.admin-message-detail {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1.5rem;
}

.admin-account-grid h2,
.admin-message-detail h2 {
  margin-top: 0.5rem;
  font-size: 1.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-account-grid dl {
  margin-top: 2rem;
}

.admin-account-grid dl div,
.admin-message-meta div {
  border-top: 1px solid var(--ink);
  padding: 0.85rem 0;
}

.admin-account-grid dt,
.admin-message-meta dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-account-grid dd,
.admin-message-meta dd {
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.admin-account-grid form label {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 800;
}

.admin-account-grid form button {
  margin-top: 1.25rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1rem;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-field-error {
  margin-top: 0.4rem;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-notice {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--ink);
  background: #ecfccb;
  padding: 1rem;
}

.admin-message-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1.25rem;
}

.admin-message-detail header p,
.admin-message-detail header a {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-message-body {
  min-height: 12rem;
  padding: 2rem 0;
  white-space: pre-wrap;
  line-height: 1.75;
}

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

.prose-dark {
  color: #171717;
  font-size: 1.05rem;
  line-height: 1.85;
}

.prose-dark h2,
.prose-dark h3 {
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 2.4rem;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.prose-dark h2 {
  font-size: 1.8rem;
}

.prose-dark h3 {
  font-size: 1.35rem;
}

.prose-dark p,
.prose-dark ul,
.prose-dark ol {
  margin-bottom: 1.1rem;
}

.prose-dark ul {
  list-style: disc;
  padding-left: 1.4rem;
}

.prose-dark pre {
  overflow-x: auto;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem;
  margin: 1.5rem 0;
}

.prose-dark code {
  color: inherit;
}

.prose-dark a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.prose-dark blockquote {
  margin: 1.5rem 0;
  border-left: 4px solid var(--accent);
  padding: 0.8rem 1.2rem;
  background: var(--accent-soft);
  color: #405264;
}

.prose-dark ol {
  list-style: decimal;
  padding-left: 1.5rem;
}

.prose-dark table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose-dark th,
.prose-dark td {
  min-width: 8rem;
  border: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.prose-dark th {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 800;
}

.prose-dark hr {
  margin: 2rem 0;
  border-top: 1px solid var(--line);
}

.markdown-dropzone {
  display: flex;
  min-height: 11rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.45rem;
  border: 1px dashed var(--ink);
  background: #f7faf9;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.markdown-dropzone:hover,
.markdown-dropzone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.markdown-dropzone.is-error {
  border-color: #b42318;
  background: #fff5f4;
}

.markdown-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.markdown-dropzone-icon {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1.3rem;
}

.markdown-dropzone strong { color: var(--ink); }
.markdown-dropzone span:not(.markdown-dropzone-icon) { color: #667085; font-size: 0.8rem; }

.markdown-file-meta {
  min-height: 1.25rem;
  margin-top: 0.7rem;
  color: #667085;
  font-size: 0.82rem;
}

.markdown-file-meta.is-error { color: #b42318; font-weight: 700; }

.markdown-tool-notes { display: grid; gap: 1rem; }

.markdown-result { border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.markdown-result-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.markdown-result-editor { display: block; width: 100%; min-height: 28rem; margin-top: 1.5rem; resize: vertical; border: 1px solid var(--ink); background: #101828; color: #f7faf9; padding: 1.25rem; font: 0.88rem/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown-copy-status { min-height: 1.25rem; margin-top: 0.5rem; color: var(--accent); font-size: 0.8rem; }

.markdown-preview {
  border: 1px solid var(--line);
  background: #f7faf9;
  padding: 1.25rem;
}

.markdown-preview > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.markdown-preview button { color: var(--accent); font-size: 0.78rem; font-weight: 800; text-decoration: underline; }
.markdown-preview pre { max-height: 20rem; margin-top: 1rem; overflow: auto; white-space: pre-wrap; color: #344054; font: 0.84rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 700px) {
  .markdown-result-heading { align-items: flex-start; flex-direction: column; }
  .markdown-result-editor { min-height: 22rem; }
}

/* Fablab: client-side images to PDF */
.fablab-tool-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: center; border: 1px solid #14213d; border-left: 5px solid #008f72; padding: 1.1rem 1.25rem; background: #f1f8f5; color: #14213d; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.fablab-tool-card:hover { transform: translateY(-2px); background: #e8f7f2; box-shadow: 8px 8px 0 #14213d; }
.fablab-tool-card-kicker { color: #008f72; font-size: .65rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.fablab-tool-card-body { display: grid; gap: .25rem; }
.fablab-tool-card-body strong { font-size: 1.1rem; }
.fablab-tool-card-body span { max-width: 680px; color: #52616b; font-size: .82rem; line-height: 1.5; }
.fablab-tool-card-action { white-space: nowrap; font-size: .75rem; font-weight: 900; }

.image-pdf-app { color: #14213d; }
.image-pdf-breadcrumb { display: flex; gap: .6rem; color: #52616b; font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.image-pdf-breadcrumb a { color: #008f72; }
.image-pdf-header { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 2rem; align-items: end; margin-top: 3.5rem; padding-bottom: 3rem; border-bottom: 1px solid #14213d; }
.image-pdf-kicker { margin: 0 0 1rem; color: #008f72; font-size: .72rem; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.image-pdf-header h1 { margin: 0; font-size: clamp(4rem, 10vw, 8.5rem); font-weight: 900; letter-spacing: -.09em; line-height: .8; }
.image-pdf-header h1 em { color: #008f72; font-style: normal; }
.image-pdf-lead { max-width: 34rem; margin: 2rem 0 0; color: #52616b; font-size: 1.15rem; line-height: 1.55; }
.image-pdf-privacy { border: 1px solid #a9cfc3; border-radius: 8px; padding: 1.1rem; background: #f1f8f5; }
.image-pdf-privacy > span { display: block; color: #008f72; font-size: 2rem; line-height: 1; }
.image-pdf-privacy strong { display: block; margin-top: .75rem; font-size: .85rem; }
.image-pdf-privacy p { margin: .4rem 0 0; color: #52616b; font-size: .75rem; line-height: 1.5; }
.image-pdf-workspace { margin-top: 2rem; border: 1px solid #d8e3de; border-radius: 10px; background: #fff; box-shadow: 0 14px 35px rgba(20,33,61,.06); }
.image-pdf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #d8e3de; background: #f8fbfa; }
.image-pdf-toolbar > div { display: flex; align-items: center; gap: .75rem; }
.image-pdf-toolbar strong, .image-pdf-toolbar small { display: block; }
.image-pdf-toolbar small { margin-top: .25rem; color: #52616b; font-size: .72rem; }
.image-pdf-step { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: #14213d; color: #fff; font-size: .65rem; font-weight: 900; }
.image-pdf-add-button { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; border: 1px solid #008f72; border-radius: 4px; padding: .65rem .85rem; background: #008f72; color: #fff; font-size: .75rem; font-weight: 900; }
.image-pdf-add-button span { font-size: 1.1rem; line-height: .6; }
.image-pdf-add-button input { display: none; }
.image-pdf-dropzone { display: grid; min-height: 11rem; place-items: center; align-content: center; gap: .35rem; margin: 1.25rem; border: 1px dashed #8ab9aa; border-radius: 8px; background: #f8fbfa; color: #52616b; cursor: pointer; text-align: center; }
.image-pdf-dropzone:hover, .image-pdf-dropzone.is-dragging { border-color: #008f72; background: #e8f7f2; }
.image-pdf-dropzone-icon { color: #008f72; font-size: 2rem; line-height: 1; }
.image-pdf-dropzone strong { color: #14213d; font-size: .95rem; }
.image-pdf-dropzone span:last-child { font-size: .75rem; }
.image-pdf-editor-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .65fr); gap: 1.5rem; padding: 0 1.25rem 1.25rem; }
.image-pdf-images-panel, .image-pdf-settings-panel { min-width: 0; }
.image-pdf-settings-panel { border-left: 1px solid #d8e3de; padding-left: 1.5rem; }
.image-pdf-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .4rem 0 1rem; }
.image-pdf-section-heading > div { display: flex; align-items: center; gap: .6rem; }
.image-pdf-section-heading h2 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
.image-pdf-section-heading > span { color: #52616b; font-size: .7rem; font-weight: 900; }
.image-pdf-image-list { display: grid; gap: .6rem; }
.image-pdf-item { display: grid; grid-template-columns: 1.3rem 5.5rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; border: 1px solid #d8e3de; border-radius: 6px; padding: .55rem; background: #fff; }
.image-pdf-item.is-dragging { opacity: .45; border-color: #008f72; }
.image-pdf-drag { color: #8aa39b; cursor: grab; font-size: 1.25rem; line-height: 1; }
.image-pdf-thumb { display: block; width: 5.5rem; height: 4.1rem; border: 1px solid #d8e3de; background: #f1f8f5; object-fit: contain; }
.image-pdf-item-info { min-width: 0; }
.image-pdf-item-info strong { display: block; overflow: hidden; color: #14213d; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.image-pdf-item-info span, .image-pdf-item-info em { display: block; margin-top: .25rem; color: #52616b; font-size: .66rem; font-style: normal; }
.image-pdf-item-info em { color: #008f72; font-weight: 900; }
.image-pdf-item-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: .3rem; }
.image-pdf-item-actions button, .image-pdf-crop-actions button { border: 1px solid #b8c7c1; border-radius: 4px; padding: .45rem .55rem; background: #fff; color: #14213d; font-size: .65rem; font-weight: 900; cursor: pointer; }
.image-pdf-item-actions button:hover, .image-pdf-crop-actions button:hover { border-color: #008f72; background: #e8f7f2; }
.image-pdf-item-actions button:disabled { opacity: .35; cursor: not-allowed; }
.image-pdf-item-actions .is-danger { color: #a63d3d; }
.image-pdf-hint { margin: .8rem 0 0; color: #718096; font-size: .7rem; line-height: 1.5; }
.image-pdf-empty { display: grid; min-height: 8rem; place-items: center; align-content: center; gap: .35rem; border: 1px dashed #b8c7c1; color: #718096; text-align: center; }
.image-pdf-empty strong { color: #14213d; font-size: .8rem; }
.image-pdf-empty span { font-size: .7rem; }
.image-pdf-settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.image-pdf-settings-form label { display: grid; gap: .35rem; }
.image-pdf-settings-form label span { color: #52616b; font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.image-pdf-settings-form label b { color: #8aa39b; font-size: .58rem; }
.image-pdf-settings-form input, .image-pdf-settings-form select { width: 100%; padding: .65rem .55rem; border: 1px solid #b8c7c1; border-radius: 4px; background: #fff; color: #14213d; font-size: .75rem; }
.image-pdf-summary { display: flex; justify-content: space-between; gap: .5rem; margin: 1.25rem 0; padding: .8rem; border: 1px solid #d8e3de; background: #f8fbfa; color: #52616b; font-size: .68rem; }
.image-pdf-summary strong { color: #008f72; font-size: 1rem; }
.image-pdf-generate, .image-pdf-print { width: 100%; border-radius: 4px; padding: .8rem; font-size: .78rem; font-weight: 900; cursor: pointer; }
.image-pdf-generate { border: 1px solid #008f72; background: #008f72; color: #fff; }
.image-pdf-generate:hover { background: #006e59; }
.image-pdf-generate:disabled, .image-pdf-print:disabled { opacity: .45; cursor: not-allowed; }
.image-pdf-generate span { margin-left: .35rem; }
.image-pdf-print { margin-top: .5rem; border: 1px solid #14213d; background: #fff; color: #14213d; }
.image-pdf-status { min-height: 1rem; margin: .7rem 0 0; color: #008f72; font-size: .7rem; line-height: 1.4; }
.image-pdf-status.is-error { color: #a63d3d; }
.image-pdf-preview-panel { margin-top: 2rem; border: 1px solid #d8e3de; border-top: 4px solid #008f72; border-radius: 10px; padding: 1.35rem; background: linear-gradient(135deg, #f8fbfa 0%, #eef5f2 100%); box-shadow: 0 10px 28px rgba(20,33,61,.06); transition: opacity .2s ease; }
.image-pdf-preview-panel[aria-busy="true"] { opacity: .72; }
.image-pdf-preview-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.image-pdf-preview-heading h2 { margin: .35rem 0 0; color: #14213d; font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -.05em; line-height: 1.05; }
.image-pdf-preview-heading p { margin: .45rem 0 0; color: #52616b; font-size: .78rem; }
.image-pdf-preview-heading > span:last-child { color: #008f72; font-size: .7rem; font-weight: 900; }
.image-pdf-preview-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; align-items: start; }
.image-pdf-preview-page { display: grid; overflow: hidden; border: 1px solid #b8c7c1; background: #fff; box-shadow: 0 14px 28px rgba(20,33,61,.14); }
.image-pdf-preview-page-grid { display: grid; min-width: 0; min-height: 0; }
.image-pdf-preview-cell { position: relative; display: grid; min-width: 0; min-height: 0; place-items: center; overflow: hidden; border: 1px solid #edf2f0; background: #fff; }
.image-pdf-preview-cell::before { position: absolute; top: .25rem; left: .3rem; color: #b8c7c1; content: attr(data-slot); font-size: .55rem; font-weight: 900; opacity: .75; }
.image-pdf-preview-cell.is-empty { border: 1px dashed #c7d6d0; background: repeating-linear-gradient(135deg, #fbfdfc, #fbfdfc 5px, #f3f8f6 5px, #f3f8f6 10px); }
.image-pdf-preview-cell.is-empty::after { color: #b8c7c1; content: "espacio libre"; font-size: .58rem; letter-spacing: .04em; text-transform: uppercase; }
.image-pdf-preview-cell img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.image-pdf-howto { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #14213d; }
.image-pdf-howto > div > span { color: #008f72; font-size: .68rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.image-pdf-howto h2 { margin: .7rem 0 0; font-size: 1.8rem; letter-spacing: -.05em; line-height: 1.05; }
.image-pdf-howto ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.image-pdf-howto li { counter-increment: steps; padding-top: 2rem; border-top: 2px solid #008f72; }
.image-pdf-howto li::before { content: "0" counter(steps); display: block; margin-bottom: 1rem; color: #008f72; font-size: .68rem; font-weight: 900; }
.image-pdf-howto li strong, .image-pdf-howto li span { display: block; }
.image-pdf-howto li strong { font-size: .9rem; }
.image-pdf-howto li span { margin-top: .4rem; color: #52616b; font-size: .72rem; line-height: 1.5; }
.image-pdf-crop-dialog { width: min(90vw, 760px); padding: 0; border: 0; border-radius: 8px; box-shadow: 0 20px 70px rgba(20,33,61,.25); }
.image-pdf-crop-dialog::backdrop { background: rgba(20,33,61,.55); }
.image-pdf-crop-modal { padding: 1.25rem; }
.image-pdf-crop-header { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.image-pdf-crop-header span { color: #008f72; font-size: .65rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.image-pdf-crop-header h2 { max-width: 32rem; margin: .35rem 0 0; overflow: hidden; font-size: 1.1rem; text-overflow: ellipsis; white-space: nowrap; }
.image-pdf-crop-header > button { border: 0; background: transparent; color: #14213d; font-size: 1.6rem; cursor: pointer; }
.image-pdf-crop-stage { position: relative; display: grid; place-items: center; margin-top: 1rem; overflow: hidden; background: #14213d; }
.image-pdf-crop-stage img { display: block; max-width: 100%; max-height: 62vh; object-fit: contain; user-select: none; }
.image-pdf-crop-selection { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(20,33,61,.55); pointer-events: none; }
.image-pdf-crop-help { color: #52616b; font-size: .72rem; }
.image-pdf-crop-actions { display: flex; justify-content: end; gap: .5rem; }
.image-pdf-crop-actions button:last-child { border-color: #008f72; background: #008f72; color: #fff; }

@media (max-width: 850px) {
  .fablab-tool-card { grid-template-columns: 1fr; gap: .55rem; }
  .fablab-tool-card-action { justify-self: start; }
  .image-pdf-header, .image-pdf-editor-layout, .image-pdf-howto { grid-template-columns: 1fr; }
  .image-pdf-settings-panel { border-top: 1px solid #d8e3de; border-left: 0; padding-top: 1.5rem; padding-left: 0; }
  .image-pdf-preview-heading { align-items: start; flex-direction: column; }
}

@media (max-width: 560px) {
  .image-pdf-header h1 { font-size: 4.8rem; }
  .image-pdf-toolbar { align-items: stretch; flex-direction: column; }
  .image-pdf-add-button { justify-content: center; }
  .image-pdf-item { grid-template-columns: 1.2rem 4.5rem minmax(0, 1fr); }
  .image-pdf-thumb { width: 4.5rem; height: 3.5rem; }
  .image-pdf-item-actions { grid-column: 2 / -1; justify-content: start; }
  .image-pdf-howto ol { grid-template-columns: 1fr; }
}

/* Fablab: Markdown converter shares the local-tool visual language */
.markdown-local-badge { border: 1px solid #a9cfc3; border-radius: 4px; padding: .45rem .6rem; color: #14745f; font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.markdown-workspace .markdown-converter-form { padding: 0 1.25rem 1.25rem; }
.markdown-workspace .markdown-dropzone { margin: 0; min-height: 13rem; }
.markdown-workspace .markdown-dropzone-icon { width: auto; height: auto; border-radius: 0; background: transparent; color: #008f72; font-size: 2rem; }
.markdown-file-meta { margin: .7rem 0 0; padding: .7rem .8rem; border: 1px solid #d8e3de; background: #f8fbfa; font-size: .72rem; }
.markdown-submit-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; margin-top: 1rem; }
.markdown-submit-row .image-pdf-generate { width: auto; justify-self: start; }
.markdown-submit-row p { margin: 0; color: #718096; font-size: .7rem; line-height: 1.45; }
.markdown-error { margin-top: .8rem; border: 1px solid #e5a7a2; border-radius: 4px; padding: .75rem; background: #fff5f4; color: #a63d3d; font-size: .75rem; font-weight: 800; }
.markdown-result-panel { margin-top: 2rem; padding: 1.35rem; border: 1px solid #d8e3de; border-top: 4px solid #008f72; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(20,33,61,.06); }
.markdown-result-heading h2 { margin: .35rem 0 0; color: #14213d; font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -.05em; line-height: 1.05; }
.markdown-result-heading p { margin: .5rem 0 0; color: #52616b; font-size: .78rem; }
.markdown-result-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.markdown-result-actions button { border: 1px solid #14213d; border-radius: 4px; padding: .65rem .8rem; background: #fff; color: #14213d; font-size: .7rem; font-weight: 900; cursor: pointer; }
.markdown-result-actions button:hover { border-color: #008f72; background: #e8f7f2; }
.markdown-result-actions button.is-primary { border-color: #008f72; background: #008f72; color: #fff; }
.markdown-result-editor { min-height: 31rem; margin-top: 1.25rem; border: 1px solid #2f405e; border-radius: 5px; background: #14213d; color: #f7faf9; padding: 1.1rem; font: .84rem/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown-copy-status { color: #008f72; font-size: .72rem; }

@media (max-width: 700px) {
  .markdown-local-badge { align-self: start; }
  .markdown-submit-row { grid-template-columns: 1fr; }
  .markdown-submit-row .image-pdf-generate { width: 100%; }
  .markdown-result-actions { width: 100%; }
  .markdown-result-actions button { flex: 1; }
}

.highlight .k,
.highlight .kn,
.highlight .kd {
  color: #ffffff;
  font-weight: 700;
}

.highlight .s,
.highlight .s1,
.highlight .s2 {
  color: #d4d4d4;
}

.mermaid {
  margin: 2rem 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1rem;
  overflow-x: auto;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes sweep {
  0%,
  42% {
    transform: translateX(-120%);
  }

  72%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.72);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@media (pointer: coarse) {
  .cursor-dot {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 79px;
    --footer-height: 104px;
  }

  body {
    background-size: 32px 32px;
  }

  .site-footer > div {
    align-items: flex-start;
  }

  .hero-layout {
    min-height: auto;
  }

  .hero-title {
    font-size: 3rem;
    line-height: 0.92;
  }

  .home-metrics {
    grid-template-columns: 1fr;
  }

  .home-metrics > div {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .home-metrics > div:last-child {
    border-bottom: 0;
  }

  .hero-portrait {
    box-shadow: 10px 10px 0 var(--ink) !important;
  }

  .section-snap {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .section-snap .flex.items-end.justify-between {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .admin-nav {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    border-left: 0;
    border-right: 0;
  }

  .admin-summary-card,
  .admin-action-card,
  .cms-module-card {
    min-height: auto;
  }

  .admin-table {
    min-width: 760px;
    font-size: 0.82rem;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .media-library,
  .media-picker-grid {
    grid-template-columns: 1fr;
  }

  .media-document-item {
    grid-template-columns: 1fr;
  }

  .media-assignment-form {
    grid-template-columns: 1fr;
  }

  .admin-account-grid,
  .admin-message-meta {
    grid-template-columns: 1fr;
  }

  .admin-message-detail > header {
    flex-direction: column;
  }
}

/* Public design system: one visual language across every route. */
.public-shell {
  --ink: #14213d;
  --paper: #ffffff;
  --muted: #64748b;
  --accent: #008f72;
  --accent-soft: #e8f7f2;
  --warm: #e76f51;
  --line: #dbe5e1;
  background: #f7faf8;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.public-shell::before {
  display: none;
}

.public-shell h1,
.public-shell h2,
.public-shell h3,
.public-shell h4 {
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.035em !important;
  text-transform: none !important;
}

.public-shell h1 {
  font-size: clamp(2.8rem, 7vw, 6.8rem) !important;
  line-height: 0.98 !important;
}

.public-shell .services-hero-title {
  max-width: 11ch;
  font-size: clamp(2.8rem, 5.2vw, 5.4rem) !important;
  line-height: 0.98 !important;
}

.public-shell .services-page > .grid:first-child {
  gap: 3rem;
  padding-bottom: 2.5rem;
}

.public-shell .services-hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 3rem;
}

.public-shell .services-proof {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}

.public-shell .services-proof > div {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  border-left: 3px solid var(--accent);
  padding: .25rem 0 .25rem .9rem;
}

.public-shell .services-proof strong,
.public-shell .service-number {
  color: var(--warm);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.public-shell .services-proof span {
  color: #405166;
  font-size: .82rem;
  font-weight: 800;
}

.public-shell .service-offer-card {
  border-radius: 1.5rem;
}

.public-shell .services-process h3 {
  color: var(--ink);
}

.public-shell .site-header {
  border-color: #e2ebe7 !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 8px 30px rgba(20, 33, 61, 0.05);
}

.public-shell .brand-mark {
  min-width: 48px;
  min-height: 42px;
  border-radius: 9px;
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--accent);
  font-family: Manrope, Inter, sans-serif;
}

.public-shell .site-nav a {
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  color: #405166;
  font-weight: 700;
}

.public-shell .site-nav a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.site-menu-toggle { display: none; }

.public-shell .public-page,
.public-shell .public-section {
  position: relative;
}

.public-shell .public-page > .grid:first-child,
.public-shell .public-page > div:first-child {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.public-shell .hero-stage {
  background: #f7faf8;
}

.public-shell .hero-title {
  max-width: 9ch;
}

.public-shell .hero-portrait,
.public-shell .hero-portrait > div {
  border-radius: 18px;
}

.public-shell .motion-button,
.public-shell main a.rounded-full,
.public-shell main button.rounded-full,
.public-shell main form button {
  border-radius: 10px !important;
  letter-spacing: 0 !important;
}

.public-shell .motion-button:first-child,
.public-shell main form button {
  background: var(--ink) !important;
  box-shadow: 0 6px 14px rgba(20, 33, 61, 0.12);
}

.public-shell .motion-button:hover,
.public-shell main form button:hover {
  background: var(--accent) !important;
  transform: translateY(-2px);
}

.public-shell .content-card,
.public-shell .empty-state,
.public-shell .filter-panel,
.public-shell .about-intro-panel,
.public-shell .about-value-panel,
.public-shell .contact-form,
.public-shell .archive-list section,
.public-shell .newsletter-band,
.public-shell main article.border.border-black.bg-white,
.public-shell main section.border.border-black.bg-white {
  border: 1px solid var(--line) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 30px rgba(20, 33, 61, 0.06);
}

.public-shell .content-card {
  border-top: 3px solid var(--accent) !important;
}

.public-shell .content-card:hover {
  border-color: #aadccd !important;
  box-shadow: 0 18px 38px rgba(20, 33, 61, 0.11);
}

.public-shell .content-card img,
.public-shell main article.border.border-black.bg-white img {
  border-radius: 12px;
}

.public-shell .filter-panel,
.public-shell .active-filter-summary {
  background: #fff;
}

.public-shell .filter-panel a,
.public-shell .active-filter-summary a {
  border-radius: 8px;
}

.public-shell main form input,
.public-shell main form textarea,
.public-shell main form select {
  min-height: 48px;
  border-radius: 10px !important;
  border-color: #c6d5cf !important;
  background: #fff !important;
}

.public-shell .newsletter-band {
  border-left: 5px solid var(--warm) !important;
}
.public-shell .newsletter-feedback { margin-top: 1rem; border-radius: 8px; padding: .75rem 1rem; font-size: .85rem; font-weight: 700; }
.public-shell .newsletter-feedback-success { background: rgba(126, 224, 199, .16); color: #b8f5e5; }
.public-shell .newsletter-feedback-error { background: rgba(231, 111, 81, .18); color: #ffd0c3; }

.public-shell .site-footer {
  border-color: #e2ebe7 !important;
  background: #fff !important;
  box-shadow: none;
}

.public-shell .site-footer p,
.public-shell .site-footer a {
  color: var(--muted);
}

/* Admin visual system */
.admin-shell {
  --ink: #14213d;
  --paper: #ffffff;
  --muted: #52616b;
  --accent: #008f72;
  --accent-soft: #dff3ed;
  --warm: #e76f51;
  --surface: #f1f5f3;
  --line: #d6dfdb;
  --footer-height: 0px;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.cookie-consent {
  position: fixed;
  z-index: 60;
  right: 1rem;
  bottom: calc(var(--footer-height) + 1rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  width: min(44rem, calc(100vw - 2rem));
  max-height: min(22rem, calc(100dvh - var(--footer-height) - 2rem));
  overflow: auto;
  padding: 1.1rem 1.2rem;
  border: 1px solid #d6dfdb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(16, 24, 40, .2), 0 4px 0 #69d3b4;
  color: #1c2938;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent-kicker { margin: 0 0 .35rem; color: #087f5b; font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.cookie-consent h2 { margin: 0; font-size: 1rem; font-weight: 800; }
.cookie-consent p { max-width: 44rem; margin: .45rem 0; font-size: .8rem; line-height: 1.5; }
.cookie-consent a { color: #101828; font-size: .75rem; font-weight: 700; text-decoration: underline; }
.cookie-preferences-link { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-size: inherit; cursor: pointer; text-decoration: underline; }
.cookie-consent-actions { display: flex; align-items: end; justify-content: end; gap: .6rem; flex-wrap: wrap; }
.cookie-consent-actions button { min-height: 42px; border: 2px solid #101828; border-radius: 999px; background: #fff; padding: .65rem 1rem; color: #101828; font-size: .72rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.cookie-consent-actions .cookie-consent-primary { background: #101828; color: #fff; }
.cookie-consent-actions button:focus-visible { outline: 3px solid #69d3b4; outline-offset: 3px; }
@media (max-width: 700px) {
  .cookie-consent {
    right: .75rem;
    bottom: calc(var(--footer-height) + .75rem);
    grid-template-columns: 1fr;
    gap: .85rem;
    width: calc(100vw - 1.5rem);
    max-height: min(28rem, calc(100dvh - var(--footer-height) - 1.5rem));
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(16, 24, 40, .2), 0 4px 0 #69d3b4;
  }
  .cookie-consent-actions { align-items: stretch; justify-content: stretch; }
  .cookie-consent-actions button { flex: 1; }
}

.admin-shell h1,
.admin-shell h2,
.admin-shell h3 {
  color: var(--ink);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.admin-shell .text-black {
  color: var(--ink) !important;
}

.admin-shell .text-neutral-700,
.admin-shell .text-neutral-600 {
  color: var(--muted) !important;
}

.admin-tool-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--ink);
  background: #dff3ed;
  padding: 1rem 1.2rem;
}
.admin-tool-card h2 { margin: .25rem 0; font-size: 1.25rem; }
.admin-tool-card p { margin: 0; color: var(--muted); font-size: .85rem; }
.admin-tool-card .admin-tool-kicker { color: var(--accent); font-size: .68rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
@media (max-width: 700px) {
  .admin-tool-card { align-items: flex-start; flex-direction: column; }
}

.admin-shell .border-black {
  border-color: var(--line) !important;
}

.admin-shell .bg-black {
  background: var(--ink) !important;
}

.admin-shell .site-main {
  min-height: calc(100vh - var(--header-height));
  padding-bottom: 0;
}

.admin-shell .site-header {
  border-color: rgba(20, 33, 61, 0.1) !important;
  background: rgba(248, 250, 248, 0.95) !important;
  box-shadow: 0 8px 30px rgba(20, 33, 61, 0.06);
}

.admin-shell .site-header nav {
  min-height: var(--header-height);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.admin-shell .brand-mark {
  min-width: 48px;
  min-height: 48px;
  border-radius: 4px;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--accent);
  font-family: Manrope, Inter, sans-serif;
}

.admin-shell .site-nav {
  gap: 0.35rem;
}

.admin-shell .site-nav a {
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  color: #314257;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-shell .site-nav a:hover {
  background: var(--accent-soft);
  color: var(--ink);
  transform: none;
}

.admin-shell .site-footer {
  position: relative !important;
  border-color: rgba(20, 33, 61, 0.12) !important;
  background: var(--ink) !important;
  color: #dce6e2;
  box-shadow: none;
}

.admin-shell .site-footer > div {
  min-height: 68px;
}

.admin-shell .site-footer p,
.admin-shell .site-footer a {
  color: #dce6e2;
}

.admin-shell .scroll-progress {
  background: var(--accent);
}

.admin-shell main h1 {
  font-size: 3.25rem !important;
  line-height: 1;
  letter-spacing: 0 !important;
  text-transform: none;
}

.admin-shell main > section > div:first-child > div:first-child > p {
  color: var(--accent) !important;
  letter-spacing: 0.16em;
}

.admin-shell .admin-nav {
  gap: 0.3rem;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(20, 33, 61, 0.05);
}

/* Admin workspace layout: persistent navigation on desktop, compact flow on mobile. */
@media (min-width: 901px) {
  .admin-shell .site-nav {
    display: none;
  }

  .admin-shell .site-header nav {
    justify-content: flex-start;
  }

  .admin-shell .site-main {
    margin-left: 238px;
    padding-right: 1.5rem;
  }

  .admin-shell .admin-nav {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    width: 220px;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 1rem;
    border-width: 0 1px 0 0;
    border-radius: 0;
    box-shadow: 8px 0 24px rgba(20, 33, 61, 0.04);
  }

  .admin-shell .admin-nav::before {
    margin: 0 0 0.9rem;
    padding: 0 0.7rem 0.8rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    content: "ESPACIO DE TRABAJO";
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.16em;
  }

  .admin-shell .admin-nav a {
    padding: 0.68rem 0.75rem;
  }

  .admin-shell .admin-nav-home {
    margin-bottom: 0.65rem;
    background: #edf5f2;
  }

  .admin-shell .admin-nav-home span {
    margin-right: 0.35rem;
    color: var(--accent);
    font-size: 1rem;
  }

  .admin-shell .admin-nav-group {
    margin-top: 0.35rem;
    border-top: 1px solid #edf0ee;
    padding-top: 0.35rem;
  }

  .admin-shell .admin-nav-group summary {
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.75rem;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    list-style: none;
    text-transform: uppercase;
  }

  .admin-shell .admin-nav-group summary::-webkit-details-marker {
    display: none;
  }

  .admin-shell .admin-nav-group summary b {
    color: var(--accent);
    font-size: 0.9rem;
    transition: transform 160ms ease;
  }

  .admin-shell .admin-nav-group:not([open]) summary b {
    transform: rotate(-90deg);
  }

  .admin-shell .admin-nav-group a {
    margin-left: 0.35rem;
    padding: 0.58rem 0.75rem;
    color: #52616b;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: none;
  }

  .admin-shell .admin-nav-group a.is-active {
    background: var(--accent-soft);
    color: var(--ink);
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .admin-shell .admin-header-actions {
    position: absolute;
    top: 0;
    right: 0;
  }

  .admin-shell .admin-page-header {
    position: relative;
    min-height: 4.25rem;
    padding-right: 13rem;
  }

  .admin-shell .admin-dashboard-intro,
  .admin-shell .admin-list-toolbar,
  .admin-shell .admin-filter-bar,
  .admin-shell .admin-bulk-bar {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .admin-shell .site-header nav {
    min-height: 64px;
  }

  .admin-shell .brand-mark {
    min-width: 48px;
    max-width: 108px;
    overflow: hidden;
    white-space: nowrap;
  }

  .admin-shell .admin-nav {
    align-items: stretch;
    gap: 0.35rem;
  }

  .admin-shell .admin-nav-group {
    min-width: 10rem;
  }

  .admin-shell .admin-nav-group summary {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f7faf8;
  }

  .admin-shell .admin-nav-group[open] summary {
    border-color: var(--accent);
    background: var(--accent-soft);
  }
}

/* Admin refinement: quiet, editorial dashboard instead of a collection of boxes. */
.admin-shell {
  --admin-navy: #101828;
  --admin-navy-soft: #1b2a40;
  --admin-mint: #69d3b4;
  --admin-bg: #f6f8f7;
  --admin-text: #1c2938;
  --admin-muted: #718096;
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-shell .site-header {
  border-bottom: 1px solid #e8ecea !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: none;
}

.admin-shell .site-header nav {
  max-width: none;
  padding-left: 1.4rem;
}

.admin-shell .brand-mark {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  border-radius: 9px;
  background: var(--admin-navy);
  box-shadow: 4px 4px 0 var(--admin-mint);
  padding: 0 0.9rem;
  color: #fff !important;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.admin-shell .site-main {
  background: var(--admin-bg);
}

.admin-shell .admin-nav {
  width: 236px;
  gap: 0.2rem;
  border: 0;
  border-radius: 0;
  background: var(--admin-navy);
  box-shadow: 10px 0 28px rgba(16, 24, 40, 0.08);
  padding: 1.25rem 0.8rem;
}

.admin-shell .admin-nav::before {
  margin: 0.2rem 0.7rem 1rem;
  border-color: rgba(255, 255, 255, 0.12);
  color: #8fa0b5;
  content: "PANEL DE CONTROL";
}

.admin-shell .admin-nav-home,
.admin-shell .admin-nav-group summary,
.admin-shell .admin-nav-group a {
  border-radius: 8px;
}

.admin-shell .admin-nav-home {
  margin-bottom: 0.6rem;
  background: var(--admin-navy-soft);
  color: #fff !important;
}

.admin-shell .admin-nav-home:hover,
.admin-shell .admin-nav-home.is-active {
  background: var(--admin-mint) !important;
  color: var(--admin-navy) !important;
}

.admin-shell .admin-nav-group {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.admin-shell .admin-nav-group summary {
  color: #8fa0b5;
}

.admin-shell .admin-nav-group summary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-shell .admin-nav-group summary b {
  color: var(--admin-mint);
}

.admin-shell .admin-nav-group a {
  color: #c1ccda;
}

.admin-shell .admin-nav-group a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.admin-shell .admin-nav-group a.is-active {
  background: var(--admin-mint) !important;
  box-shadow: none;
  color: var(--admin-navy) !important;
  font-weight: 900;
}

.admin-shell .admin-dashboard-intro,
.admin-shell .admin-list-toolbar,
.admin-shell .admin-filter-bar,
.admin-shell .admin-bulk-bar,
.admin-shell .admin-editor-form,
.admin-shell .admin-summary-card,
.admin-shell .admin-action-card,
.admin-shell .cms-module-card,
.admin-shell .admin-activity-grid section,
.admin-shell .media-item,
.admin-shell .media-picker,
.admin-shell main .border.border-black.bg-white {
  border: 1px solid #e5ebe8 !important;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
}

.admin-shell .admin-dashboard-intro {
  border-top: 0 !important;
  border-left: 4px solid var(--admin-mint) !important;
  background: #fff;
}

.admin-shell .admin-summary-card {
  border-top: 0 !important;
  border-left: 3px solid var(--admin-mint) !important;
  background: #fff;
}

.admin-shell .admin-summary-card strong {
  color: var(--admin-navy);
}

.admin-shell .admin-summary-card:hover,
.admin-shell .admin-action-card:hover,
.admin-shell .cms-module-card:hover {
  border-color: #b7e8da !important;
  background: #f0fbf7;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  transform: translateY(-2px);
}

.admin-shell .admin-table-wrap {
  overflow: hidden;
  border: 1px solid #e5ebe8;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
}

.admin-shell .admin-table th {
  background: var(--admin-navy);
  color: #fff;
}

@media (max-width: 900px) {
  .admin-shell .admin-nav {
    width: auto;
    border-radius: 10px;
    background: var(--admin-navy);
    box-shadow: none;
    padding: 0.6rem;
  }

  .admin-shell .admin-nav::before {
    display: none;
  }

  .admin-shell .admin-nav-home {
    margin-bottom: 0;
  }

  .admin-shell .admin-nav-group summary {
    color: #fff;
  }
}

.admin-shell .admin-nav a {
  border: 0;
  border-radius: 4px;
  color: #405166;
  letter-spacing: 0;
}

.admin-shell .admin-nav a.is-active,
.admin-shell .admin-nav a:hover {
  background: var(--accent);
  color: var(--paper);
}

.admin-shell .admin-section-action,
.admin-shell .admin-icon-button,
.admin-shell .admin-mini-button {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

.admin-shell .admin-section-action:hover,
.admin-shell .admin-icon-button:hover,
.admin-shell .admin-mini-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.admin-shell .admin-dashboard-intro,
.admin-shell .admin-list-toolbar,
.admin-shell .admin-filter-bar,
.admin-shell .admin-bulk-bar,
.admin-shell .admin-editor-form,
.admin-shell .admin-account-grid > section,
.admin-shell .admin-account-grid > form,
.admin-shell .admin-message-detail {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(20, 33, 61, 0.06);
}

.admin-shell .admin-dashboard-intro {
  border-top: 4px solid var(--warm);
}

.admin-shell .admin-dashboard-intro h2 {
  font-size: 2.1rem;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
}
.admin-shell .admin-subsection-title { margin: 0; color: var(--ink); font-size: 1.1rem; font-weight: 900; letter-spacing: -.02em; }

.admin-shell .admin-editor-form {
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.admin-shell main input,
.admin-shell main textarea,
.admin-shell main select {
  border-color: #b8c7c1 !important;
  border-radius: 4px !important;
  background: #fbfdfc !important;
  color: var(--ink) !important;
}

.admin-shell main input:focus,
.admin-shell main textarea:focus,
.admin-shell main select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0, 143, 114, 0.14);
  outline: 0;
}

.admin-shell .admin-filter-bar button,
.admin-shell .admin-account-grid form button {
  border-color: var(--accent);
  border-radius: 4px;
  background: var(--accent);
}

.admin-shell .admin-filter-bar a,
.admin-shell .admin-bulk-bar button,
.admin-shell .media-assignment-form button,
.admin-shell .media-assignment-form select {
  border-color: var(--line);
  border-radius: 4px;
}

.admin-shell .admin-bulk-bar button:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.admin-shell .admin-summary-card,
.admin-shell .admin-action-card,
.admin-shell .cms-module-card,
.admin-shell .admin-activity-grid section,
.admin-shell .media-item,
.admin-shell .media-picker,
.admin-shell main .border.border-black.bg-white {
  border-color: var(--line) !important;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(20, 33, 61, 0.05);
}

.admin-shell .admin-summary-card {
  border-top: 3px solid var(--accent);
}

.admin-shell .admin-summary-card strong {
  color: var(--accent);
  font-family: Manrope, Inter, sans-serif;
}

.admin-shell .admin-summary-card:hover,
.admin-shell .admin-action-card:hover {
  border-color: #a9cfc3;
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(20, 33, 61, 0.1);
}

.admin-shell .admin-summary-card:hover span,
.admin-shell .admin-summary-card:hover em {
  color: #345b50;
}

.admin-shell .admin-summary-card-dark {
  border-top-color: var(--warm);
  background: var(--ink);
  color: var(--paper);
}

.admin-shell .admin-summary-card-dark strong {
  color: #7ee0c7;
}

.admin-shell .admin-summary-card-dark:hover {
  background: #20304f;
  color: var(--paper);
}

.admin-shell .admin-action-card {
  border-left: 4px solid var(--warm);
  text-transform: none;
}

.admin-shell .cms-module-card span,
.admin-shell .cms-module-card strong {
  letter-spacing: 0;
  text-transform: none;
}

.admin-shell .cms-module-card:hover {
  border-color: #a9cfc3;
  background: var(--accent-soft);
  color: var(--ink);
}

.admin-shell .cms-module-card:hover p {
  color: var(--muted);
}

.admin-shell .admin-activity-grid h2 {
  border-color: var(--line);
  border-radius: 8px 8px 0 0;
  background: #edf5f2;
  letter-spacing: 0;
  text-transform: none;
}

.admin-shell .admin-activity-grid a,
.admin-shell .admin-activity-grid p {
  border-color: var(--line);
}

.admin-shell .admin-activity-grid a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.admin-shell .admin-activity-grid a:hover span {
  color: var(--muted);
}

.admin-shell .admin-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(20, 33, 61, 0.06);
}

.admin-shell main .grid > section {
  min-width: 0;
}

.admin-shell .admin-table th {
  border-color: #2f405e;
  background: var(--ink);
  letter-spacing: 0.08em;
}

.admin-shell .admin-table td {
  border-color: var(--line);
}

.admin-shell .admin-table tbody tr:hover td {
  background: #f2f8f6;
}

.admin-shell .admin-table tr.admin-row-unread td {
  background: #e8f4f0;
}

.admin-shell .admin-table tr.admin-row-unread td:first-child {
  box-shadow: 4px 0 0 var(--accent) inset;
}

.admin-shell .media-item img {
  border-color: var(--line);
  filter: none;
}

.admin-shell .media-item.is-active {
  border-color: var(--accent);
  box-shadow: 7px 7px 0 var(--accent);
}

.admin-shell .media-active-label {
  border-color: var(--accent);
  border-radius: 4px;
  background: var(--accent);
}

.admin-shell .admin-notice {
  border-color: #91c7b8;
  border-radius: 8px;
  background: var(--accent-soft);
}

.admin-shell .preview-banner {
  border-color: var(--line);
  border-radius: 8px;
}

/* Media manager */
.admin-media-page .admin-eyebrow {
  margin: 0 0 .45rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.media-manager-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 1.5rem;
  align-items: stretch;
}

.media-manager-intro > div:first-child,
.media-upload-box,
.media-library-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(20, 33, 61, .06);
}

.media-manager-intro > div:first-child {
  padding: 1.5rem;
  border-top: 4px solid var(--accent);
}

.media-manager-intro h2 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  letter-spacing: -.04em;
  line-height: 1.05;
}

.media-manager-intro p:not(.admin-eyebrow) {
  max-width: 680px;
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.media-upload-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .8rem;
  padding: 1.25rem;
  background: #f1f8f5;
}

.media-upload-box label,
.media-upload-box label span {
  display: block;
}

.media-upload-box label strong {
  color: var(--ink);
  font-size: 1rem;
}

.media-upload-box label span,
.media-upload-box small {
  margin-top: .35rem;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.45;
}

.media-upload-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
}

.media-upload-controls input {
  min-width: 0;
  padding: .6rem;
  border: 1px dashed #8ab9aa;
  background: #fff;
  font-size: .75rem;
}

.media-upload-controls button,
.media-filter-actions button {
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  padding: .65rem .9rem;
  font-size: .75rem;
  font-weight: 900;
}

.media-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.media-stat-card {
  display: flex;
  min-height: 7.4rem;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.media-stat-card:hover { background: var(--accent-soft); }
.media-stat-card-accent { border-top-color: var(--warm); }
.media-stat-card span,
.media-stat-card small { color: var(--muted); font-size: .7rem; font-weight: 800; }
.media-stat-card strong { color: var(--accent); font-size: 1.75rem; letter-spacing: -.05em; line-height: 1; }
.media-stat-card strong b { font-size: .65rem; letter-spacing: 0; }

.media-library-panel { padding: 1.35rem; }
.media-library-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.media-library-heading h2 { margin: 0; color: var(--ink); font-size: 1.5rem; letter-spacing: -.03em; }
.media-view-switcher { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.media-view-switcher a { padding: .55rem .7rem; color: var(--muted); font-size: .7rem; font-weight: 900; text-decoration: none; }
.media-view-switcher a + a { border-left: 1px solid var(--line); }
.media-view-switcher a.is-active { background: var(--ink); color: #fff; }

.media-manager-filters {
  display: grid;
  grid-template-columns: minmax(200px, 1.5fr) repeat(3, minmax(120px, .7fr)) auto;
  gap: .65rem;
  align-items: end;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfa;
}

.media-manager-filters label { display: grid; gap: .35rem; }
.media-manager-filters label span { color: var(--muted); font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.media-manager-filters input,
.media-manager-filters select { width: 100%; min-width: 0; padding: .65rem .7rem; border: 1px solid #b8c7c1; border-radius: 4px; background: #fff; font-size: .78rem; }
.media-filter-actions { display: flex; align-items: center; gap: .55rem; }
.media-filter-actions a { color: var(--muted); font-size: .72rem; font-weight: 800; white-space: nowrap; }

.media-manager-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.media-manager-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 5px 16px rgba(20, 33, 61, .045); }
.media-manager-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 143, 114, .14); }
.media-card-preview { position: relative; border-bottom: 1px solid var(--line); background: #edf4f1; }
.media-card-preview img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.media-card-badge { position: absolute; top: .7rem; left: .7rem; padding: .35rem .5rem; border-radius: 3px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.media-document-preview { display: grid; min-height: 11rem; place-items: center; align-content: center; gap: .25rem; color: var(--ink); }
.media-document-preview strong { font-size: 2.2rem; letter-spacing: -.08em; }
.media-document-preview span { color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.media-card-content { display: grid; gap: .75rem; padding: 1rem; }
.media-card-title-row { display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.media-card-title-row h3 { max-width: 19rem; margin: 0; overflow: hidden; color: var(--ink); font-size: .92rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.media-card-title-row p { margin: .25rem 0 0; color: var(--muted); font-size: .68rem; }
.media-card-status { flex: none; padding: .28rem .4rem; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: .59rem; font-weight: 900; text-transform: uppercase; }
.media-card-status.is-used { border-color: #a9cfc3; color: #14745f; }
.media-card-status.is-orphan { border-color: #e6c48b; color: #92631e; }
.media-card-url { display: block; overflow: hidden; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.media-card-usages { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.media-card-usages strong { width: 100%; color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.media-card-usages span { border: 1px solid #c8d9d3; border-radius: 3px; padding: .3rem .4rem; color: #345b50; font-size: .62rem; font-weight: 800; }
.media-card-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding-top: .2rem; border-top: 1px solid #edf1ef; }
.media-card-actions a,
.media-card-actions button,
.media-card-assign summary { border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); padding: .45rem .55rem; font-size: .65rem; font-weight: 900; text-decoration: none; cursor: pointer; }
.media-card-actions a:hover,
.media-card-actions button:hover,
.media-card-assign summary:hover { border-color: var(--accent); background: var(--accent-soft); }
.media-card-actions form { display: inline-flex; }
.media-card-assign { position: relative; }
.media-card-assign summary { list-style: none; }
.media-card-assign summary::-webkit-details-marker { display: none; }
.media-card-assign form { position: absolute; z-index: 5; right: 0; top: calc(100% + .4rem); display: grid; width: min(21rem, 80vw); gap: .45rem; padding: .65rem; border: 1px solid var(--line); border-radius: 5px; background: #fff; box-shadow: 0 12px 30px rgba(20, 33, 61, .14); }
.media-card-assign select { width: 100%; padding: .55rem; border: 1px solid #b8c7c1; border-radius: 4px; font-size: .72rem; }
.media-card-assign button { background: var(--accent); color: #fff; }
.media-card-actions .media-danger-action { margin-left: auto; color: #a63d3d; }
.media-empty-state { display: grid; place-items: center; gap: .5rem; min-height: 13rem; border: 1px dashed #b8c7c1; color: var(--muted); text-align: center; }
.media-empty-state strong { color: var(--ink); }
.media-empty-state a { color: var(--accent); font-size: .8rem; font-weight: 900; }

.media-manager-results-list { display: grid; grid-template-columns: 1fr; }
.media-manager-results-list .media-manager-card { display: grid; grid-template-columns: 12rem minmax(0, 1fr); }
.media-manager-results-list .media-card-preview { border-right: 1px solid var(--line); border-bottom: 0; }
.media-manager-results-list .media-document-preview { min-height: 10rem; }

@media (max-width: 1050px) {
  .media-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .media-manager-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .media-manager-intro { grid-template-columns: 1fr; }
  .media-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-library-heading { align-items: start; flex-direction: column; }
  .media-manager-filters { grid-template-columns: 1fr; }
  .media-filter-actions { grid-column: auto; }
  .media-manager-results-list .media-manager-card { display: block; }
  .media-manager-results-list .media-card-preview { border-right: 0; border-bottom: 1px solid var(--line); }
}

.admin-shell .preview-banner strong {
  background: var(--accent);
}

.public-shell .auth-form {
  border-color: var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 18px 42px rgba(20, 33, 61, 0.11);
}

.public-shell .auth-form > p:first-of-type {
  color: var(--accent) !important;
}

@media (max-width: 767px) {
  .admin-shell {
    --header-height: 72px;
    --footer-height: 0px;
  }

  .admin-shell .site-header nav {
    min-height: 72px;
  }

  .admin-shell .brand-mark {
    min-width: 42px;
    min-height: 42px;
    box-shadow: 3px 3px 0 var(--accent);
  }

  .admin-shell .site-nav a {
    padding: 0.45rem 0.35rem;
    font-size: 0.72rem;
  }

  .admin-shell main h1 {
    font-size: 2.5rem !important;
  }

  .admin-shell .admin-nav {
    border-radius: 0;
  }

  .admin-shell .admin-dashboard-intro h2 {
    font-size: 1.65rem;
  }

  .admin-shell .admin-editor-form {
    padding: 1rem;
  }

  .admin-shell .site-footer > div {
    min-height: auto;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* Public visual system */
.public-shell {
  --ink: #14213d;
  --paper: #ffffff;
  --muted: #52616b;
  --accent: #008f72;
  --accent-soft: #dff3ed;
  --warm: #e76f51;
  --surface: #f4f7f5;
  --line: #d8e0dc;
  --footer-height: 0px;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.public-shell h1,
.public-shell h2,
.public-shell h3 {
  color: var(--ink);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.public-shell .text-black {
  color: var(--ink) !important;
}

.public-shell .text-neutral-700,
.public-shell .text-neutral-600 {
  color: var(--muted) !important;
}

.public-shell .border-black {
  border-color: var(--line) !important;
}

.public-shell .bg-black {
  background: var(--ink) !important;
}

.public-shell .site-main {
  min-height: calc(100vh - var(--header-height));
  padding-bottom: 0;
}

.public-shell .site-header {
  border-color: rgba(20, 33, 61, 0.1) !important;
  background: rgba(248, 250, 248, 0.94) !important;
  box-shadow: 0 8px 30px rgba(20, 33, 61, 0.06);
}

.public-shell .site-header nav {
  min-height: var(--header-height);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.public-shell .brand-mark {
  min-width: 48px;
  min-height: 48px;
  border-radius: 4px;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--accent);
  font-family: Manrope, Inter, sans-serif;
}

.public-shell .site-nav {
  gap: 0.35rem;
}

.public-shell .site-nav a {
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  color: #314257;
  font-size: 0.82rem;
  font-weight: 700;
}

.public-shell .site-nav a:hover {
  background: var(--accent-soft);
  color: var(--ink);
  transform: none;
}

.public-shell .site-footer {
  position: relative !important;
  border-color: rgba(20, 33, 61, 0.12) !important;
  background: var(--ink) !important;
  color: #dce6e2;
  box-shadow: none;
}

.public-shell .site-footer > div {
  min-height: 72px;
}

.public-shell .site-footer p,
.public-shell .site-footer a {
  color: #dce6e2;
}

.public-shell .site-footer a:hover {
  color: #7ee0c7;
}

@media (max-width: 760px) {
  body.site-menu-open {
    overflow: hidden;
  }

  .public-shell .site-menu-toggle {
    display: inline-grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font-size: 1.15rem;
    cursor: pointer;
  }
  .public-shell .site-menu-toggle:hover { background: var(--accent-soft); transform: none; }
  .public-shell .site-header nav { position: relative; flex-wrap: wrap; }
  .public-shell .site-nav {
    display: none;
    flex: 0 0 100%;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: .75rem 0 .25rem;
    border-top: 1px solid var(--line);
  }
  .public-shell .site-nav.is-open { display: grid; gap: .3rem; }
  .public-shell .site-nav a { width: 100%; padding: .85rem 1rem; }
  .public-shell .site-nav a.nav-cta { margin-top: .35rem; background: var(--accent); color: #fff; text-align: center; }
}

/* Full-bleed page shells: readable text widths remain local to their blocks. */
.public-shell {
  overflow-x: hidden;
}

.public-shell .site-header > nav,
.public-shell .site-footer > div,
.public-shell .site-main > .hero-stage > .hero-layout,
.public-shell .public-page,
.public-shell .public-section,
.public-shell .dashboard-hero,
.public-shell .contact-layout {
  width: 100%;
  max-width: none;
  padding-inline: clamp(1rem, 3.2vw, 4rem) !important;
}

.public-shell .site-main > *,
.public-shell .public-page > *,
.public-shell .public-section > *,
.public-shell .hero-layout > * {
  min-width: 0;
}

.public-shell .public-page > .grid,
.public-shell .public-section > .grid,
.public-shell .hero-layout {
  width: 100%;
}

.public-shell .scroll-progress {
  height: 3px;
  background: var(--accent);
}

.public-shell .cursor-dot {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.public-shell .hero-stage {
  border-color: var(--line) !important;
  background: #edf4f1;
}

.public-shell .hero-stage::before {
  display: none;
}

.public-shell .hero-canvas {
  opacity: 0.28;
}

.public-shell .hero-layout {
  min-height: calc(100vh - var(--header-height));
  gap: 4.5rem;
}

.public-shell .hero-title {
  max-width: 760px;
  color: var(--ink) !important;
  font-size: 5.5rem;
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: none;
}

.public-shell .hero-layout > div:first-of-type > p:first-child,
.public-shell .public-page > div:first-child p:first-child,
.public-shell .contact-copy > p:first-child {
  color: var(--accent) !important;
}

.public-shell .hero-subtitle {
  color: #263a50 !important;
  font-size: 1.35rem;
  line-height: 1.45;
}

.public-shell .home-slogan {
  border-left: 4px solid var(--warm);
  padding-left: 0.9rem;
  color: var(--ink);
  font-family: Manrope, Inter, sans-serif;
}

.public-shell .home-focus {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--accent) !important;
}

.public-shell .home-focus::before {
  width: 2rem;
  height: 2px;
  background: var(--accent);
  content: "";
}

.public-shell .home-signal-strip {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 0;
}

.public-shell .home-signal-strip::after {
  position: absolute;
  top: -5rem;
  right: 8%;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(126, 224, 199, .25);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.public-shell .home-signal-item {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 18rem;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  padding: 1.5rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.public-shell .home-signal-item:hover {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(126, 224, 199, .16), rgba(255, 255, 255, .04));
  transform: translateY(-4px);
}

.public-shell .home-signal-grid {
  display: grid;
  gap: .75rem;
}

.public-shell .home-signal-index {
  position: absolute;
  top: 1.25rem;
  right: 1.35rem;
  color: var(--accent);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: .8;
  opacity: .9;
}

.public-shell .home-signal-label {
  margin-bottom: .8rem;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.public-shell .home-signal-item h2 {
  max-width: 17rem;
  color: var(--paper);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.05;
}

.public-shell .home-signal-description {
  max-width: 25rem;
  margin-top: .85rem;
  color: #d4d4d4;
  font-size: .9rem;
  line-height: 1.65;
}

@media (min-width: 768px) {
  .public-shell .home-signal-strip { padding: 2rem 0; }
  .public-shell .home-signal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .public-shell .home-signal-item { min-height: 20rem; padding: 2rem; }
}

.public-shell .home-method-list {
  max-width: 48rem;
}

.public-shell .home-method-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: padding .2s ease, background .2s ease, color .2s ease;
}

.public-shell .home-method-row span:first-child {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.public-shell .home-method-row span:last-child {
  color: var(--accent);
  font-size: 1.25rem;
  transition: transform .2s ease;
}

.public-shell .home-method-row:hover {
  padding-inline: .75rem;
  background: rgba(255, 255, 255, .7);
}

.public-shell .home-method-row:hover span:last-child {
  transform: translate(3px, -3px);
}

.public-shell .newsletter-consent {
  width: 100%;
  cursor: pointer;
}

.public-shell .newsletter-consent input {
  flex: 0 0 auto;
  accent-color: var(--warm);
}

.public-shell .motion-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding-right: 1.15rem;
  padding-left: 1.15rem;
}

.public-shell .motion-button:first-child {
  background: var(--accent) !important;
}

.public-shell .motion-button:hover {
  box-shadow: 5px 5px 0 var(--ink);
}

.public-shell .hero-portrait {
  border: 0 !important;
  border-radius: 8px;
  background: var(--paper);
  padding: 0.65rem;
  box-shadow: 16px 16px 0 var(--accent) !important;
}

.public-shell .hero-portrait > div {
  border: 0 !important;
  border-radius: 4px;
}

.public-shell .hero-portrait img {
  filter: none;
}

.public-shell .hero-portrait-mobile {
  width: calc(100% - 10px);
  border-radius: 8px;
  box-shadow: 10px 10px 0 var(--accent) !important;
}

.public-shell .hero-portrait-mobile > div {
  aspect-ratio: 16 / 10;
}

.public-shell .hero-portrait-mobile img {
  object-position: center 32%;
}

.public-shell .home-metrics {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(20, 33, 61, 0.08);
}

.public-shell .home-metrics > div {
  border-color: var(--line) !important;
}

.public-shell .home-metrics strong {
  color: var(--accent);
  font-family: Manrope, Inter, sans-serif;
}

.public-shell .marquee {
  border-color: var(--ink) !important;
  background: var(--ink) !important;
}

.public-shell .marquee span {
  border-color: rgba(126, 224, 199, 0.28);
  color: #f4fbf8;
  letter-spacing: 0.1em;
}

.public-shell .marquee span::before {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.8rem;
  border-radius: 50%;
  background: var(--warm);
  content: "";
}

.public-shell .public-section-alt {
  background: #eaf2ef;
  box-shadow: 0 0 0 100vmax #eaf2ef;
  clip-path: inset(0 -100vmax);
}

.public-shell .section-snap::before {
  left: 1.25rem;
  right: 1.25rem;
  background: var(--line);
}

.public-shell .section-snap h2,
.public-shell .public-page h1,
.public-shell .contact-layout h1,
.public-shell main > section > h1,
.public-shell main > section > div > h1 {
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.public-shell .section-snap h2 {
  font-size: 3.35rem;
  line-height: 1.05;
}

.public-shell .section-snap > div:first-child > a {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.25rem;
  color: var(--accent);
  letter-spacing: 0;
}

.public-shell .content-card {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-top: 3px solid var(--accent) !important;
  border-radius: 8px;
  background: var(--paper) !important;
  color: var(--ink) !important;
  box-shadow: 0 10px 25px rgba(20, 33, 61, 0.06);
}

.public-shell .content-card:hover {
  background: var(--paper) !important;
  color: var(--ink) !important;
  box-shadow: 0 18px 36px rgba(20, 33, 61, 0.13);
  transform: translateY(-4px);
}

.public-shell .content-card img {
  border-color: var(--line) !important;
  filter: none;
}

.public-shell .content-card h3,
.public-shell .content-card h3 a {
  color: var(--ink) !important;
  letter-spacing: 0;
  text-transform: none;
}

.public-shell .content-card p {
  color: var(--muted) !important;
}

.public-shell .content-card h3 a::after {
  background: var(--warm);
}

.public-shell .content-card span {
  border-color: var(--line) !important;
  background: var(--accent-soft);
  color: #195849;
}

.public-shell .empty-state,
.public-shell .filter-panel,
.public-shell .archive-list section,
.public-shell .about-cv-section {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(20, 33, 61, 0.05);
}

.public-shell .about-cv-section {
  overflow: hidden;
}

.public-shell .about-cv-heading {
  align-items: flex-start;
  background: #fbfdfc;
}

.public-shell .about-cv-heading h2 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.15;
}

.public-shell .about-cv-item h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.public-shell .about-cv-date {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .public-shell .public-page {
    padding-top: 3rem !important;
    padding-bottom: 4rem !important;
  }

  .public-shell .public-page > .grid:first-child {
    gap: 2rem;
  }

  .public-shell .public-page h1 {
    font-size: 3.25rem;
    line-height: 0.98;
  }

  .public-shell .about-cv-heading {
    padding: 1rem;
  }

  .public-shell .about-cv-item,
  .public-shell .about-cv-certification,
  .public-shell .about-cv-award,
  .public-shell .about-cv-patent {
    grid-template-columns: 2.65rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 1.1rem;
  }

  .public-shell .about-cv-marker {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 0.5rem;
  }

  .public-shell .about-cv-award .about-cv-marker {
    font-size: 0.43rem;
  }

  .public-shell .about-cv-date {
    white-space: normal;
  }

  .public-shell .about-cv-description {
    font-size: 0.88rem;
    line-height: 1.6;
  }
}

.public-shell .empty-state strong {
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.public-shell .filter-panel {
  gap: 1.2rem;
  padding: 1.25rem;
}

.public-shell .filter-panel a,
.public-shell .active-filter-summary a {
  border-color: var(--line);
  border-radius: 4px;
  color: #34475a;
  letter-spacing: 0;
}

.public-shell .filter-panel a.is-active,
.public-shell .filter-panel a:hover,
.public-shell .active-filter-summary a.is-active,
.public-shell .active-filter-summary a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.public-shell main form input,
.public-shell main form textarea,
.public-shell main form select {
  border-color: #b9c8c2 !important;
  border-radius: 4px !important;
  background: #fbfdfc !important;
}

.public-shell main form input:focus,
.public-shell main form textarea:focus,
.public-shell main form select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0, 143, 114, 0.14);
}

.public-shell main form button {
  border-radius: 4px !important;
  background: var(--accent) !important;
  font-weight: 800;
}

.public-shell .tech-cloud span,
.public-shell .about-cv-skills span,
.public-shell .public-page > section:last-child span {
  border-color: #b9d7cd !important;
  border-radius: 4px !important;
  background: var(--accent-soft) !important;
  color: #195849 !important;
}

.public-shell .newsletter-band {
  position: relative;
  overflow: hidden;
  border: 0 !important;
  border-left: 6px solid var(--warm) !important;
  border-radius: 8px;
  background: var(--ink) !important;
}

.public-shell .newsletter-band h3 {
  color: var(--paper);
  letter-spacing: 0;
  text-transform: none;
}

.public-shell .about-intro-panel,
.public-shell .about-value-panel,
.public-shell .contact-form {
  border-color: var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 32px rgba(20, 33, 61, 0.07);
}

.public-shell .about-value-panel {
  border-top: 3px solid var(--warm) !important;
}

.public-shell .about-value-panel:nth-child(2) {
  border-top-color: var(--accent) !important;
}

.public-shell .about-value-panel h2,
.public-shell .about-cv-heading h2,
.public-shell .about-cv-item h3 {
  letter-spacing: 0;
  text-transform: none;
}

.public-shell .about-cv-heading,
.public-shell .about-cv-item {
  border-color: var(--line);
}

.public-shell .about-cv-heading span,
.public-shell .about-cv-skills span {
  border-color: #b9d7cd;
}

.public-shell .about-cv-heading span,
.public-shell .about-cv-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.public-shell .contact-layout {
  align-items: start;
}

.public-shell .contact-copy {
  position: sticky;
  top: calc(var(--header-height) + 3rem);
}

.public-shell .contact-copy > p:nth-of-type(2) {
  display: inline-flex;
  border-left: 3px solid var(--warm);
  padding: 0.5rem 0.8rem;
  background: var(--paper);
  color: var(--ink) !important;
  font-weight: 700;
}

.public-shell .contact-copy a {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.2rem;
  color: var(--ink);
  font-weight: 700;
}

.public-shell .content-tools button,
.public-shell .content-tools a {
  border-color: var(--accent);
  border-radius: 4px;
  color: var(--accent);
}

.public-shell .content-tools button:hover,
.public-shell .content-tools a:hover {
  background: var(--accent);
  color: var(--paper);
}

.public-shell .toc-panel {
  border-color: var(--line);
  border-radius: 8px;
  background: #eef6f3;
}

.public-shell .toc-panel a {
  border-color: var(--accent);
}

.public-shell .prose-dark {
  color: #2e3d4d;
}

.public-shell .prose-dark h2,
.public-shell .prose-dark h3 {
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.public-shell .archive-list h2,
.public-shell .archive-list a {
  border-color: var(--line);
}

.public-shell .archive-list h2 {
  color: var(--accent);
}

.public-shell .archive-list a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.public-shell .archive-list strong {
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 1023px) {
  .public-shell .hero-layout {
    gap: 3rem;
  }

  .public-shell .hero-title {
    font-size: 4.6rem;
  }

  .public-shell .hero-portrait {
    width: min(100%, 34rem);
  }

  .public-shell .contact-copy {
    position: static;
  }
}

@media (max-width: 767px) {
  .public-shell {
    --header-height: 72px;
    --footer-height: 0px;
  }

  .public-shell .site-header nav {
    min-height: 72px;
  }

  .public-shell .brand-mark {
    min-width: 42px;
    min-height: 42px;
    box-shadow: 3px 3px 0 var(--accent);
  }

  .public-shell .site-nav a {
    padding: 0.45rem 0.35rem;
    font-size: 0.72rem;
  }

  .public-shell .hero-layout {
    min-height: auto;
    gap: 3rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .public-shell .hero-title {
    font-size: 3.15rem;
    line-height: 1;
  }

  .public-shell .hero-subtitle {
    font-size: 1.15rem;
  }

  .public-shell .section-snap h2 {
    font-size: 2.35rem;
  }

  .public-shell .public-section {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  .public-shell .site-footer > div {
    min-height: auto;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
  }

  .public-shell .archive-list section {
    grid-template-columns: 1fr;
  }

  .public-shell .archive-list h2 {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Apply the full-width shell consistently to every public and admin page. */
.site-main > section,
.site-main > article {
  box-sizing: border-box;
  width: 100%;
  max-width: none !important;
  margin-right: 0;
  margin-left: 0;
  padding-right: clamp(1rem, 3.2vw, 4rem) !important;
  padding-left: clamp(1rem, 3.2vw, 4rem) !important;
}

.site-main > .hero-stage {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.site-main > .hero-stage > .hero-layout {
  box-sizing: border-box;
  max-width: none !important;
  padding-right: clamp(1rem, 3.2vw, 4rem) !important;
  padding-left: clamp(1rem, 3.2vw, 4rem) !important;
}

.admin-shell .site-main > section,
.admin-shell .site-main > article {
  padding-top: clamp(2.5rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
}

/* Editorial article layout */
.article-page {
  background: linear-gradient(180deg, #f7faf8 0, #fff 34rem);
}

.article-header,
.article-hero,
.article-reading-layout,
.article-related,
.article-cta {
  width: min(100%, 110rem);
  margin-right: auto;
  margin-left: auto;
}

.article-header {
  padding: clamp(2rem, 7vw, 7rem) clamp(0rem, 4vw, 4rem) clamp(2.5rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.article-kicker time {
  margin-left: auto;
  color: var(--muted);
}

.article-header h1 {
  max-width: 16ch;
  margin-top: 1.6rem;
  color: var(--ink);
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(2.8rem, 7vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.article-summary {
  max-width: 58rem;
  margin-top: 2rem;
  color: #405166;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.55;
}

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

.article-hero {
  margin-top: clamp(1.5rem, 4vw, 4rem);
}

.article-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(20, 33, 61, 0.1);
}

.article-reading-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: start;
  margin-top: clamp(2.5rem, 6vw, 6rem);
}

.article-sidebar {
  position: sticky;
  top: 6rem;
}

.article-sidebar .toc-panel {
  display: block;
  margin: 0;
}

.article-sidebar-note {
  margin-top: 1.5rem;
  border-top: 2px solid var(--accent);
  padding-top: 0.9rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
}

.article-content-column {
  min-width: 0;
  max-width: 58rem;
}

.article-content-column .prose-dark {
  max-width: 50rem;
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
  line-height: 1.9;
}

.article-content-column .prose-dark > h1:first-child {
  display: none;
}

.article-content-column .prose-dark h2 {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  line-height: 1.08;
}

.article-content-column .prose-dark p {
  margin-bottom: 1.5rem;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.article-nav a,
.article-related-grid a {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  color: var(--ink);
}

.article-nav a:hover,
.article-related-grid a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.article-nav small,
.article-related-grid span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-nav strong {
  font-size: 1rem;
  line-height: 1.25;
}

.article-related {
  margin-top: clamp(4rem, 8vw, 8rem);
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.article-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.article-related-grid strong {
  font-size: 1.05rem;
  line-height: 1.25;
}

.article-cta {
  margin-top: clamp(4rem, 8vw, 8rem);
  border-radius: 12px;
  background: var(--ink);
  padding: clamp(2rem, 5vw, 5rem);
  color: #fff;
}

.article-cta > p:first-child {
  color: var(--admin-mint, #69d3b4);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.article-cta h2 {
  max-width: 20ch;
  margin-top: 1rem;
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(1.8rem, 4vw, 4rem);
  line-height: 1;
}

.article-cta > p:not(:first-child) {
  max-width: 42rem;
  margin-top: 1rem;
  color: #cbd8d3;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-cta a {
  display: inline-flex;
  margin-top: 2rem;
  border-radius: 6px;
  background: var(--accent);
  padding: 0.85rem 1.1rem;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
}

@media (max-width: 900px) {
  .article-reading-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-sidebar {
    position: static;
  }

  .article-sidebar-note {
    display: none;
  }

  .article-sidebar .toc-panel:has(nav:empty) {
    display: none;
  }
}

@media (max-width: 640px) {
  .article-kicker time {
    width: 100%;
    margin-left: 0;
  }

  .article-header h1 {
    font-size: clamp(2.65rem, 13vw, 4.4rem);
  }

  .article-hero img {
    aspect-ratio: 4 / 3;
  }

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

  .article-section-heading {
    flex-direction: column;
  }
}

/* Earthquake dashboard: final responsive filter layout. */
.dashboard-toolbar {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

.dashboard-filter-group,
.dashboard-filter-group > div {
  width: 100%;
  min-width: 0;
}

.dashboard-filter-group .dashboard-filters {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: 100%;
}

.dashboard-filter-group .dashboard-filters .dashboard-input {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.dashboard-filter-group .dashboard-filters #earthquake-search {
  grid-column: span 2;
}

.dashboard-filter-group .dashboard-controls {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: 100%;
}

.dashboard-filter-group .dashboard-controls > * {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.dashboard-filter-group .dashboard-controls #earthquake-status {
  grid-column: 1 / -1;
  text-align: left;
}

@media (max-width: 1000px) {
  .dashboard-filter-group .dashboard-filters,
  .dashboard-filter-group .dashboard-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-filter-group .dashboard-filters #earthquake-search,
  .dashboard-filter-group .dashboard-controls #earthquake-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .dashboard-filter-group .dashboard-filters,
  .dashboard-filter-group .dashboard-controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-filter-group .dashboard-filters #earthquake-search,
  .dashboard-filter-group .dashboard-controls #earthquake-status {
    grid-column: auto;
  }

  .dashboard-filter-heading {
    display: block;
    margin-top: 0.25rem;
  }
}

/* Final admin sidebar layout override. Keep every submenu item in a strict vertical stack. */
.admin-shell .admin-nav {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}

.admin-shell .admin-nav > *,
.admin-shell .admin-nav-group {
  display: block !important;
  width: 100% !important;
  flex: 0 0 auto !important;
}

.admin-shell .admin-nav > .admin-nav-footer {
  display: grid !important;
  margin-top: auto;
}

.admin-shell .admin-nav-group[open] > summary,
.admin-shell .admin-nav-group > a {
  width: 100% !important;
  box-sizing: border-box;
}

.admin-shell .admin-nav-group > summary {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

.admin-shell .admin-nav-group > a {
  display: flex !important;
  flex: none !important;
  clear: both;
  white-space: normal;
}

.admin-shell .admin-nav-footer {
  display: grid !important;
  width: 100% !important;
  flex: 0 0 auto !important;
}

.public-shell .site-nav a.is-active {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35rem;
}

/* Final public UX pass: stable rhythm, readable content widths and touch-friendly navigation. */
.public-shell {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable;
}

.public-shell .site-header > nav,
.public-shell .site-footer > div {
  max-width: 1440px;
  margin-inline: auto;
}

.public-shell .site-header {
  transition: box-shadow 180ms ease, background 180ms ease;
}

.public-shell .site-header.is-scrolled {
  background: rgba(248, 250, 248, .98) !important;
  box-shadow: 0 14px 34px rgba(20, 33, 61, .12);
}

@keyframes hero-ambient-drift {
  0%, 100% { background-position: 0% 45%; transform: scale(1); }
  50% { background-position: 100% 55%; transform: scale(1.04); }
}

@keyframes link-glow {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

.public-shell .hero-stage::before {
  display: block;
  z-index: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(0, 143, 114, .18), transparent 26rem),
    radial-gradient(circle at 85% 70%, rgba(244, 162, 97, .14), transparent 24rem),
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 72%);
  background-size: 160% 160%, 160% 160%, 220% 100%;
  opacity: .8;
  transform: scale(1);
  animation: hero-ambient-drift 14s ease-in-out infinite;
}

.public-shell .hero-canvas {
  opacity: .42;
  mix-blend-mode: multiply;
}

.public-shell .content-card,
.public-shell .service-offer-card,
.public-shell .motion-button,
.public-shell .article-related-grid a {
  will-change: transform;
}

.public-shell .content-card,
.public-shell .service-offer-card,
.public-shell .article-related-grid a {
  position: relative;
}

.public-shell .content-card::before,
.public-shell .service-offer-card::before,
.public-shell .article-related-grid a::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle 180px at var(--pointer-x, 50%) var(--pointer-y, 0%), rgba(0, 143, 114, .14), transparent 72%);
  transition: opacity 260ms ease;
}

.public-shell .content-card:hover::before,
.public-shell .service-offer-card:hover::before,
.public-shell .article-related-grid a:hover::before {
  opacity: 1;
}

.public-shell .content-card > *,
.public-shell .service-offer-card > *,
.public-shell .article-related-grid a > * {
  position: relative;
  z-index: 1;
}

.public-shell .content-card img,
.public-shell main article.border.border-black.bg-white img {
  transition: transform 520ms cubic-bezier(.2, .8, .2, 1), filter 520ms ease;
}

.public-shell .content-card:hover img,
.public-shell main article.border.border-black.bg-white:hover img {
  transform: scale(1.055) rotate(.35deg);
  filter: saturate(1.08) contrast(1.02);
}

.public-shell .motion-button,
.public-shell main form button,
.public-shell .article-cta a {
  position: relative;
  overflow: hidden;
}

.public-shell .motion-button::after,
.public-shell main form button::after,
.public-shell .article-cta a::after {
  position: absolute;
  inset: 0 auto 0 -45%;
  width: 35%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .32), transparent);
  transform: skewX(-18deg);
  transition: left 500ms ease;
}

.public-shell .motion-button:hover::after,
.public-shell main form button:hover::after,
.public-shell .article-cta a:hover::after {
  left: 125%;
}

.public-shell .section-snap h2::after {
  display: block;
  width: 3.5rem;
  height: 4px;
  margin-top: .9rem;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 800ms cubic-bezier(.2, .8, .2, 1);
}

.public-shell .section-snap.is-visible h2::after {
  transform: scaleX(1);
}

.public-shell .site-nav a:not(.nav-cta)::after {
  position: absolute;
  right: .8rem;
  bottom: .25rem;
  left: .8rem;
  height: 2px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.public-shell .site-nav a:not(.nav-cta):hover::after,
.public-shell .site-nav a:not(.nav-cta).is-active::after {
  transform: scaleX(1);
}

.public-shell .language-switcher {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .2rem;
  margin-left: .25rem;
  border-left: 1px solid var(--line);
  padding-left: .55rem;
}

.public-shell .language-switcher summary {
  min-height: 30px;
  padding: .35rem .5rem;
  color: var(--muted);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  list-style: none;
}

.public-shell .language-switcher summary::-webkit-details-marker { display: none; }
.public-shell .language-switcher summary:hover { background: var(--accent-soft); color: var(--ink); }
.public-shell .language-switcher[open] summary { background: var(--accent-soft); color: var(--ink); }

.public-shell .language-switcher-menu {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  z-index: 80;
  display: grid;
  min-width: 10rem;
  gap: .2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: .4rem;
  box-shadow: 0 16px 36px rgba(20, 33, 61, .14);
}

.public-shell .language-switcher-menu a {
  justify-content: flex-start;
  min-height: 36px;
  padding: .5rem .65rem;
  color: var(--muted);
  font-size: .7rem;
}

.public-shell .language-switcher-menu a.is-active,
.public-shell .language-switcher-menu a:hover { background: var(--accent-soft); color: var(--ink); }

.admin-ai-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.admin-ai-trigger {
  flex: 0 0 auto;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  padding: .3rem .55rem;
  color: var(--accent);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 900;
}

.admin-ai-trigger:hover { background: var(--accent); color: #fff; }

.admin-ai-dialog {
  width: min(34rem, calc(100vw - 2rem));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 0;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(20, 33, 61, .24);
}

.admin-ai-dialog::backdrop { background: rgba(20, 33, 61, .42); backdrop-filter: blur(4px); }
.admin-ai-dialog-form { display: grid; gap: .9rem; padding: 1.4rem; }
.admin-ai-dialog h2 { margin: 0; font-size: 1.45rem; }
.admin-ai-dialog p { margin: 0; color: var(--muted); line-height: 1.5; }
.admin-ai-dialog label { display: grid; gap: .35rem; color: var(--muted); font-size: .75rem; font-weight: 800; }
.admin-ai-dialog select,
.admin-ai-dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: .7rem; color: var(--ink); font: inherit; }
.admin-ai-dialog-close { position: absolute; top: .65rem; right: .8rem; border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; cursor: pointer; }
.admin-ai-dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.admin-ai-dialog-actions button { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .65rem .9rem; color: var(--ink); cursor: pointer; font-weight: 800; }
.admin-ai-dialog-actions .admin-section-action-primary { background: var(--ink); color: #fff; }
.admin-ai-dialog-status { min-height: 1.3em; color: var(--accent) !important; font-size: .8rem; }

.translation-toolbar,
.translation-actions,
.translation-actions form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
}

.translation-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; justify-content: initial; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.translation-toolbar-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; padding: .75rem; border: 1px solid var(--line); background: var(--surface); }
.translation-toolbar-filters label { min-width: 10rem; }
.translation-toolbar-filters button { align-self: end; }
.translation-toolbar label,
.translation-actions label { display: grid; gap: .35rem; color: var(--muted); font-size: .75rem; font-weight: 800; }
.translation-toolbar input,
.translation-toolbar select,
.translation-actions select { min-width: 11rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: .65rem .75rem; color: var(--ink); font: inherit; }
.translation-toolbar input:focus,
.translation-toolbar select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.translation-filter-search { min-width: 15rem !important; }
.translation-table { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.translation-table-head,
.translation-row { display: grid; grid-template-columns: 1fr .8fr 2.4fr auto; gap: .75rem; align-items: center; padding: .8rem 1rem; }
.translation-table-head { background: var(--ink); color: #fff; font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.translation-row { border-top: 1px solid var(--line); font-size: .78rem; }
.translation-row textarea { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: .55rem; color: var(--ink); font: inherit; }
.translation-row code { color: var(--accent); font-size: .72rem; }
.translation-cms-table { overflow: auto; }
.translation-cms-table .translation-table-head,
.translation-cms-table .translation-row { grid-template-columns: minmax(8rem, .8fr) minmax(11rem, 1.1fr) minmax(16rem, 1.5fr) minmax(16rem, 1.5fr) auto; min-width: 920px; }
.translation-cms-table .translation-row { align-items: start; padding-block: .9rem; }
.translation-cms-table .translation-row > span,
.translation-cms-table .translation-row > code { padding-top: .55rem; }
.translation-cms-table .translation-row textarea { min-height: 4.5rem; resize: vertical; }
.translation-cms-table .translation-source { max-height: 6rem; overflow: auto; white-space: pre-wrap; line-height: 1.45; }
.translation-cms-table .admin-icon-button { white-space: nowrap; }
.translation-row-actions { display: flex; flex-wrap: wrap; align-items: start; gap: .4rem; }
.translation-row-actions .admin-icon-button { white-space: nowrap; }
.translation-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.translation-overview > div { border: 1px solid var(--line); background: var(--paper); padding: 1rem; }
.translation-overview strong { display: block; color: var(--accent); font-size: 1.8rem; }
.translation-overview span { color: var(--muted); font-size: .75rem; }
.translation-section { border: 1px solid var(--line); background: var(--paper); padding: 1rem; }
.translation-section-heading,
.translation-entity-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.translation-section-heading h2 { margin: .2rem 0 0; font-size: 1.3rem; }
.translation-section-heading h2 small { color: var(--muted); font-size: .8rem; }
.translation-batch-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; }
.translation-batch-status { min-width: 12rem; color: var(--muted); font-size: .75rem; }
.translation-batch-source { display: none; }
.translation-section-note { color: var(--muted); font-size: .75rem; }
.admin-floating-notification { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 100; max-width: min(28rem, calc(100vw - 2.5rem)); transform: translateY(1rem); opacity: 0; pointer-events: none; border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: .9rem 1rem; box-shadow: 0 16px 35px rgba(20,33,61,.22); font-size: .82rem; font-weight: 800; transition: opacity .2s ease, transform .2s ease; }
.admin-floating-notification.is-visible { transform: translateY(0); opacity: 1; }
.admin-floating-notification[data-tone="error"] { border-color: #e76f51; background: #fff3ed; color: #8f2d16; }
.admin-flash-stack { position: fixed; top: calc(var(--header-height) + .9rem); right: 1.25rem; z-index: 80; display: grid; gap: .55rem; width: min(26rem, calc(100vw - 2.5rem)); }
.admin-flash { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; border: 1px solid #b9e7d9; border-left: 4px solid var(--admin-mint, #69d3b4); border-radius: 10px; background: #fff; padding: .8rem .9rem; color: var(--admin-text, #1c2938); box-shadow: 0 14px 32px rgba(16, 24, 40, .12); font-size: .8rem; font-weight: 700; animation: admin-flash-in .22s ease both; }
.admin-flash button { flex: 0 0 auto; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1.2rem; line-height: 1; opacity: .6; }
.admin-flash-error { border-color: #f2b8a7; border-left-color: #e76f51; background: #fff7f4; color: #8f2d16; }
.admin-flash-warning { border-color: #ead59e; border-left-color: #d6a932; background: #fffaf0; }
@keyframes admin-flash-in { from { opacity: 0; transform: translateY(-.5rem); } to { opacity: 1; transform: translateY(0); } }
.maintenance-hero { align-items: center; }
.maintenance-hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; }
.maintenance-hero-actions form { margin: 0; }
.admin-danger-action { border-color: #d88a76 !important; color: #8f2d16 !important; }
.admin-danger-action:hover:not(:disabled) { border-color: #8f2d16 !important; background: #fff0eb !important; color: #8f2d16 !important; }
.admin-danger-action:disabled { cursor: not-allowed; opacity: .45; }
.maintenance-table-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.maintenance-table-heading h2 { margin: 0; color: var(--ink); font-size: 1.25rem; font-weight: 900; }
.maintenance-table-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; }
.maintenance-warning { border: 1px solid #ead59e; border-radius: 999px; background: #fffaf0; padding: .45rem .7rem; color: #765b14; font-size: .7rem; font-weight: 800; }
.maintenance-table-wrap .admin-table td:last-child { white-space: nowrap; }
.maintenance-empty { padding-block: 2.5rem; }
.seo-hero { align-items: center; }
.seo-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
.seo-results-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.seo-results-heading h2 { margin: 0; color: var(--ink); font-size: 1.25rem; font-weight: 900; }
.seo-results-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; }
.seo-legend { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .72rem; font-weight: 800; }
.seo-legend-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--warm); }
.seo-status { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .55rem; font-size: .68rem; font-weight: 900; }
.seo-status-published { border-color: #b9e7d9; background: #effaf6; color: #087f5b; }
.seo-status-draft { background: #f5f7f6; color: var(--muted); }
.seo-actions { justify-content: flex-end; }
.seo-filter-bar { grid-template-columns: minmax(16rem, 1fr) minmax(12rem, auto) minmax(12rem, auto) auto auto; }
@media (max-width: 760px) {
  .seo-hero-actions, .seo-hero-actions a { width: 100%; }
  .seo-results-heading { align-items: flex-start; flex-direction: column; }
  .seo-filter-bar { grid-template-columns: 1fr; }
  .seo-filter-bar > * { width: 100%; }
  .seo-actions { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .maintenance-hero-actions, .maintenance-hero-actions form, .maintenance-hero-actions a, .maintenance-hero-actions button { width: 100%; }
  .maintenance-table-heading { align-items: flex-start; flex-direction: column; }
  .maintenance-table-wrap { overflow-x: auto; }
  .maintenance-table-wrap .admin-table { min-width: 720px; }
}
.translation-entity-list { display: grid; gap: .75rem; margin-top: 1rem; }
.translation-entity { border-top: 1px solid var(--line); padding-top: 1rem; }
.translation-entity-heading { align-items: center; margin-bottom: .75rem; }
.translation-entity-heading strong { display: block; }
.translation-entity-heading span { color: var(--muted); font-size: .72rem; }
.translation-fields-table { border-radius: 6px; }
.translation-field-row { display: grid; grid-template-columns: .8fr 1.4fr 1.8fr auto; gap: .75rem; align-items: start; border-top: 1px solid var(--line); padding: .7rem .85rem; font-size: .78rem; }
.translation-field-row textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 5px; padding: .55rem; color: var(--ink); font: inherit; }
.translation-source { color: var(--muted); line-height: 1.45; max-height: 7rem; overflow: auto; white-space: pre-wrap; }
@media (max-width: 760px) {
  .translation-toolbar { grid-template-columns: 1fr; gap: 1rem; }
  .translation-toolbar-filters { align-items: stretch; }
  .translation-toolbar-filters label, .translation-toolbar-filters button { width: 100%; }
  .translation-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .translation-section-heading, .translation-entity-heading { align-items: stretch; flex-direction: column; }
  .translation-field-row { grid-template-columns: 1fr; }
  .translation-field-row .admin-icon-button { justify-self: start; }
  .translation-cms-table { overflow: visible; }
  .translation-cms-table .translation-table-head { display: none; }
  .translation-cms-table .translation-row { display: grid; grid-template-columns: 1fr; min-width: 0; gap: .35rem; padding: 1rem; }
  .translation-cms-table .translation-row > span,
  .translation-cms-table .translation-row > code { padding-top: 0; }
}
@media (max-width: 480px) {
  .translation-overview { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .admin-flash-stack { top: calc(var(--header-height) + .65rem); right: .75rem; width: calc(100vw - 1.5rem); }
}

@media (max-width: 760px) {
  .translation-table-head { display: none; }
  .translation-row { grid-template-columns: 1fr; }
  .public-shell .language-switcher { margin: .35rem 0 0; border-top: 1px solid var(--line); border-left: 0; padding: .45rem 0 0; }
  .public-shell .language-switcher-menu { position: static; margin-top: .35rem; }
}
}

.public-shell .language-switcher a {
  min-height: 30px;
  padding: .35rem .45rem;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .06em;
}

.public-shell .language-switcher a.is-active,
.public-shell .language-switcher a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

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

.admin-ai-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 1.4rem;
  box-shadow: 0 10px 28px rgba(20, 33, 61, .06);
}

.admin-ai-card h2 { margin: .35rem 0; font-size: 1.45rem; }
.admin-ai-card p { color: var(--muted); line-height: 1.6; }
.admin-ai-card label { display: grid; gap: .4rem; color: var(--muted); font-size: .78rem; font-weight: 800; }
.admin-ai-card textarea,
.admin-ai-card input,
.admin-ai-card select { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: .7rem .8rem; color: var(--ink); font: inherit; font-weight: 500; }
.admin-ai-stat { margin-top: 1.1rem; border-left: 3px solid var(--accent); padding-left: .8rem; }
.admin-ai-stat strong { display: block; color: var(--accent); font-size: 2rem; }
.admin-ai-result { border-top: 1px solid var(--line); padding-top: 1rem; }
.admin-ai-alert { border: 1px solid #e76f51; border-radius: 8px; background: #fff3ed; padding: 1rem; color: #8f2d16; }

@media (max-width: 760px) {
  .admin-ai-grid { grid-template-columns: 1fr; }
  .public-shell .language-switcher { margin: .35rem 0 0; border-top: 1px solid var(--line); border-left: 0; padding: .45rem 0 0; }
}

.public-shell [data-reveal] {
  filter: blur(8px);
  transition: opacity 800ms ease, transform 800ms ease, filter 800ms ease;
}

.public-shell [data-reveal].is-visible {
  filter: blur(0);
}

.public-shell .toc-panel a {
  transition: color 180ms ease, border-color 180ms ease, padding-left 180ms ease, background 180ms ease;
}

.public-shell .toc-panel a.is-current {
  border-left-color: var(--accent);
  padding-left: 1rem;
  color: var(--accent);
  background: rgba(0, 143, 114, .08);
}

.public-shell .site-nav a {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.public-shell .site-nav a.is-active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--ink);
  text-decoration: none;
}

.public-shell .site-nav a.nav-cta {
  background: var(--ink);
  color: #fff;
}

.public-shell .site-nav a.nav-cta:hover {
  background: var(--accent);
  color: #fff;
}

.public-shell .site-nav a:focus-visible,
.public-shell .site-menu-toggle:focus-visible,
.public-shell .brand-mark:focus-visible {
  position: relative;
  z-index: 3;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.public-shell .content-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--accent) !important;
  box-shadow: 0 18px 38px rgba(20, 33, 61, .12);
}

.public-shell .public-page,
.public-shell .public-section,
.public-shell .hero-layout,
.public-shell .article-page {
  max-width: 1440px;
  margin-inline: auto;
}

.public-shell .article-page {
  padding-inline: clamp(1rem, 4vw, 4rem) !important;
}

.public-shell .article-header {
  max-width: 960px;
  margin-inline: auto;
}

.public-shell .article-header h1 {
  max-width: 900px;
  margin-top: 1rem;
  font-size: clamp(2.6rem, 6vw, 5.8rem) !important;
  line-height: .98 !important;
}

.public-shell .article-summary {
  max-width: 760px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.65;
}

.public-shell .article-hero {
  max-width: 1240px;
  margin: 3rem auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 20px 55px rgba(20, 33, 61, .1);
}

.public-shell .article-hero img {
  display: block;
  width: 100%;
  max-height: 680px;
  object-fit: cover;
}

.public-shell .article-reading-layout {
  max-width: 1080px;
  margin-inline: auto;
}

.public-shell .prose-dark {
  font-size: 1.05rem;
  line-height: 1.85;
}

.public-shell .prose-dark h2 {
  margin-top: 3rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.public-shell .prose-dark a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.public-shell .content-card,
.public-shell .service-offer-card,
.public-shell .about-value-panel,
.public-shell .about-intro-panel,
.public-shell .contact-form {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.public-shell .content-card:focus-within,
.public-shell .service-offer-card:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(0, 143, 114, .14), 0 18px 36px rgba(20, 33, 61, .1);
}

@media (max-width: 760px) {
  .public-shell .site-header > nav {
    padding-inline: 1rem !important;
  }

  .public-shell .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 1rem;
    left: 1rem;
    z-index: 2;
    width: auto;
    padding: .7rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 42px rgba(20, 33, 61, .14);
  }

  .public-shell .site-nav a {
    justify-content: flex-start;
    min-height: 44px;
  }

  .public-shell .site-nav a.nav-cta {
    justify-content: center;
  }

  .public-shell .article-page {
    padding-top: 3rem !important;
    padding-bottom: 4rem !important;
  }

  .public-shell .article-hero {
    margin-top: 2rem;
    border-radius: 12px;
  }

  .public-shell .article-hero img {
    min-height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-transition,
  .page-transition span {
    transition: none !important;
  }

  .page-transition {
    display: none;
  }

  .public-shell .hero-stage::before {
    animation: none;
  }

  .public-shell [data-reveal] {
    filter: none;
  }

  .public-shell *,
  .public-shell *::before,
  .public-shell *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .public-shell .cursor-dot {
    display: none;
  }
}

/* Final admin sidebar overrides: keep icons compact and animate the actual list. */
.admin-shell .admin-nav .admin-nav-icon {
  display: inline-flex !important;
  flex: 0 0 .9rem !important;
  width: .9rem !important;
  min-width: .9rem !important;
  height: 1rem !important;
  align-items: center !important;
  justify-content: center !important;
}

.admin-shell .admin-nav .admin-nav-icon-svg {
  width: .82rem !important;
  height: .82rem !important;
}

.admin-shell .admin-nav .admin-nav-group > .admin-nav-links {
  display: block !important;
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  transform: translateY(-.4rem) !important;
  transition: max-height .32s ease, opacity .22s ease, transform .32s ease !important;
}

.admin-shell .admin-nav .admin-nav-group[open] > .admin-nav-links {
  max-height: 32rem !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.admin-shell .admin-nav .admin-nav-group > .admin-nav-links > a {
  min-height: 2.35rem !important;
  padding-top: .55rem !important;
  padding-bottom: .55rem !important;
}

@media (prefers-reduced-motion: reduce) {
  .admin-shell .admin-nav .admin-nav-group > .admin-nav-links {
    transition: none !important;
  }
}

.translation-language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.translation-language-card,
.translation-language-add {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: #fff;
}

.translation-language-card > div:first-child {
  display: grid;
  gap: .2rem;
}

.translation-language-card strong {
  color: var(--admin-navy);
  font-size: 1rem;
}

.translation-language-card span,
.translation-language-protected {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.translation-language-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
}

.translation-language-add {
  grid-column: 1 / -1;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-start;
  background: var(--paper);
}

.translation-language-add strong {
  width: 100%;
  color: var(--admin-navy);
}

.translation-language-add input {
  flex: 1 1 10rem;
  min-height: 2.65rem;
  border: 1px solid var(--line);
  padding: .65rem .8rem;
  background: #fff;
  color: var(--admin-text);
}

/* Translation workspace: keep the existing admin visual language while making
   the controls readable at desktop and stacked on small screens. */
.admin-shell .translation-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.4rem;
}
.admin-shell .translation-hero-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: .55rem .8rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}
.admin-shell .translation-hero-status strong { color: var(--admin-navy); letter-spacing: .1em; }
.translation-status-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--admin-mint, #69d3b4); box-shadow: 0 0 0 4px rgba(105, 211, 180, .18); }
.admin-shell .translation-filter-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1.1rem;
}
.translation-filter-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.translation-filter-heading h2 { margin: .2rem 0 0; color: var(--admin-navy); font-size: 1.2rem; }
.translation-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; gap: .75rem; }
.translation-filter-grid label { display: grid; min-width: 0; gap: .35rem; color: var(--muted); font-size: .72rem; font-weight: 800; }
.translation-filter-grid input, .translation-filter-grid select { width: 100%; min-width: 0; min-height: 2.7rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: .62rem .7rem; color: var(--ink); font: inherit; }
.translation-filter-grid input:focus, .translation-filter-grid select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.translation-filter-search { grid-column: span 1; }
.translation-filter-submit { min-height: 2.7rem; white-space: nowrap; }
.translation-filter-help { margin: .8rem 0 0; color: var(--muted); font-size: .72rem; }
.translation-overview { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.translation-overview > div { min-height: 7.2rem; }
.translation-metric-label { display: block; color: var(--admin-navy) !important; font-size: .68rem !important; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.translation-language-card-main { display: flex; align-items: center; gap: .7rem; }
.translation-language-code { display: inline-grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: 8px; background: var(--admin-navy); color: #fff !important; font-size: .65rem !important; letter-spacing: .08em; }
.translation-language-state { display: inline-flex; border-radius: 999px; padding: .3rem .5rem; background: #f5f7f6; color: var(--muted) !important; font-size: .65rem !important; font-weight: 900; }
.translation-language-state.is-active { background: #e8f8f2; color: #087f5b !important; }
.translation-language-state.is-hidden { background: #fff4ef; color: #9b3a1e !important; }
.translation-language-add > div { display: grid; flex: 1 1 13rem; gap: .2rem; }
.translation-language-add > div span { color: var(--muted); font-size: .72rem; }
@media (max-width: 980px) {
  .translation-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .translation-filter-submit { justify-self: start; }
}
@media (max-width: 760px) {
  .admin-shell .translation-hero { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .translation-filter-heading { align-items: flex-start; flex-direction: column; }
  .translation-filter-grid { grid-template-columns: 1fr; }
  .translation-filter-submit { width: 100%; }
  .translation-language-card { align-items: flex-start; flex-direction: column; }
  .translation-language-actions { justify-content: flex-start; }
}
