/* ==========================================================================
   UniSUS Procedimentos — Modulo SIGTAP
   Mesmo sistema de variaveis do UniSUS principal
   ========================================================================== */

/* ==========================================================================
   1. FONT-FACE
   ========================================================================== */

@font-face {
  font-family: "Rawline";
  src: url("/assets/fonts/rawline-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rawline";
  src: url("/assets/fonts/rawline-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rawline";
  src: url("/assets/fonts/rawline-600.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. CSS VARIABLES (light + dark) — copied from UniSUS site
   ========================================================================== */

:root {
  --white-pure: #F8F9FA;
  --light-gray: #D5D8DE;
  --low-opacity-gray: #EDEFF2;
  --highlight-gray: #E0E3E8;
  --gray: #71839B;
  --dark-gray: #71839B;

  --green: #059142;
  --warm-green: #168821;
  --light-blue: #E8F0FE;
  --blue-warm: #1351B4;
  --blue-warm-vivid-05: #EEF2FA;
  --dark-blue: #0C326F;
  --blue-light: #2670E8;
  --bright-red: #e52207;
  --bright-yellow: #fabd10;

  --text-color: #1A1A2E;
  --dark-200: #71839B;
  --dark-300: #1A1A2E;
  --dark-400: #555555;

  --on-dark: #ffffff;
  --dark-blue-bg: #0C326F;

  --shadow-sm: rgba(0, 0, 0, 0.04);
  --shadow-md: rgba(0, 0, 0, 0.08);
  --shadow-lg: rgba(0, 0, 0, 0.12);
  --shadow-xl: rgba(0, 0, 0, 0.15);

  --btn-primary-bg: #1351B4;
  --btn-primary-text: #ffffff;
  --shadow-blue-sm: rgba(19, 81, 180, 0.04);
  --shadow-blue-md: rgba(19, 81, 180, 0.08);
  --shadow-blue-lg: rgba(19, 81, 180, 0.15);
  --shadow-blue-xl: rgba(19, 81, 180, 0.3);

  /* Cores por módulo */
  --mod-sigtap: #1351B4;
  --mod-cnes: #059142;
  --mod-cid: #9B2FAE;
  --mod-tabnet: #E8590C;
  --mod-cns: #D63384;
  --mod-bpa: #0C8599;
  --mod-cbhpm: #C92A2A;
  --mod-ciap: #5C7CFA;

  /* Module accent */
  --accent: #1351B4;
  --accent-light: rgba(19, 81, 180, 0.08);
}

[data-theme="dark"] {
  --white-pure: #16162a;
  --light-gray: #3a3a4e;
  --low-opacity-gray: #20203a;
  --highlight-gray: #2a2a40;
  --gray: #9a9aae;
  --dark-gray: #8a8a9e;

  --green: #4ADE80;
  --warm-green: #34D399;
  --light-blue: #1e2d4a;
  --blue-warm: #6BA6FF;
  --blue-warm-vivid-05: #1c2540;
  --dark-blue: #8AC4FF;
  --blue-light: #5B9BF5;
  --bright-red: #ff6b6b;
  --bright-yellow: #ffd93d;

  --on-dark: #ffffff;
  --dark-blue-bg: #111128;

  --text-color: #e4e4ee;
  --dark-200: #b0b0c0;
  --dark-300: #e0e0ee;
  --dark-400: #c0c0d0;

  --shadow-sm: rgba(0, 0, 0, 0.15);
  --shadow-md: rgba(0, 0, 0, 0.25);
  --shadow-lg: rgba(0, 0, 0, 0.35);
  --shadow-xl: rgba(0, 0, 0, 0.45);

  --btn-primary-bg: #1565c0;
  --btn-primary-text: #ffffff;
  --shadow-blue-sm: rgba(107, 166, 255, 0.06);
  --shadow-blue-md: rgba(107, 166, 255, 0.12);
  --shadow-blue-lg: rgba(107, 166, 255, 0.2);
  --shadow-blue-xl: rgba(107, 166, 255, 0.35);

  --mod-sigtap: #6BA6FF;
  --mod-cnes: #4ADE80;
  --mod-cid: #D08CED;
  --mod-tabnet: #FF9F5A;
  --mod-cns: #F06CAA;
  --mod-bpa: #3DC9D8;
  --mod-cbhpm: #FF7B7B;
  --mod-ciap: #8FA4FF;

  --accent: #6BA6FF;
  --accent-light: rgba(107, 166, 255, 0.1);
}

/* ==========================================================================
   3. GLOBAL RESET & BASE
   ========================================================================== */

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

html, body {
  font-family: "Rawline", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: var(--white-pure);
  color: var(--text-color);
  transition: background-color 0.2s ease, color 0.2s ease;
}

button, input, textarea, select { font-family: inherit; }
a { text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; padding: 0; margin: 0; }

h1 { font-size: 2.2rem; font-weight: 400; color: var(--dark-300); }
h2 { font-size: 1.5rem; font-weight: 400; }

[id] { scroll-margin-top: 80px; }

.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;
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.main-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - 64px - 142px);
  position: relative;
}

/* ==========================================================================
   5. HEADER
   ========================================================================== */

.site-header {
  height: 64px;
  width: 100%;
  padding: 0 3rem;
  border-bottom: 1px solid var(--low-opacity-gray);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white-pure);
  transition: background-color 0.2s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo-link:hover { opacity: 0.85; }
.logo { height: 28px; cursor: pointer; }

.header-pipe {
  height: 28px;
  width: 1.5px;
  background-color: var(--light-gray);
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-300);
}
.brand-accent { color: var(--green); }

.module-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--dark-300);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.theme-toggle:hover {
  color: var(--blue-warm);
  background-color: var(--blue-warm-vivid-05);
}
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Nav button (outline style) */
.nav-button {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue-warm);
  background: transparent;
  border: 1px solid var(--light-gray);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.nav-button:hover {
  border-color: var(--blue-warm);
  background-color: var(--blue-warm-vivid-05);
}

