.mley-home-search-tabs { width: 100%; min-width: 0; container: home-search-tabs / inline-size; }
.mley-home-search-tabs [hidden] { display: none !important; }
.mley-home-search-tabs__nav { display: flex; flex-wrap: wrap; gap: .3rem; width: fit-content; max-width: 100%; padding: .3rem; margin: 0 0 1.2rem; border-radius: 12px; background: var(--surface-muted); }
.mley-home-search-tab { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .55rem .85rem; border: 1px solid transparent; border-radius: 9px; color: var(--text-muted); font-size: .85rem; line-height: 1.4; text-align: center; text-decoration: none; }
.mley-home-search-tab:hover { color: var(--accent-color); text-decoration: none; }
.mley-home-search-tab[aria-selected="true"], .mley-home-search-tab[aria-current="page"] { color: var(--accent-color); background: var(--bg-surface); border-color: var(--border-color); box-shadow: 0 2px 4px rgba(0,0,0,.04); }
.mley-home-search-tab:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.mley-home-search-tab > i { flex: 0 0 auto; }
.mley-home-search-tab__compact-label { display: none; }
.mley-home-search-tabs__label { display: block; margin: 0 0 .35rem; color: var(--text-color); font-size: .85rem; font-weight: 500; }
.mley-home-search-help { position: relative; display: inline-flex; }
.mley-home-search-help__button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); cursor: help; }
.mley-home-search-help__button:hover, .mley-home-search-help__button:focus-visible { color: var(--accent-color); background: var(--surface-muted); }
.mley-home-search-help__button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.popover:has(.mley-home-search-help__body) { max-width: min(18rem, calc(100vw - 16px)); border-color: var(--border-color); border-radius: 8px; background: var(--bg-surface); color: var(--text-color); font-size: .8rem; line-height: 1.5; }
.popover .mley-home-search-help__body { padding: .65rem .8rem; color: inherit; }
.mley-home-search-tabs__law-options { min-width: 0; width: 100%; border: 0; padding: 0; margin: 0; }
.mley-home-search-tabs__edition { border-top: 1px solid var(--border-color); margin-top: 1.1rem; padding-top: .4rem; }
.mley-home-search-tabs__date-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; padding: .6rem 0; }
.mley-home-search-tabs__date-form label { display: grid; gap: .35rem; flex: 1 1 9rem; min-width: 0; margin: 0; color: var(--text-color); font-size: .8rem; }
.mley-home-search-tabs__date-form :is(input,select,button) { min-height: 44px; }
.mley-home-search-tabs__date-form input { width: 100%; min-width: 0; }
@media (max-width: 575px) {
  .mley-home-search-tabs__nav { display: grid; grid-template-columns: repeat(5, auto); width: 100%; }
  .mley-home-search-tab { min-width: 44px; padding-inline: .4rem; white-space: nowrap; }
  .mley-home-search-tab > i, .mley-home-search-tab__full-label { display: none; }
  .mley-home-search-tab__compact-label { display: inline; }
  .mley-home-search-tabs .mley-home-primary-search__box { grid-template-columns: minmax(0,1fr) auto !important; border-radius: 16px; }
  .mley-home-search-help { grid-column: 2; grid-row: 1; }
  .mley-home-search-tabs #mley-home-primary-query { grid-column: 1; grid-row: 1; }
  .mley-home-search-tabs .mley-home-primary-search__box > i { display: none; }
  .mley-home-search-tabs .mley-home-primary-search__submit { grid-column: 1 / -1; width: 100% !important; }
  .mley-home-search-tabs__date-form button { flex: 1 1 100%; }
}
@media (max-width: 359px) {
  .mley-home-search-tab { font-size: .75rem; padding-inline: .2rem; }
}

