:root {
  --bg-dark: #2c1919;
  --bg-soft: #432222;
  --accent: #7b3a3a;
  --accent-strong: #9f5b57;
  --panel: rgba(255,255,255,0.05);
  --panel-strong: rgba(255,255,255,0.08);
  --light: #d8b0ae;
  --ivory: #f4e6e6;
  --text: #f8f0ee;
  --text-muted: #c9b3b0;
}

html {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(167,106,101,0.35) 0%, rgba(167,106,101,0) 32%),
    radial-gradient(circle at right 20%, rgba(123,58,58,0.28) 0%, rgba(123,58,58,0) 26%),
    linear-gradient(135deg, #1b0f0f 0%, var(--bg-dark) 38%, #120a0a 100%);
  color: var(--text);
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
  pointer-events: none;
}

.page {
  width: 100%;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(96,49,49,0.18), rgba(96,49,49,0) 22%),
    linear-gradient(180deg, rgba(67,34,34,0.98), rgba(28,14,14,0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.08), transparent 22%, transparent 78%, rgba(255,255,255,0.04));
  pointer-events: none;
}

.hero,
.document-hero {
  display: grid;
  position: relative;
  align-items: center;
}

.hero {
  grid-template-columns: minmax(0, 1.5fr) minmax(130px, 0.4fr);
  gap: 36px;
  padding: 34px 106px 18px;
}

.hero::before,
.document-hero::after {
  content: "";
  position: absolute;
  left: 106px;
  right: 106px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04), transparent);
  pointer-events: none;
}

.hero::before {
  bottom: 10px;
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 28px;
  padding: 22px;
  position: relative;
  min-height: 160px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 22px 40px rgba(0,0,0,0.22);
  justify-self: end;
  width: 100%;
  max-width: 240px;
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
}

.hero-image::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(176,106,59,0.32), rgba(176,106,59,0));
  filter: blur(10px);
  pointer-events: none;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.35));
  animation: floatLogo 6s ease-in-out infinite;
}

.hero-copy,
.document-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.hero-copy small,
.document-hero-copy small {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero-copy small {
  letter-spacing: 0.24em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.hero-copy h1,
.document-hero-copy h1 {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.02;
  color: #f0cfc7;
  text-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  max-width: 8ch;
  letter-spacing: 0.02em;
}

.hero-copy p,
.document-hero-copy p {
  color: var(--text-muted);
  line-height: 1.65;
  padding: 10px 14px;
  border-left: 3px solid rgba(176,106,59,0.58);
  border-radius: 0 16px 16px 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

.hero-copy p {
  max-width: 520px;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.hero-actions,
.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 2px;
}

:is(.hero-pill, .calculator-header small, .calculator-reset-button, .result-title-chip, .gallery-section-tag) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-nav-actions {
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  margin-bottom: 2px;
  padding: 7px 9px;
  gap: 18px;
  border-radius: 18px;
  border: 1px solid rgba(216,176,174,0.16);
  background:
    radial-gradient(circle at top, rgba(167,106,101,0.14), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012)),
    rgba(27,14,14,0.92);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 0 0 1px rgba(255,255,255,0.02),
    0 18px 34px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
}

.hero-nav-actions .hero-pill {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  border-width: 1px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.045),
    inset 0 -1px 0 rgba(0,0,0,0.12);
}

.hero-nav-actions .hero-pill + .hero-pill {
  position: relative;
  margin-left: 0;
}

.hero-nav-actions .hero-pill + .hero-pill::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 1px;
  height: 18px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}

.hero-nav-actions .hero-pill-primary {
  background: linear-gradient(180deg, rgba(163,96,67,0.38), rgba(97,36,36,0.26));
  border-color: rgba(212,151,118,0.32);
  color: #fff1eb;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    inset 0 -1px 0 rgba(0,0,0,0.12),
    0 10px 20px rgba(0,0,0,0.14);
}

.hero-nav-actions .hero-pill-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border-color: rgba(255,255,255,0.1);
  color: rgba(246,235,231,0.92);
}

.hero-nav-actions .hero-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(227,188,168,0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.12),
    0 12px 22px rgba(0,0,0,0.16);
}

.hero-side .hero-actions {
  justify-content: center;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.hero-side .hero-image {
  width: 240px;
  max-width: 240px;
}

.hero-side .hero-pill {
  min-height: 32px;
  padding: 6px 14px;
  font-size: 0.68rem;
}

.hero-pill {
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--ivory);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.hero-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.24);
}

.hero-pill-primary {
  background: linear-gradient(180deg, rgba(176,106,59,0.3), rgba(123,58,58,0.22));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 24px rgba(0,0,0,0.16);
}

.hero-pill-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  color: var(--text);
}

.hero-pill-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
}

.hero-pill:focus-visible {
  outline: 2px solid rgba(255,255,255,0.24);
  outline-offset: 2px;
}

.document-page {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.gallery-page {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.document-hero {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 560px);
  gap: 26px;
  padding: 18px 56px 20px;
}

.document-hero::after {
  bottom: 0;
}

.document-hero-copy small {
  letter-spacing: 0.18em;
}

.document-hero-copy h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.document-hero-copy p {
  max-width: 700px;
}

.document-hero-update {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-top: 2px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(123,58,58,0.1));
  color: rgba(244,230,230,0.84);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-hero-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.document-page .document-hero-copy p {
  max-width: none;
  white-space: nowrap;
}

.amendes-page .document-hero-copy p {
  white-space: normal;
}

.gallery-page .document-hero-copy p {
  max-width: none;
  white-space: nowrap;
}

.document-actions {
  justify-content: flex-end;
}

.hero-side,
.document-hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-self: end;
}

.hero-side {
  align-items: center;
}

.document-hero-side {
  align-items: flex-end;
  width: 100%;
  max-width: 560px;
}

.document-hero-side .hero-image {
  width: 240px;
  max-width: 240px;
  align-self: flex-end;
}

.document-hero-side .document-actions {
  width: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-self: flex-end;
}

.document-hero-side .hero-pill {
  white-space: nowrap;
  flex: 0 0 auto;
}

.gallery-hero-side {
  align-items: flex-end;
}

.gallery-hero-side .document-actions {
  width: 240px;
  max-width: 240px;
  justify-content: center;
  align-self: flex-end;
}

.amendes-page .document-hero-side .document-actions {
  width: 240px;
  max-width: 240px;
  justify-content: center;
  align-self: flex-end;
}