@media (max-width: 767px) {
  .site-header { height: auto; padding: 0 1rem; }
  .header-pipe, .nav-button span { display: none; }
  .nav-button { padding: 0.5rem; border: none; }
}

/* ==========================================================================
   6. HERO
   ========================================================================== */

.hero {
  padding: 3rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 700px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(19, 81, 180, 0.08);
  padding: 0.35rem 1rem;
  border-radius: 20px;
}
[data-theme="dark"] .hero-badge {
  background: rgba(107, 166, 255, 0.1);
}

.hero h1 {
  color: var(--dark-blue);
  font-weight: 700;
  text-align: center;
  max-width: 640px;
  font-size: 2rem;
}

.hero-subtitle {
  font-size: 1.0625rem;
  text-align: center;
  color: var(--dark-200);
  max-width: 540px;
  line-height: 1.6;
}

/* Search box */
.search-box {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 560px;
  border: 2px solid var(--light-gray);
  border-radius: 50px;
  padding: 0.25rem 0.25rem 0.25rem 1rem;
  background: var(--white-pure);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--shadow-blue-lg);
}

.search-icon {
  flex-shrink: 0;
  color: var(--gray);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.625rem 0.5rem;
  font-size: 1rem;
  color: var(--text-color);
  outline: none;
}
.search-input::placeholder { color: var(--gray); }

.search-button {
  flex-shrink: 0;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 50px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}
.search-button:hover { background: var(--dark-blue); }

@media (max-width: 767px) {
  .hero { padding: 1.5rem 1rem; gap: 1.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-subtitle { font-size: 0.9375rem; }
  .search-box { border-radius: 12px; padding: 0.25rem 0.25rem 0.25rem 0.75rem; }
  .search-button { padding: 0.5rem 1rem; font-size: 0.8125rem; border-radius: 10px; }
  .autocomplete-dropdown { max-height: 60vh; border-radius: 8px; }
  .autocomplete-item { padding: 0.625rem 1rem; }
}

/* ==========================================================================
   7. DESCRIPTION SECTION
   ========================================================================== */

.desc-section {
  width: 100%;
  padding: 3rem 2rem;
  background-color: var(--low-opacity-gray);
}

.desc-inner {
  max-width: 760px;
  margin: 0 auto;
}

.desc-inner h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 1rem;
}

