/* Shared public-page chrome. Retro-term is the only UI foundation. */
@import url('../ui/retro-term/front/retro-term.min.css');
@import url('../ui/retro-term/front/retro-term-icons.min.css');
html[data-theme="dark"] { --rt-dark-bg:#212121; --rt-dark-surface:rgba(45,45,45,.82); --rt-dark-surface-solid:#2b2b2b; --rt-dark-text:#f5f5f5; --rt-dark-muted:#bdbdbd; --rt-dark-border:rgba(255,255,255,.14); }
html { scrollbar-width:thin; scrollbar-color:#cbd5e1 transparent; }
html, body { width:100%; min-width:0; margin:0; padding:0; }
*, *::before, *::after { box-sizing:border-box; }
html::-webkit-scrollbar { width:8px; height:8px; }
html::-webkit-scrollbar-track { background:transparent; }
html::-webkit-scrollbar-thumb { min-height:56px; border:2px solid transparent; border-radius:999px; background:#cbd5e1; background-clip:padding-box; }
html::-webkit-scrollbar-thumb:hover { background:#94a3b8; background-clip:padding-box; }
html::-webkit-scrollbar-corner { background:transparent; }
body:has(.public-footer) { min-height:100vh; display:block; }
body:has(.public-footer) > main { position:relative; z-index:1; min-height:calc(100vh - 1px); border-bottom:1px solid var(--rt-border); background:var(--rt-bg,#fff); }
html[data-radius="rounded"] .rt-feature-card, html[data-radius="rounded"] .rt-detail-card { border-radius:var(--rt-radius-lg, 26px) !important; }
html[data-radius="flat"] .rt-feature-card, html[data-radius="flat"] .rt-detail-card { border-radius:0 !important; }
html[data-theme="dark"] body { background:var(--rt-bg) !important; color:var(--rt-text) !important; }
html[data-theme="dark"] .card, html[data-theme="dark"] .feature, html[data-theme="dark"] .hero-card, html[data-theme="dark"] .public-map, html[data-theme="dark"] .empty { color:var(--rt-text) !important; background:var(--rt-surface-solid) !important; border-color:var(--rt-border) !important; }
html[data-theme="dark"] .profile { color:var(--rt-text) !important; background:var(--rt-surface-solid) !important; border-color:var(--rt-border) !important; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { color:var(--rt-text) !important; background:var(--rt-surface-solid) !important; border-color:var(--rt-border) !important; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] .intro p, html[data-theme="dark"] .summary, html[data-theme="dark"] .address, html[data-theme="dark"] .meta, html[data-theme="dark"] .hint, html[data-theme="dark"] .label { color:var(--rt-text) !important; }
html[data-theme="dark"] .profile .address { background:var(--rt-dark-surface-solid) !important; border-color:var(--rt-dark-border) !important; }
html[data-theme="dark"] .profile .notice { background:rgba(var(--rt-primary-rgb),.14) !important; color:var(--rt-text) !important; }
html[data-theme="dark"] .filter, html[data-theme="dark"] .search-preview, html[data-theme="dark"] .result, html[data-theme="dark"] .note { border-color:var(--rt-border) !important; background:var(--rt-surface-solid) !important; color:var(--rt-text) !important; }
html[data-theme="dark"] .detail, html[data-theme="dark"] .back { color:var(--rt-primary-2) !important; }
html[data-theme="dark"] .status, html[data-theme="dark"] .eyebrow, html[data-theme="dark"] .avatar, html[data-theme="dark"] .code { background:rgba(var(--rt-primary-rgb),.18) !important; color:var(--rt-text) !important; }
html[data-theme="dark"] .public-navbar__brand, html[data-theme="dark"] .public-navbar__brand-text strong { color:var(--rt-text); }
html[data-theme="dark"] .public-navbar__brand-text small { color:var(--rt-text-muted, #94a3b8); }
html[data-theme="dark"] .public-navbar__nav .rt-topbar-icon-tbl, html[data-theme="dark"] .public-navbar__nav a { color:var(--rt-text); background:var(--rt-surface-solid); border-color:var(--rt-border); }
html[data-theme="dark"] .rt-feature-card a:not(.rt-btn),
html[data-theme="dark"] .rt-feature-card b,
html[data-theme="dark"] .rt-feature-card > span { color:var(--rt-text) !important; }
html[data-theme="dark"] .rt-feature-card a:not(.rt-btn):hover,
html[data-theme="dark"] .rt-feature-card a:not(.rt-btn):focus-visible { color:var(--rt-primary-2) !important; }
html[data-theme="light"] .public-navbar__brand,
html[data-theme="light"] .public-navbar__brand-text strong,
html[data-theme="light"] .public-navbar__nav a,
html[data-theme="light"] .public-footer,
html[data-theme="light"] .public-footer__brand,
html[data-theme="light"] .public-footer__brand-text strong,
html[data-theme="light"] .public-footer__column h2 { color:#101828; }
html[data-theme="light"] .public-navbar__brand-text small,
html[data-theme="light"] .public-footer__brand-text small,
html[data-theme="light"] .public-footer__intro,
html[data-theme="light"] .public-footer__links,
html[data-theme="light"] .public-footer__links a,
html[data-theme="light"] .public-footer__bottom { color:#667085; }
html[data-theme="light"] .portal-card,
html[data-theme="light"] .portal-pager,
html[data-theme="light"] .portal-card h2,
html[data-theme="light"] .portal-pager__link { color:#101828; }
html[data-theme="light"] .portal-card p { color:#667085; }
html[data-theme="light"] .portal-highlights,
html[data-theme="light"] .portal-highlight { color:#101828; background:#fff; border-color:rgba(15,23,42,.1); }
html[data-theme="light"] .portal-highlight h3 a { color:#101828; }
html[data-theme="light"] .portal-highlight p { color:#667085; }
.public-navbar { display:block; width:100%; box-sizing:border-box; padding:0 clamp(16px,4vw,56px) !important; }
.public-navbar, .public-footer { max-width:none; align-self:stretch; }
.public-navbar { position:relative; z-index:2; }
.public-navbar__inner { width:100%; max-width:none; margin:0; box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:22px 0; }
.public-navbar__brand { display:flex; align-items:center; gap:12px; min-width:0; padding:8px 12px; border-radius:16px; color:#102a43; font-weight:800; text-decoration:none; }
.public-navbar__brand img { width:48px; height:48px; object-fit:contain; flex:0 0 auto; }
.public-navbar__brand-text { display:grid; gap:3px; min-width:0; }
.public-navbar__brand-text small { display:block; color:#627d98; font-weight:500; }
.public-navbar__nav { display:flex; align-items:center; gap:8px; }
.public-navbar__desktop-actions { display:flex; align-items:center; gap:8px; }
.public-navbar__mobile-actions { display:none; }
.public-navbar__nav .rt-dropdown { position:relative; }
.public-navbar__nav .rt-dropdown-menu { right:0; left:auto; min-width:190px; }
.public-navbar__nav .rt-topbar-icon-tbl, .public-navbar__nav .rt-topbar_icon-tbl { display:inline-grid; place-items:center; width:42px; height:42px; border:1px solid var(--rt-border); border-radius:var(--rt-radius); background:var(--rt-surface); color:var(--rt-text); cursor:pointer; }
.public-navbar__nav .rt-topbar-icon-tbl:hover, .public-navbar__nav .rt-topbar-icon-tbl:focus-visible, .public-navbar__nav .rt-topbar_icon-tbl:hover, .public-navbar__nav .rt-topbar_icon-tbl:focus-visible { border-color:#1f6feb; }
.public-navbar__mobile-actions .rt-dropdown-menu { min-width:220px; padding:7px; }
.public-navbar__settings-title { padding:7px 10px 6px; color:var(--rt-muted); font-size:.7rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.public-navbar__settings-divider { height:1px; margin:6px 3px; background:var(--rt-border); }
.public-navbar__settings-menu .rt-dropdown-item { display:flex; align-items:center; gap:10px; width:100%; min-height:38px; padding:9px 10px; border:0; border-radius:var(--rt-radius); background:transparent; color:var(--rt-text); font-size:.86rem; font-weight:700; text-align:left; text-decoration:none; cursor:pointer; }
.public-navbar__settings-menu .rt-dropdown-item:hover, .public-navbar__settings-menu .rt-dropdown-item:focus-visible { background:rgba(var(--rt-primary-rgb),.1); color:var(--rt-primary); outline:none; }
.public-navbar .public-navbar__brand { transition:transform .24s ease; }
.public-navbar .public-navbar__brand:hover, .public-navbar .public-navbar__brand:focus-visible { transform:translateY(-1px); }
.public-footer { position:sticky; bottom:0; z-index:0; isolation:isolate; overflow:hidden; margin-top:0; border-top:0; padding:0 clamp(16px,4vw,56px); color:var(--rt-muted); background:#f8fafc; font-size:.88rem; }
.public-footer::before { content:""; position:absolute; z-index:-2; inset:0; pointer-events:none; background-image:url("../uploads/images/public-footer-landmark.webp"); background-repeat:no-repeat; background-position:center calc(100% - 10px); background-size:min(800px,78vw); opacity:.2; transform:none; }
.public-footer::after { content:""; position:absolute; z-index:-1; inset:0; pointer-events:none; background:linear-gradient(180deg,rgba(248,250,252,.96) 0%,rgba(248,250,252,.72) 55%,rgba(248,250,252,.9) 100%); }
.public-footer__inner { position:relative; z-index:1; width:100%; max-width:none; margin:0; padding:48px 0 24px; }
.public-footer__grid { display:grid; grid-template-columns:minmax(240px,1.5fr) repeat(3,minmax(130px,1fr)); gap:30px; }
.public-footer__brand { display:inline-flex; align-items:center; gap:12px; color:var(--rt-text); text-decoration:none; font-weight:800; }
.public-footer__brand img { width:48px; height:48px; object-fit:contain; flex:0 0 auto; }
.public-footer__brand-text { display:grid; gap:3px; }
.public-footer__brand-text small { color:var(--rt-muted); font-weight:500; }
.public-footer__intro { max-width:360px; margin:18px 0 0; color:var(--rt-muted); line-height:1.7; }
.public-footer__column h2 { margin:0 0 14px; color:var(--rt-text); font-size:.86rem; letter-spacing:.08em; text-transform:uppercase; }
.public-footer__links { display:grid; gap:9px; margin:0; padding:0; list-style:none; }
.public-footer__links a { color:var(--rt-muted); text-decoration:none; transition:color .2s ease,transform .2s ease; }
.public-footer__links a:hover,.public-footer__links a:focus-visible { color:var(--rt-primary); transform:translateX(3px); }
.public-footer__bottom { display:flex; justify-content:space-between; gap:16px; margin-top:34px; padding-top:18px; border-top:1px solid var(--rt-border); color:var(--rt-muted); font-size:.8rem; }
html[data-theme="dark"] .public-footer { color:var(--rt-muted); background:#181818; }
html[data-theme="dark"] .public-footer::before { opacity:.16; filter:brightness(1.8) saturate(.8); }
html[data-theme="dark"] .public-footer::after { background:linear-gradient(180deg,rgba(24,24,24,.96) 0%,rgba(24,24,24,.72) 55%,rgba(24,24,24,.94) 100%); }
.public-footer__bottom span:last-child { text-align:right; }
@media (max-width:760px) { body:has(.public-footer) > main { min-height:auto; } .public-footer { position:relative; bottom:auto; } .public-footer::before { background-size:110% auto; background-position:center calc(100% - 8px); opacity:.1; } .public-footer__inner { padding-top:36px; } .public-footer__grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .public-footer__grid > :first-child { grid-column:1/-1; } .public-footer__bottom { display:grid; } .public-footer__bottom span:last-child { text-align:left; } }
@media (max-width:560px) {
    .public-navbar__inner { align-items:flex-start; }
    .public-navbar__desktop-actions { display:none; }
    .public-navbar__mobile-actions { display:block; }
    .public-navbar__nav .public-navbar__toggle { width:36px; height:36px; }
    .public-navbar__mobile-actions .rt-sm { width:.82rem; height:.82rem; }
}
@media (max-width:460px) { .public-footer__grid { grid-template-columns:1fr; } .public-footer__grid > :first-child { grid-column:auto; } }

html[data-radius="flat"] .public-navbar__brand,
html[data-radius="flat"] .public-navbar__brand img,
html[data-radius="flat"] .public-footer__brand,
html[data-radius="flat"] .search-preview,
html[data-radius="flat"] .search-preview button,
html[data-radius="flat"] .filter,
html[data-radius="flat"] .filter input,
html[data-radius="flat"] .filter select,
html[data-radius="flat"] .filter button,
html[data-radius="flat"] .avatar,
html[data-radius="flat"] .status,
html[data-radius="flat"] .eyebrow,
html[data-radius="flat"] .profile,
html[data-radius="flat"] .address,
html[data-radius="flat"] .button,
html[data-radius="flat"] .rt-btn { border-radius:0 !important; }

html[data-radius="rounded"] .public-navbar__brand img,
html[data-radius="rounded"] .public-footer__brand img { border-radius:1rem !important; }

/* The select menu is moved to body by Retro-term so it needs a page-level scope. */
body:has(#directoryFilter) .rt-select-menu {
    width:min(320px, calc(100vw - 24px)) !important;
    max-width:calc(100vw - 24px) !important;
}
body:has(#directoryFilter) .rt-select-menu[hidden] {
    display:none !important;
}
body:has(#directoryFilter) .rt-select-toggle {
    min-height:44px;
    border:1px solid var(--line, #d9e2ec);
    border-radius:0;
    padding:0 13px;
    background:#fff;
    color:var(--ink, #172b4d);
    font-weight:400;
    text-align:left;
}
html[data-radius="flat"] body:has(#directoryFilter) .rt-select-toggle,
html[data-radius="flat"] body:has(#directoryFilter) .rt-select-menu,
html[data-radius="flat"] body:has(#directoryFilter) .rt-select-search-input,
html[data-radius="flat"] body:has(#directoryFilter) .rt-select-option { border-radius:0 !important; }
html[data-radius="rounded"] body:has(#directoryFilter) .rt-select-toggle,
html[data-radius="rounded"] body:has(#directoryFilter) .rt-select-menu,
html[data-radius="rounded"] body:has(#directoryFilter) .rt-select-search-input,
html[data-radius="rounded"] body:has(#directoryFilter) .rt-select-option { border-radius:var(--rt-radius) !important; }
body:has(#directoryFilter) .rt-select-menu { overflow:hidden; }
body:has(#directoryFilter) .rt-select-list { min-width:0; padding-right:0; }
body:has(#directoryFilter) .rt-select-option { box-sizing:border-box; min-width:100%; }
html[data-theme="dark"] body:has(#directoryFilter) .rt-select-toggle {
    border-color:var(--rt-border);
    background:var(--rt-surface-solid);
    color:var(--rt-text);
}
body:has(#directoryFilter) .rt-select-option {
    white-space:normal;
    overflow-wrap:anywhere;
}
/* Complaint form uses the same Retro-term select treatment as the directory filter. */
body:has(#complaintForm) .rt-select,
body:has(#complaintForm) .rt-select-toggle {
    width:100%;
    box-sizing:border-box;
}
body:has(#complaintForm) .rt-select-toggle {
    min-height:44px;
    border:1px solid var(--line, #d9e2ec);
    border-radius:0;
    padding:0 13px;
    background:#fff;
    color:var(--ink, #172b4d);
    font:inherit;
    font-weight:400;
    text-align:left;
}
body:has(#complaintForm) .rt-select-menu {
    max-width:calc(100vw - 24px) !important;
    overflow:hidden;
}
body:has(#complaintForm) .rt-select-menu[hidden] {
    display:none !important;
}
body:has(#complaintForm) .rt-select-list {
    min-width:0;
    padding-right:0;
}
body:has(#complaintForm) .rt-select-option {
    box-sizing:border-box;
    min-width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
}
html[data-radius="flat"] body:has(#complaintForm) .rt-select-toggle,
html[data-radius="flat"] body:has(#complaintForm) .rt-select-menu,
html[data-radius="flat"] body:has(#complaintForm) .rt-select-search-input,
html[data-radius="flat"] body:has(#complaintForm) .rt-select-option { border-radius:0 !important; }
html[data-radius="rounded"] body:has(#complaintForm) .rt-select-toggle,
html[data-radius="rounded"] body:has(#complaintForm) .rt-select-menu,
html[data-radius="rounded"] body:has(#complaintForm) .rt-select-search-input,
html[data-radius="rounded"] body:has(#complaintForm) .rt-select-option { border-radius:var(--rt-radius) !important; }
html[data-theme="dark"] body:has(#complaintForm) .rt-select-toggle {
    border-color:var(--rt-border);
    background:var(--rt-surface-solid);
    color:var(--rt-text);
}
body:has(#directoryPagination) .rt-table-pagination__btn {
    width:34px;
    height:34px;
    display:inline-grid;
    place-items:center;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    color:var(--rt-text);
    box-shadow:none;
}
body:has(#directoryPagination) .directory-pagination {
    display:flex !important;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
    width:100%;
}
body:has(#directoryPagination) .directory-pagination .rt-table-pagination__nav {
    display:flex !important;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
    flex-wrap:nowrap;
}
body:has(#directoryPagination) .rt-table-pagination__btn:hover:not(:disabled),
body:has(#directoryPagination) .rt-table-pagination__btn:focus-visible {
    border:0;
    background:rgba(var(--rt-primary-rgb), .08);
    color:var(--rt-primary);
}
body:has(#directoryPagination) .rt-table-pagination__btn:disabled {
    opacity:.35;
    cursor:not-allowed;
}
body:has(#directoryPagination) .rt-table-pagination__text {
    font-weight:800;
    color:var(--rt-text);
}
body:has(#directoryPagination) .rt-table-pagination__pages {
    display:flex;
    align-items:center;
    gap:6px;
}
body:has(#directoryPagination) .rt-table-pagination__pages .rt-table-pagination__btn.is-active {
    color:var(--rt-primary);
    background:rgba(var(--rt-primary-rgb),.08);
}
html[data-radius="rounded"] body:has(#directoryPagination) .rt-table-pagination__btn {
    border-radius:var(--rt-radius) !important;
}
html[data-radius="flat"] body:has(#directoryPagination) .rt-table-pagination__btn {
    border-radius:0 !important;
}
html[data-theme="dark"] body:has(#directoryPagination) .directory-pagination {
    color:var(--rt-text);
}
@media (max-width:640px) {
    body:has(#directoryPagination) .directory-pagination {
        justify-content:center;
    }
}
/* Portal detail follows the same public theme, radius, and navbar controls. */
html[data-theme="dark"] .public-navbar__nav a.rt-bg-white,
html[data-theme="dark"] .public-navbar__nav a.rt-btn {
  background: var(--rt-surface-solid) !important;
  color: var(--rt-text) !important;
  border-color: var(--rt-border) !important;
}

html[data-theme="dark"] .portal-detail .post-body,
html[data-theme="dark"] .portal-detail .post-body p,
html[data-theme="dark"] .portal-detail .post-meta,
html[data-theme="dark"] .portal-detail .portal-widget,
html[data-theme="dark"] .portal-detail .portal-widget__muted,
html[data-theme="dark"] .portal-detail .portal-widget small {
  color: var(--rt-text) !important;
}

html[data-theme="dark"] .portal-detail .eyebrow {
  background: transparent !important;
}

html[data-radius="rounded"] .portal-detail__article,
html[data-radius="rounded"] .portal-detail .portal-widget,
html[data-radius="rounded"] .portal-detail .portal-ad,
html[data-radius="rounded"] .portal-detail .portal-tag {
  border-radius: var(--rt-radius, 18px) !important;
}

html[data-radius="flat"] .portal-detail__article,
html[data-radius="flat"] .portal-detail .portal-widget,
html[data-radius="flat"] .portal-detail .portal-ad,
html[data-radius="flat"] .portal-detail .portal-tag {
  border-radius: 0 !important;
}

html[data-theme="dark"] .portal-card,
html[data-theme="dark"] .portal-pager {
  color: var(--rt-text) !important;
}
.portal-card { box-shadow:none !important; }
.portal-page-tabs {
  display:flex;
  align-items:center;
  gap:8px;
  margin:18px 0 22px;
}
.portal-page-tab {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:32px;
  padding:0 12px;
  border:1px solid var(--rt-border);
  border-radius:var(--rt-radius);
  color:var(--rt-muted);
  background:var(--rt-surface);
  font-size:.76rem;
  font-weight:800;
}
.portal-page-tab:hover,
.portal-page-tab:focus-visible,
.portal-page-tab.is-active {
  color:var(--rt-primary);
  border-color:var(--rt-primary);
  background:rgba(var(--rt-primary-rgb),.08);
}
.portal-card.is-filter-hidden {
  opacity:0;
}
.portal-card { content-visibility:auto; contain-intrinsic-size:auto 260px; }
@media(max-width:760px) {
  .portal-page-tabs { justify-content:center; margin:14px 0 18px; }
}

html[data-radius="rounded"] .portal-card,
html[data-radius="rounded"] .portal-pager,
html[data-radius="rounded"] .portal-pager__link,
html[data-radius="rounded"] .portal-card__image {
  border-radius: var(--rt-radius, 18px) !important;
}

html[data-radius="flat"] .portal-card,
html[data-radius="flat"] .portal-pager,
html[data-radius="flat"] .portal-pager__link,
html[data-radius="flat"] .portal-card__image {
  border-radius: 0 !important;
}

/* Portal pagination mirrors the Retro-term table pagination component. */
.portal-pager {
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 20px !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  flex-wrap:wrap;
}
.portal-pager > span {
  font-size:.8rem;
  font-weight:700;
  color:var(--rt-muted) !important;
}
.portal-pager__links {
  display:flex;
  align-items:center;
  gap:6px;
}
.portal-pager__link {
  width:34px;
  min-width:34px;
  height:34px;
  display:inline-grid;
  place-items:center;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:var(--rt-text) !important;
  box-shadow:none !important;
  font-size:.82rem;
  font-weight:800;
}
.portal-pager__link:hover:not([aria-disabled="true"]),
.portal-pager__link:focus-visible {
  background:rgba(var(--rt-primary-rgb),.08) !important;
  color:var(--rt-primary) !important;
}
.portal-pager__link.is-active {
  background:transparent !important;
  border-color:transparent !important;
  color:var(--rt-text) !important;
}
.portal-pager__link[aria-disabled="true"] {
  opacity:.35;
  cursor:not-allowed;
}
.portal-content-tabs {
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
}
.portal-content-tab {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:32px;
  padding:0 12px;
  border:1px solid var(--rt-border);
  border-radius:var(--rt-radius);
  color:var(--rt-muted);
  background:var(--rt-surface);
  font-size:.76rem;
  font-weight:800;
  text-decoration:none;
}
.portal-content-tab:hover,
.portal-content-tab:focus-visible,
.portal-content-tab.is-active {
  color:var(--rt-primary);
  border-color:var(--rt-primary);
  background:rgba(var(--rt-primary-rgb),.08);
}
html[data-theme="dark"] .portal-content-tab {
  color:var(--rt-text);
  background:var(--rt-surface-solid);
}
html[data-radius="flat"] .portal-content-tab { border-radius:0; }
html[data-radius="rounded"] .portal-content-tab { border-radius:var(--rt-radius); }
.portal-highlights .public-map__head {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:end;
}
.portal-highlight {
  content-visibility:auto;
  contain-intrinsic-size:auto 220px;
}
.portal-highlight.is-filter-hidden {
  opacity:0;
  pointer-events:none;
}
@media(max-width:620px) {
  .portal-pager {
    flex-direction:column;
    align-items:center;
    text-align:center;
  }
  .portal-pager > span { width:100%; text-align:center; }
}
@media(max-width:760px) {
  .portal-highlights .public-map__head { display:block; }
  .portal-highlights .portal-content-tabs { margin:12px 0; }
}

/* Frontpage uses the shared public stylesheet and the Retro-term card contract. */
.public-home {
  --navy:#102a43;
  --blue:#1f6feb;
  --ink:#172b4d;
  --muted:#627d98;
  --line:#d9e2ec;
  --soft:#f0f6ff;
  color:var(--ink);
}
.public-home .visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.public-home a { color:inherit; }
.public-home .public-shell { width:100%; margin:0 auto; padding-inline:clamp(16px,4vw,56px); }
.public-home .hero { display:grid; grid-template-columns:1.1fr .9fr; gap:32px; align-items:center; padding:56px 0 44px; }
.public-home .eyebrow { display:inline-flex; padding:8px 12px; border-radius:999px; background:#dcecff; color:#174a8b; font-weight:800; font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; }
.public-home h1 { margin:18px 0 14px; max-width:720px; color:var(--navy); font-size:clamp(2.2rem,5vw,4.2rem); line-height:1.05; letter-spacing:-.045em; }
.public-home .lead { max-width:650px; color:var(--muted); font-size:1.08rem; line-height:1.7; }
.public-home .hero-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:26px; }
.public-home .hero-actions .rt-btn,.public-home .search-preview .rt-btn,.public-home .public-map__head h2 { display:inline-flex; align-items:center; gap:8px; }
.public-home .hero-card { position:relative; z-index:20; overflow:visible; padding:28px; border:1px solid rgba(31,111,235,.13); background:rgba(255,255,255,.78); }
.public-home .hero-card h2 { margin:0 0 12px; color:var(--navy); font-size:1.25rem; }
.public-home .hero-card p { color:var(--muted); line-height:1.65; }
.public-home .search-preview { display:flex; gap:8px; padding:8px; border:1px solid var(--line); background:#fff; }
.public-home .search-preview input { min-width:0; flex:1; border:0; outline:0; padding:10px; color:var(--ink); }
.public-home .search-preview button { border:0; padding:0 14px; color:#fff; background:var(--blue); font-weight:800; }
.public-home .public-search-autocomplete { position:relative; z-index:2; }
.public-home .public-search-suggestions { position:absolute; z-index:1000; top:calc(100% + 8px); left:0; right:0; display:grid; gap:4px; padding:8px; border:1px solid var(--line); background:#fff; }
.public-home .public-search-suggestions[hidden] { display:none; }
.public-home .public-search-suggestion { display:block; width:100%; padding:10px 12px; border:0; background:transparent; color:var(--ink); text-align:left; cursor:pointer; font:inherit; }
.public-home .public-search-suggestion:hover,.public-home .public-search-suggestion:focus-visible { outline:0; background:var(--soft); color:var(--blue); }
.public-home .features { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; padding:18px 0 12px; }
.public-home .features > a { display:flex; min-width:0; color:inherit; text-decoration:none; }
.public-home .feature { padding:22px; border:1px solid var(--line); background:rgba(255,255,255,.72); }
.public-home .feature b { display:flex; align-items:center; gap:8px; color:var(--navy); margin-bottom:8px; }
.public-home .feature b .rt { color:var(--blue); }
.public-home .feature span { color:var(--muted); line-height:1.55; font-size:.92rem; }
.public-home .feature .rt-btn { margin-top:14px; width:max-content; }
.public-home .public-map { margin:12px 0 60px; padding:22px; border:1px solid var(--line); background:rgba(255,255,255,.72); }
.public-home .public-map__head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:16px; }
.public-home .public-map__head h2 { margin:0; color:var(--navy); font-size:clamp(1.35rem,2.5vw,2rem); }
.public-home .public-map__head p { margin:6px 0 0; color:var(--muted); }
.public-home .public-map__canvas { min-height:360px; border:1px solid var(--line); background:#e8f0f7; contain:layout paint; }
.public-home .public-map__status { margin:12px 0 0; color:var(--muted); font-size:.9rem; }
.public-home .portal-highlights { margin:0 0 34px; padding:22px; border:1px solid var(--rt-border); background:var(--rt-surface-solid); }
.public-home .portal-highlights__grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.public-home .portal-highlight { padding:18px; border:1px solid var(--rt-border); background:var(--rt-surface-solid); }
.public-home .portal-highlight__image { display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; margin-bottom:12px; }
.public-home > main { overflow-x:clip; overscroll-behavior-x:none; }
.public-home .feature { content-visibility:auto; contain-intrinsic-size:1px 220px; }
.public-home .portal-highlight > span { color:var(--blue); font-size:.72rem; font-weight:800; letter-spacing:.06em; }
.public-home .portal-highlight h3 { margin:8px 0; font-size:1rem; line-height:1.3; }
.public-home .portal-highlight h3 a { color:var(--rt-text); text-decoration:none; }
.public-home .portal-highlight p { margin:0; color:var(--rt-muted); font-size:.88rem; line-height:1.55; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; white-space:pre-line; }
.public-home .portal-card.is-filter-hidden { opacity:0; }
.public-home .portal-card[hidden] { display:none !important; }
.portal-pager__ellipsis,
body:has(#directoryPagination) .rt-table-pagination__ellipsis {
    display:inline-grid;
    place-items:center;
    min-width:20px;
    color:var(--rt-muted);
    font-weight:800;
}
.public-home .portal-pager { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:22px; padding:14px 18px; border:1px solid var(--rt-border); background:var(--rt-surface-solid); color:var(--rt-text); }
.public-home .portal-pager__links { display:flex; align-items:center; gap:8px; }
.public-home .portal-pager__link { display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 10px; border:1px solid var(--rt-border); color:var(--rt-text); text-decoration:none; }
.public-home .portal-pager__link.is-active { background:var(--rt-primary); border-color:var(--rt-primary); color:#fff; }
.public-home .portal-pager__link[aria-disabled="true"] { opacity:.45; pointer-events:none; }
.public-home .rt-card,.public-home .feature,.public-home .hero-card,.public-home .public-map,.public-home .portal-highlights,.public-home .portal-highlight,.public-home .search-preview,.public-home .public-search-suggestions,.public-home .public-search-suggestion,.public-home .portal-highlight__image { border-radius:var(--rt-radius,18px); }
html[data-radius="flat"] .public-home .rt-card,html[data-radius="flat"] .public-home .feature,html[data-radius="flat"] .public-home .hero-card,html[data-radius="flat"] .public-home .public-map,html[data-radius="flat"] .public-home .portal-highlights,html[data-radius="flat"] .public-home .portal-highlight,html[data-radius="flat"] .public-home .search-preview,html[data-radius="flat"] .public-home .public-search-suggestions,html[data-radius="flat"] .public-home .public-search-suggestion,html[data-radius="flat"] .public-home .portal-highlight__image { border-radius:0 !important; }
html[data-radius="rounded"] .public-home .portal-highlight__image { border-radius:var(--rt-radius,18px); }
html[data-theme="dark"] .public-home .hero-card,html[data-theme="dark"] .public-home .feature,html[data-theme="dark"] .public-home .public-map { background:var(--rt-surface-solid); border-color:var(--rt-border); }
html[data-theme="dark"] .public-home .feature b { color:var(--rt-text,#f5f5f5) !important; }
html[data-theme="dark"] .public-home .feature b .rt { color:var(--rt-primary-2,#7db3ff) !important; }
html[data-theme="dark"] .public-home .feature > span { color:var(--rt-muted,#bdbdbd) !important; }
@media (max-width:980px) { .public-home .portal-highlights__grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) { .public-home .hero { display:block; padding-top:34px; } .public-home .hero-card { margin-top:28px; } .public-home .features { grid-template-columns:1fr; padding-bottom:16px; } .public-home .portal-highlights__grid { grid-template-columns:1fr; padding-bottom:38px; } .public-home .public-map,.public-home .portal-highlights { padding:14px; } .public-home .public-map__head { display:block; } .public-home .portal-pager { align-items:flex-start; flex-direction:column; } }
@media (prefers-reduced-motion:reduce) { .public-home *, .public-home *::before, .public-home *::after { scroll-behavior:auto !important; transition-duration:0.01ms !important; animation-duration:0.01ms !important; } }

/* Frontpage footer: batik accent with a readable content veil. */
.public-footer {
    min-height:260px;
    background:#f8fafc;
}
.public-footer::before {
    background-image:url("../uploads/images/batik_mpd.webp");
    background-position:center;
    background-size:auto 100%;
    background-repeat:repeat;
    opacity:.2;
    transform:translateY(var(--public-footer-parallax, 0));
    transition:none;
}
.public-footer::after {
    background:linear-gradient(90deg,rgba(248,250,252,.96) 0%,rgba(248,250,252,.82) 48%,rgba(248,250,252,.94) 100%);
}
.public-footer__brand,
.public-footer__column h2,
.public-footer__brand-text strong {
    color:#172b4d;
}
.public-footer__brand-text small,
.public-footer__intro,
.public-footer__links,
.public-footer__links a,
.public-footer__bottom {
    color:#627d98;
}
.public-footer__bottom { border-color:#d9e2ec; }
.public-footer__links a:hover,
.public-footer__links a:focus-visible { color:var(--rt-primary); }
html[data-theme="dark"] .public-footer {
    background:#171717;
}
html[data-theme="dark"] .public-footer::before {
    opacity:.34;
}
html[data-theme="dark"] .public-footer::after {
    background:linear-gradient(90deg,rgba(10,10,10,.94) 0%,rgba(10,10,10,.78) 48%,rgba(10,10,10,.88) 100%);
}
html[data-theme="dark"] .public-footer__brand,
html[data-theme="dark"] .public-footer__column h2,
html[data-theme="dark"] .public-footer__brand-text strong {
    color:#fff;
}
html[data-theme="dark"] .public-footer__brand-text small,
html[data-theme="dark"] .public-footer__intro,
html[data-theme="dark"] .public-footer__links,
html[data-theme="dark"] .public-footer__links a,
html[data-theme="dark"] .public-footer__bottom {
    color:rgba(255,255,255,.78);
}
html[data-theme="dark"] .public-footer__bottom { border-color:rgba(255,255,255,.2); }
html[data-theme="dark"] .public-footer__links a:hover,
html[data-theme="dark"] .public-footer__links a:focus-visible { color:#fff; }
@media (max-width:760px) {
    main .portal-grid { justify-items:stretch; }
    main .portal-grid .portal-card { max-width:none; }
}
@media (max-width:760px) {
    .public-footer::before { background-size:auto 100%; opacity:.16; }
    html[data-theme="dark"] .public-footer::before { opacity:.26; }
    .public-footer__inner { padding-top:36px; }
}