.lois-page .document-hero-side .document-actions {
  width: 240px;
  max-width: 240px;
  justify-content: center;
  align-self: flex-end;
}

.document-viewer-shell {
  margin: 24px 56px 28px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.045));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 24px 60px rgba(0,0,0,0.24);
}

.gallery-browser {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(430px, 560px) minmax(0, 860px);
  gap: 48px;
  justify-content: center;
  align-items: start;
}

.gallery-sidebar {
  display: grid;
  gap: 10px;
  align-content: start;
}

.home-focus-shell {
  margin: 20px 176px 28px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.045));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 24px 60px rgba(0,0,0,0.24);
}

.home-focus {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(460px, 0.98fr);
  gap: 42px;
  align-items: center;
}

.home-focus-top {
  align-items: start;
}

.home-focus-top .home-focus-copy {
  gap: 16px;
}

.home-focus-top .home-focus-copy > p:not(.home-focus-note) {
  line-height: 1.82;
}

.home-focus-copy {
  display: grid;
  gap: 12px;
  align-content: center;
}

.home-focus-copy small {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(166,45,45,0.3), rgba(86,23,23,0.14));
  color: #ffe7e1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-focus-copy .home-focus-tag-government {
  color: #eaded9;
  border-color: rgba(172,146,146,0.26);
  background: linear-gradient(180deg, rgba(130,94,94,0.18), rgba(58,33,33,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.home-focus-copy h2 {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.5rem, 2.1vw, 2.2rem);
  line-height: 1.14;
  color: #f3d6ce;
  letter-spacing: 0.02em;
  text-shadow: 0 8px 22px rgba(0,0,0,0.22);
}

.home-focus-copy > p:not(.home-focus-note) {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  padding: 6px 0 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
}

.home-focus-note {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  padding: 6px 12px;
  max-width: none;
  border-left: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(67,34,34,0.18));
  color: rgba(244,230,230,0.92);
  font-size: 0.76rem;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.home-focus-note-alert {
  color: #fff3f1;
  border-color: rgba(174,56,56,0.5);
  background: linear-gradient(180deg, rgba(138,26,26,0.56), rgba(86,12,12,0.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 22px rgba(0,0,0,0.18);
}

.home-focus-note-update {
  color: #fff3f1;
  border-color: rgba(174,56,56,0.5);
  background: linear-gradient(180deg, rgba(138,26,26,0.56), rgba(86,12,12,0.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 22px rgba(0,0,0,0.18);
}

.home-focus-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(216,176,174,0.18);
  background:
    radial-gradient(circle at top, rgba(167,106,101,0.18), transparent 52%),
    linear-gradient(180deg, rgba(74,38,38,0.92), rgba(37,19,19,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 18px 38px rgba(0,0,0,0.18);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-focus-media:hover {
  transform: translateY(-2px);
  border-color: rgba(216,176,174,0.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 24px 46px rgba(0,0,0,0.22);
}

.home-focus-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 820px;
  border-radius: 18px;
  display: block;
}

.home-focus-media-contained {
  width: fit-content;
  max-width: 100%;
  justify-self: center;
}

.home-focus-media-contained img {
  width: auto;
  max-width: 100%;
  max-height: 940px;
  object-fit: contain;
}

.home-news-shell {
  margin: 20px 206px 28px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.045));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 24px 60px rgba(0,0,0,0.24);
}

.home-news-list {
  display: grid;
  gap: 16px;
}

.home-flash-card {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 420px);
  gap: 22px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
    rgba(26,13,13,0.78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.045),
    0 18px 34px rgba(0,0,0,0.16);
  position: relative;
  overflow: hidden;
}

.home-flash-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: rgba(216,176,174,0.28);
}

.home-flash-card-mandatory::before {
  background: linear-gradient(180deg, rgba(205,86,86,0.9), rgba(116,27,27,0.88));
}

.home-flash-card-mandatory .home-flash-media img {
  transform: scale(1.02);
}

.home-flash-card-government::before {
  background: linear-gradient(180deg, rgba(176,138,106,0.82), rgba(109,79,60,0.84));
}

.home-flash-copy {
  display: grid;
  gap: 7px;
  align-content: start;
  padding-left: 10px;
}

.home-flash-tag {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  color: #f6ebe7;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.home-flash-tag-mandatory {
  border-color: rgba(205,86,86,0.34);
  background: linear-gradient(180deg, rgba(166,45,45,0.3), rgba(86,23,23,0.14));
}

.home-flash-tag-government {
  border-color: rgba(172,146,146,0.24);
  background: linear-gradient(180deg, rgba(130,94,94,0.18), rgba(58,33,33,0.08));
}

.home-flash-copy h2 {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.16rem, 1.6vw, 1.5rem);
  line-height: 1.12;
  color: #efd7d1;
  letter-spacing: 0.02em;
  text-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.home-flash-copy > p {
  color: var(--text-muted);
  font-size: 0.87rem;
  line-height: 1.65;
}

.home-flash-note {
  display: inline-flex;
  width: fit-content;
  min-height: 27px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(67,34,34,0.14));
  color: rgba(244,230,230,0.9);
  font-size: 0.68rem;
  font-style: italic;
  letter-spacing: 0.05em;
}

.home-flash-note-live {
  border-color: rgba(214,143,92,0.36);
  background: linear-gradient(180deg, rgba(138,64,42,0.68), rgba(89,32,20,0.82));
  color: #fff0ea;
}

.home-flash-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  min-height: 190px;
  padding: 12px 14px 14px;
  border-radius: 20px;
  border: 1px solid rgba(216,176,174,0.16);
  background:
    radial-gradient(circle at top, rgba(167,106,101,0.16), transparent 52%),
    linear-gradient(180deg, rgba(74,38,38,0.9), rgba(37,19,19,0.95));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 16px 32px rgba(0,0,0,0.16);
  overflow: hidden;
  position: relative;
}

.home-flash-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.22s ease, filter 0.22s ease;
  transform: scale(1.08);
}

.home-flash-media-contained {
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
}

.home-flash-media-contained img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-flash-media-link {
  text-decoration: none;
}

.home-flash-media-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(21,10,10,0.12), rgba(21,10,10,0.02) 26%, rgba(21,10,10,0.18) 100%),
    linear-gradient(90deg, rgba(21,10,10,0.16), transparent 16%, transparent 84%, rgba(21,10,10,0.16));
  transition: background-color 0.22s ease, opacity 0.22s ease;
  pointer-events: none;
}