.desc-inner p {
  font-size: 1rem;
  color: var(--dark-200);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.desc-inner p:last-child { margin-bottom: 0; }

@media (max-width: 767px) {
  .desc-section { padding: 2rem 1rem; }
  .desc-inner h2 { font-size: 1.375rem; }
}

/* ==========================================================================
   8. SAMPLE DATA TABLE
   ========================================================================== */

.sample-section {
  width: 100%;
  padding: 3rem 2rem;
}

.sample-inner {
  max-width: 900px;
  margin: 0 auto;
}

.sample-inner h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  text-align: center;
  margin-bottom: 0.5rem;
}

.sample-subtitle {
  font-size: 0.9375rem;
  color: var(--gray);
  text-align: center;
  margin-bottom: 2rem;
}

.sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.sample-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  border-bottom: 2px solid var(--light-gray);
}

.sample-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--low-opacity-gray);
  color: var(--text-color);
}

.sample-table tr:hover td {
  background-color: var(--blue-warm-vivid-05);
}

.sample-code {
  font-family: monospace;
  font-weight: 600;
  color: var(--accent);
  background: var(--blue-warm-vivid-05);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.sample-value {
  font-weight: 600;
  color: var(--green);
}

.sample-complexity {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--blue-warm-vivid-05);
  color: var(--accent);
}

@media (max-width: 767px) {
  .sample-section { padding: 2rem 1rem; }
  .sample-table { font-size: 0.8125rem; }
  .sample-table th, .sample-table td { padding: 0.5rem 0.5rem; }
}

/* ==========================================================================
   9. FAQ
   ========================================================================== */

.faq-section {
  width: 100%;
  padding: 3rem 2rem;
  background-color: var(--low-opacity-gray);
}

.faq-inner {
  max-width: 760px;
  margin: 0 auto;
}

.faq-title-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  text-align: center;
  margin-bottom: 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--white-pure);
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--accent); }

.faq-item summary {
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark-300);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--gray);
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  padding: 0 1.25rem 1rem;
  font-size: 0.9375rem;
  color: var(--dark-200);
  line-height: 1.7;
}

@media (max-width: 767px) {
  .faq-section { padding: 2rem 1rem; }
  .faq-title-heading { font-size: 1.375rem; }
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */

.site-footer {
  width: 100%;
  background-color: var(--dark-blue-bg);
  color: var(--on-dark);
}

.footer-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-logo-container a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.footer-logo-container a:hover { opacity: 0.85; }
.footer-logo {
  height: 36px;
  filter: brightness(1.6);
}

.footer-text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding-block: 1.5rem;
  color: var(--on-dark);
}

.footer-text-container span,
.footer-text-container strong {
  font-size: 14px;
  width: fit-content;
}

.footer-text-container span:first-child {
  padding-inline: 1rem;
  text-align: center;
}

.footer-redirect-link {
  color: var(--on-dark);
  padding-top: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-redirect-link:hover {
  color: var(--light-blue);
}

.footer-link-group {
  display: flex;
  gap: 2rem;
  padding-top: 0.5rem;
}

@media (max-width: 767px) {
  .footer-link-group { flex-direction: column; gap: 0; text-align: center; }
}

/* ==========================================================================
   11. AUTOCOMPLETE DROPDOWN
   ========================================================================== */

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white-pure);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow-lg);
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  z-index: 50;
  max-height: 400px;
  overflow-y: auto;
}

.autocomplete-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background-color 0.15s;
}
.autocomplete-item:hover {
  background-color: var(--blue-warm-vivid-05);
}

.autocomplete-code {
  font-family: monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--blue-warm-vivid-05);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.autocomplete-name {
  font-size: 0.875rem;
  color: var(--text-color);
}

.autocomplete-empty {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--gray);
  text-align: center;
}

/* ==========================================================================
   12. ADVANCED SEARCH LINK
   ========================================================================== */

.advanced-search-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--blue-warm);
  white-space: nowrap;
  border: 1px solid var(--blue-warm);
  border-radius: 20px;
  height: 44px;
  transition: background-color 0.2s;
}
.advanced-search-link:hover {
  background-color: var(--blue-warm-vivid-05);
}

/* ==========================================================================
   13. POPULAR PROCEDURES
   ========================================================================== */

.popular-section {
  width: 100%;
  padding: 3rem 2rem;
}

.popular-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  text-align: center;
  margin-bottom: 2rem;
}

.popular-list-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.popular-list {
  display: flex;
  flex-direction: column;
}

