:root {
  /* MyANRH-like tool chrome + ANRH Core */
  --green: #2f9a6a;
  --green-dark: #1e6b48;
  --green-deep: #1e6b48;
  --green-soft: #e8f5ee;
  --anrh: #80ba2e;
  --plum: #573656;
  --prune: #824a79;

  --bg: #ffffff;
  --bg-2: #f7f8f7;
  --bg-3: #eef2ef;
  --line: #e4e8e5;
  --line-strong: #c9d2cc;
  --text: #1a1f1c;
  --muted: #6b756f;
  --accent: var(--green);
  --radius: 8px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1180px;
  --topbar-h: 52px;

  /* aliases for older templates */
  --contrast: var(--plum);
  --ink: var(--text);
  --surface: var(--bg);
  --surface-2: var(--bg-2);
  --lilas: #f3eef3;
  --orange: #ed6e1c;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

html { background: #fbfcfb; }
body { background: transparent; }

.site-waves {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.site-wave {
  position: absolute;
  height: auto;
  overflow: visible;
}

.site-wave--a {
  width: 120vw;
  top: 22vh;
  left: -28vw;
  opacity: 0.07;
}

.site-wave--b {
  width: 62vw;
  right: -18vw;
  bottom: -8vh;
  opacity: 0.055;
}

.site-wave--c {
  width: 70vw;
  left: -10vw;
  bottom: -12vh;
  top: auto;
  opacity: 0.04;
}

img { max-width: 100%; display: block; }
a { color: var(--green-deep); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}

.skip-link {
  position: absolute;
  left: 10px;
  top: -40px;
  background: var(--green-deep);
  color: #fff;
  padding: 0.4rem 0.7rem;
  z-index: 100;
  border-radius: var(--radius);
}
.skip-link:focus { top: 10px; }

/* —— Topbar MyANRH-style —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--topbar-h);
  padding: 0 1.15rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  color: inherit;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-text {
  font-weight: 600;
  font-size: 0.925rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand:hover .brand-text { color: var(--green-deep); }

.workspace-switch {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding-right: 0.75rem;
  margin-right: 0.1rem;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
}

.workspace-switch a {
  color: var(--muted);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 500;
}

.workspace-switch a:hover {
  background: var(--green-soft);
  color: var(--green-deep);
}

.workspace-switch a.is-active {
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 650;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
  overflow: visible;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover {
  background: var(--bg-2);
  color: var(--text);
}

.nav-link.active {
  background: var(--bg-3);
  color: var(--text);
  font-weight: 650;
}

.nav-link--menu[aria-expanded="true"] {
  background: var(--bg-2);
  color: var(--text);
}

.nav-caret {
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.7;
  transition: transform 0.18s var(--ease, ease);
}

.nav-link--menu[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown {
  left: 0;
  right: auto;
  min-width: 220px;
  z-index: 60;
}

.nav-dropdown a {
  display: block;
  line-height: 1.25;
}

.nav-dropdown a strong {
  display: block;
  font-weight: 600;
  font-size: 0.84rem;
}

.nav-dropdown a small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.12rem;
  font-weight: 400;
}

.nav-dropdown a.is-active {
  background: var(--green-soft);
  color: var(--green-deep);
}

.nav-dropdown a.is-active small {
  color: rgba(30, 107, 72, 0.75);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  min-width: 0;
}

.global-search {
  position: relative;
  width: min(260px, 30vw);
}

.global-search-input {
  width: 100%;
  height: 34px;
  padding: 0 0.85rem 0 2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2390a09a' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='6.2' cy='6.2' r='4.2'/%3E%3Cpath d='M9.4 9.4 12 12'/%3E%3C/svg%3E")
      0.7rem 50% / 14px no-repeat,
    var(--bg-2);
  font-size: 0.82rem;
  outline: none;
}

.global-search-input:hover { background-color: #f2f4f3; }

.global-search-input:focus {
  border-color: rgba(47, 154, 106, 0.35);
  box-shadow: 0 0 0 3px rgba(47, 154, 106, 0.1);
  background-color: #fff;
}

.live-search {
  position: relative;
}

.live-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, 92vw);
  max-height: min(420px, 70vh);
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(228, 232, 229, 0.95);
  border-radius: 14px;
  box-shadow:
    0 4px 6px rgba(26, 31, 28, 0.03),
    0 18px 40px rgba(26, 31, 28, 0.1);
  /* Assure que le dropdown reste au-dessus des sections de la page */
  z-index: 999;
  padding: 0.4rem;
  backdrop-filter: blur(10px);
}

.live-search-results--wide {
  left: 0;
  right: 0;
  width: auto;
}

.live-search-results .search-group {
  padding: 0.35rem 0.15rem;
}

.live-search-results .search-group h4 {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.25rem 0.65rem 0.2rem;
  margin: 0;
}

.live-search-results .search-group a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: var(--text);
}

.live-search-results .search-group a:hover {
  background: var(--green-soft);
  color: var(--green-deep);
}

.live-search-results .search-group a small {
  color: var(--muted);
  font-size: 0.74rem;
}

.search-empty {
  padding: 0.85rem 0.7rem !important;
  margin: 0;
}

.live-search.is-open .global-search-input,
.live-search.is-open .command-search {
  border-color: rgba(47, 154, 106, 0.35);
  background-color: #fff;
}

.header-slot { position: relative; }

.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
}