.home-flash-media-overlay {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18,9,9,0.72);
  color: #fff1ec;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
  pointer-events: none;
  white-space: nowrap;
}

.home-flash-media-link:hover img,
.home-flash-media-link:focus-visible img {
  transform: scale(1.12);
  filter: saturate(1.04);
}

.home-flash-card-mandatory .home-flash-media-link:hover img,
.home-flash-card-mandatory .home-flash-media-link:focus-visible img {
  transform: scale(1.06);
}

.home-flash-media-link:hover::before,
.home-flash-media-link:focus-visible::before {
  background:
    linear-gradient(180deg, rgba(21,10,10,0.2), rgba(21,10,10,0.04) 26%, rgba(21,10,10,0.28) 100%),
    linear-gradient(90deg, rgba(21,10,10,0.2), transparent 16%, transparent 84%, rgba(21,10,10,0.2));
}

.home-flash-media-link:hover .home-flash-media-overlay,
.home-flash-media-link:focus-visible .home-flash-media-overlay {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.home-flash-media-link:focus-visible {
  outline: 2px solid rgba(214,143,92,0.36);
  outline-offset: 3px;
}

.gallery-section-tag {
  width: fit-content;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
  color: var(--text-muted);
  font-size: 1.02rem;
  letter-spacing: 0.12em;
}

:is(.document-toolbar, .gallery-menu) {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(216,176,174,0.14);
  background:
    radial-gradient(circle at top, rgba(167,106,101,0.09), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.008)),
    rgba(23,11,11,0.94);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 0 0 1px rgba(255,255,255,0.015),
    0 20px 42px rgba(0,0,0,0.18);
  width: 100%;
  height: fit-content;
  align-self: start;
  backdrop-filter: blur(10px);
}

.gallery-menu {
  margin-top: 0;
  min-width: 430px;
  max-width: 560px;
}

.gallery-menu-update {
  margin-top: 0;
  margin-bottom: 12px;
  justify-self: start;
}

.gallery-menu-update-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gallery-menu-update-live::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f0bf8c;
  box-shadow: 0 0 0 0 rgba(240,191,140,0.7);
  animation: homeFocusPulse 1.4s ease-out infinite;
}

.gallery-menu-group {
  --gallery-item-hover-bg: rgba(176,106,59,0.12);
  --gallery-item-hover-border: rgba(176,106,59,0.22);
  --gallery-item-active-bg: rgba(176,106,59,0.16);
  --gallery-item-active-border: rgba(176,106,59,0.3);
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.07);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
    rgba(255,255,255,0.015);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.gallery-menu-group[aria-labelledby="gallery-presidence"] {
  --gallery-item-hover-bg: rgba(214,143,92,0.16);
  --gallery-item-hover-border: rgba(214,143,92,0.3);
  --gallery-item-active-bg: rgba(214,143,92,0.22);
  --gallery-item-active-border: rgba(214,143,92,0.42);
}

.gallery-menu-group[aria-labelledby="gallery-mandatory"] {
  --gallery-item-hover-bg: rgba(166,45,45,0.18);
  --gallery-item-hover-border: rgba(205,86,86,0.3);
  --gallery-item-active-bg: rgba(166,45,45,0.24);
  --gallery-item-active-border: rgba(205,86,86,0.4);
}

.gallery-menu-group[aria-labelledby="gallery-gouvernement"] {
  --gallery-item-hover-bg: rgba(130,94,94,0.16);
  --gallery-item-hover-border: rgba(172,146,146,0.24);
  --gallery-item-active-bg: rgba(130,94,94,0.22);
  --gallery-item-active-border: rgba(172,146,146,0.32);
}