.popular-link {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--low-opacity-gray);
  transition: background-color 0.15s;
}
.popular-link:hover {
  background-color: var(--blue-warm-vivid-05);
}

.popular-code {
  font-family: monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--blue-warm-vivid-05);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.popular-name {
  font-size: 0.875rem;
  color: var(--text-color);
}

.expand-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem auto 0;
  padding: 0.625rem 1.5rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  background: transparent;
  color: var(--blue-warm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background-color 0.2s;
}
.expand-button:hover {
  border-color: var(--blue-warm);
  background-color: var(--blue-warm-vivid-05);
}

/* ==========================================================================
   13b. COMPETENCIA INDICATOR
   ========================================================================== */

.competencia-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue-warm-vivid-05);
  border: 1px solid var(--blue-warm);
  color: var(--blue-warm);
  font-size: 0.8125rem;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.competencia-indicator svg {
  flex-shrink: 0;
  stroke: var(--blue-warm);
}
[data-theme="dark"] .competencia-indicator {
  background: rgba(107, 166, 255, 0.1);
  border-color: var(--blue-warm);
}

/* ==========================================================================
   13c. EXPENSIVE PROCEDURES
   ========================================================================== */

.expensive-section {
  width: 100%;
  padding: 3rem 2rem;
  background: var(--blue-warm-vivid-05);
}

.expensive-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.expensive-link {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.expensive-rank {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-warm);
  min-width: 2rem;
  text-align: center;
  flex-shrink: 0;
}

.expensive-value {
  margin-left: auto;
  font-family: monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--warm-green);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ==========================================================================
   14. BREADCRUMB
   ========================================================================== */

.breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.8125rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb li::after {
  content: "/";
  margin: 0 0.5rem;
  color: var(--gray);
}
.breadcrumb li:last-child::after { content: ""; margin: 0; }

.breadcrumb a {
  color: var(--blue-warm);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb li[aria-current] {
  color: var(--gray);
}

/* ==========================================================================
   15. PROCEDURE DETAIL
   ========================================================================== */

.procedure-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem 3rem;
}

.procedure-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

.procedure-code-line {
  font-size: 0.9375rem;
  color: var(--gray);
  margin-bottom: 1.5rem;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  background: transparent;
  color: var(--text-color);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background-color 0.2s;
}
.action-btn:hover {
  border-color: var(--blue-warm);
  background-color: var(--blue-warm-vivid-05);
}
.action-btn.active {
  border-color: var(--bright-yellow);
  background: rgba(250, 189, 16, 0.1);
}

.section {
  margin-bottom: 2.5rem;
}

.section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--low-opacity-gray);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
}

.detail-field span:last-child {
  font-size: 0.9375rem;
  color: var(--text-color);
}

.detail-field a {
  color: var(--blue-warm);
  text-decoration: none;
}
.detail-field a:hover { text-decoration: underline; }

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.value-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  background: var(--white-pure);
}

.value-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
}

.value-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
}

/* Simulator */
.simulator-details {
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  overflow: hidden;
}

.simulator-summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--blue-warm);
  list-style: none;
}
.simulator-summary::-webkit-details-marker { display: none; }

.simulator-content {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--low-opacity-gray);
}

.simulator-hint {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

.simulator-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.simulator-label {
  font-size: 0.875rem;
  font-weight: 600;
}

.simulator-input {
  width: 100px;
  padding: 0.5rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-color);
  background: var(--white-pure);
}

.simulator-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.simulator-result-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.result-label {
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: uppercase;
}

.result-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--green);
}

.simulator-disclaimer {
  font-size: 0.75rem;
  color: var(--gray);
  font-style: italic;
}

/* Tabs */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 2px solid var(--low-opacity-gray);
  margin-bottom: 1rem;
}

.tab-button {
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--gray);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.tab-button[data-active="true"] {
  color: var(--blue-warm);
  border-bottom-color: var(--blue-warm);
}

.tab-panel {
  padding: 0.5rem 0;
}

.description-text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-color);
}

.table-wrapper {
  overflow-x: auto;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table-wrapper th {
  text-align: left;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  border-bottom: 2px solid var(--light-gray);
}

.table-wrapper td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--low-opacity-gray);
  color: var(--text-color);
}

