:root {
  --page-bg: #edf1f5;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: rgba(13, 47, 78, 0.1);
  --ink: #10223a;
  --ink-soft: #5b6d82;
  --green: #157c4b;
  --green-deep: #0d653b;
  --blue: #173e86;
  --blue-deep: #112d61;
  --blue-soft: #dae6fb;
  --success: #157c4b;
  --alert: #af5d2b;
  --shadow-lg: 0 28px 70px rgba(15, 31, 56, 0.16);
  --shadow-md: 0 12px 30px rgba(13, 35, 63, 0.08);
  --radius-xl: 34px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(21, 124, 75, 0.14), transparent 22%),
    radial-gradient(circle at top right, rgba(23, 62, 134, 0.14), transparent 24%),
    linear-gradient(180deg, #f5f8fb, var(--page-bg));
}

body.modal-open {
  overflow: hidden;
}

.page-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.app-frame {
  overflow: hidden;
  border-radius: 38px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.masthead {
  padding: 1.65rem 1.65rem 1.3rem;
  background:
    radial-gradient(circle at left, rgba(21, 124, 75, 0.24), transparent 26%),
    linear-gradient(100deg, var(--green-deep), var(--green), var(--blue));
  color: #fff;
}

.masthead__top,
.masthead__hero,
.search-console__footer,
.results-panel__header,
.result-row,
.result-row__body,
.result-row__actions,
.result-row__meta,
.portal-footer {
  display: flex;
  align-items: center;
}

.masthead__top,
.masthead__hero,
.search-console__footer,
.results-panel__header,
.portal-footer {
  justify-content: space-between;
}

.masthead__top,
.masthead__hero {
  gap: 1rem;
}

.masthead__hero {
  align-items: flex-end;
  margin-top: 1.35rem;
}

.brand {
  display: flex;
  align-items: center;
}

.brand__logo {
  display: block;
  width: min(300px, 100%);
  max-height: 66px;
  height: auto;
  object-fit: contain;
}

.masthead__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.state-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 1.08rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.state-switcher:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

#current-state-pill {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-size: 0.92rem;
  white-space: nowrap;
}

.state-switcher__chevron {
  width: 0.52rem;
  height: 0.52rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.state-switcher[aria-expanded="true"] .state-switcher__chevron {
  transform: rotate(-135deg) translateY(-0.08rem);
}

.masthead__copy {
  max-width: 700px;
}

.eyebrow,
.filter-panel__label,
.result-row__tag,
.status-badge,
.state-modal .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.masthead__copy h1,
.results-panel__header h2,
.state-modal__card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.results-panel__header h2,
.state-modal__card h2 {
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  font-weight: 800;
}

.masthead__copy h1 {
  font-family: Georgia, "Times New Roman", serif;
}

.masthead__copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.03;
  max-width: 11ch;
}

.hero__text,
.state-modal__copy {
  color: rgba(255, 255, 255, 0.84);
}

.hero__text {
  max-width: 60ch;
  line-height: 1.7;
}

.hero-highlight {
  min-width: 275px;
  padding: 1.15rem;
  border-radius: 24px;
  background: rgba(7, 22, 48, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-highlight__label {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
}

.hero-highlight strong {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 0.95;
}

.hero-highlight span {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.82);
}

.mode-badge {
  width: fit-content;
  margin-top: 0.75rem;
}

.search-console {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.3rem;
  justify-items: center;
}

.search-console--menu-open {
  padding-bottom: 0;
}

.search-shell {
  position: relative;
  z-index: 24;
  width: min(820px, 100%);
  margin: 0 auto;
}

.filters-panel {
  position: relative;
  z-index: 22;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  width: min(760px, 100%);
  margin: 0 auto;
}

.filters-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  min-width: 128px;
  padding: 0.78rem 1.12rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.filters-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.filters-toggle.has-active-filters {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.2);
}

