.portal-services-body { background: #fbfaf7; color: #20242c; }
.portal-services-body > main.content { max-width: none; width: 100%; margin: 0 auto; padding: 36px 28px 64px; }
.services-topbar { padding: 18px 28px; background: #fff; border-bottom: 1px solid #d8d2c8; }
.services-topbar .siga-brand-title { color: #071744; font-size: 27px; letter-spacing: 2px; }
.portal-services h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.25; letter-spacing: -.7px; margin: 0 0 20px; }
.portal-services h2 { font-size: 20px; margin: 28px 0 14px; }
.portal-services .button.primary { background: #071744; color: #fff; border-color: #071744; }
.portal-services .button.secondary { background: #fff; color: #071744; border: 1px solid #d8d2c8; }
.portal-services a { color: #071744; }
.services-search { padding-bottom: 26px; border-bottom: 1px solid #d8d2c8; }
.services-search-row { display: flex; gap: 12px; }
.services-search-row input { flex: 1; min-width: 0; background: #fff; border: 1px solid #969bab; border-radius: 7px; padding: 14px 16px; }
.services-help, .services-count { color: #596174; font-size: 13px; margin: 10px 0; }
.services-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.services-filters label { font-size: 13px; }
.services-filters select, .services-picker input { background: #fff; border: 1px solid #969bab; border-radius: 7px; padding: 10px 12px; font: inherit; color: #20242c; }
.services-picker { position: relative; width: 280px; max-width: 100%; }
.services-picker input { width: 100%; padding-right: 30px; }
.services-picker::after { content: '⌄'; position: absolute; top: 8px; right: 12px; pointer-events: none; }
.services-options { position: absolute; top: calc(100% + 5px); left: 0; right: 0; max-height: 280px; overflow-y: auto; padding: 5px; background: #fff; border: 1px solid #969bab; border-radius: 7px; box-shadow: 0 8px 24px #07174418; z-index: 10; }
.services-options [role=option] { padding: 9px 10px; cursor: pointer; border-radius: 4px; }
.services-options [role=option]:hover, .services-options .active { background: #eef1f8; }
.services-options [aria-selected=true] { font-weight: 650; color: #071744; }
.services-frequent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.services-frequent span { font-size: 12px; color: #596174; }
.services-frequent button { background: #fff; color: #071744; border: 1px solid #d8d2c8; border-radius: 20px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.services-frequent button[aria-pressed=true] { color: #fff; background: #071744; border-color: #071744; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.services-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #d8d2c8; border-radius: 11px; padding: 23px; }
.services-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.services-card h3 { font-size: 18px; line-height: 1.4; margin: 0 0 10px; }
.services-card p { color: #596174; font-size: 14px; margin: 0 0 20px; }
.services-card p.services-card-note { font-size: 12px; border-left: 2px solid #969bab; padding-left: 10px; }
.services-card .portal-favorite-form { position: static; flex-shrink: 0; }
.services-star { border: 0; background: transparent; color: #596174; font-size: 25px; cursor: pointer; padding: 0 4px; }
.services-star[aria-pressed=true] { color: #071744; }
.services-card-action { margin-top: auto; }
.services-card-action a:not(.button) { text-decoration: none; font-weight: 650; }
.services-empty { grid-column: 1 / -1; padding: 24px; border: 1px dashed #969bab; border-radius: 8px; }
.services-more { margin-top: 28px; }
.services-more summary { color: #071744; cursor: pointer; padding: 10px 0; }
.services-more .sidebar { position: static; width: 100%; margin-top: 12px; }
.services-more .sidebar-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.services-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 36px; border-top: 1px solid #d8d2c8; padding-top: 20px; font-size: 12px; color: #596174; }
.services-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.portal-services :focus-visible { outline: 3px solid #487ab7; outline-offset: 4px; }
.portal-services [hidden] { display: none !important; }
@media (max-width: 800px) { .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) {
  .portal-services-body > main.content { padding: 28px 18px 48px; }
  .services-topbar { padding: 16px 18px; gap: 12px; flex-wrap: wrap; }
  .services-topbar .siga-brand-subtitle { max-width: 190px; font-size: 10px; }
  .services-grid { grid-template-columns: 1fr; }
  .services-search-row { flex-direction: column; }
  .services-search-row button { align-self: start; }
  .services-filters { align-items: start; flex-direction: column; }
}

/* Compact service entry; favorites remain above the stretched access target. */
.portal-services-body > main.content { padding-top: 24px; }
.services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.services-card { position: relative; padding: 18px 20px; min-width: 0; }
.services-card h3 { font-size: 17px; margin-bottom: 8px; }
.services-card p { margin-bottom: 18px; }
.services-card-action { text-align: right; }
.portal-services .services-card-access { background: transparent; border: 0; padding: 4px 0; font: inherit; font-size: 13px; font-weight: 650; color: #5c1638; cursor: pointer; text-decoration: none; }
.services-card-access::after { content: ''; position: absolute; inset: 0; border-radius: 11px; }
.services-card:has(.services-card-access):hover, .services-card:focus-within { border-color: #969bab; }
.services-card .portal-favorite-form { position: relative; z-index: 1; }
.services-admin-card { background: #f4e7ee; border-color: #d9b6c6; }
.services-admin-card h3, .services-admin-card .services-card-access { color: #5c1638; }
.services-topbar .topnav { min-width: 0; max-width: 100%; }
.services-account { position: relative; max-width: 100%; color: #071744; font-size: 13px; }
.services-account summary { cursor: pointer; list-style: none; border: 1px solid #d8d2c8; border-radius: 7px; padding: 10px 14px; min-height: 44px; max-width: min(360px, calc(100vw - 36px)); overflow-wrap: anywhere; }
.services-account-options { position: absolute; right: 0; top: calc(100% + 7px); z-index: 10; background: #fff; border: 1px solid #d8d2c8; border-radius: 9px; padding: 6px; min-width: min(200px, calc(100vw - 36px)); max-width: calc(100vw - 36px); box-shadow: 0 8px 24px #07174418; }
.services-account-options a, .services-account-options button { display: block; width: 100%; min-height: 44px; text-align: left; border: 0; background: transparent; color: #071744; font: inherit; padding: 12px; overflow-wrap: anywhere; text-decoration: none; cursor: pointer; }
.services-account-options a:hover, .services-account-options button:hover { background: #fbfaf7; }
.services-account :focus-visible { outline: 3px solid #487ab7; outline-offset: 2px; }
@media (max-width: 540px) { .services-account-options { left: 0; right: auto; } }
.services-admin-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.services-admin-tools > a { background: #fff; border: 1px solid #d8d2c8; padding: 18px; border-radius: 7px; text-decoration: none; }
.services-admin-back { display: inline-block; margin-bottom: 24px; }
@media (max-width: 1150px) { .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 850px) { .services-grid, .services-admin-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .services-grid, .services-admin-tools { grid-template-columns: 1fr; } }

/* Administration shortcuts; archive cards keep their existing presentation. */
.services-admin-page h1 { margin-bottom: 28px; }
.services-admin-page .services-admin-back { margin-bottom: 18px; font-size: 14px; text-underline-offset: 3px; }
.services-admin-page h2 { margin: 28px 0 12px; }
.services-admin-page .services-admin-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.services-admin-page .services-admin-tools > a { display: flex; align-items: center; min-height: 64px; padding: 16px 18px; border-radius: 8px; font-weight: 550; }
.services-admin-page .services-admin-tools > a:hover { border-color: #5c1638; }
.services-admin-advanced { margin-top: 28px; border-top: 1px solid #d8d2c8; padding-top: 10px; }
.services-admin-advanced > summary { width: fit-content; padding: 12px 0; font-weight: 600; color: #071744; cursor: pointer; }
.services-admin-advanced .services-admin-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.services-admin-advanced .services-more { margin-top: 6px; }
.portal-services .services-admin-archives { display: inline-block; margin-top: 22px; padding: 8px 0; color: #5c1638; font-weight: 600; text-underline-offset: 4px; }
@media (max-width: 1000px) { .services-admin-page .services-admin-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .services-admin-page .services-admin-tools { grid-template-columns: 1fr; } .services-admin-page .services-admin-tools > a { min-height: 56px; padding: 14px 16px; } }