/* Related */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.related-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--low-opacity-gray);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.15s;
}
.related-card:hover {
  border-color: var(--blue-warm);
  background-color: var(--blue-warm-vivid-05);
}

.related-code {
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--blue-warm-vivid-05);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.related-name {
  font-size: 0.8125rem;
  color: var(--text-color);
}

.cta-block {
  text-align: center;
  padding: 2rem 0;
}

.cta-link {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
}
.cta-link:hover {
  background: var(--dark-blue);
}

/* Cross-reference box (CBHPM link) */
.cross-ref-box {
  padding: 1.5rem;
  border: 1px solid var(--light-gray);
  border-left: 4px solid #C92A2A;
  border-radius: 8px;
  background: var(--low-opacity-gray, #f8f9fa);
}
.cross-ref-box h2 {
  font-size: 1.125rem;
  color: #C92A2A;
}
.cross-ref-box p {
  font-size: 0.875rem;
  color: var(--dark-200, #555);
  line-height: 1.6;
}

/* Compare callout box (homepage) */
.compare-callout {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 1.5rem 2rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(19, 81, 180, 0.05), rgba(201, 42, 42, 0.05));
  text-align: center;
}
.compare-callout h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark-blue);
}
.compare-callout p {
  font-size: 0.9rem;
  color: var(--dark-200, #555);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.compare-callout .compare-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.compare-callout .compare-link {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.compare-callout .compare-link:hover {
  opacity: 0.85;
}
.compare-callout .compare-link--sigtap {
  background: var(--btn-primary-bg, #1351B4);
  color: #fff;
}
.compare-callout .compare-link--cbhpm {
  background: #C92A2A;
  color: #fff;
}

/* ==========================================================================
   16. PROCEDURE SEARCH PAGE
   ========================================================================== */

.proc-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem 3rem;
}

.proc-search-block {
  margin-bottom: 3rem;
}

.proc-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

.proc-subtitle {
  font-size: 1rem;
  color: var(--dark-200);
  margin-bottom: 1rem;
}

.proc-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(5, 145, 66, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.proc-form-area {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.proc-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.proc-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.proc-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dark-300);
}

.proc-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-color);
  background: var(--white-pure);
  transition: border-color 0.2s;
}
.proc-input:focus {
  border-color: var(--blue-warm);
  outline: none;
  box-shadow: 0 0 0 3px var(--shadow-blue-lg);
}

.proc-button-row {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.proc-btn-primary {
  padding: 0.625rem 2rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}
.proc-btn-primary:hover { background: var(--dark-blue); }

.proc-btn-outline {
  padding: 0.625rem 2rem;
  background: transparent;
  color: var(--blue-warm);
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
}
.proc-btn-outline:hover { border-color: var(--blue-warm); }

.proc-guide-block {
  margin-bottom: 3rem;
}

.proc-guide-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 1rem;
}

.proc-guide-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.proc-guide-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--low-opacity-gray);
  border-radius: 8px;
}

.proc-guide-label {
  font-weight: 700;
  color: var(--dark-300);
  margin-bottom: 0.25rem;
}

.proc-guide-content p {
  font-size: 0.875rem;
  color: var(--dark-200);
  line-height: 1.5;
}

.proc-faq-block {
  margin-bottom: 2rem;
}

.proc-faq-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 1rem;
}

/* ==========================================================================
   17. FAVORITES PAGE
   ========================================================================== */

.fav-hero {
  text-align: center;
  padding: 2rem;
}

.fav-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

.fav-subtitle {
  color: var(--dark-200);
  margin-bottom: 1.5rem;
}

.fav-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  background: var(--white-pure);
}

.fav-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-color);
  outline: none;
}

.fav-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.fav-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.fav-count {
  font-size: 0.875rem;
  color: var(--gray);
}

.fav-clear-btn {
  background: transparent;
  border: none;
  color: var(--bright-red);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.fav-list {
  display: flex;
  flex-direction: column;
}

.fav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--low-opacity-gray);
  transition: background-color 0.15s;
}
.fav-row:hover { background-color: var(--blue-warm-vivid-05); }