.icon-btn:hover { background: var(--bg-2); color: var(--text); }
.icon-btn.ghost { color: #fff; background: rgba(255,255,255,0.14); }

.badge-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.15rem 0.45rem 0.15rem 0.15rem;
  cursor: pointer;
}

.user-chip:hover { background: var(--bg-2); }

.avatar,
.avatar.tone-bleu,
.avatar.tone-prune,
.avatar.tone-orange,
.avatar.tone-vert,
.avatar.tone-rose,
.avatar.tone-jaune {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: var(--plum);
  flex-shrink: 0;
}

.avatar.lg { width: 64px; height: 64px; font-size: 1.15rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.4rem; }

.user-name {
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--bg-2);
  border-radius: 8px;
  cursor: pointer;
  place-items: center;
  gap: 4px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--text);
}

/* —— Main content —— */
.main { min-height: calc(100vh - var(--topbar-h)); }

.page,
.content-inner,
.wrap,
.page.wrap {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 1.25rem 1.35rem 2.75rem;
}

.page:not(.serp-page) {
  background: #fbfcfb;
}

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

.greeting {
  margin: 0 0 0.15rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.page-intro h1 { font-size: 1.45rem; }

.lede {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 40rem;
}

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

/* Hero visuel intranet */
.hero-visual {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  min-height: 280px;
  margin-bottom: 1.15rem;
  border-radius: 18px;
  overflow: visible;
  background: #123d2a;
  box-shadow: 0 10px 30px rgba(26, 31, 28, 0.08);
}

.hero-visual-media {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  z-index: 0;
}

.hero-visual-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(18, 61, 42, 0.92) 0%, rgba(18, 61, 42, 0.72) 42%, rgba(18, 61, 42, 0.28) 100%),
    linear-gradient(180deg, transparent 40%, rgba(18, 61, 42, 0.35));
}

.hero-visual-content {
  position: relative;
  z-index: 1;
  grid-column: 1;
  padding: 1.75rem 1.6rem 1.5rem;
  color: #fff;
  max-width: 36rem;
}

body[data-page="home"] .page {
  padding: 40px 20px 72px 24px;
  min-height: 0;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: calc(100vh - var(--topbar-h));
}

.home-main {
  min-width: 0;
  padding: 1.6rem 2rem 2.25rem;
}

.home-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 0;
  padding: 1.1rem 0 0.4rem;
  text-align: left;
}

.home-stage--results {
  padding-top: 0.35rem;
}

