:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #101828;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --primary: #0f6b57;
  --primary-strong: #0a4f42;
  --primary-soft: #eaf6f2;
  --accent: #b45309;
  --danger: #d92d20;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-raised: 0 8px 22px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.ahd-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 62px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.ahd-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.ahd-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.ahd-brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
}

.ahd-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ahd-nav a {
  padding: 8px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.ahd-nav a:hover {
  background: #f2f4f7;
  color: var(--text);
}

.ahd-nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.ahd-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 20px 42px;
}

.is-webview .ahd-shell {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.ahd-dashboard,
.ahd-page,
.ahd-detail {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.ahd-dashboard > * {
  min-width: 0;
}

.ahd-home-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}

.ahd-home-heading > div {
  min-width: 0;
}

.ahd-home-heading > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.ahd-home-heading h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  word-break: keep-all;
}

.ahd-home-heading > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.ahd-home-heading > a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ahd-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.ahd-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  flex: 1;
  padding: 0 8px 0 14px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ahd-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 107, 87, 0.1);
}

.ahd-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.ahd-search input::placeholder {
  color: #98a2b3;
}

.ahd-search button,
.ahd-btn,
.ahd-icon-btn,
.ahd-fav-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.ahd-search button,
.ahd-btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.ahd-search button:hover,
.ahd-btn.primary:hover {
  background: var(--primary-strong);
}

.ahd-icon-btn {
  width: 44px;
  padding: 0;
  border-color: var(--line-strong);
  color: #475467;
}

.ahd-icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ahd-icon-btn.danger {
  color: var(--danger);
}

.ahd-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ahd-stat {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 78px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
  background: transparent;
}

.ahd-stat:last-child {
  border-right: 0;
}

.ahd-stat:hover {
  background: #f9fafb;
}

.ahd-stat span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ahd-stat span i {
  color: var(--primary);
  font-size: 14px;
}

.ahd-stat strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 0;
  font-size: 23px;
  line-height: 1.2;
}

.ahd-stat strong small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ahd-stat strong.action {
  align-items: center;
  color: var(--text);
  font-size: 15px;
}

.ahd-stat strong.action i {
  color: #98a2b3;
  font-size: 13px;
}

.ahd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.ahd-section-head h1,
.ahd-section-head h2 {
  min-width: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  word-break: keep-all;
}

.ahd-section-head > div > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ahd-section-head a,
.ahd-section-head span {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.ahd-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.ahd-list.compact {
  grid-template-columns: 1fr;
}

.ahd-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.ahd-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-raised);
  transform: translateY(-1px);
}

.ahd-card-main {
  display: grid;
  gap: 14px;
  height: 100%;
  padding: 18px 18px 16px;
}

.ahd-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
  padding-right: 40px;
}

.ahd-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.ahd-badge.muted {
  background: #eef2f6;
  color: #475467;
}

.ahd-badge.accent {
  background: #fff2d6;
  color: #a15c05;
}

.ahd-badge.value {
  background: #eaf8f0;
  color: #0b6b3a;
}