.gallery-section-tag {
  width: fit-content;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  color: #f5e8e4;
  font-size: 0.62rem;
  letter-spacing: 0.17em;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.gallery-section-tag-presidence {
  color: #fff2e2;
  border-color: rgba(214,143,92,0.42);
  background: linear-gradient(180deg, rgba(214,143,92,0.34), rgba(128,74,38,0.2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.gallery-section-tag-government {
  color: #eaded9;
  border-color: rgba(172,146,146,0.26);
  background: linear-gradient(180deg, rgba(130,94,94,0.18), rgba(58,33,33,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.gallery-section-tag-mandatory {
  color: #ffe7e1;
  border-color: rgba(205,86,86,0.36);
  background: linear-gradient(180deg, rgba(166,45,45,0.3), rgba(86,23,23,0.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}

.gallery-menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: 4px 10px;
  padding: 10px 12px 10px 14px;
  text-align: left;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 2px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)),
    rgba(255,255,255,0.02);
  color: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.gallery-menu-item:hover,
.gallery-menu-item:focus-visible {
  background: var(--gallery-item-hover-bg);
  border-color: var(--gallery-item-hover-border);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 8px 18px rgba(0,0,0,0.1);
  transform: translateX(2px);
  outline: none;
}

.gallery-menu-item.is-active {
  border-left-color: var(--gallery-item-active-border);
  border-color: var(--gallery-item-active-border);
  background: var(--gallery-item-active-bg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 22px rgba(0,0,0,0.12);
}

.gallery-menu-item-title {
  color: var(--ivory);
  grid-column: 1;
  align-self: center;
  font-size: 0.76rem;
  font-weight: 640;
  line-height: 1.3;
  letter-spacing: 0.01em;
  min-width: 0;
  padding-right: 4px;
  white-space: nowrap;
}

.gallery-menu-item-meta {
  grid-column: 2;
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.045);
  color: rgba(231,214,210,0.82);
  font-size: 0.49rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
}


.gallery-preview {
  display: grid;
  gap: 20px;
  align-content: start;
  justify-items: center;
  width: 100%;
}

.gallery-preview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 860px;
}

.gallery-preview-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.gallery-preview-copy .gallery-section-tag {
  width: fit-content;
  min-width: 180px;
}

.gallery-preview-copy .gallery-section-tag[hidden] {
  display: none;
}

.gallery-preview-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 520px;
  margin-top: 24px;
  padding: 22px 26px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  text-align: center;
}

.gallery-preview-empty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(123,58,58,0.12));
  color: #f0dedb;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-preview-empty-title {
  color: var(--ivory);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.2;
}

.gallery-preview-empty-text {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

.gallery-preview-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(67,34,34,0.18));
  color: rgba(244,230,230,0.92);
  font-size: 0.74rem;
  font-style: italic;
  letter-spacing: 0.03em;
  text-align: center;
  align-self: center;
}

.gallery-preview-note[hidden] {
  display: none;
}

.gallery-preview-stage[hidden],
.gallery-preview-empty[hidden] {
  display: none;
}

.document-frame,
.gallery-preview-stage {
  border: 1px solid rgba(216,176,174,0.18);
  background:
    radial-gradient(circle at top, rgba(167,106,101,0.18), transparent 52%),
    linear-gradient(180deg, rgba(74,38,38,0.92), rgba(37,19,19,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 18px 38px rgba(0,0,0,0.18);
}

.gallery-preview-stage {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  max-width: min(960px, 100%);
  min-height: 0;
  padding: 18px;
  border-radius: 20px;
  overflow: hidden;
  justify-self: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-preview-stage img {
  width: auto;
  max-width: 100%;
  max-height: 1040px;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    0 18px 34px rgba(0,0,0,0.24),
    0 0 0 1px rgba(255,255,255,0.04);
}

.gallery-preview-stage:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 22px 42px rgba(0,0,0,0.22);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.document-viewer-header {
  display: grid;
  grid-template-columns: minmax(420px, 540px) minmax(0, 860px);
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
  padding-bottom: 14px;
  position: relative;
  text-align: center;
}

.document-viewer-heading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 10px;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  margin: 0;
}

.document-viewer-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 680px);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}

.document-viewer-badge,
.document-viewer-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.document-viewer-badge {
  color: #fae6da;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(176,106,59,0.42), rgba(112,63,28,0.84));
  border-color: rgba(176,106,59,0.48);
}

.document-viewer-title {
  color: var(--ivory);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: none;
  text-shadow: 0 8px 24px rgba(0,0,0,0.24);
}

.document-viewer-download {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  white-space: nowrap;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.amendes-shell .document-viewer-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  width: auto;
}

.amendes-shell .document-viewer-badge {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
 }

.amendes-update {
  flex-basis: 100%;
  justify-self: center;
  margin-top: 6px;
}

.amendes-update-live {
  gap: 8px;
}

.amendes-update-live::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f0bf8c;
  box-shadow: 0 0 0 0 rgba(240,191,140,0.7);
  animation: homeFocusPulse 1.4s ease-out infinite;
}

.home-focus-header {
  margin: 4px 306px 8px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  width: auto;
}

.home-focus-last-update {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(244,230,230,0.8);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.home-focus-last-update-live {
  gap: 8px;
}

.home-focus-last-update-live::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f0bf8c;
  box-shadow: 0 0 0 0 rgba(240,191,140,0.7);
  animation: homeFocusPulse 1.4s ease-out infinite;
}

.home-focus-badge-live {
  position: relative;
  gap: 8px;
  min-height: 26px;
  padding: 4px 10px 4px 9px;
  color: #fff1ec;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  background: linear-gradient(180deg, rgba(156,77,52,0.92), rgba(106,47,32,0.96));
  border-color: rgba(214,143,92,0.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 10px 24px rgba(0,0,0,0.18);
}

.home-focus-badge-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f0bf8c;
  box-shadow: 0 0 0 0 rgba(240,191,140,0.7);
  animation: homeFocusPulse 1.4s ease-out infinite;
}

@keyframes homeFocusPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(240,191,140,0.62);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(240,191,140,0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(125,255,154,0);
  }
}

.document-toolbar {
  grid-template-columns: 1fr;
  align-content: start;
  min-width: 420px;
  max-width: 540px;
  align-self: start;
  position: sticky;
  top: 16px;
  z-index: 6;
}