.home-aurora {
  position: absolute;
  inset: -30% -8% -50% -12%;
  z-index: 0;
  pointer-events: none;
  filter: blur(46px);
  mask-image: radial-gradient(ellipse at 28% 42%, #000 18%, transparent 68%);
}

.home-aurora span {
  position: absolute;
  border-radius: 50%;
}

.home-aurora span:nth-child(1) {
  width: 280px;
  height: 280px;
  left: 6%;
  top: 8%;
  background: rgba(128, 186, 46, 0.42);
}

.home-aurora span:nth-child(2) {
  width: 240px;
  height: 240px;
  right: 4%;
  bottom: 0;
  background: rgba(87, 54, 86, 0.28);
}

.home-aurora span:nth-child(3) {
  width: 170px;
  height: 170px;
  left: 42%;
  top: 28%;
  background: rgba(47, 154, 106, 0.32);
}

.home-hello,
.home-mark,
.home-stage .command-search--web {
  position: relative;
  z-index: 1;
}

.home-hello {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.home-mark {
  margin-top: 0.35rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
}

.home-mark em {
  font-style: normal;
  color: var(--prune);
}

.home-stage--results .home-mark {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

/* Vignettes sites publics */
.site-strip {
  margin: 0 0 1.25rem;
}

.site-strip-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.site-strip-head h2 {
  font-size: 1.05rem;
  margin-top: 0.1rem;
}

.site-strip-head > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  max-width: 22rem;
  text-align: right;
}

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

.site-vignette {
  display: grid;
  grid-template-rows: 118px auto;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  min-height: 100%;
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.22s var(--ease);
}

.site-vignette:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 28px rgba(26, 31, 28, 0.08);
}

.site-vignette:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.site-vignette-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.site-vignette-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.45s var(--ease);
}

.site-vignette:hover .site-vignette-media > img {
  transform: scale(1.07);
}

.site-vignette-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-vignette--anrh .site-vignette-shade {
  background:
    linear-gradient(160deg, rgba(30, 107, 72, 0.55), rgba(87, 54, 86, 0.42)),
    linear-gradient(0deg, rgba(18, 61, 42, 0.35), transparent 55%);
}

.site-vignette--velos .site-vignette-shade {
  background:
    linear-gradient(160deg, rgba(37, 99, 140, 0.58), rgba(237, 110, 28, 0.28)),
    linear-gradient(0deg, rgba(20, 48, 72, 0.35), transparent 55%);
}

.site-vignette--plats .site-vignette-shade {
  background:
    linear-gradient(160deg, rgba(130, 74, 121, 0.5), rgba(237, 110, 28, 0.38)),
    linear-gradient(0deg, rgba(90, 40, 30, 0.32), transparent 55%);
}

.site-vignette-mark {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: 0 6px 16px rgba(18, 40, 30, 0.12);
}

.site-vignette--anrh .site-vignette-mark {
  background: #fff;
  padding: 0.28rem;
}

.site-mark-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-vignette--velos .site-vignette-mark {
  color: #25638c;
}

.site-vignette--plats .site-vignette-mark {
  color: var(--prune);
}

.site-vignette-body {
  display: grid;
  gap: 0.28rem;
  padding: 0.85rem 0.9rem 0.95rem;
}

.site-vignette-body strong {
  font-size: 0.95rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.site-vignette-body small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.site-vignette-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.site-vignette-domain {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-vignette-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--green-deep);
}

.site-vignette:hover .site-vignette-cta {
  color: var(--prune);
}