/* Shared search identity for the home and regulations catalogs. */
body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card {
  --home-search-accent: #145b60;
  --home-search-accent-hover: #0d464b;
  --home-search-ink: #16383e;
  --home-search-muted: #546d72;
  --home-search-border: #d5e3e2;
  --home-search-surface: #f3f8f7;
  --home-search-ring: rgba(20, 91, 96, .13);
  border: 1px solid var(--home-search-border) !important;
  border-radius: 24px;
  background: var(--home-search-surface);
  box-shadow: 0 8px 28px rgba(22, 56, 62, .05);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card:hover {
  box-shadow: 0 8px 28px rgba(22, 56, 62, .05);
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card > .card-body {
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-search-hero {
  gap: 1.6rem;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-heading {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

.mley-home-search-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: .75rem;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-logo-mark {
  flex: 0 0 auto;
  width: 3.1rem;
  height: 1.4rem;
  padding: .1rem .8rem .1rem .35rem;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-logo-mark span {
  font-size: 1rem;
}

.mley-home-search-hero__kicker {
  color: var(--home-search-accent);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.6;
  text-transform: uppercase;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-search-hero__header {
  gap: .6rem;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-search-hero__title {
  color: var(--home-search-ink);
  font-size: clamp(1.65rem, 2.8vw, 2.3rem);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.16;
  text-wrap: balance;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-search-hero__subtitle {
  max-width: 38rem;
  color: var(--home-search-muted);
  font-size: .94rem;
  line-height: 1.65;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tabs__nav {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  justify-content: space-between;
  width: 100%;
  gap: .25rem;
  padding: 0;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--home-search-border);
  border-radius: 0;
  background: transparent;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tab {
  position: relative;
  min-width: 0;
  min-height: 48px;
  margin-bottom: -1px;
  padding: .65rem .3rem .85rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  color: var(--home-search-muted);
  font-size: .83rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tab:hover {
  color: var(--home-search-accent);
  background: var(--home-search-ring);
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tab:is([aria-selected="true"], [aria-current="page"]) {
  color: var(--home-search-accent);
  border-bottom-color: var(--home-search-accent);
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tab:focus-visible {
  outline-color: var(--home-search-accent);
  outline-offset: 3px;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-primary-search__box {
  min-height: 68px;
  gap: .65rem;
  padding: .5rem;
  border-color: var(--home-search-border);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: 0 4px 12px rgba(22, 56, 62, .04);
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-primary-search__box:focus-within {
  border-color: var(--home-search-accent);
  box-shadow: 0 0 0 4px var(--home-search-ring), 0 4px 12px rgba(22, 56, 62, .04);
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-help__button {
  color: var(--home-search-muted);
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-help__button:is(:hover, :focus-visible) {
  color: var(--home-search-accent);
  background: var(--home-search-surface);
  outline-color: var(--home-search-accent);
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-primary-search__submit {
  gap: .7rem;
  min-height: 50px;
  padding-inline: 1.25rem;
  border-color: var(--home-search-accent) !important;
  border-radius: 11px !important;
  background: var(--home-search-accent) !important;
  color: var(--bg-surface) !important;
  font-size: .9rem;
  font-weight: 600;
  transition: background-color .16s ease;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-primary-search__submit:is(:hover, :focus-visible) {
  border-color: var(--home-search-accent-hover) !important;
  background: var(--home-search-accent-hover) !important;
  filter: none;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-primary-search__submit:focus-visible {
  outline: 2px solid var(--home-search-accent);
  outline-offset: 3px;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-primary-search__submit svg {
  flex: 0 0 auto;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tabs__edition {
  margin-top: .85rem;
  border-top: 0;
}

body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tabs__date-form > button {
  border: 1px solid var(--home-search-accent) !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: var(--home-search-accent) !important;
  font-family: inherit;
}

:root[data-theme="dark"] body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card {
  --home-search-accent: #95d5ce;
  --home-search-accent-hover: #b5e6e0;
  --home-search-ink: #e4f3f1;
  --home-search-muted: #b3c8cb;
  --home-search-border: #355256;
  --home-search-surface: #1c3238;
  --home-search-ring: rgba(149, 213, 206, .13);
  background: var(--home-search-surface);
}

/* Use the search card's available width, including beside the sidebar. */
@container home-search-tabs (max-width: 620px) {
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tab__full-label { display: none; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tab__compact-label { display: inline; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tab > i { display: none; }
}

@media (max-width: 575px) {
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card { border-radius: 20px; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-search-hero { gap: 1.25rem; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-heading { gap: 1rem; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-hero__kicker { font-size: .6rem; letter-spacing: .09em; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-search-hero__subtitle { font-size: .88rem; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tabs__nav { gap: 0; margin-bottom: .85rem; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-tab { font-size: .76rem; padding-inline: .1rem; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-primary-search__box { gap: .35rem; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-primary-search__box input { padding-left: .5rem; }
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card .mley-home-primary-search__submit { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  body:is([data-page-kind="home"], [data-page-kind="reglamentos"]) .mley-home-search-card.card :is(.mley-home-search-tab, .mley-home-primary-search__box, .mley-home-primary-search__submit) { transition: none; }
}