:is(.document-toolbar-group, .gallery-menu-group) {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.document-toolbar-group {
  width: 100%;
}

.document-toolbar-group-amendments {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.document-toolbar-group-toggle {
  list-style: none;
  position: relative;
  cursor: pointer;
  width: 100%;
  padding: 13px 40px 13px 14px;
  color: #f3e7e4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  transition: background-color 0.16s ease, color 0.16s ease;
}

.document-toolbar-group-toggle::-webkit-details-marker {
  display: none;
}

.document-toolbar-group-toggle::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(244,230,230,0.72);
  font-size: 1rem;
  font-weight: 700;
}

.document-toolbar-group-amendments[open] .document-toolbar-group-toggle::after {
  content: "−";
}

.document-toolbar-group-toggle:hover {
  background: linear-gradient(180deg, rgba(176,106,59,0.14), rgba(255,255,255,0.03));
}

.document-toolbar-group-display {
  gap: 6px;
  padding: 10px 14px;
}

.document-display-row {
  display: grid;
  grid-template-columns: auto minmax(0, 108px);
  align-items: center;
  gap: 10px;
}

.document-toolbar-pair {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.document-toolbar-group-search {
  min-width: 0;
}

.document-toolbar-group-search.is-search-active {
  border-color: rgba(214,143,92,0.22);
  background:
    linear-gradient(180deg, rgba(176,106,59,0.08), rgba(255,255,255,0.03)),
    rgba(43,23,23,0.96);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 14px 28px rgba(0,0,0,0.14);
}

.document-outline {
  width: 100%;
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.document-toolbar-group-amendments .document-outline {
  margin-top: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.document-outline-heading,
.document-toolbar-label,
.document-toolbar-status,
.gallery-menu-item-meta {
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.document-outline-heading,
.gallery-menu-item-meta {
  font-size: 0.64rem;
}

.document-outline-empty {
  color: rgba(201,179,176,0.82);
  font-size: 0.72rem;
  line-height: 1.4;
}

.document-outline-group {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  overflow: hidden;
}

.document-outline-group-summary {
  list-style: none;
  position: relative;
  cursor: pointer;
  padding: 11px 36px 11px 12px;
  color: #f4e8e5;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: normal;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  transition: background-color 0.16s ease, color 0.16s ease;
}

.document-outline-summary-amendment {
  color: #d7a279;
  white-space: normal;
  overflow-wrap: anywhere;
}

.document-outline-summary-separator {
  color: rgba(244,232,229,0.48);
}

.document-outline-summary-title {
  color: #f4e8e5;
  overflow-wrap: anywhere;
}

.document-outline-summary-count {
  color: rgba(244,232,229,0.62);
}

.document-outline-group-summary::-webkit-details-marker {
  display: none;
}

.document-outline-group-summary::after {
  content: "+";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(244,230,230,0.72);
  font-size: 1rem;
  font-weight: 700;
}

.document-outline-group[open] .document-outline-group-summary::after {
  content: "−";
}

.document-outline-group-summary:hover {
  background: linear-gradient(180deg, rgba(176,106,59,0.14), rgba(255,255,255,0.03));
}

.document-outline-group-list {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.document-outline-item {
  width: 100%;
  display: block;
  padding: 8px 10px 8px calc(10px + (var(--outline-depth, 0) * 14px));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: #f2e5e1;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.document-outline-item-amendment {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.02);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.document-outline-item-amendment-label {
  color: #d7a279;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.document-outline-item-amendment-meta {
  color: rgba(233,217,213,0.7);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.document-outline-item:hover {
  background: rgba(176,106,59,0.12);
  border-color: rgba(176,106,59,0.22);
  transform: translateX(2px);
}

.document-outline-item.is-active {
  background: linear-gradient(180deg, rgba(176,106,59,0.18), rgba(123,58,58,0.14));
  border-color: rgba(214,143,92,0.34);
  color: #fff3ee;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.document-outline-item-amendment.is-active .document-outline-item-amendment-label {
  color: #fff0e7;
}

.document-outline-item-amendment.is-active .document-outline-item-amendment-meta {
  color: rgba(255,241,234,0.78);
}

.document-outline-item:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.document-toolbar-label,
.document-toolbar-status {
  font-size: 0.66rem;
}

.document-toolbar-group-display .document-toolbar-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.document-toolbar-section {
  width: 100%;
  display: inline-flex;
  align-items: center;
  margin-bottom: 2px;
  padding-bottom: 8px;
  color: #f3e7e4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.document-search-input,
.document-zoom-select,
.document-tool-button {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  outline: none;
}

.document-search-input,
.document-zoom-select {
  background: rgba(12,6,6,0.26);
  color: #fff7f4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.document-search-input {
  width: 100%;
  min-width: 0;
  padding: 0 16px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.document-search-input::placeholder {
  color: rgba(201,179,176,0.76);
}

.document-zoom-select {
  padding: 0 12px;
  min-width: 112px;
  text-align: left;
  font-weight: 600;
}

.document-toolbar-group-display .document-zoom-select {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.74rem;
  border-radius: 10px;
}

.document-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: rgba(176,106,59,0.14);
  color: #fff7f4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.document-tool-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.18);
  background: rgba(176,106,59,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.document-tool-button-subtle {
  background: rgba(255,255,255,0.05);
  color: #eadad6;
}

.document-search-input:focus,
.document-zoom-select:focus,
.document-tool-button:focus-visible {
  border-color: rgba(214,143,92,0.4);
  box-shadow: 0 0 0 3px rgba(176,106,59,0.12);
}

.document-zoom-select option {
  background: #241515;
  color: var(--ivory);
}

.document-stage {
  display: grid;
  grid-template-columns: minmax(420px, 540px) minmax(0, 860px);
  align-items: start;
  gap: 48px;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.document-preview {
  display: grid;
  align-content: start;
  justify-items: center;
  align-self: start;
  margin-top: 0;
  width: 100%;
}

.document-toolbar {
  width: min(100%, 540px);
  justify-self: end;
  align-self: start;
  position: sticky;
  top: 16px;
}

.document-toolbar.is-fixed {
  position: sticky;
  top: 16px;
  z-index: 1;
}

.document-toolbar-placeholder {
  display: none;
}

.document-toolbar-placeholder[hidden] {
  display: none;
}

#search-status,
#page-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  color: #f0dfdb;
}

#search-status,
.document-toolbar-group-page #page-status {
  width: 100%;
  justify-content: center;
}

.document-frame {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: auto;
  min-height: 640px;
  border-radius: 20px;
  display: block;
  margin: 0 auto;
  overflow: hidden;
  padding: 0;
  justify-self: center;
}

.pdfjs-viewer-container {
  position: absolute;
  inset: 16px 14px 14px 14px;
  overflow: hidden;
  border-radius: 16px;
}

.pdfjs-viewer-container[hidden] {
  display: none;
}

.pdf-native-frame,
.pdf-fallback-frame {
  position: absolute;
  inset: 16px 14px 14px 14px;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
  border-radius: 16px;
}

.pdf-native-frame[hidden] {
  display: none;
}

.pdfjs-viewer-container .pdfViewer {
  padding-bottom: 14px;
}

.pdfjs-viewer-container .pdfViewer .page {
  margin: 0 auto 16px !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.pdfjs-viewer-container .textLayer .highlight {
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(176,106,59,0.3) !important;
  border-radius: 2px;
  box-shadow: none;
}

.pdfjs-viewer-container .textLayer .highlight.selected {
  background: rgba(159,91,87,0.3) !important;
  border-radius: 2px;
  box-shadow: none;
}

.pdfjs-viewer-container .textLayer .highlight.begin {
  border-radius: 2px 0 0 2px;
}

.pdfjs-viewer-container .textLayer .highlight.end {
  border-radius: 0 2px 2px 0;
}

.pdfjs-viewer-container .textLayer .highlight.middle {
  border-radius: 0;
}

.pdfjs-viewer-container .textLayer .article-search-hit {
  background: rgba(176,106,59,0.34) !important;
  box-shadow: inset 0 0 0 1px rgba(214,143,92,0.26);
  border-radius: 2px;
}

.pdfjs-viewer-container .pdfViewer .page .article-search-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  border-radius: 4px;
  background: rgba(176,106,59,0.26);
  box-shadow: inset 0 0 0 1px rgba(214,143,92,0.34);
}

.document-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 28px 28px 16px;
  }

  .hero-image {
    min-height: 180px;
    justify-self: center;
    max-width: 220px;
  }

  .hero-side {
    align-items: center;
  }

  .document-hero {
    grid-template-columns: 1fr;
    padding: 18px 28px 18px;
  }

  .document-page .document-hero-copy p {
    white-space: normal;
  }

  .document-hero::after {
    left: 28px;
    right: 28px;
  }

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

  .document-hero-side {
    justify-self: center;
    align-items: center;
  }


  .document-hero-side .hero-image {
    align-self: center;
  }

  .document-hero-side .document-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .document-hero-meta {
    flex-direction: column;
    justify-content: center;
  }

  .document-viewer-shell {
    margin: 20px 28px 24px;
  }

  .home-focus-shell {
    margin: 20px 28px 24px;
    padding: 18px;
  }

  .home-news-shell {
    margin: 20px 28px 24px;
    padding: 18px;
  }

  .home-focus-header {
    margin: 4px 28px 8px;
  }

  .home-focus-last-update {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .home-focus {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .home-flash-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-flash-media {
    padding: 10px 12px 12px;
    min-height: 0;
    height: 170px;
  }

  .home-flash-media img {
    height: 170px;
  }

  .home-focus-copy {
    justify-items: start;
  }

  .gallery-browser {
    margin: 20px 28px 24px;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .gallery-menu {
    min-width: 0;
    max-width: 100%;
  }

  .document-toolbar-group {
    justify-content: flex-start;
  }

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

  .document-toolbar,
  .document-preview {
    width: 100%;
  }

  .document-toolbar {
    position: static;
    top: auto;
  }

  .document-toolbar.is-fixed {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
  }

  .document-preview {
    margin-top: 0;
  }

  .gallery-preview-stage {
    min-height: 560px;
    padding: 14px;
  }

  .gallery-preview-stage img {
    max-height: 520px;
  }

  .calculator {
    padding: 28px 24px 32px;
  }

  .site-footer {
    padding: 18px 24px 24px;
  }

}

.calculator {
  display: grid;
  width: 100%;
  gap: 8px;
  padding: 25px 56px 52px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border-top: 1px solid rgba(255,255,255,0.08);
}

.amendes-shell .calculator {
  padding: 0;
  gap: 14px;
  border-top: 0;
  background: transparent;
}

.calculator-standalone .fine-form {
  gap: 22px;
}

.calculator-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-direction: column;
}

.calculator-header small {
  min-height: 38px;
  padding: 8px 16px;
  color: #fff4f2;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(123,58,58,0.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 24px rgba(0,0,0,0.14);
}

.calculator-reset-button {
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  color: var(--text-muted);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.14s ease;
}

.calculator-reset-button:hover {
  color: #fff4f2;
  border-color: rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(176,106,59,0.1));
  transform: translateY(-1px);
}

.calculator-reset-button:focus-visible {
  outline: 2px solid rgba(255,255,255,0.22);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 16px;
  padding: 18px 56px 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08));
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-heart {
  color: #d42828;
}

.fine-form {
  display: grid;
  gap: 18px;
}

.result-divider {
  width: min(100%, 760px);
  height: 1px;
  margin: 14px auto 12px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
}

.result-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 12px 28px 24px;
  box-shadow: 0 22px 45px rgba(0,0,0,0.18);
}

.result-card > :empty {
  display: none;
}

.result-card.is-empty .result-summary,
.result-card.is-empty .result-divider {
  display: none;
}

.result-card.is-empty .result-rule-note {
  display: none;
}

#result-title {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  text-align: center;
}

.result-rule-note {
  margin: -2px 0 12px;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.result-title-prefix {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  color: #fff8f6;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(123,58,58,0.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(0,0,0,0.16);
}

.result-title-separator {
  color: rgba(255,255,255,0.55);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.result-title-chip {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.12);
}

.result-title-chip-1 {
  color: #f3e7d2;
  background: rgba(154,122,77,0.24);
  border-color: rgba(154,122,77,0.4);
}

.result-title-chip-2 {
  color: #fae6da;
  background: rgba(176,106,59,0.24);
  border-color: rgba(176,106,59,0.42);
}

.result-title-chip-3 {
  color: #ffebe7;
  background: rgba(199,82,63,0.24);
  border-color: rgba(199,82,63,0.42);
}

.result-title-chip-4 {
  color: #fff0f0;
  background: rgba(176,24,24,0.34);
  border-color: rgba(212,40,40,0.46);
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-metric {
  position: relative;
  padding: 11px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
  text-align: center;
}

.summary-metric::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.16;
  pointer-events: none;
}

.summary-metric-min::before {
  background: linear-gradient(135deg, rgba(240,191,140,0.46), rgba(240,191,140,0));
}

.summary-metric-max::before {
  background: linear-gradient(135deg, rgba(255,123,114,0.55), rgba(255,123,114,0));
}

.summary-metric-total::before {
  background: linear-gradient(135deg, rgba(110,231,168,0.55), rgba(110,231,168,0));
}

.summary-label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-metric-total .summary-label::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.24), transparent);
}

.summary-value {
  position: relative;
  z-index: 1;
  font-size: clamp(1.08rem, 1.8vw, 1.45rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.summary-metric-max .summary-value {
  color: #ff8f88;
}

.summary-metric-total .summary-value {
  color: #84efb5;
}

.summary-metric-min .summary-value {
  color: #f0bf8c;
}

.summary-metric-min,
.summary-metric-max {
  padding: 9px 12px 10px;
}

.summary-metric-min .summary-label,
.summary-metric-max .summary-label {
  font-size: 0.66rem;
  margin-top: 2px;
}

.summary-metric-min .summary-value,
.summary-metric-max .summary-value {
  font-size: clamp(0.96rem, 1.35vw, 1.18rem);
  margin-top: 2px;
}

.offense-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  align-items: start;
  column-gap: 24px;
  row-gap: 24px;
  margin-top: 18px;
  width: 100%;
}

.category-card {
  --category-card-border: rgba(255,255,255,0.12);
  --category-card-glow-start: rgba(255,255,255,0.08);
  --category-card-glow-end: rgba(255,255,255,0.025);
  --category-chip-text: var(--ivory);
  --category-chip-top: rgba(255,255,255,0.055);
  --category-chip-bottom: rgba(255,255,255,0.025);
  --category-chip-border: rgba(255,255,255,0.09);
  --category-row-hover-bg: rgba(255,255,255,0.2);
  --category-row-hover-border: rgba(255,255,255,0.26);
  --category-check-bg: rgba(255,255,255,0.22);
  --category-check-border: rgba(255,255,255,0.34);
  background: rgba(0,0,0,0.20);
  border: 1px solid var(--category-card-border);
  border-radius: 24px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035), 0 24px 60px rgba(0,0,0,0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 28px 70px rgba(0,0,0,0.28);
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  background: linear-gradient(135deg, var(--category-card-glow-start), var(--category-card-glow-end));
}

.category-card::after {
  content: '';
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: -13px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.22), transparent);
  pointer-events: none;
  display: none;
}

.category-card:nth-child(n + 2)::after {
  display: block;
}

.category-1 {
  --category-card-border: rgba(154,122,77,0.62);
  --category-card-glow-start: rgba(154,122,77,0.34);
  --category-card-glow-end: rgba(154,122,77,0.08);
  --category-chip-text: #f3e7d2;
  --category-chip-top: rgba(154,122,77,0.44);
  --category-chip-bottom: rgba(92,64,32,0.84);
  --category-chip-border: rgba(154,122,77,0.46);
  --category-row-hover-bg: rgba(154,122,77,0.18);
  --category-row-hover-border: rgba(154,122,77,0.44);
  --category-check-bg: #9a7a4d;
  --category-check-border: #b8935f;
}

.category-2 {
  --category-card-border: rgba(176,106,59,0.68);
  --category-card-glow-start: rgba(176,106,59,0.38);
  --category-card-glow-end: rgba(176,106,59,0.1);
  --category-chip-text: #fae6da;
  --category-chip-top: rgba(176,106,59,0.46);
  --category-chip-bottom: rgba(112,63,28,0.84);
  --category-chip-border: rgba(176,106,59,0.48);
  --category-row-hover-bg: rgba(176,106,59,0.2);
  --category-row-hover-border: rgba(176,106,59,0.46);
  --category-check-bg: #b06a3b;
  --category-check-border: #cf8756;
}

.category-3 {
  --category-card-border: rgba(199,82,63,0.72);
  --category-card-glow-start: rgba(199,82,63,0.42);
  --category-card-glow-end: rgba(199,82,63,0.1);
  --category-chip-text: #ffebe7;
  --category-chip-top: rgba(199,82,63,0.46);
  --category-chip-bottom: rgba(121,34,26,0.84);
  --category-chip-border: rgba(199,82,63,0.5);
  --category-row-hover-bg: rgba(199,82,63,0.2);
  --category-row-hover-border: rgba(199,82,63,0.48);
  --category-check-bg: #c7523f;
  --category-check-border: #dd705f;
}

.category-4 {
  --category-card-border: rgba(212,40,40,0.82);
  --category-card-glow-start: rgba(212,40,40,0.48);
  --category-card-glow-end: rgba(212,40,40,0.12);
  --category-chip-text: #fff0f0;
  --category-chip-top: rgba(212,40,40,0.5);
  --category-chip-bottom: rgba(112,10,10,0.88);
  --category-chip-border: rgba(212,40,40,0.58);
  --category-row-hover-bg: rgba(212,40,40,0.22);
  --category-row-hover-border: rgba(212,40,40,0.54);
  --category-check-bg: #d42828;
  --category-check-border: #ef5b5b;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.category-header h3 {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  margin: 0;
  color: var(--category-chip-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--category-chip-border);
  background: linear-gradient(180deg, var(--category-chip-top), var(--category-chip-bottom));
}

.category-header span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  color: var(--category-chip-text);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--category-chip-border);
  background: linear-gradient(180deg, var(--category-chip-top), var(--category-chip-bottom));
}

