/* Shared type scale: body 16, interface 15, secondary 14, captions 13, marks 12. */
@font-face {
  font-family: Estedad;
  src: url('/static/fonts/Estedad.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --font-family-primary: Estedad, Arial, sans-serif;
  --text-micro: .75rem;
  --text-caption: .8125rem;
  --text-small: .875rem;
  --text-ui: .9375rem;
  --text-body: 1rem;
  --heading-hero: clamp(2rem, 3.4vw, 2.875rem);
  --heading-page: clamp(1.625rem, 2.5vw, 2.125rem);
  --heading-section: clamp(1.375rem, 2vw, 1.625rem);
  font-family: var(--font-family-primary);
  font-synthesis: none;
}
body {
  font-family: var(--font-family-primary);
  font-size: var(--text-body);
  line-height: 1.95;
}
button, input, select, textarea { font-family: inherit; }
html[lang] body :is(h1, h2, h3) { letter-spacing: normal; font-weight: 600; }
html[dir] .hero h1 { font-size: var(--heading-hero); line-height: 1.65; margin-block: 14px 20px; }
.page-heading h1, .business-page h1 { font-size: var(--heading-page); line-height: 1.65; }
.section h2, .home-intro h2, .prose h2 { font-size: var(--heading-section); line-height: 1.8; }
.home-links h2, .owners-steps h2 { font-size: 1.25rem; }
.business-card h2, .business-card h3, .field-grid h3 { font-size: 1.0625rem; line-height: 1.9; }
.hero-description, .page-heading>p, .home-intro p, .prose p,
.business-page #business-detail>p { font-size: var(--text-body); line-height: 2.05; }
.hero-description { max-width: 420px; }
.home-links p, .field-grid p, .owners-steps p, .status-notice p { font-size: var(--text-ui); line-height: 2; }
.prose p { color: var(--muted); }
.breadcrumb, .section-heading>p, .footer-nav, .building-location { font-size: var(--text-small); }
.overline, .page-heading .overline { font-size: var(--text-micro); }
.brand b { font-size: 1.25rem; font-weight: 600; letter-spacing: normal; }
.brand small { font-size: .625rem; }
.main-nav { gap: 24px; font-size: var(--text-small); }
.header { gap: 20px; padding-inline: 4%; }
.header-actions { gap: 14px; }
.owner-button { font-size: var(--text-small); padding-inline-start: 16px; gap: 8px; }
.language select { width: 83px; font-size: var(--text-small); }
.hero-stats strong { font-size: 2rem; font-weight: 500; }
.hero-stats strong span { font-size: 1.125rem; }
.hero-stats p, .hero-stats div>span { font-size: var(--text-caption); line-height: 1.9; }
.primary-button, .outline-button, .search-submit { font-size: var(--text-small); font-weight: 500; line-height: 1.8; }
.search-input-wrap input { font-size: var(--text-body); }
.search-floor { min-width: 160px; }
.search-floor select { font-size: var(--text-small); }
.search-input-wrap>span, .search-floor>span { font-size: var(--text-caption); }
.search-input-wrap input::placeholder { font-size: inherit; }
.category-tabs button { font-size: var(--text-small); }
.card-category, .card-products, .card-footer { font-size: var(--text-caption); }
.card-top { gap: 10px; }
.card-category { text-align: end; }
.business-card { padding: 20px; }
.card-footer { gap: 8px; flex-wrap: wrap; }
.results-meta, .results-meta .demo-badge { font-size: var(--text-caption); }
.results-meta { gap: 15px; flex-wrap: wrap; }
.model-controls { max-width: 100%; }
.model-control { font-size: var(--text-micro); }
.model-hint, .model-label small { font-size: var(--text-micro); }
.model-label b { font-size: var(--text-caption); }
.model-coordinate { font-size: .625rem; }
.floor-button, .map-selection { font-size: var(--text-small); }
.floor-button small, .floor-code, .plan-legend { font-size: var(--text-caption); }
.source-note, .prose .inline-sources, .about-photo figcaption { font-size: var(--text-caption); line-height: 2; }
.gallery-grid figcaption { font-size: var(--text-small); }
.address-marker>b { font-size: 1.25rem; }
/* Dashboard: the same face and reading sizes, with modest headings. */
.portal { font-size: var(--text-ui); }
.portal h1, .portal .portal-page-heading h1 { font-size: 1.625rem; line-height: 1.7; }
.portal h2, .portal .card-title h2 { font-size: 1.0625rem; line-height: 1.9; }
.portal h3 { font-size: var(--text-body); }
.portal .nav-item, .portal .nav-group summary { font-size: var(--text-small); line-height: 1.8; }
.portal .nav-children { padding-inline-start: 14px; margin-inline-start: 20px; margin-inline-end: 10px; }
.portal .nav-children a { font-size: var(--text-caption); line-height: 1.85; }
.portal .nav-children small { font-size: .6875rem; }
.portal .sidebar-label { font-size: var(--text-caption); }
.portal .sidebar-brand { padding-inline: 23px; }
.portal .sidebar-brand b { font-size: 1.1875rem; }
.portal .page-kicker, .portal .eyebrow { font-size: var(--text-micro); }
.portal .muted, .portal .progress-card>.muted, .portal .form-aside .muted { font-size: var(--text-small); line-height: 2; }
.portal .welcome-card h2 { font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.8; }
.portal .welcome-card p { font-size: var(--text-small); line-height: 2; }
.portal .welcome-link, .portal .subtle-link { font-size: var(--text-caption); }
.portal .stat-title { font-size: var(--text-caption); line-height: 1.8; }
.portal .stat-card b { font-size: 1.875rem; font-weight: 500; }
.portal .stat-card { min-height: 122px; gap: 10px; padding: 22px; }
.portal .quick-links a { font-size: var(--text-small); }
.portal .progress-row { font-size: var(--text-small); }
.portal .progress-steps { font-size: var(--text-micro); flex-wrap: wrap; }
.portal .event-row b { font-size: var(--text-small); }
.portal .event-row p, .portal .event-row time { font-size: var(--text-caption); }
.portal .event-row { flex-wrap: wrap; }
.portal .event-row time { white-space: normal; }
.portal .event-details, .portal .pagination { font-size: var(--text-caption); }
.portal .form-field, .portal .form-field label { font-size: var(--text-small); line-height: 1.9; }
.portal .form-control { font-size: var(--text-body); min-height: 48px; }
.portal .field-help, .portal .field-error { font-size: var(--text-caption); line-height: 1.9; }
.portal .portal-button { font-size: var(--text-small); min-height: 44px; }
.portal .portal-button.small, .portal .progress-card .portal-button { font-size: var(--text-caption); min-height: 40px; }
.portal .topbar-account b { font-size: var(--text-small); }
.portal .topbar-account small { font-size: var(--text-micro); }
.portal .tehran-clock>time, .portal .tehran-clock>span { font-size: var(--text-caption); line-height: 1.65; }
.portal .tehran-clock small { font-size: var(--text-micro); }
.portal .portal-language select { font-size: var(--text-caption); max-width: 88px; }
.portal .topbar-tools { gap: 10px; }
.portal .portal-topbar { height: 72px; }
.portal .status-chip { font-size: var(--text-micro); white-space: normal; }
.portal .notification-row b { font-size: var(--text-ui); line-height: 1.9; }
.portal .notification-row p, .portal .notification-row time { font-size: var(--text-caption); }
.portal .checkbox-field, .portal .portal-table { font-size: var(--text-small); }
.portal .portal-table th, .portal .portal-table td small { font-size: var(--text-caption); }
.portal .shop-card h2, .portal .empty-panel h2 { font-size: 1.1875rem; }
.portal .packages-card h2 { font-size: 1.375rem; }
.portal .empty-mini, .portal .danger-link { font-size: var(--text-caption); }
.portal .portal-message, .portal .form-errors { font-size: var(--text-small); }
.portal .auth-form-wrap h1 { font-size: 1.75rem; line-height: 1.8; }
.portal .auth-form-wrap .lead { font-size: var(--text-body); }
.portal .auth-switch { font-size: var(--text-small); margin-top: 24px; }
.portal .auth-story-copy h2 { font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.95; }
.portal .auth-story-copy p { font-size: var(--text-small); }
/* The tour's SVG plan coordinates keep their own scale; its controls use the UI scale. */
.tour-brand h1 { font-size: 1.0625rem; }
.tour-floor-pill, .tour-demo-note { font-size: var(--text-caption); }
.tour-search input { font-size: var(--text-ui); }
.tour-search-label, .tour-floor-nav button>b, .tour-tabs button { font-size: var(--text-small); }
.tour-result b, .page-visit .tour-result b { font-size: var(--text-small); }
.tour-result small, .page-visit .tour-result small { font-size: var(--text-micro); }
.tour-scene-status, .tour-viewpoints button, .tour-minimap>span,
.tour-photo-peek b, .tour-selected p, .tour-selected button { font-size: var(--text-caption); }
.tour-walk-hint, .page-visit .tour-walk-hint { font-size: var(--text-micro); white-space: normal; line-height: 1.75; }
.tour-media h2, .tour-plan h2 { font-size: var(--heading-section); }
.tour-media-heading p, .tour-plan>p, .tour-media-thumbs span { font-size: var(--text-caption); }
/* Django's technical admin uses the same face and readable controls. */
body:not(.portal)[class*=app-], body.login, body.dashboard { font-size: var(--text-ui); }
body:not(.portal) .form-row input, body:not(.portal) .form-row select,
body:not(.portal) .form-row textarea { font-size: var(--text-body); }
@media(max-width:1150px) and (min-width:901px) {
  .header { padding-inline: 3%; gap: 16px; }
  .main-nav { gap: 16px; font-size: var(--text-caption); }
  .header-actions { gap: 9px; }
  .owner-button { padding-inline-start: 12px; font-size: var(--text-caption); }
  .brand { gap: 8px; }
  .brand b { font-size: 1.125rem; }
  .brand small { letter-spacing: 2px; }
}
@media(max-width:760px) {
  .portal .portal-topbar { height: 70px; padding-inline: 12px; }
  .portal .topbar-account { gap: 6px; min-width: 0; }
  .portal .topbar-account b { font-size: var(--text-caption); max-width: 105px; }
  .portal .topbar-account small { font-size: var(--text-micro); }
  .portal .topbar-tools { gap: 3px; }
  .portal .tehran-clock { margin-left: 2px; }
  .portal .tehran-clock>time, .portal .tehran-clock>span { font-size: var(--text-micro); }
  .portal .portal-language select { font-size: var(--text-micro); width: 58px; max-width: 58px; }
  .portal .portal-page-heading h1 { font-size: 1.375rem; }
  .portal .page-kicker { font-size: var(--text-micro); }
  .portal .portal-page-heading { align-items: flex-end; }
  .portal .stat-card { padding: 19px 16px; }
  .portal .stat-title { font-size: var(--text-caption); }
  .portal .card-title { align-items: flex-start; }
  .portal .card-title h2 { font-size: var(--text-body); }
  .portal .event-row time { width: 100%; margin-top: 0; }
  .portal .welcome-card p { max-width: 100%; }
  .portal .welcome-card h2 { max-width: none; font-size: 1.375rem; }
  .portal .auth-form-wrap h1 { font-size: 1.5rem; }
  .portal .auth-tools .portal-language select { width: 70px; max-width: 70px; }
}
@media(max-width:650px) {
  .header { padding-inline: 5%; gap: 10px; }
  .header .brand b { font-size: 1.1875rem; }
  .header .brand { gap: 8px; }
  .header-actions { gap: 6px; }
  .language { gap: 0; }
  .language>span { display: none; }
  .language select { width: 67px; font-size: var(--text-caption); }
  html[dir] .hero h1 { font-size: 2.125rem; line-height: 1.75; }
  .hero-description { font-size: var(--text-body); max-width: none; }
  .hero-stats strong { font-size: 1.75rem; }
  .hero-stats p, .hero-stats div>span { font-size: var(--text-micro); }
  .hero-stats { gap: 16px; }
  .hero-topline { font-size: var(--text-micro); }
  .hero-copy { padding-top: 24px; }
  .hero-bottom { gap: 18px; align-items: flex-start; }
  .hero-bottom .text-link, .tiny-label { font-size: var(--text-caption); }
  .hero-bottom .text-link { text-align: end; }
  .model-label { left: 24px; max-width: 150px; }
  .model-label b, .model-label small { font-size: var(--text-micro); }
  .model-coordinate { display: none; }
  .model-control { font-size: var(--text-micro); padding-inline: 6px; }
  .model-hint { font-size: .6875rem; }
  .enter-building b { font-size: var(--text-body); }
  .enter-building small { font-size: var(--text-micro); }
  .search-floor { min-width: 0; }
  .search-input-wrap input { font-size: var(--text-body); }
  .primary-button, .outline-button, .search-submit { font-size: var(--text-small); }
  .page-heading h1, .business-page h1 { font-size: 1.625rem; }
  .section h2, .prose h2, .home-intro h2 { font-size: 1.375rem; }
  .page-heading>p, .prose p, .home-intro p, .business-page #business-detail>p { font-size: var(--text-body); line-height: 2.05; }
  .business-card { padding: 18px 14px; }
  .card-top { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
  .card-category { text-align: start; }
  .business-card h2, .business-card h3 { font-size: var(--text-body); }
  .card-products, .card-footer, .card-category { font-size: var(--text-caption); }
  .home-links h2, .owners-steps h2 { font-size: 1.1875rem; }
  .field-grid h3 { font-size: var(--text-body); }
  .field-grid p, .status-notice p, .owners-steps p { font-size: var(--text-small); }
  .floor-button { font-size: var(--text-caption); }
  .floor-button small { font-size: var(--text-micro); }
  .floor-code { font-size: var(--text-caption); }
  .floor-button { min-height: 76px; }
  .plan-legend { gap: 12px; font-size: var(--text-micro); flex-wrap: wrap; }
  .building-location { font-size: var(--text-caption); flex-wrap: wrap; }
  .footer-nav { font-size: var(--text-caption); }
  .tour-brand h1 { font-size: var(--text-caption); }
  .tour-header select, .interior-tour .tour-exit { font-size: var(--text-micro); }
  .tour-brand small { display: none; }
  .tour-floor-nav button { gap: 4px; padding-inline: 5px; min-width: 0; }
  .tour-floor-nav button>b { font-size: var(--text-micro); white-space: normal; text-align: center; }
  .tour-all-floors { font-size: var(--text-micro); }
  .tour-all-floors span { max-width: 78px; }
  .tour-search input, .page-visit .tour-search input { font-size: var(--text-small); }
  .tour-tabs { gap: 15px; padding-inline: 10px; }
  .tour-tabs button { font-size: var(--text-micro); gap: 5px; }
  .tour-result b, .page-visit .tour-result b { font-size: var(--text-caption); }
  .tour-result small, .page-visit .tour-result small { font-size: var(--text-micro); }
  .tour-results { max-height: 90px; }
  .tour-scene-status { font-size: var(--text-micro); top: 10px; }
  .tour-viewpoints { top: 55px; }
  .tour-viewpoints button, .tour-photo-peek b { font-size: var(--text-micro); }
  .tour-photo-peek small { display: none; }
  .tour-minimap { width: 112px; }
  .tour-minimap>span { font-size: .6875rem; }
  .tour-media-heading p, .tour-plan>p { font-size: var(--text-caption); }
}
@media(max-width:370px) {
  .header .brand b { font-size: 1.0625rem; }
  .header .brand small { letter-spacing: 2px; }
  .header .brand img { width: 28px; }
  .header .language select { width: 60px; }
  .portal .topbar-account b { max-width: 88px; }
  .portal .notification-button { display: none; }
  .portal .portal-main { padding-inline: 14px; }
}
.gallery-grid figcaption { color: var(--muted); }
@media(max-width:650px) {
  .search-panel { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 13px; }
  .search-input-wrap { grid-column: 2; }
  .search-floor { grid-column: 1/-1; width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: space-between; padding-top: 12px; }
  .search-floor select { width: auto; min-width: 140px; max-width: 75%; }
  .search-submit { grid-column: 1/-1; width: 100%; margin-top: 0; }
  .model-area { margin-top: 28px; }
  .model-label { top: -15px; }
}
@media(max-width:760px) {
  .portal .stat-title { grid-column: 1/-1; }
  .portal .stat-card .stat-icon { grid-row: 2; }
  .portal .progress-steps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; }
}
@media(max-width:650px) {
  .model-label { max-width: 260px; }
  .tour-controls { bottom: 46px; }
  .tour-minimap, .tour-photo-peek { bottom: 150px; }
}