.fav-row-main {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.fav-row-code {
  font-family: monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

.fav-row-name {
  font-size: 0.875rem;
  color: var(--text-color);
}

.fav-row-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fav-row-group {
  font-size: 0.75rem;
  color: var(--gray);
}

.fav-row-remove {
  background: transparent;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 0.875rem;
}

.fav-empty {
  text-align: center;
  padding: 3rem 2rem;
}

.fav-empty h2 {
  font-size: 1.25rem;
  color: var(--dark-300);
  margin-bottom: 0.5rem;
}

.fav-empty p {
  color: var(--dark-200);
  margin-bottom: 1.5rem;
}

.fav-cta-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

.fav-no-results {
  text-align: center;
  padding: 2rem;
  color: var(--gray);
}

/* ==========================================================================
   18. COMPARE PAGE
   ========================================================================== */

.compare-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2rem 3rem;
}

.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.compare-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
}

.compare-clear-all {
  background: transparent;
  border: 1px solid var(--bright-red);
  color: var(--bright-red);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.compare-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray);
}

.compare-cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 1rem;
}

.compare-loading {
  text-align: center;
  padding: 3rem;
  color: var(--gray);
}

.compare-table-wrapper {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.compare-table th, .compare-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--low-opacity-gray);
  text-align: left;
}

.compare-table th {
  background: var(--blue-warm-vivid-05);
  font-weight: 600;
  vertical-align: top;
}

.compare-table th a {
  color: var(--blue-warm);
  text-decoration: none;
  font-weight: 700;
}

.compare-remove-btn {
  display: block;
  margin-top: 0.5rem;
  background: transparent;
  border: none;
  color: var(--bright-red);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Compare Floating Bar */
.compare-floating-bar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--dark-blue-bg);
  color: var(--on-dark);
  border-radius: 50px;
  box-shadow: 0 4px 24px var(--shadow-xl);
  z-index: 200;
  font-size: 0.875rem;
}

.compare-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.compare-bar-link {
  color: var(--on-dark);
  font-weight: 600;
  text-decoration: none;
  padding: 0.375rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
}

.compare-bar-clear {
  background: transparent;
  border: none;
  color: var(--on-dark);
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
}

/* ==========================================================================
   19. GROUP/SUBGROUP/FORMA PAGES
   ========================================================================== */

.group-detail, .subgroup-detail, .forma-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem 3rem;
}

.group-header h1, .subgroup-header h1, .forma-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.badge-group { color: var(--accent); background: var(--accent-light); }
.badge-subgroup { color: var(--green); background: rgba(5, 145, 66, 0.08); }
.badge-forma { color: var(--dark-blue); background: var(--blue-warm-vivid-05); }

.subgroup-list, .forma-section, .group-procedures, .subgroup-procedures, .forma-procedures {
  margin-top: 2rem;
}

.subgroup-list h2, .forma-section h2, .group-procedures h2, .subgroup-procedures h2, .forma-procedures h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 1rem;
}

.subgroup-card {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--low-opacity-gray);
  border-radius: 8px;
}

.subgroup-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.subgroup-card h3 a {
  color: var(--blue-warm);
  text-decoration: none;
}
.subgroup-card h3 a:hover { text-decoration: underline; }

.forma-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.forma-list li a {
  display: block;
  padding: 0.375rem 0.75rem;
  color: var(--blue-warm);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 4px;
  transition: background-color 0.15s;
}
.forma-list li a:hover { background-color: var(--blue-warm-vivid-05); }

.procedure-list {
  display: flex;
  flex-direction: column;
}

.procedure-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
  border-bottom: 1px solid var(--low-opacity-gray);
  transition: background-color 0.15s;
}
.procedure-item:hover { background-color: var(--blue-warm-vivid-05); }

.procedure-code {
  font-family: monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.procedure-name {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-color);
}

.procedure-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green);
  flex-shrink: 0;
}

/* ==========================================================================
   20. LEGAL & ABOUT PAGES
   ========================================================================== */

.legal-page, .about-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem;
}

.section-inner {
  max-width: 760px;
}

.legal-page h1, .about-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

.legal-updated {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

.legal-content h2, .about-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-300);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p, .about-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--dark-200);
  margin-bottom: 0.75rem;
}

.legal-content ul, .about-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  list-style: disc;
}

.legal-content li, .about-content li {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--dark-200);
  margin-bottom: 0.25rem;
}

.legal-content a, .about-content a {
  color: var(--blue-warm);
  text-decoration: none;
}
.legal-content a:hover, .about-content a:hover { text-decoration: underline; }