.hint-chip {
  border: 0;
  background: var(--bg-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
}

.hint-chip:hover {
  background: var(--green-soft);
  color: var(--green-deep);
}

.command-search {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.55rem 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}

.command-search--web {
  display: flex;
  align-items: center;
  width: min(720px, 100%);
  margin: 1.45rem 0 0;
  padding: 0.42rem 0.42rem 0.42rem 1.2rem;
  border: 1px solid rgba(26, 31, 28, 0.06);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  box-shadow:
    0 10px 30px rgba(26, 31, 28, 0.07),
    0 1px 2px rgba(26, 31, 28, 0.04);
}

.command-search--web > svg {
  flex: none;
  color: var(--green-deep);
}

.command-search--web input {
  flex: 1;
  color: var(--text);
  font-size: 1.08rem;
  padding: 0.95rem 0.6rem;
}

.command-search--web input::placeholder {
  color: var(--muted);
}

.command-search--web .btn {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.25rem;
  font-size: 0.92rem;
}

.home-news {
  margin-top: 1.25rem;
}

.web-serp {
  width: auto;
  margin: 10px 0 0;
}

.web-serp[hidden] { display: none; }

.web-serp-status {
  margin: 14px 0 0;
  color: #70757a;
  font-size: 14px;
}

.web-serp-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.web-serp-list li {
  padding: 0 0 26px;
}

.web-hit-skel {
  height: 68px;
  margin-bottom: 26px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f3f5f3 0%, #e7eeea 45%, #f3f5f3 100%);
  background-size: 200% 100%;
}

.web-hit-title {
  display: inline;
  color: var(--prune);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
}

.web-hit-title:hover { text-decoration: underline; }

.web-hit-url {
  margin-top: 2px;
  color: #188038;
  font-size: 14px;
  line-height: 1.3;
}

.web-hit-snippet {
  margin: 4px 0 0;
  color: #4d5156;
  font-size: 14px;
  line-height: 1.58;
}

.web-hit-title,
.web-hit-url,
.web-hit-snippet {
  overflow-wrap: anywhere;
}

.serp-news {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  column-gap: 16px;
  align-items: start;
}

.serp-news-thumb {
  display: block;
}

.serp-news-thumb img {
  width: 112px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f3f4;
}

.serp-pager {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 4px 0 28px;
}

.serp-pager[hidden] { display: none; }

.serp-pager button {
  border: 0;
  background: none;
  padding: 8px 2px;
  color: var(--green-deep);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.serp-pager button:hover { text-decoration: underline; }

.serp-pager button[hidden] { display: none; }

.serp-page {
  display: grid;
  grid-template-columns: minmax(0, 1172px) minmax(28px, 1fr) 320px;
  column-gap: 28px;
  align-items: start;
  align-content: start;
  padding: 18px 0 64px 12px;
}

.serp-stage {
  display: grid;
  grid-template-columns: 64px minmax(0, 1080px);
  column-gap: 28px;
  align-items: start;
  align-content: start;
  min-width: 0;
}

.serp-logo {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  height: 46px;
}

.serp-logo img {
  height: 48px;
  width: auto;
}

.serp-search {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 0 6px 0 16px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  background: #fff;
  box-shadow: none;
}

.serp-search:hover,
.serp-search:focus-within {
  border-color: transparent;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.18);
}

.serp-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  padding: 0 8px 0 0;
}

.serp-search input[type="search"]::-webkit-search-cancel-button { display: none; }

.serp-clear,
.serp-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
}

.serp-go { color: var(--green-deep); }
.serp-clear:hover,
.serp-go:hover { background: var(--green-soft); }

.serp-main {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  max-width: none;
  min-width: 0;
  background: transparent;
}

.serp-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-top: 8px;
  border-bottom: 1px solid #ebebeb;
}

.serp-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 16px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  color: #5f6368;
  font-size: 14px;
}

.serp-tab svg { flex: none; }

.serp-tab:hover { color: var(--text); }

.serp-tab.is-active {
  color: var(--green-deep);
  border-bottom-color: var(--green-deep);
}

