/*
 * SobangNet v5.16.1 responsive recovery layer
 * Restores layout declarations lost during typography normalization.
 * Loaded last so it can be removed as a single rollback unit.
 */

html {
  scroll-padding-top: 76px;
}

body,
button,
input,
select,
textarea {
  line-height: 1.5;
}

.page {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.topbar {
  height: 72px;
  padding: 0 18px;
  border-bottom-color: #e8ecf1;
}

.brand-logo-button {
  width: 204px;
  max-width: 204px;
  min-height: 58px;
  overflow: hidden;
}

.brand-logo-img {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.top-title {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}

.top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.top-actions:empty {
  width: 40px;
}

.top-login-button,
.top-account-button,
.partner-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #d8dee7;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.top-notification-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #d8dee7;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
}

.top-notification-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  font-weight: 900;
  text-align: center;
}

.top-login-button {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(27px, 5.8vw, 31px);
  line-height: 1.27;
  letter-spacing: -0.045em;
}

.btn {
  font-size: 15px;
  line-height: 1.3;
}

.title {
  font-size: 24px;
  line-height: 1.34;
  letter-spacing: -0.035em;
}

.hero p,
.subtitle,
.founder-story p,
.legal-content p,
.legal-content li {
  font-size: 15px;
  line-height: 1.7;
}

.helper,
.small,
.address,
.search-note,
.legal-note {
  line-height: 1.6;
}

.search-card {
  margin-top: 22px;
  border-color: #d7dee7;
  background: #fff;
}

.typical-fee-card {
  border-color: #f0b6a8;
  background: linear-gradient(160deg, #fff9f7, #ffffff 72%);
}

.typical-fee-card.provisional {
  border-color: #e4c479;
  background: linear-gradient(160deg, #fffaf0, #ffffff 72%);
}

.fee-preview-first {
  margin: 14px 0;
}

.typical-fee-card a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
  text-decoration: none;
}

.typical-assumption-card {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 14px 15px;
  border: 1px solid #dce4ec;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--navy);
}

.typical-assumption-card b,
.typical-assumption-card span,
.typical-assumption-card p {
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.typical-assumption-card span {
  font-weight: 800;
}

.typical-assumption-card p {
  margin: 0;
  color: var(--ink-sub);
  font-size: 13px;
}

.address-primary-note {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px 7px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f7f9fc;
  color: #0f1e33;
  font-size: 13px;
  line-height: 1.45;
}

.address-full-btn {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 46px;
  margin-top: 9px;
  padding: 10px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d8e0e8;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  text-align: left;
}

.address-full-btn span {
  color: var(--ink-sub);
}

.address-full-btn b {
  flex: 0 0 auto;
  font-weight: 850;
}

.address-alt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.address-rescue-grid,
.address-rescue-head {
  line-height: 1.5;
}

.workflow-kpis,
.decision-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}

.privacy-consent {
  margin-top: 18px;
  border: 1px solid #dce3ea;
  border-radius: 15px;
  background: #f8fafc;
}

.section-heading,
.panel-heading,
.bid-table-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0 18px;
  padding: 4px;
  border-radius: 14px;
}

body[data-route="admin"] .admin-tabs {
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  justify-content: start;
  overflow-x: auto;
}

.quote-detail-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.floor-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid #eef2f5;
}

.bid-compare-table th,
.bid-compare-table td {
  min-width: 142px;
  padding: 10px 11px;
  border-right: 1px solid #e7ecf1;
  border-bottom: 1px solid #e7ecf1;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-align: left;
  vertical-align: top;
}

.bid-compare-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 104px;
  width: 104px;
  background: #f7f9fc;
  color: #344054;
  font-weight: 900;
}

.compact-compare-table th,
.compact-compare-table td {
  min-width: 116px;
  padding: 9px 10px;
}

.scope-compare-table th,
.scope-compare-table td {
  min-width: 106px;
  padding: 8px 9px;
}

.role-category-nav button,
.admin-queue-nav button {
  min-height: 64px;
  padding: 10px 7px;
  border: 1px solid #d8e2ec;
  border-radius: 13px;
  background: #fff;
  color: #344054;
  text-align: center;
}

.stacked-sticky {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 8px;
}

.pricebook-form {
  align-items: end;
}

.customer-request-kpis > div {
  min-width: 0;
}

.bottomnav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  display: grid;
  width: min(520px, 100%);
  height: calc(74px + env(safe-area-inset-bottom));
  padding: 0 8px env(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  transform: translateX(-50%);
  border-top: 1px solid var(--divider);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 24px rgba(15, 30, 51, 0.06);
  backdrop-filter: blur(14px);
}

.navitem {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 7px 4px 6px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #667085;
  line-height: 1;
}