.checkbox-list {
  display: grid;
  gap: 8px;
}

.checkbox-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.checkbox-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.checkbox-row:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.26);
  transform: translateY(-2px);
}

.category-card .checkbox-row:hover,
.category-card .checkbox-row:has(input:checked) {
  background: var(--category-row-hover-bg);
  border-color: var(--category-row-hover-border);
}

.checkbox-row input,
.result-item-title input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.checkbox-row input::before,
.result-item-title input[type="checkbox"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #fff8f6;
  transform: scale(0);
  transition: transform 0.14s ease;
}

.checkbox-row input:hover,
.result-item-title input[type="checkbox"]:hover {
  border-color: rgba(255,255,255,0.34);
}

.checkbox-row input:focus-visible,
.result-item-title input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(255,255,255,0.22);
  outline-offset: 2px;
}

.checkbox-row input:checked::before,
.result-item-title input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.category-card .checkbox-row input:checked,
.result-item .result-item-title input[type="checkbox"]:checked {
  background: var(--category-check-bg, var(--result-check-bg));
  border-color: var(--category-check-border, var(--result-check-border));
}

.checkbox-label {
  color: var(--text);
  font-size: 0.74rem;
  min-width: 0;
}

.checkbox-amount {
  color: var(--text-muted);
  font-size: 0.76rem;
  white-space: nowrap;
  justify-self: end;
  text-align: right;
}