.serp-hello {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 16px 14px 14px;
  background: linear-gradient(165deg, rgba(128, 186, 46, 0.16), rgba(87, 54, 86, 0.07) 58%, #fff 100%);
  border-bottom: 1px solid #f0eef1;
}

.serp-hello .avatar {
  width: 44px;
  height: 44px;
  font-size: 0.85rem;
}

.serp-hello-date {
  margin: 0;
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 600;
}

.serp-hello h2 {
  margin: 1px 0 0;
  color: var(--prune);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.serp-hello-role {
  margin: 4px 0 0;
  color: #202124;
  font-size: 12.5px;
  line-height: 1.35;
}

.serp-hello-meta {
  margin: 1px 0 0;
  color: #70757a;
  font-size: 12px;
  line-height: 1.35;
}

.serp-apps {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  width: 320px;
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
  max-height: calc(100vh - var(--topbar-h) - 28px);
  overflow: auto;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  padding: 0 0 8px;
}

.serp-apps-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 4px;
}

.serp-apps-head h2 {
  margin: 0;
  color: #202124;
  font-size: 14px;
  font-weight: 600;
}

.serp-apps-head a {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.serp-apps-head a:hover { text-decoration: underline; }

.serp-apps ul {
  list-style: none;
  margin: 0;
  padding: 0 8px 4px;
}

.serp-app {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px 6px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.serp-app:hover { background: var(--green-soft); }

.serp-app strong {
  display: block;
  color: #202124;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.serp-app span span {
  display: block;
  margin-top: 1px;
  color: #70757a;
  font-size: 12px;
  line-height: 1.3;
}

.serp-apps-empty {
  margin: 4px 6px 10px;
  color: #70757a;
  font-size: 13px;
}

.serp-empty {
  margin: 18px 0 0;
  color: #70757a;
  font-size: 14px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 12px;
  margin-top: 16px;
}

.photo-card {
  color: inherit;
  min-width: 0;
}

.photo-frame {
  position: relative;
}

.photo-open {
  display: block;
}

.photo-card img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f3f4;
}

.photo-download {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(32, 33, 36, 0.28);
}

.photo-download:hover {
  background: var(--green-deep);
  color: #fff;
}

.photo-card strong {
  display: block;
  margin-top: 6px;
  color: #202124;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.photo-card span {
  display: block;
  margin-top: 2px;
  color: #70757a;
  font-size: 12px;
  line-height: 1.35;
}

.home-rail {
  border-left: 1px solid var(--line);
  background: #f6f7f6;
  padding: 1.15rem 0.95rem 1.4rem;
  position: sticky;
  top: var(--topbar-h);
  z-index: 1;
  align-self: stretch;
  min-height: calc(100vh - var(--topbar-h));
  max-height: calc(100vh - var(--topbar-h));
  overflow: auto;
}

.home-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.home-rail-head h2 {
  font-size: 0.95rem;
}

.home-rail-head a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.home-rail-head a:hover { color: var(--green-deep); }

.home-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.home-news {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  padding: 0.4rem;
  border-radius: 12px;
  color: inherit;
}

.home-news:hover { background: #fff; }

.home-news img {
  width: 62px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
}

.home-news span {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.home-news strong {
  font-size: 0.82rem;
  line-height: 1.3;
  font-weight: 600;
}

.home-news time {
  color: var(--muted);
  font-size: 0.72rem;
}

.command-search input {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  min-width: 0;
}

.command-hints {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.panel-flush { padding: 0; overflow: hidden; }
.panel-head-pad { padding: 0.85rem 0.95rem 0.65rem; margin-bottom: 0; }

.news-mosaic {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.55rem;
  padding: 0 0.75rem 0.85rem;
}

.news-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  background: #1a1f1c;
}

.news-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease, ease);
}

.news-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(18, 30, 24, 0.88) 100%);
}

.news-tile:hover img { transform: scale(1.04); }

.news-tile-body {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.news-tile .tag {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(6px);
}

.news-tile strong {
  font-size: 0.95rem;
  line-height: 1.3;
}

.news-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  line-height: 1.4;
}

.news-tile time {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.74rem;
}

.news-tile--lead {
  grid-row: 1 / span 2;
  min-height: 320px;
}

.news-tile--lead strong {
  font-size: 1.2rem;
}

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

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

.shortcut-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  color: inherit;
}

.shortcut-card--visual {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: 1rem;
  background: #fff;
  align-content: start;
}

.shortcut-glow {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 185, 39, 0.22), transparent 70%);
  pointer-events: none;
}

.picto-lg {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.picto-lg svg {
  width: 22px;
  height: 22px;
}

.shortcut-cta {
  margin-top: auto;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--green-deep);
}

.shortcut-card strong { font-size: 0.9rem; }
.shortcut-card small { color: var(--muted); font-size: 0.74rem; }

.panel-soft {
  background: var(--green-soft);
  border-color: transparent;
}

.side-note {
  margin: 0;
  color: var(--green-deep);
  font-size: 0.84rem;
  line-height: 1.45;
}

.side-note strong {
  display: block;
  margin-bottom: 0.25rem;
}

.hints-label {
  font-size: 0.74rem;
  color: var(--muted);
  margin-right: 0.15rem;
}

.workspace-switch { display: none; }

.intranet {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.intranet-main,
.intranet-side { display: grid; gap: 1rem; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.7fr);
  gap: 0.9rem;
  align-items: start;
}

.workspace-main,
.workspace-side { display: grid; gap: 0.9rem; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.95rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.panel-head h2 { font-size: 0.9rem; }

.panel-head a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.panel-head a:hover { color: var(--green-deep); }

.app-list,
.task-list,
.news-list { display: grid; gap: 0.2rem; }

.app-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem;
  border-radius: 8px;
}

.app-row:hover { background: var(--bg-2); }

.app-row-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
  color: inherit;
}