.filters-toggle__chevron {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.filters-toggle.is-open .filters-toggle__chevron {
  transform: rotate(-135deg) translateY(-0.08rem);
}

.filter-deck-wrap {
  width: min(760px, 100%);
  animation: filters-drop 180ms ease both;
}

.filter-deck-wrap[hidden] {
  display: none;
}

.search-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.55rem 0.5rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 16px 36px rgba(7, 23, 49, 0.14);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 28;
  display: grid;
  gap: 0.12rem;
  width: 100%;
  max-height: 11rem;
  padding: 0.38rem;
  overflow-y: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(7, 23, 49, 0.14);
  border: 1px solid rgba(16, 34, 58, 0.08);
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion {
  display: grid;
  gap: 0.18rem;
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: none;
  border-radius: 18px;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.search-suggestion strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.search-suggestion span {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.search-suggestion:hover {
  background: #f2f6fb;
}

.search-suggestions::-webkit-scrollbar {
  width: 8px;
}

.search-suggestions::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(91, 109, 130, 0.35);
}

.search-bar__icon {
  position: relative;
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
}

.search-bar__icon::before,
.search-bar__icon::after {
  content: "";
  position: absolute;
}

.search-bar__icon::before {
  inset: 0.05rem 0.28rem 0.28rem 0.05rem;
  border: 2px solid #8aa0ba;
  border-radius: 50%;
}

.search-bar__icon::after {
  right: 0.08rem;
  bottom: 0.08rem;
  width: 0.42rem;
  height: 2px;
  background: #8aa0ba;
  transform: rotate(45deg);
  transform-origin: center;
  border-radius: 999px;
}

.search-bar input,
.filter-panel select,
.field select {
  font: inherit;
  color: var(--ink);
}

.search-bar input {
  width: 100%;
  padding: 0.35rem 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
}

.search-button,
.primary-button,
.ghost-button,
.link-button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.search-button,
.primary-button,
.ghost-button {
  border-radius: 999px;
}

.search-button {
  min-width: 150px;
  padding: 0.9rem 1.25rem;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #1a9b59);
  box-shadow: 0 10px 24px rgba(21, 124, 75, 0.24);
}

.primary-button {
  width: 100%;
  padding: 0.95rem 1.15rem;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 12px 28px rgba(17, 45, 97, 0.18);
}

.ghost-button {
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(16, 34, 58, 0.12);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.ghost-button--accent {
  color: var(--blue-deep);
  background: #eef4ff;
}

.link-button {
  padding: 0;
  border: none;
  background: none;
  color: var(--blue-deep);
}

.search-button:hover,
.primary-button:hover,
.ghost-button:hover,
.link-button:hover,
.result-row__button:hover {
  transform: translateY(-1px);
}

.filter-deck {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.48rem;
  width: 100%;
  margin: 0 auto;
  padding: 0.55rem;
  border-radius: 1.65rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.filter-field,
.filter-panel {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
  min-height: 2.85rem;
  padding: 0.08rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 22px rgba(13, 35, 63, 0.1);
  color: var(--ink);
}

.filter-field {
  flex: 1 1 215px;
  max-width: 230px;
}

.filter-panel--compact {
  min-width: 0;
}

.filter-field--sort {
  flex: 0 1 180px;
  max-width: 180px;
}

.filter-panel__label {
  flex: 0 0 auto;
  color: #607288;
  letter-spacing: 0.08em;
  font-size: 0.64rem;
  white-space: nowrap;
}

.filter-field input,
.filter-field__trigger,
.filter-panel select {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0.58rem 1.45rem 0.58rem 0;
  border: none;
  border-radius: 999px;
  color: var(--ink);
  outline: none;
  font-size: 0.92rem;
}

.filter-field__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.filter-panel select {
  background:
    linear-gradient(45deg, transparent 50%, #708299 50%) calc(100% - 0.95rem) calc(50% - 0.14rem) / 0.38rem 0.38rem
      no-repeat,
    linear-gradient(135deg, #708299 50%, transparent 50%) calc(100% - 0.7rem) calc(50% - 0.14rem) / 0.38rem 0.38rem
      no-repeat,
    transparent;
  appearance: none;
}

.filter-field input {
  padding-right: 1.6rem;
  background: transparent;
  appearance: none;
}

.filter-field input::-webkit-search-cancel-button {
  appearance: none;
}

.filter-field input::placeholder {
  color: #7b8ca1;
}

.filter-field__chevron {
  position: absolute;
  right: 0.92rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #708299;
  border-bottom: 2px solid #708299;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
  pointer-events: none;
}

.filter-field.is-open .filter-field__chevron {
  transform: translateY(-35%) rotate(-135deg);
}

.filter-field:focus-within,
.filter-panel:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14), 0 10px 22px rgba(13, 35, 63, 0.1);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 0.1rem;
  max-height: 11rem;
  padding: 0.35rem;
  overflow-y: auto;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(16, 34, 58, 0.08);
  box-shadow: 0 18px 38px rgba(10, 28, 53, 0.18);
}

.filter-menu[hidden] {
  display: none;
}

.filter-menu__option,
.filter-menu__empty {
  padding: 0.72rem 0.78rem;
  border-radius: 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
}

.filter-menu__option {
  border: none;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.filter-menu__option.is-active {
  background: #e9f1ff;
  color: var(--blue-deep);
}

.filter-menu__option:hover {
  background: #f2f6fb;
}

.filter-menu__empty {
  color: var(--ink-soft);
}

.field select:focus {
  border-color: rgba(23, 62, 134, 0.34);
  box-shadow: 0 0 0 4px rgba(23, 62, 134, 0.08);
}

.filter-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.filter-actions .ghost-button {
  width: auto;
  min-width: 102px;
  padding: 0.7rem 1.02rem;
  min-height: 2.85rem;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: none;
}

.content-area {
  padding: 1.3rem 1.65rem 1.6rem;
  background: linear-gradient(180deg, #f9fbfd, #eef3f7);
}

.results-panel {
  margin-top: 0;
  padding: 1.2rem;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.results-panel__header {
  gap: 1rem;
  align-items: flex-end;
}

.results-panel__header h2,
.footer-card h3 {
  margin: 0;
}

#status-message {
  max-width: 420px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: right;
}

.results-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(16, 34, 58, 0.08);
}

.pagination-summary {
  margin: 0;
  color: var(--ink-soft);
}

.pagination-controls,
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-controls {
  margin-left: auto;
}

.pagination-button,
.pagination-page {
  min-width: 2.8rem;
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 34, 58, 0.12);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.pagination-button:hover,
.pagination-page:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 34, 58, 0.08);
}

.pagination-button[disabled],
.pagination-page[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pagination-page.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 10px 22px rgba(17, 45, 97, 0.16);
}

.pagination-ellipsis {
  padding: 0 0.2rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.result-card {
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  border: 1px solid rgba(16, 34, 58, 0.16);
  box-shadow: 0 12px 24px rgba(14, 29, 49, 0.08);
  overflow: hidden;
  animation: rise-in 420ms ease both;
  animation-delay: var(--delay, 0ms);
}

.result-card[open] {
  border-color: rgba(16, 34, 58, 0.22);
  box-shadow: 0 18px 36px rgba(14, 29, 49, 0.12);
}

.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  cursor: pointer;
  list-style: none;
  border-radius: 18px;
}

.result-row::-webkit-details-marker {
  display: none;
}

.result-row__main {
  min-width: 0;
}

.result-row__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue-deep);
}

.result-row__tag--soft {
  background: #eaf7f0;
  color: var(--green-deep);
}

.result-row__lab {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.result-row__info h3 {
  margin: 0;
  font-size: 1.08rem;
}

.result-row h3 {
  margin: 0;
  font-size: 1.08rem;
}

.result-row__subtitle {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
}

.result-row__category {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.result-row__price {
  display: grid;
  gap: 0.28rem;
  min-width: 150px;
  text-align: right;
  justify-items: end;
}

.result-row__price-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
  width: 100%;
}

.result-row__tag--state {
  margin-bottom: 0;
}

.result-row__price strong {
  font-size: 2rem;
  line-height: 1;
  color: var(--green-deep);
}

.result-row__price small {
  color: var(--ink-soft);
}

.result-row__lab {
  color: var(--ink-soft);
}

.result-row__toggle {
  position: relative;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  opacity: 0.82;
}

.result-row__toggle::before {
  content: "";
  position: absolute;
  top: 0.05rem;
  left: 0.14rem;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--blue-deep);
  border-bottom: 2px solid var(--blue-deep);
  transform: rotate(45deg);
  transition: transform 160ms ease, top 160ms ease;
}

.result-card[open] .result-row__toggle::before {
  top: 0.28rem;
  transform: rotate(-135deg);
}

.result-expand {
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(16, 34, 58, 0.08);
  background: linear-gradient(180deg, #fbfdff, #f4f8fc);
}

.result-expand__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  padding-top: 0.9rem;
}

.result-expand__empty {
  margin: 0;
  padding-top: 0.9rem;
  color: var(--ink-soft);
}

.detail-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(16, 34, 58, 0.08);
}