.result-items {
  display: grid;
  gap: 10px;
  margin-top: 30px;
  justify-items: center;
  position: relative;
}

.result-items::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 320px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  pointer-events: none;
}

.result-item {
  --result-border: rgba(255,255,255,0.12);
  --result-left-border: rgba(255,255,255,0.12);
  --result-background-top: rgba(255,255,255,0.05);
  --result-check-bg: rgba(255,255,255,0.22);
  --result-check-border: rgba(255,255,255,0.34);
  --result-meta-border: rgba(167,106,101,0.42);
  --result-meta-top: rgba(123,58,58,0.34);
  --result-meta-bottom: rgba(67,34,34,0.82);
  --result-meta-text: #f6dfdc;
  --result-badge-text: var(--text);
  --result-badge-background: rgba(255,255,255,0.08);
  --result-badge-border: rgba(255,255,255,0.14);
  --result-select-border: rgba(255,255,255,0.14);
  width: min(100%, 880px);
  background: linear-gradient(180deg, var(--result-background-top), rgba(255,255,255,0.04));
  border: 1px solid var(--result-border);
  border-left-width: 5px;
  border-left-color: var(--result-left-border);
  border-radius: 18px;
  padding: 8px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  overflow: hidden;
}

.result-category-1 {
  --result-border: rgba(137,112,76,0.34);
  --result-left-border: #9a7a4d;
  --result-background-top: rgba(154,122,77,0.12);
  --result-check-bg: #9a7a4d;
  --result-check-border: #b8935f;
  --result-meta-border: rgba(154,122,77,0.46);
  --result-meta-top: rgba(154,122,77,0.44);
  --result-meta-bottom: rgba(92,64,32,0.84);
  --result-meta-text: #f5ead7;
  --result-badge-text: #f3e7d2;
  --result-badge-background: rgba(154,122,77,0.3);
  --result-badge-border: rgba(154,122,77,0.44);
  --result-select-border: rgba(154,122,77,0.3);
}