.navitem svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.navitem span {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.navitem.on {
  color: var(--navy);
}

.legal-footer {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.faq-story-link {
  display: inline-flex;
  min-height: 44px;
  margin-top: 10px;
  padding: 10px 0;
  align-items: center;
  line-height: 1.45;
}

.founder-story {
  display: grid;
  gap: 16px;
}

.founder-story p {
  margin: 0;
}

.founder-sign {
  padding-top: 8px;
  color: var(--navy);
  font-weight: 800;
  text-align: right;
}

main .title[tabindex="-1"]:focus,
main h1[tabindex="-1"]:focus,
main[tabindex="-1"]:focus {
  outline: none;
}

@media (min-width: 900px) {
  .app-shell {
    width: min(100%, 560px);
  }

  .topbar {
    height: 72px;
  }

  .brand-logo-button {
    width: 210px;
    max-width: 210px;
  }

  .brand-logo-img {
    width: 206px;
    max-height: 58px;
  }

  .hero {
    padding-top: 30px;
  }

  .bottomnav,
  .sticky {
    width: min(560px, 100%);
  }

  body[data-route="admin"] .app-shell,
  body[data-route="partner"] .app-shell {
    width: min(100%, 920px);
  }

  body[data-route="admin"] .bottomnav,
  body[data-route="partner"] .bottomnav,
  body[data-route="admin"] .sticky,
  body[data-route="partner"] .sticky {
    width: min(920px, 100%);
  }
}

@media (max-width: 430px) {
  .topbar {
    height: 66px;
    padding: 0 14px;
  }

  .brand-logo-button {
    width: 164px;
    max-width: 164px;
    min-height: 48px;
  }

  .brand-logo-img {
    width: 160px;
    max-height: 48px;
  }

  .top-actions {
    gap: 4px;
  }

  .top-login-button,
  .top-account-button,
  .partner-pill {
    min-width: 46px;
    min-height: 38px;
    padding: 0 9px;
    font-size: 12px;
  }

  .hero {
    padding: 24px 16px 14px;
  }

  .content,
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 {
    font-size: clamp(26px, 8vw, 29px);
  }

  .address-alt-actions,
  .stacked-sticky {
    grid-template-columns: 1fr;
  }

  .address-full-btn {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .bottomnav {
    height: calc(70px + env(safe-area-inset-bottom));
  }

  .navitem svg {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }

  body[data-route="admin"] .admin-tabs {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
  }
}

@media (max-width: 350px) {
  .brand-logo-button {
    width: 146px;
  }

  .brand-logo-img {
    width: 142px;
  }

  .partner-pill {
    display: none;
  }

  .hero h1 {
    font-size: 25px;
  }
}

/* v5.20 final mobile information architecture and density pass */
.flagship-search {
  padding: 16px;
  box-shadow: 0 12px 32px rgba(15, 30, 51, 0.08);
}

.flagship-search .search-row button {
  min-width: 96px;
  background: var(--red);
}

.flagship-search .address-primary-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr) auto minmax(0, 1fr);
  gap: 5px;
  margin: 11px 0 9px;
  padding: 10px 8px;
  text-align: center;
}

.flagship-search .address-primary-note span {
  min-width: 0;
}

.flagship-search .address-primary-note b {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.flagship-search .address-primary-note i {
  color: #9aa6b5;
  font-style: normal;
}

.flagship-search .address-full-btn {
  min-height: 48px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-color: #cfd9e5;
  background: #f8fafc;
  text-align: center;
}

.flagship-search .address-full-btn span {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.flagship-search .search-note {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.flagship-search .search-note:before {
  grid-row: 1 / span 2;
}

.flagship-search .search-note b,
.flagship-search .search-note span {
  display: block;
  word-break: keep-all;
}

.max-estimate-promise.compact {
  margin-top: 12px;
  padding: 13px 14px;
}

.max-estimate-promise.compact p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
}

.compact-section .stack {
  gap: 10px;
}

.compact-section .flow-card {
  min-height: 88px;
  padding: 16px;
  border-color: #d9e2ec;
  box-shadow: none;
}

.site-bridge-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-page .content {
  display: grid;
  gap: 14px;
  padding-top: 22px;
}

.account-page-title span,
.account-section-heading > span {
  color: var(--red);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.account-page-title h1,
.account-section-heading h2 {
  margin: 5px 0 0;
  color: var(--navy);
  letter-spacing: -0.035em;
}

.account-page-title h1 {
  font-size: 26px;
  line-height: 1.25;
}

.account-section-heading h2 {
  font-size: 19px;
  line-height: 1.35;
}

.account-identity-card,
.account-role-panel,
.account-guide-panel,
.account-manage-details {
  border: 1px solid #dde5ed;
  border-radius: 18px;
  background: #fff;
}

.account-identity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
}

.account-identity-card > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.account-identity-card > div:first-child > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.account-identity-card b {
  overflow: hidden;
  color: var(--navy);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity-card small {
  color: var(--muted);
  font-size: 12px;
}

.account-avatar {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: #eaf1f8;
  color: var(--navy);
  font-weight: 900;
}

.account-logout {
  align-self: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #dce3eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #556274;
  font-size: 12px;
  font-weight: 800;
}

.account-identity-card > .notice {
  grid-column: 1 / -1;
  margin: 0;
}

.account-identity-card.signed-out {
  grid-template-columns: 1fr;
}

.account-role-panel,
.account-guide-panel {
  padding: 18px;
}

.account-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.account-menu-grid button {
  display: grid;
  min-width: 0;
  min-height: 106px;
  padding: 14px;
  align-content: start;
  gap: 4px;
  border: 1px solid #dce4ed;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--navy);
  text-align: left;
}

.account-menu-grid button > span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.account-menu-grid button > b {
  font-size: 14px;
  line-height: 1.4;
  word-break: keep-all;
}

.account-menu-grid button > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  word-break: keep-all;
}

.account-manage-details {
  overflow: hidden;
}

.account-manage-details > summary {
  display: flex;
  min-height: 70px;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.account-manage-details > summary::-webkit-details-marker {
  display: none;
}

.account-manage-details > summary span {
  display: grid;
  gap: 3px;
}

.account-manage-details > summary b {
  color: var(--navy);
  font-size: 15px;
}

.account-manage-details > summary small {
  color: var(--muted);
  font-size: 12px;
}

.account-manage-details > summary i {
  color: #9aa6b5;
  font-size: 24px;
  font-style: normal;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.account-manage-details[open] > summary i {
  transform: rotate(-90deg);
}

.account-manage-details .notification-preferences {
  margin: 0;
  border: 0;
  border-top: 1px solid #e7ecf2;
  border-radius: 0;
  background: #fbfcfe;
}

.notification-detail-body,
.account-withdrawal-details .withdrawal-card {
  padding: 0 16px 16px;
  border-top: 1px solid #e7ecf2;
}

.notification-detail-body .notification-tools {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 0 4px;
}

.account-withdrawal-details .withdrawal-card {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.account-list-links {
  margin-top: 12px;
  border-top: 1px solid #e7ecf2;
}

.account-list-links button {
  display: flex;
  width: 100%;
  min-height: 52px;
  padding: 0;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid #e7ecf2;
  background: transparent;
  color: var(--navy);
  text-align: left;
}

.account-list-links span {
  color: #9aa6b5;
  font-size: 20px;
}

.account-guide-panel .btn-link-block {
  margin-top: 14px;
}

.account-page > .install-section {
  padding-top: 0;
}

.building-head + .fee-preview-first {
  margin-top: 12px;
}

@media (max-width: 430px) {
  .hero.brand-hero {
    padding-top: 20px;
  }

  .hero.brand-hero > p {
    font-size: clamp(12.6px, 3.55vw, 14px);
    line-height: 1.6;
    letter-spacing: -0.025em;
    word-break: keep-all;
  }

  .flagship-search {
    margin-top: 18px;
    padding: 14px;
  }

  .flagship-search .search-row input {
    padding: 0 11px;
    font-size: 14px;
  }

  .flagship-search .search-row button {
    width: 84px;
    min-width: 84px;
    font-size: 13px;
  }

  .flagship-search .address-primary-note b {
    font-size: 10px;
  }

  .compact-section,
  .site-bridge-section {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .compact-section h2 {
    margin-bottom: 14px;
    font-size: 21px;
    line-height: 1.4;
  }

  .compact-section .flow-card {
    min-height: 78px;
    padding: 13px 14px;
  }

  .site-bridge {
    padding: 16px;
  }

  .account-page .content {
    gap: 12px;
    padding-top: 18px;
  }

  .account-menu-grid {
    grid-template-columns: 1fr;
  }

  .account-menu-grid button {
    min-height: 86px;
  }
}

@media (max-width: 350px) {
  .flagship-search .address-primary-note b {
    font-size: 9px;
  }

  .flagship-search .address-primary-note {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .flagship-search .address-primary-note i {
    display: none;
  }

  .flagship-search .address-primary-note b {
    white-space: normal;
  }

  .account-identity-card {
    grid-template-columns: 1fr;
  }

  .account-logout {
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .page:has(.stacked-sticky) {
    padding-bottom: calc(174px + env(safe-area-inset-bottom));
  }
}