/* ==========================================================================
   21. SCROLL TO TOP
   ========================================================================== */

.scroll-top-btn {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: background-color 0.2s;
}
.scroll-top-btn:hover { background: var(--dark-blue); }

/* ==========================================================================
   22. MOBILE NAV
   ========================================================================== */

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  border-top: 1px solid var(--low-opacity-gray);
}

.mobile-nav-link {
  padding: 0.75rem 1rem;
  color: var(--dark-300);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color 0.15s;
}
.mobile-nav-link:hover { background-color: var(--blue-warm-vivid-05); }

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-300);
  text-decoration: none;
}
.nav-link:hover { background-color: var(--blue-warm-vivid-05); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--dark-300);
  border-radius: 1px;
}

/* ==========================================================================
   23. STRUCTURED DATA
   ========================================================================== */

.structured-data { display: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 767px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .nav-button span { display: none; }
  .nav-button { padding: 0.5rem; border: none; }

  .procedure-detail, .proc-page, .compare-container, .group-detail, .subgroup-detail, .forma-detail {
    padding: 1rem;
  }

  .detail-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .simulator-results { grid-template-columns: 1fr; }
  .proc-fields-row { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }

  .procedure-header h1, .proc-title { font-size: 1.375rem; }

  .value-amount { font-size: 1.25rem; }
}

@media print {
  .action-buttons, .site-footer, .site-header, .hamburger, .mobile-nav,
  .theme-toggle, .compare-floating-bar, .scroll-top-btn, .nav-button,
  .search-box, .hero-badge, .advanced-search-link, .cta-block, .cta-link,
  .btn-print, .faq-section, .popular-section, .related-grid,
  .simulator-details, .tab-list, .expand-button,
  footer, header { display: none !important; }

  body { font-size: 11pt; line-height: 1.5; color: #000 !important; background: #fff !important; }
  .main-content, main { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
  * { box-shadow: none !important; text-shadow: none !important; }

  a { color: #000 !important; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  a[href^="/"]::after { content: none; }

  h1, h2, h3 { page-break-after: avoid; break-after: avoid; color: #000 !important; }
  table, .detail-grid, .values-grid { page-break-inside: avoid; break-inside: avoid; }

  .breadcrumb { display: block !important; font-size: 9pt; margin-bottom: 0.5rem; border: none; }
  .breadcrumb ol { display: flex; gap: 0.25rem; padding: 0; }
  .breadcrumb li::after { content: " > "; }
  .breadcrumb li:last-child::after { content: none; }

  .procedure-detail { padding: 0 !important; }
  .procedure-header { border-bottom: 2px solid #000; padding-bottom: 0.5rem; margin-bottom: 1rem; }

  .value-card { border: 1px solid #ccc; padding: 0.5rem; }
  .values-grid { gap: 0.5rem; }

  .tab-panel { display: block !important; }
  .tab-panel[hidden] { display: block !important; }
  .tab-panel::before { content: attr(id); display: block; font-weight: bold; text-transform: capitalize; margin: 1rem 0 0.25rem; }

  .table-wrapper { overflow: visible; }
  table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  table th, table td { border: 1px solid #ccc; padding: 0.25rem 0.5rem; }

  .structured-data { display: none !important; }
}

/* ==========================================================================
   CROSS-MODULE NAVIGATION BAR
   ========================================================================== */

.module-nav {
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--border, #D5D8DE);
  height: 36px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.module-nav::-webkit-scrollbar { display: none; }

.module-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

.module-nav-link {
  font-family: "Rawline", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, var(--gray, #71839B));
  text-decoration: none;
  padding: 8px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}
.module-nav-link:hover {
  color: var(--text-primary, var(--text, #1A1A2E));
  text-decoration: none;
}
.module-nav-link.active {
  color: var(--accent, #1351B4);
  border-bottom-color: var(--accent, #1351B4);
}
.module-nav-portal {
  font-weight: 400;
  opacity: 0.7;
}
.module-nav-portal:hover {
  opacity: 1;
}

@media (max-width: 600px) {
  .module-nav-inner {
    padding: 0 8px;
  }
  .module-nav-link {
    padding: 8px 10px;
    font-size: 0.74rem;
  }
}