.result-category-2 {
  --result-border: rgba(164,101,66,0.36);
  --result-left-border: #b06a3b;
  --result-background-top: rgba(176,106,59,0.16);
  --result-check-bg: #b06a3b;
  --result-check-border: #cf8756;
  --result-meta-border: rgba(176,106,59,0.48);
  --result-meta-top: rgba(176,106,59,0.46);
  --result-meta-bottom: rgba(112,63,28,0.84);
  --result-meta-text: #f9e5d8;
  --result-badge-text: #fae6da;
  --result-badge-background: rgba(176,106,59,0.3);
  --result-badge-border: rgba(176,106,59,0.44);
  --result-select-border: rgba(176,106,59,0.32);
}

.result-category-3 {
  --result-border: rgba(172,74,58,0.4);
  --result-left-border: #c7523f;
  --result-background-top: rgba(199,82,63,0.18);
  --result-check-bg: #c7523f;
  --result-check-border: #dd705f;
  --result-meta-border: rgba(199,82,63,0.5);
  --result-meta-top: rgba(199,82,63,0.46);
  --result-meta-bottom: rgba(121,34,26,0.84);
  --result-meta-text: #ffebe7;
  --result-badge-text: #ffebe7;
  --result-badge-background: rgba(199,82,63,0.3);
  --result-badge-border: rgba(199,82,63,0.46);
  --result-select-border: rgba(199,82,63,0.34);
}

.result-category-4 {
  --result-border: rgba(166,39,39,0.48);
  --result-left-border: #d42828;
  --result-background-top: rgba(177,24,24,0.22);
  --result-check-bg: #d42828;
  --result-check-border: #ef5b5b;
  --result-meta-border: rgba(212,40,40,0.58);
  --result-meta-top: rgba(212,40,40,0.5);
  --result-meta-bottom: rgba(112,10,10,0.88);
  --result-meta-text: #fff3f3;
  --result-badge-text: #fff0f0;
  --result-badge-background: rgba(176,24,24,0.58);
  --result-badge-border: rgba(212,40,40,0.7);
  --result-select-border: rgba(212,40,40,0.4);
}

.result-item-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.result-item-title label {
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.result-item-offense {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-item-meta {
  color: var(--result-meta-text);
  font-size: 0.68rem;
  white-space: nowrap;
  padding: 4px 7px;
  border: 1px solid var(--result-meta-border);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--result-meta-top), var(--result-meta-bottom));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  text-align: center;
}

.result-item-category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  padding: 2px 6px;
  margin-right: 5px;
  border: 1px solid var(--result-badge-border);
  border-radius: 999px;
  background: var(--result-badge-background);
  color: var(--result-badge-text);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}


.result-amount-control {
  display: grid;
  justify-items: stretch;
  width: 85px;
}

.result-amount-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 95px;
  min-height: 28px;
  padding: 0 5px;
  border: 1px solid var(--result-select-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.result-amount-input,
.result-multiplier-select {
  width: auto;
  min-width: 72px;
  min-height: 28px;
  padding: 3px 5px;
  border: 1px solid var(--result-select-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  color: var(--ivory);
  font-size: 0.745rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.result-amount-input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
}

.result-amount-suffix {
  color: rgba(241,227,222,0.72);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-right: 5px;
}

.result-multiplier-select {
  min-width: 76px;
  margin-left: 10px;
}

.result-amount-field:focus-within,
.result-amount-input:focus,
.result-multiplier-select:focus {
  border-color: rgba(255,255,255,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 2px rgba(176,106,59,0.12);
}

.result-amount-input:focus {
  border-color: transparent;
  box-shadow: none;
}

.result-amount-input::-webkit-outer-spin-button,
.result-amount-input::-webkit-inner-spin-button {
  margin: 0;
}

.result-amount-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.result-multiplier-select option {
  background: #241515;
  color: var(--ivory);
}

@media (max-width: 1200px) {
  .offense-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card::after {
    display: none;
  }

  .category-card:nth-child(even)::after {
    display: block;
  }
}

@media (max-width: 640px) {
  .home-focus-shell {
    margin: 16px 18px 22px;
    padding: 14px;
    border-radius: 22px;
  }

  .home-news-shell {
    margin: 16px 18px 22px;
    padding: 14px;
    border-radius: 22px;
  }

  .home-focus-header {
    margin: 4px 18px 8px;
  }

  .home-focus-last-update {
    font-size: 0.68rem;
  }

  .home-focus-copy h2 {
    font-size: clamp(1.72rem, 8vw, 2.3rem);
  }

  .home-flash-copy h2 {
    font-size: clamp(1.18rem, 7vw, 1.52rem);
  }

  .home-focus-copy > p:not(.home-focus-note) {
    font-size: 0.9rem;
  }

  .home-flash-copy > p {
    font-size: 0.84rem;
  }

  .home-focus-note {
    font-size: 0.72rem;
  }

  .home-flash-note {
    font-size: 0.65rem;
  }

  .home-focus-media {
    padding: 12px;
    border-radius: 18px;
  }

  .home-flash-card {
    padding: 12px;
    border-radius: 18px;
  }

  .home-flash-media {
    border-radius: 16px;
    padding: 9px 10px 10px;
    height: 150px;
  }

  .home-flash-media img {
    height: 150px;
  }

  .home-flash-media-overlay {
    bottom: 12px;
    min-height: 28px;
    padding: 4px 10px;
    font-size: 0.58rem;
  }

  .offense-categories {
    grid-template-columns: 1fr;
  }

  .category-card::after {
    display: none;
  }

  .category-card:not(:first-child) {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 -12px 0 -11px rgba(255,255,255,0.16), 0 24px 60px rgba(0,0,0,0.24);
  }

  .result-summary {
    grid-template-columns: 1fr;
  }

  .result-card {
    padding: 22px 18px;
  }

  .result-item-title {
    gap: 10px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .checkbox-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .checkbox-amount {
    grid-column: 1;
    justify-self: start;
    text-align: left;
    margin-left: 20px;
  }

  .hero-actions,
  .document-actions {
    width: 100%;
  }

  .hero-pill {
    width: 100%;
  }

  .document-viewer-shell {
    margin: 18px 16px 22px;
    padding: 14px;
  }

  .document-viewer-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .document-viewer-heading {
    grid-column: 1;
    grid-row: auto;
    flex-wrap: wrap;
    margin: 0;
  }

  .document-viewer-download {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
  }

  .document-toolbar {
    padding: 12px;
    min-width: 0;
    max-width: none;
  }

  .document-toolbar-group,
  .document-toolbar-group-search,
  .document-toolbar-group-page {
    justify-content: center;
  }


  .document-search-input {
    min-width: 100%;
  }

  .pdfjs-viewer-container {
    inset: 10px;
  }
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