.app-row-body {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.app-row-body strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.app-row-body small {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.45rem;
  border-radius: 8px;
  color: inherit;
  border-top: 1px solid var(--line);
}

.news-item:first-child { border-top: 0; }
.news-item:hover { background: var(--bg-2); }

.news-item-meta {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.news-item strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.news-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.5rem 0.35rem;
  border-radius: 8px;
  color: inherit;
}

.task-item:not(.static):hover { background: var(--bg-2); }

.task-item strong {
  display: block;
  font-size: 0.84rem;
}

.task-item small {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.task-count,
.task-date {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-deep);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.74rem;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.1;
  padding: 0.15rem;
}

/* Compat pages */
.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.page-kicker,
.section-label,
.eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-head h1 { font-size: 1.4rem; }
.page-head p { margin: 0.35rem 0 0; color: var(--muted); max-width: 40rem; }
.demo-note { font-size: 0.76rem; color: var(--muted); }

.section { margin: 0 0 1.5rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-head h2 { font-size: 1rem; }
.section-head.compact { margin-bottom: 0.6rem; }

.link-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.link-more:hover { color: var(--green-deep); }

.grid { display: grid; gap: 0.75rem; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 0.3rem; }
.home-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.75rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.search-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.search-field {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.35rem 0.25rem 0.75rem;
}

.search-field input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0.4rem 0;
}

select.filter-select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

table.data th {
  text-align: left;
  background: var(--bg-2);
  color: var(--muted);
  padding: 0.6rem 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

table.data td {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--line);
}

table.data tr:hover td { background: #fafbfa; }

.empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.signature { color: var(--prune); font-weight: 650; font-size: 0.72rem; }

@media (max-width: 1180px) {
  .serp-page,
  .serp-page:has([data-serp-panel="image"]:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }

  .serp-stage,
  .serp-page:has([data-serp-panel="image"]:not([hidden])) .serp-stage {
    grid-template-columns: 52px minmax(0, 1fr);
    width: 100%;
    max-width: 760px;
  }

  .serp-apps {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 760px;
    justify-self: stretch;
    position: static;
    max-height: none;
    margin-top: 22px;
  }
}

@media (max-width: 1100px) {
  .topbar {
    position: relative;
    gap: 0.55rem;
    padding: 0 0.75rem;
  }

  .nav-toggle { display: inline-flex; }

  .nav {
    display: none;
    position: absolute;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.45rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 40;
  }

  .nav.open { display: flex; }

  .nav-link { width: 100%; }

  .nav-dropdown {
    position: static;
    display: none;
    min-width: 0;
    margin: 0.15rem 0 0.35rem;
    padding: 0.25rem;
    box-shadow: none;
    border: 0;
    background: var(--green-soft);
  }

  .nav-dropdown.open { display: grid; }

  .global-search { width: min(180px, 28vw); }
}

@media (max-width: 980px) {
  .workspace,
  .intranet { grid-template-columns: 1fr; }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .user-name { display: none; }
  .hero-visual { grid-template-columns: 1fr; min-height: 320px; }
  .home-layout { grid-template-columns: 1fr; }
  body[data-page="home"] .page { padding: 28px 16px 48px; }
  .serp-apps { max-width: none; }
  .serp-search,
  .serp-main,
  .serp-page:has([data-serp-panel="image"]:not([hidden])) .serp-main {
    width: 100%;
    max-width: none;
  }
  .serp-tabs { overflow-x: auto; overflow-y: hidden; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-main { padding: 1.15rem 1rem 1.4rem; }
  .home-rail {
    position: static;
    min-height: 0;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .home-stage { padding-top: 0.4rem; }
  .command-search--web { padding-left: 0.85rem; }
  .command-search--web input { font-size: 0.95rem; }
  .command-search--web .btn { padding: 0.7rem 0.9rem; }
  .site-vignettes { grid-template-columns: 1fr 1fr; }
  .site-strip-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-strip-head > p { text-align: left; }
  .news-mosaic {
    grid-template-columns: 1fr 1fr;
  }
  .news-tile--lead {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 220px;
  }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    overflow: visible;
  }
  .nav.open { display: flex; }
  .nav-link {
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    width: 100%;
    justify-content: space-between;
  }
  .nav-item {
    width: 100%;
  }
  .nav-dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    min-width: 0;
    padding: 0 0 0.25rem 0.55rem;
    margin: 0 0 0.15rem;
    background: transparent;
  }
  .nav-dropdown.open {
    display: block;
  }
  .nav-dropdown a {
    padding: 0.5rem 0.7rem;
  }
  .global-search { width: min(160px, 42vw); }
  .grid-4, .grid-3, .grid-2, .home-split { grid-template-columns: 1fr; }
  .shortcut-grid,
  .shortcut-grid--visual,
  .news-mosaic,
  .site-vignettes { grid-template-columns: 1fr; }
  .page-intro { flex-direction: column; align-items: flex-start; }
  .page, .wrap, .page.wrap { padding-left: 0.9rem; padding-right: 0.9rem; }
  .topbar { position: relative; }
  .hero-visual-content { padding: 1.35rem 1.15rem 1.2rem; }
}

@media (max-width: 640px) {
  .brand-text { display: none; }
  .global-search { width: min(132px, 42vw); }

  .serp-stage,
  .serp-page:has([data-serp-panel="image"]:not([hidden])) .serp-stage {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  .serp-logo {
    grid-column: 1;
    grid-row: 1;
    height: 36px;
    justify-content: flex-start;
  }

  .serp-logo img { height: 32px; }

  .serp-search {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
  }

  .serp-main {
    grid-column: 1;
    grid-row: 3;
    max-width: none;
  }

  .serp-apps {
    grid-column: 1;
    max-width: none;
  }

  .serp-news { grid-template-columns: minmax(0, 1fr) 84px; }

  .serp-news-thumb img {
    width: 84px;
    height: 56px;
  }

  .photo-grid { grid-template-columns: 1fr 1fr; }
  .page-head h1 { font-size: 1.35rem; }
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login-card {
  width: min(420px, 100%);
  padding: 32px 28px 28px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(26, 31, 28, 0.06);
}

.login-logo { height: 48px; width: auto; }

.login-card h1 {
  margin: 14px 0 6px;
  font-size: 1.45rem;
  color: var(--prune);
}

.login-card p { margin: 0 0 16px; color: var(--muted); }

.login-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fbf4f4;
  color: #8a3030;
}

.login-card label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.84rem;
  font-weight: 650;
}

.login-card input[type="email"],
.login-card input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #dfe1e5;
  border-radius: 12px;
  font: inherit;
}

.login-card button[type="submit"] {
  width: 100%;
  height: 46px;
  margin-top: 18px;
  border: 0;
  border-radius: 12px;
  background: var(--green-deep);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.dropdown button.menu-action {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
}

.dropdown button.menu-action:hover {
  background: var(--green-soft);
  color: var(--green-deep);
}

.profile-form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.84rem;
  font-weight: 650;
}

.profile-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #dfe1e5;
  border-radius: 12px;
  font: inherit;
  background: #fff;
}