.detail-card span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.detail-card strong {
  font-size: 0.94rem;
  line-height: 1.45;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  text-align: center;
}

.status-badge--economia {
  background: rgba(21, 124, 75, 0.12);
  color: var(--green-deep);
}

.status-badge--alerta {
  background: rgba(175, 93, 43, 0.12);
  color: var(--alert);
}

.status-badge--estavel {
  background: rgba(23, 62, 134, 0.1);
  color: var(--blue-deep);
}

.result-row__button {
  padding: 0.88rem 1rem;
  border: none;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  background: linear-gradient(135deg, var(--green), #1a9b59);
  box-shadow: 0 10px 22px rgba(21, 124, 75, 0.18);
}

.portal-footer {
  gap: 1rem;
  align-items: stretch;
  margin-top: 1rem;
}

.footer-card {
  flex: 1 1 0;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.footer-card p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.empty-state {
  padding: 2rem 1.2rem;
  border-radius: 18px;
  text-align: center;
  border: 1px dashed rgba(16, 34, 58, 0.16);
  background: #f9fbfd;
}

.empty-state h3 {
  margin: 0 0 0.45rem;
}

.state-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 22, 44, 0.52);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.state-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.state-modal__card {
  width: min(440px, 100%);
  padding: 1.35rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(21, 124, 75, 0.12), transparent 40%),
    linear-gradient(135deg, #ffffff, #eef4ff);
  box-shadow: 0 28px 70px rgba(8, 26, 49, 0.28);
}

.state-modal__card h2 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.08;
}