.ahd-card-heading {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ahd-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ahd-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.ahd-address {
  margin: 0;
  min-height: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ahd-card-price {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.ahd-card-price > div {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 92px;
  padding: 12px;
  background: #f9fafb;
}

.ahd-card-price > div.primary {
  background: #f0f8f5;
}

.ahd-card-price span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ahd-card-price strong {
  margin-top: 4px;
  color: #344054;
  font-size: 18px;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: normal;
}

.ahd-card-price .primary strong {
  color: var(--primary-strong);
  font-size: 21px;
}

.ahd-card-price em {
  margin-top: 5px;
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.ahd-card-price em.watch {
  color: #9a3412;
}

.ahd-card-price em.neutral {
  color: #667085;
}

.ahd-card-facts {
  display: grid;
  grid-template-columns: .9fr .65fr 1.45fr;
  gap: 0;
  margin: 0;
}

.ahd-card-facts > div {
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid var(--line);
}

.ahd-card-facts > div:first-child {
  padding-left: 0;
}

.ahd-card-facts > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.ahd-card-facts dt {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ahd-card-facts dt i {
  color: #98a2b3;
}

.ahd-card-facts dd {
  margin: 4px 0 0;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ahd-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ahd-card-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ahd-card-foot i {
  color: #98a2b3;
}

.ahd-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.ahd-metrics div {
  min-width: 0;
}

.ahd-metrics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ahd-metrics dd {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.ahd-metrics .primary dd {
  color: var(--primary-strong);
}

.ahd-metrics em {
  display: block;
  margin-top: 4px;
  color: #0b6b3a;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.ahd-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ahd-fav-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: #98a2b3;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.ahd-fav-btn.active,
.ahd-fav-wide.active {
  color: var(--accent);
}

.ahd-filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 180px 48px;
  gap: 8px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ahd-filter-bar input,
.ahd-filter-bar select,
.ahd-filter-editor input,
.ahd-filter-editor select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.ahd-filter-bar button {
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
}

.ahd-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.ahd-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ahd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.ahd-detail-title,
.ahd-info-panel,
.ahd-price-panel,
.ahd-filter-editor,
.ahd-filter-card,
.ahd-notification {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ahd-detail-title {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.ahd-detail-title h1 {
  margin: 0;
  font-size: 26px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.ahd-detail-title p {
  margin: 0;
  color: var(--muted);
}

.ahd-price-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.ahd-price-panel div {
  min-height: 96px;
  padding: 16px;
  background: #fff;
}

.ahd-price-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ahd-price-panel strong {
  display: block;
  margin-top: 10px;
  font-size: 21px;
  overflow-wrap: anywhere;
}

.ahd-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ahd-info-panel {
  padding: 16px;
}

.ahd-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ahd-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ahd-panel-head h2 {
  margin: 0;
}

.ahd-panel-head span,
.ahd-panel-head a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.ahd-info-panel h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.ahd-info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ahd-info-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}

.ahd-info-list.compact div {
  grid-template-columns: 170px minmax(0, 1fr);
}

.ahd-info-list dt {
  color: var(--muted);
  font-weight: 700;
}

.ahd-info-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ahd-filter-editor {
  display: none;
  gap: 12px;
  padding: 16px;
}

.ahd-filter-editor.open {
  display: grid;
}

.ahd-filter-editor label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ahd-page.auth {
  min-height: calc(100vh - 150px);
  place-items: center;
}

.ahd-auth-panel {
  width: min(420px, 100%);
}

.ahd-auth-panel.wide {
  width: min(760px, 100%);
}

.ahd-auth-panel h1 {
  margin: 0 0 14px;
}

.ahd-auth-copy,
.ahd-help {
  color: var(--muted);
  line-height: 1.6;
}

.ahd-alert {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 14px;
  font-weight: 800;
}

.ahd-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ahd-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ahd-settings-form {
  display: grid;
  gap: 12px;
}

.ahd-settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ahd-settings-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.ahd-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ahd-toggle {
  display: inline-flex !important;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 8px !important;
}

.ahd-toggle input {
  width: auto;
  min-height: auto;
}

.ahd-filter-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.ahd-filter-card h2 {
  margin: 0;
  font-size: 17px;
}

.ahd-filter-card p {
  margin: 5px 0;
  color: var(--muted);
}

.ahd-filter-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.ahd-notifications {
  display: grid;
  gap: 10px;
}

.ahd-notification {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.ahd-notification p {
  margin: 5px 0;
  color: var(--muted);
}

.ahd-notification time {
  color: var(--muted);
  font-size: 12px;
}

.ahd-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #98a2b3;
}

.ahd-dot.sent {
  background: var(--primary);
}

.ahd-dot.failed {
  background: var(--danger);
}

.ahd-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.ahd-empty h1 {
  color: var(--text);
}

.ahd-empty.inline {
  grid-column: 1 / -1;
  min-height: 150px;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.ahd-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 26px 18px 40px;
  color: var(--muted);
  font-size: 13px;
}

.ahd-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  height: calc(66px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.06);
}

.ahd-bottom-nav a {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  min-width: 0;
}

.ahd-bottom-nav i {
  font-size: 18px;
}

.ahd-bottom-nav a.active {
  color: var(--primary);
}

.ahd-bottom-nav a.active i {
  font-weight: 900;
}

@media (max-width: 860px) {
  .ahd-header {
    height: 56px;
  }

  .ahd-header-inner {
    padding: 0 12px;
  }

  .ahd-nav {
    display: none;
  }

  .ahd-shell {
    padding: 12px;
  }

  .ahd-dashboard {
    gap: 18px;
  }

  .ahd-list,
  .ahd-detail-grid,
  .ahd-account-grid {
    grid-template-columns: 1fr;
  }

  .ahd-stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ahd-stat {
    min-height: 74px;
    padding: 11px 12px;
  }

  .ahd-stat strong {
    font-size: 20px;
  }

  .ahd-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 48px;
  }

  .ahd-filter-bar input:first-child {
    grid-column: 1 / -1;
  }

  .ahd-filter-bar input[name="sido"] {
    grid-column: 1;
  }

  .ahd-filter-bar input[name="sigu"] {
    grid-column: 2;
  }

  .ahd-filter-bar select {
    grid-column: 1 / 3;
  }

  .ahd-filter-bar button {
    grid-column: 3;
    min-height: 42px;
  }

  .ahd-price-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ahd-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .ahd-home-heading {
    align-items: center;
    gap: 10px;
  }

  .ahd-home-heading > a {
    width: 40px;
    padding: 0;
  }

  .ahd-home-heading > a span {
    display: none;
  }

  .ahd-home-heading h1 {
    font-size: 23px;
  }

  .ahd-toolbar {
    gap: 8px;
  }

  .ahd-search {
    min-height: 46px;
  }

  .ahd-search button {
    min-width: 58px;
    padding: 0 10px;
  }

  .ahd-stat-row {
    gap: 0;
  }

  .ahd-stat {
    padding: 10px 8px;
  }

  .ahd-stat span {
    gap: 4px;
    font-size: 11px;
  }

  .ahd-stat strong {
    font-size: 19px;
  }

  .ahd-section-head h1,
  .ahd-section-head h2 {
    font-size: 19px;
  }

  .ahd-card-main {
    gap: 13px;
    padding: 14px;
  }

  .ahd-card-price > div {
    min-height: 84px;
    padding: 10px;
  }

  .ahd-card-price strong {
    font-size: 16px;
  }

  .ahd-card-price .primary strong {
    font-size: 18px;
  }

  .ahd-card-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 11px;
  }

  .ahd-card-facts > div:nth-child(2) {
    padding-right: 0;
    border-right: 0;
  }

  .ahd-card-facts > div:nth-child(3) {
    grid-column: 1 / -1;
    padding: 11px 0 0;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .ahd-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .ahd-info-list div,
  .ahd-info-list.compact div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .ahd-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .ahd-search {
    padding-left: 11px;
  }

  .ahd-search button {
    min-width: 52px;
  }

  .ahd-stat span i {
    display: none;
  }
}

.ahd-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ahd-metrics dd {
  overflow-wrap: anywhere;
}

.ahd-match-reason {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.ahd-decision-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ahd-decision-panel > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ahd-decision-panel .primary {
  background: #123c35;
  color: #fff;
}

.ahd-decision-panel span {
  display: block;
  margin-bottom: 7px;
  color: inherit;
  opacity: .72;
  font-size: 13px;
  font-weight: 800;
}

.ahd-decision-panel strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ahd-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ahd-check-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.ahd-info-panel.muted {
  background: #f8fafc;
}

.ahd-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ahd-advanced-filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.ahd-advanced-filter summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 900;
}

.ahd-advanced-filter .ahd-form-grid {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .ahd-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ahd-decision-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ahd-decision-panel .primary {
    grid-column: 1 / -1;
  }

  .ahd-quick-grid {
    grid-template-columns: 1fr;
  }
}

.ahd-brand-mark-img {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.ahd-brand-text {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

@media (max-width: 430px) {
  .ahd-brand-mark-img {
    width: 31px;
    height: 31px;
  }

  .ahd-brand-text {
    font-size: 17px;
  }
}
.ahd-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ahd-filter-actions .ahd-btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

@media (max-width: 560px) {
  .ahd-filter-card {
    align-items: flex-start;
  }

  .ahd-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
.ahd-filter-editor.simple {
  max-width: 760px;
}

.ahd-price-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.ahd-price-range-row > span {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 560px) {
  .ahd-price-range-row {
    grid-template-columns: 1fr;
  }

  .ahd-price-range-row > span {
    min-height: 10px;
  }
}
.ahd-filter-page {
  max-width: 920px;
  margin: 0 auto;
}

.ahd-filter-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbf9 0%, #ffffff 65%);
  box-shadow: var(--shadow);
}

.ahd-filter-hero span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.ahd-filter-hero h1 {
  margin: 6px 0 8px;
  font-size: 26px;
  line-height: 1.25;
}

.ahd-filter-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.ahd-filter-editor.simple {
  max-width: none;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ahd-filter-editor.simple.open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
  align-items: end;
  gap: 16px;
}

.ahd-filter-editor.simple .ahd-toggle,
.ahd-filter-editor.simple .ahd-btn.wide {
  grid-column: 1 / -1;
}

.ahd-btn.wide {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  font-size: 15px;
}

.ahd-filter-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.ahd-filter-list-head h2 {
  margin: 0;
  font-size: 18px;
}

.ahd-filter-list-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ahd-filter-card.clean {
  align-items: center;
  border-left: 4px solid var(--primary);
}

.ahd-filter-card.clean h2 {
  font-size: 18px;
}

@media (max-width: 760px) {
  .ahd-filter-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .ahd-filter-hero h1 {
    font-size: 22px;
  }

  .ahd-filter-editor.simple.open {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}
.ahd-badge.signal.strong,
.ahd-badge.signal.good {
  background: #dcfce7;
  color: #166534;
}

.ahd-badge.signal.watch {
  background: #fff7ed;
  color: #9a3412;
}

.ahd-badge.signal.neutral {
  background: #eef2f6;
  color: #475467;
}

.ahd-card-insight,
.ahd-risk-mini {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 10px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.ahd-card-insight.strong,
.ahd-card-insight.good {
  background: #ecfdf3;
  color: #166534;
}

.ahd-card-insight.watch,
.ahd-risk-mini.warn {
  background: #fff7ed;
  color: #9a3412;
}

.ahd-card-insight.neutral,
.ahd-risk-mini.note,
.ahd-risk-mini.ok {
  background: #f2f4f7;
  color: #475467;
}

.ahd-risk-mini i,
.ahd-card-insight i {
  margin-top: 2px;
  flex: 0 0 auto;
}

.ahd-analysis-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ahd-analysis-panel.strong,
.ahd-analysis-panel.good {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.ahd-analysis-panel.watch {
  border-color: #fed7aa;
  background: #fff7ed;
}

.ahd-analysis-panel.neutral {
  background: #f8fafc;
}

.ahd-analysis-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.ahd-analysis-panel h2 {
  margin: 5px 0 8px;
  font-size: 23px;
}

.ahd-analysis-panel p {
  margin: 0;
  color: #344054;
  line-height: 1.6;
}

.ahd-analysis-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ahd-analysis-panel dl div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(16, 24, 40, .08);
}

.ahd-analysis-panel dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ahd-analysis-panel dd {
  margin: 5px 0 0;
  font-weight: 900;
}

.ahd-risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ahd-risk-card {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.ahd-risk-card.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.ahd-risk-card.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.ahd-risk-card strong {
  display: block;
  font-size: 15px;
}

.ahd-risk-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ahd-step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ahd-step-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ahd-step-list span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.ahd-step-list strong {
  display: block;
  margin-top: 10px;
}

.ahd-step-list p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .ahd-analysis-panel,
  .ahd-risk-grid,
  .ahd-step-list {
    grid-template-columns: 1fr;
  }
}
.ahd-mock-panel {
  display: grid;
  gap: 12px;
}

.ahd-mock-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ahd-mock-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ahd-mock-form label.wide {
  grid-column: 1 / -1;
}

.ahd-mock-form small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.ahd-mock-form input,
.ahd-mock-form select,
.ahd-mock-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  resize: vertical;
}

.ahd-mock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.ahd-mock-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ahd-mock-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.ahd-mock-summary div {
  min-width: 0;
  padding: 14px;
  background: #fff;
}

.ahd-mock-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ahd-mock-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.ahd-mock-summary .success strong,
.ahd-mock-summary .likely strong {
  color: #166534;
}

.ahd-mock-summary .danger strong {
  color: #991b1b;
}

.ahd-mock-summary .warning strong {
  color: #92400e;
}

.ahd-mock-card a {
  display: grid;
  gap: 12px;
}

.ahd-mock-card.focused {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 60, 53, .12);
}

.ahd-badge.result.success {
  background: #dcfce7;
  color: #166534;
}

.ahd-badge.result.danger {
  background: #fee2e2;
  color: #991b1b;
}

.ahd-badge.result.warning {
  background: #fef3c7;
  color: #92400e;
}

.ahd-badge.result.neutral {
  background: #eef2f6;
  color: #475467;
}

.ahd-mock-result-message {
  margin: 0;
  padding: 11px 12px;
  border-radius: 7px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.ahd-mock-result-message.success {
  background: #f0fdf4;
  color: #166534;
}

.ahd-mock-result-message.danger {
  background: #fef2f2;
  color: #991b1b;
}

.ahd-mock-result-message.warning {
  background: #fffbeb;
  color: #92400e;
}

.ahd-mock-result {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.ahd-mock-result.success {
  border-color: #86efac;
  background: #f0fdf4;
}

.ahd-mock-result.danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.ahd-mock-result.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.ahd-mock-result > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ahd-mock-result > div > strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.ahd-mock-result p {
  margin: 8px 0 0;
  color: #344054;
  line-height: 1.6;
}

.ahd-mock-result dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ahd-mock-result dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
}

.ahd-mock-result dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ahd-mock-result dd {
  margin: 0;
  text-align: right;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .ahd-mock-form,
  .ahd-mock-result {
    grid-template-columns: 1fr;
  }

  .ahd-mock-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