.profile-form .btn { margin-top: 14px; }

.profile-status {
  min-height: 1.2em;
  margin: 12px 0 0;
}

.profile-status.is-error { color: #8a3030; }
.profile-status.is-ok { color: var(--green-deep); }

.gov-card label,
.gov-inline {
  display: block;
  margin-top: 10px;
}

.gov-card input,
.gov-card select,
.gov-inline input,
.gov-inline select {
  width: 100%;
  height: 42px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid #dfe1e5;
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.gov-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gov-inline input,
.gov-inline select { margin-top: 0; }

.gov-actions { display: flex; gap: 8px; margin-top: 12px; }

.gov-scope {
  margin: 0 0 16px;
  padding: 14px 16px;
  list-style: none;
  background: #f7f8fa;
  border-radius: 12px;
}

.gov-scope li { margin: 4px 0; }

.gov-scope-title {
  margin-bottom: 8px;
  font-weight: 600;
}

.gov-step { margin: 0 0 16px; }

.gov-team { display: flex; flex-direction: column; gap: 12px; }

.gov-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gov-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
}

.gov-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0;
}

.gov-checks input {
  width: auto;
  height: auto;
  margin: 0;
}

.gov-perm-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(160px, 240px);
  gap: 10px;
  align-items: center;
}

.gov-perm-row select { margin-top: 0; }

.gov-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
}

.gov-sheet-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.gov-sheet-head-static { cursor: default; }

.gov-sheet-head strong,
.gov-row strong { display: block; }

.gov-sheet-body { padding: 0 16px 14px; }

.gov-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.gov-hint {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.gov-kicker {
  margin: 14px 0 4px;
  color: var(--muted);
}

.gov-empty { color: var(--muted); }

.gov-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.gov-access:first-child .gov-row { border-top: 0; }

.switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  margin: 0;
}

.switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 44px;
  height: 26px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d5dbd7;
  position: relative;
  transition: background .15s ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  transition: transform .15s ease;
}

.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.switch input:disabled { cursor: default; }
.switch input:disabled + .switch-ui { opacity: .75; }

.gov-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 8px;
}

.gov-pills label {
  position: relative;
  display: inline-flex;
  width: auto;
  margin: 0;
}

.gov-pills input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.gov-pills span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  cursor: pointer;
}

.gov-pills input:checked + span {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-deep);
  font-weight: 600;
}

.gov-pills input:focus-visible + span { outline: 2px solid var(--green-dark); outline-offset: 2px; }

.gov-rename,
.gov-pair label,
.gov-role label {
  display: block;
  margin-top: 10px;
}

.gov-rename input,
.gov-pair select,
.gov-role input,
.gov-add input {
  width: 100%;
  height: 40px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.gov-role {
  display: grid;
  grid-template-columns: minmax(140px, .7fr) minmax(180px, 1.2fr) minmax(220px, 1.6fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.gov-base {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.gov-add-member { grid-template-columns: auto repeat(4, minmax(0, 1fr)) auto auto; }

.gov-role label { margin-top: 0; }

.gov-add {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

.gov-add input { margin-top: 0; }

@media (max-width: 800px) {
  .gov-pair,
  .gov-role,
  .gov-add { grid-template-columns: 1fr; }
}

.adm-path,
.adm-rule {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.adm-path li,
.adm-rule li {
  margin: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.adm-path strong,
.adm-rule strong { display: block; }

.adm-path span,
.adm-rule span,
.adm-hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.adm-split {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.adm-nav,
.adm-stage {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.adm-nav { overflow: hidden; }

.adm-nav-list {
  max-height: calc(100vh - 240px);
  overflow: auto;
}

.adm-pick,
.adm-person-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.adm-pick strong,
.adm-person-row strong { display: block; }

.adm-pick span,
.adm-person-row .adm-hint { color: var(--muted); font-size: 13px; }

.adm-pick.is-on,
.adm-pick[aria-current="true"] {
  background: var(--green-soft);
  box-shadow: inset 3px 0 0 var(--green);
}

.adm-pick:hover,
.adm-person-row:hover { background: var(--bg-2); }

.adm-pick.is-on:hover { background: var(--green-soft); }

.adm-filter {
  display: block;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.adm-filter input,
.adm-create input,
.adm-create select,
.adm-stage input,
.adm-stage select {
  width: 100%;
  height: 40px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-weight: 400;
  color: var(--text);
}

.adm-create {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--bg-2);
}

.adm-create strong { font-size: 13px; }

.adm-create .btn { justify-self: start; }

.adm-stage { padding: 18px 20px 20px; }

.adm-stage h2 { font-size: 1.35rem; }

.adm-stage h3 {
  margin: 22px 0 10px;
  font-size: 0.95rem;
}

.adm-title { margin-bottom: 8px; }

.adm-title p {
  margin: 6px 0 0;
  max-width: 42rem;
  color: var(--muted);
}

.adm-mods,
.adm-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.adm-mod {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.adm-mod:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
}

.adm-mod strong { display: block; }

.adm-perms { display: grid; gap: 8px; }

.adm-perm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.adm-perm select { margin-top: 0; }

.adm-field { display: block; max-width: 360px; margin-top: 14px; font-weight: 650; }

.adm-fields label { display: block; font-weight: 650; }

.adm-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.adm-person h2 { margin: 0; }

.adm-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 700;
}

.adm-person-row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
}

.adm-people { margin-top: 4px; }

.adm-note,
.adm-empty {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--muted);
}

.adm-note { background: var(--green-soft); color: var(--green-deep); }

.adm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.adm-quiet {
  margin-top: 8px;
  padding-top: 4px;
}

.adm-lock {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 650;
}

.adm-danger { color: #8a3030; }

.adm-rule { margin-top: 14px; }

@media (max-width: 800px) {
  .adm-path,
  .adm-rule,
  .adm-split,
  .adm-mods,
  .adm-fields,
  .adm-perm { grid-template-columns: 1fr; }
  .adm-nav-list { max-height: 240px; }
}