.state-modal__copy {
  color: var(--ink-soft);
  line-height: 1.65;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.field select {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(16, 34, 58, 0.12);
  background: #fff;
  outline: none;
}

.state-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes filters-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .masthead__hero,
  .results-panel__header,
  .portal-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-deck {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: min(680px, 100%);
    border-radius: 1.6rem;
  }

  .filter-field,
  .filter-field--sort,
  .filter-actions {
    max-width: none;
  }

  .pagination-bar {
    align-items: flex-start;
  }

  .pagination-controls {
    margin-left: 0;
  }

  #status-message {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 1200px);
    padding-top: 0.75rem;
  }

  .masthead,
  .content-area,
  .results-panel,
  .state-modal__card {
    padding: 1rem;
  }

  .masthead__copy h1 {
    max-width: none;
    font-size: 2.25rem;
  }

  .search-bar {
    grid-template-columns: auto 1fr;
    border-radius: 24px;
  }

  .search-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .search-console--menu-open {
    padding-bottom: 0;
  }

  .filter-deck,
  .portal-footer,
  .result-expand__grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .masthead__top,
  .masthead__nav,
  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .state-switcher,
  .ghost-button,
  .result-row__button,
  .pagination-button {
    width: 100%;
  }

  .filter-actions {
    width: auto;
    justify-content: flex-end;
    flex-direction: row;
  }

  .filter-deck {
    width: 100%;
    padding: 0.4rem;
    border-radius: 1.6rem;
    margin: 0 auto;
  }

  .filter-field,
  .filter-field--sort,
  .filter-panel,
  .filter-actions {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .filter-field input,
  .filter-panel select {
    width: 100%;
  }

  .filters-panel,
  .filter-deck-wrap {
    width: 100%;
  }

  .filters-toggle,
  .filter-actions .ghost-button {
    width: 100%;
  }

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

  .result-row__price {
    justify-items: start;
    text-align: left;
  }

  .result-row__price-meta {
    justify-content: flex-start;
  }

  .result-row__toggle {
    justify-self: end;
  }

  .pagination-controls {
    width: 100%;
    margin-left: 0;
  }

  .pagination-pages {
    justify-content: center;
  }
}
