/* ========================================================================== 
   HISTRIPHY FRONTEND REFRESH TEST · 20.0.22
   Shared public visual system. Core logic and data remain untouched.
   ========================================================================== */
:root,
:root[data-theme="dark"]{
  --n1:#070706;--n2:#0b0a09;--n3:#0f0e0c;--n4:#13110f;--n5:#171512;--n6:#1b1815;--n7:#201d19;--n8:#25211d;
  --n9:#2b2722;--n10:#322d27;--n11:#39332d;--n12:#433c34;--n13:#514940;--n14:#62594f;--n15:#71695f;--n16:#817a70;
  --n17:#8f887e;--n18:#9c968d;--n19:#aaa49b;--n20:#b9b3aa;--n21:#cbc5bc;--n22:#ded9d1;--n23:#ece8e1;--n24:#f5f2ec;
  --gold-1:#735116;--gold-2:#9e721e;--gold-3:#c18b27;--gold-4:#e9ae45;--gold-5:#f2c66d;
  --bg:#0b0a09;--bg-deep:#070706;--bg-card:#13110f;--bg-raised:#171512;--bg-elevated:#1b1815;
  --border:rgba(245,242,236,.11);--border-soft:rgba(245,242,236,.075);--border-strong:rgba(245,242,236,.20);
  --ink:#f5f2ec;--ink-dim:#aaa49b;--ink-faint:#777168;--gold:#e9ae45;--gold-soft:#f2c66d;--gold-deep:#9e721e;--gold-ink:#f2c66d;--on-gold:#17120b;
  --input-bg:#11100e;--input-border:rgba(245,242,236,.15);--input-ink:#f5f2ec;--focus-ring:#e9ae45;
  --map-ocean:#0b0a09;--map-land:#26231f;--map-line:#48423b;--map-fill:#302b25;--map-hover:#d59c38;--map-selected:#e9ae45;--map-has-data:#4b453e;--map-glow:rgba(233,174,69,.24);
  --shadow-1:0 1px 0 rgba(255,255,255,.03);--shadow-2:0 20px 54px -35px rgba(0,0,0,.9);--shadow-3:0 34px 90px -48px rgba(0,0,0,.95);
  --radius:8px;--radius-lg:14px;--container:1240px;
}
:root[data-theme="light"]{
  --n1:#f0ede7;--n2:#f6f4f0;--n3:#fbfaf7;--n4:#ffffff;--n5:#ffffff;--n6:#fdfbf8;--n7:#faf7f2;--n8:#f4f0e9;
  --n9:#ece7de;--n10:#e4ded4;--n11:#d9d2c7;--n12:#cec6ba;--n13:#beb5a9;--n14:#ada397;--n15:#9b9287;--n16:#898177;
  --n17:#777067;--n18:#686159;--n19:#5b554e;--n20:#4d4842;--n21:#403c37;--n22:#302d29;--n23:#22201d;--n24:#151310;
  --gold-1:#60450e;--gold-2:#825d13;--gold-3:#a4761a;--gold-4:#ad7c20;--gold-5:#815b11;
  --bg:#f6f4f0;--bg-deep:#f0ede7;--bg-card:#ffffff;--bg-raised:#ffffff;--bg-elevated:#faf7f2;
  --border:rgba(21,19,16,.12);--border-soft:rgba(21,19,16,.075);--border-strong:rgba(21,19,16,.22);
  --ink:#151310;--ink-dim:#5b554e;--ink-faint:#8a8379;--gold:#ad7c20;--gold-soft:#815b11;--gold-deep:#60450e;--gold-ink:#7b570f;--on-gold:#fff;
  --input-bg:#fff;--input-border:rgba(21,19,16,.17);--input-ink:#151310;--focus-ring:#ad7c20;
  --map-ocean:#fbfaf7;--map-land:#e5dfd5;--map-line:#beb5a9;--map-fill:#ddd6ca;--map-hover:#ad7c20;--map-selected:#ad7c20;--map-has-data:#c9c0b4;--map-glow:rgba(173,124,32,.18);
  --shadow-1:0 1px 2px rgba(28,24,18,.05);--shadow-2:0 18px 44px -34px rgba(28,24,18,.30);--shadow-3:0 28px 70px -42px rgba(28,24,18,.34);
}

html{scroll-behavior:smooth;background:var(--bg)}
body{background:var(--bg);color:var(--ink);font-family:var(--font-body);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
body,button,input,select,textarea{font-family:var(--font-body)}
::selection{background:color-mix(in srgb,var(--gold) 34%,transparent);color:var(--ink)}
a{color:inherit;text-underline-offset:3px}
:focus-visible{outline:2px solid var(--focus-ring)!important;outline-offset:3px}
.section-inner,.header-inner,.footer-inner,.map-library-wide{width:min(calc(100% - 40px),var(--container));max-width:var(--container);margin-inline:auto}
.site-shell{min-height:100vh;background:var(--bg)}

/* Header */
.site-header{position:relative;z-index:100;height:68px;border-bottom:1px solid var(--border-soft);background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:saturate(120%) blur(14px)}
.header-inner{height:68px;display:flex;align-items:center;gap:28px}
.brand{display:inline-flex;align-items:center;gap:10px;min-width:max-content;color:var(--ink);font-size:1.08rem;font-weight:750;letter-spacing:-.025em;text-decoration:none}
.brand:hover{color:var(--ink)}
.brand-mark{width:31px;height:31px;display:grid;place-items:center;border-radius:50%;overflow:hidden;background:var(--gold);box-shadow:none}
.brand-mark.small{width:28px;height:28px}
.brand-name{line-height:1}
.desktop-nav{display:flex;align-items:center;gap:30px;margin-inline:auto}
.desktop-nav a{position:relative;padding:24px 0 22px;color:var(--ink-dim);font-size:.875rem;font-weight:520;text-decoration:none;white-space:nowrap}
.desktop-nav a:hover,.desktop-nav a:focus-visible{color:var(--ink)}
.desktop-nav a[aria-current="page"],.desktop-nav .current-menu-item>a,.desktop-nav .current_page_item>a{color:var(--ink)}
.desktop-nav a[aria-current="page"]::after,.desktop-nav .current-menu-item>a::after,.desktop-nav .current_page_item>a::after{content:"";position:absolute;left:0;right:0;bottom:12px;height:2px;background:var(--gold);border-radius:2px}
.header-actions{display:flex;align-items:center;gap:9px;min-width:max-content}
.theme-control{display:inline-flex;height:38px;padding:3px;border:1px solid var(--border);border-radius:8px;background:var(--bg-card)}
.theme-option{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;color:var(--ink-faint);cursor:pointer}
.theme-option:hover{color:var(--ink);background:var(--bg-elevated)}
.theme-option[aria-checked="true"]{color:var(--gold);background:color-mix(in srgb,var(--gold) 11%,var(--bg-card));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--gold) 18%,transparent)}
.theme-option svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.account-link,.submit-link{min-height:40px;display:inline-flex;align-items:center;justify-content:center;padding:0 16px;border-radius:8px;font-size:.82rem;font-weight:650;text-decoration:none;white-space:nowrap}
.account-link{border:1px solid var(--border);background:transparent;color:var(--ink)}
.account-link:hover{border-color:var(--border-strong);background:var(--bg-card);color:var(--ink)}
.submit-link{border:1px solid var(--gold);background:var(--gold);color:var(--on-gold);box-shadow:0 12px 30px -22px color-mix(in srgb,var(--gold) 80%,transparent)}
.submit-link:hover{filter:brightness(1.05);color:var(--on-gold)}
.mobile-nav{background:var(--bg-raised);border-bottom:1px solid var(--border-soft)}
.mobile-nav a{color:var(--ink-dim);border-bottom:1px solid var(--border-soft)}

/* Shared buttons, inputs, cards */
.button,.histriphy-download-btn,.map-details-btn{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 17px;border-radius:8px;border:1px solid transparent;font-size:.82rem;font-weight:680;line-height:1;text-decoration:none;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}
.button:hover,.histriphy-download-btn:hover,.map-details-btn:hover{transform:translateY(-1px)}
.button-primary,.histriphy-download-btn{background:var(--gold);border-color:var(--gold);color:var(--on-gold)}
.button-primary:hover,.histriphy-download-btn:hover{color:var(--on-gold);filter:brightness(1.05);box-shadow:0 12px 30px -22px color-mix(in srgb,var(--gold) 86%,transparent)}
.button-outline,.button-secondary,.map-details-btn{background:transparent;border-color:var(--border);color:var(--ink)}
.button-outline:hover,.button-secondary:hover,.map-details-btn:hover{background:var(--bg-elevated);border-color:var(--border-strong);color:var(--ink)}
.button svg,.histriphy-download-btn svg,.map-details-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
input[type="text"],input[type="email"],input[type="password"],input[type="search"],input[type="number"],input[type="url"],select,textarea{border:1px solid var(--input-border);border-radius:8px;background:var(--input-bg);color:var(--input-ink);box-shadow:none}
input:focus,select:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 12%,transparent);outline:0}
.map-card,.simple-submit-card,.security-panel,.account-download-allowance,.account-hero-panel,.country-map-panel,.map-download-card-v19,.map-facts-card-v19,.community-uploader-card,.legal-summary{border:1px solid var(--border);background:var(--bg-card);box-shadow:var(--shadow-2)}

/* Map cards */
.map-card{position:relative;border-radius:10px;overflow:hidden;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.map-card:hover{transform:translateY(-2px);border-color:var(--border-strong);box-shadow:var(--shadow-3)}
.map-card .preview{background:var(--map-ocean);border-bottom:1px solid var(--border-soft)}
.map-card .preview-glow{opacity:.28;background:radial-gradient(circle,color-mix(in srgb,var(--gold) 18%,transparent),transparent 66%)}
.map-card .card-body{background:var(--bg-card)}
.map-card h3{color:var(--ink);letter-spacing:-.02em}
.map-card .card-foot{color:var(--ink-faint)}
.map-source-badge,.year,.category{border-radius:5px!important;backdrop-filter:blur(8px)}
.map-source-badge.is-official{color:var(--gold-soft);border-color:color-mix(in srgb,var(--gold) 35%,transparent);background:color-mix(in srgb,var(--bg-deep) 78%,transparent)}
.map-source-badge.is-community{color:var(--ink-dim);background:color-mix(in srgb,var(--bg-deep) 78%,transparent)}

/* Single map page */
.map-experience{background:var(--bg)}
.map-hero-v19{padding:68px 0 62px;border-bottom:1px solid var(--border-soft);background:linear-gradient(180deg,color-mix(in srgb,var(--bg-raised) 45%,transparent),transparent)}
.map-hero-inner-v19{display:grid;grid-template-columns:minmax(0,.78fr) minmax(520px,1.22fr);gap:64px;align-items:center}
.map-breadcrumb{color:var(--ink-faint);font-size:.75rem}
.map-hero-copy-v19 h1{font-size:clamp(3.2rem,6vw,5.7rem);line-height:.94;letter-spacing:-.055em;color:var(--ink)}
.map-hero-summary{max-width:54ch;color:var(--ink-dim);font-size:1.02rem;line-height:1.75}
.map-origin-badge,.map-period-badge{border-radius:6px;border:1px solid var(--border);background:var(--bg-card);color:var(--ink-dim)}
.map-origin-badge.is-official{color:var(--gold-soft);border-color:color-mix(in srgb,var(--gold) 32%,var(--border))}
.map-hero-preview{min-height:470px;border:1px solid var(--border);border-radius:12px;background:var(--map-ocean);box-shadow:var(--shadow-3)}
.map-preview-caption{color:var(--ink-faint)}
.map-body-v19{padding:64px 0 96px}
.map-body-grid-v19{grid-template-columns:minmax(0,1fr) 310px;gap:52px}
.map-content-section{padding:34px 0;border-top:1px solid var(--border-soft)}
.map-content-section:first-child{border-top:0;padding-top:0}
.map-section-heading h2{font-size:1.35rem;letter-spacing:-.025em}
.map-description-copy,.map-context-group p{color:var(--ink-dim);line-height:1.8}
.map-chip-list a,.map-chip-list span{border:1px solid var(--border);background:var(--bg-card);color:var(--ink-dim);border-radius:6px}
.map-sidebar-v19{gap:14px}
.map-download-card-v19,.map-facts-card-v19,.community-uploader-card{border-radius:10px;padding:22px;background:var(--bg-card)}
.map-coming-soon{border:1px dashed var(--border);background:transparent;border-radius:10px}
.map-related-grid{gap:14px}
.map-related-card{border:1px solid var(--border);border-radius:9px;background:var(--bg-card);overflow:hidden}

/* Compare */
.country-compare-page{background:var(--bg)}
.country-compare-hero{padding:56px 0 34px;border-bottom:1px solid var(--border-soft);background:linear-gradient(180deg,color-mix(in srgb,var(--bg-raised) 50%,transparent),transparent)}
.country-compare-heading h1{font-size:clamp(2.5rem,5vw,4.7rem);letter-spacing:-.05em;line-height:1}
.country-compare-heading p{color:var(--ink-dim)}
.country-compare-picker{padding:18px;border:1px solid var(--border);border-radius:10px;background:var(--bg-card);box-shadow:var(--shadow-2)}
.country-picker-field label{color:var(--ink-faint)}
.country-compare-content{padding:42px 0 88px}
.country-map-grid{gap:16px}
.country-map-panel{border-radius:10px;overflow:hidden}
.country-map-panel-head{border-bottom:1px solid var(--border-soft);background:var(--bg-card)}
.country-compare-preview{min-height:370px;background:var(--map-ocean)}
.country-data-comparison{margin-top:24px;border:1px solid var(--border);border-radius:10px;background:var(--bg-card);overflow:hidden}
.country-data-heading,.country-data-row{border-bottom-color:var(--border-soft)}
.country-data-row:hover{background:var(--bg-elevated)}

/* About and public forms */
.simple-about-page,.simple-submit-page{background:var(--bg)}
.simple-page-hero,.simple-submit-section{padding:72px 0 84px;background:linear-gradient(180deg,color-mix(in srgb,var(--bg-raised) 38%,transparent),transparent)}
.simple-page-shell,.simple-submit-shell{max-width:1040px}
.simple-page-hero h1,.simple-submit-header h1{font-size:clamp(2.8rem,6vw,5.3rem);line-height:.98;letter-spacing:-.055em}
.simple-page-hero .hero-text,.simple-submit-header p{color:var(--ink-dim);font-size:1.02rem;line-height:1.75}
.kicker,.account-kicker,.auth-kicker,.security-panel-kicker{color:var(--gold);font-family:var(--font-mono);font-size:.64rem;letter-spacing:.14em;text-transform:uppercase}
.simple-about-grid{gap:50px}
.simple-about-story{color:var(--ink-dim);font-size:1rem;line-height:1.84}
.simple-contact-line{padding:20px 0;border-top:1px solid var(--border-soft);border-bottom:1px solid var(--border-soft);color:var(--ink-dim)}
.simple-contact-line a{color:var(--gold-soft)}
.simple-submit-card{border-radius:10px;padding:26px}
.simple-submit-form,.batch-submit-form{box-shadow:none}
.submit-mode-switch{border-bottom:1px solid var(--border-soft)}
.submit-mode-button{border-radius:0;background:transparent;color:var(--ink-dim)}
.submit-mode-button.is-active{color:var(--ink);box-shadow:inset 0 -2px var(--gold)}
.submission-category-grid label,.submission-multi-options label{border:1px solid var(--border);background:var(--bg-card);border-radius:7px}
.submission-category-grid label:hover,.submission-multi-options label:hover{border-color:var(--border-strong)}
.file-upload{border:1px dashed var(--border-strong);background:var(--bg-elevated);border-radius:9px}

/* Authentication */
.auth-page{background:var(--bg)}
.auth-atmosphere{opacity:.42;background:radial-gradient(circle at 16% 16%,color-mix(in srgb,var(--gold) 9%,transparent),transparent 31%),radial-gradient(circle at 86% 82%,color-mix(in srgb,var(--map-line) 18%,transparent),transparent 34%)}
.auth-shell{min-height:calc(100vh - 68px)}
.auth-layout{max-width:1080px;border:1px solid var(--border);border-radius:14px;overflow:hidden;background:var(--bg-card);box-shadow:var(--shadow-3)}
.auth-story-panel{background:var(--bg-deep);border-right:1px solid var(--border-soft)}
.auth-story-content h1{letter-spacing:-.045em}
.auth-story-content p,.auth-trust-list p,.auth-story-foot{color:var(--ink-dim)}
.auth-form-panel{background:var(--bg-card)}
.auth-form-card{box-shadow:none;background:transparent;border:0}
.auth-input-wrap{border-radius:8px;background:var(--input-bg)}
.auth-google-button,.auth-secondary-action{border-color:var(--border);background:transparent;color:var(--ink)}
.auth-google-button:hover,.auth-secondary-action:hover{background:var(--bg-elevated)}
.auth-notice{border-radius:8px;background:var(--bg-elevated);border:1px solid var(--border)}
.auth-notice.is-error{border-color:color-mix(in srgb,var(--error) 42%,var(--border));color:var(--error)}
.auth-notice.is-success{border-color:color-mix(in srgb,var(--success) 42%,var(--border));color:var(--success)}
.auth-compact-card{border:1px solid var(--border);border-radius:12px;background:var(--bg-card);box-shadow:var(--shadow-3)}

/* Account */
.account-dashboard-page{background:var(--bg);padding:46px 0 90px}
.account-hero-panel{border-radius:12px;padding:26px 28px;background:var(--bg-card)}
.account-layout-v2{gap:22px;margin-top:22px}
.account-sidebar-v2{border:1px solid var(--border);border-radius:10px;background:var(--bg-card);overflow:hidden}
.account-nav a{border-radius:0;border-bottom:1px solid var(--border-soft);color:var(--ink-dim)}
.account-nav a:hover,.account-nav a.is-active{background:var(--bg-elevated);color:var(--ink)}
.account-nav a.is-active{box-shadow:inset 2px 0 var(--gold)}
.account-content-v2{border:1px solid var(--border);border-radius:10px;background:var(--bg-card);padding:28px}
.account-download-allowance{border-radius:9px;box-shadow:none}
.security-overview-card,.security-panel,.account-profile-photo-card,.account-security-shortcut{border-color:var(--border);background:var(--bg-elevated);border-radius:9px}

/* Legal */
.legal-page{background:var(--bg)}
.legal-masthead{padding:72px 0 48px;background:linear-gradient(180deg,color-mix(in srgb,var(--bg-raised) 38%,transparent),transparent);border-bottom:1px solid var(--border-soft)}
.legal-masthead h1{color:var(--ink);font-size:clamp(2.7rem,5.5vw,4.8rem);letter-spacing:-.05em}
.legal-intro,.legal-document p,.legal-document ul{color:var(--ink-dim)}
.legal-document-section{background:var(--bg)}
.legal-summary{box-shadow:none;border-left:2px solid var(--gold);border-top:0;border-right:0;border-bottom:0;border-radius:0;background:var(--bg-elevated)}
.legal-document>section{border-color:var(--border-soft)}
.legal-document h2,.legal-document h3{color:var(--ink)}
.legal-index{border-color:var(--border-soft)}

/* Footer */
.site-footer{padding:62px 0 26px;border-top:1px solid var(--border-soft);background:var(--bg-deep)}
.footer-main{gap:64px}
.footer-intro p{color:var(--ink-dim);line-height:1.7}
.footer-email{color:var(--gold-soft)}
.footer-columns{gap:48px}
.footer-columns h2{font-family:var(--font-mono);font-size:.62rem;letter-spacing:.13em;text-transform:uppercase;color:var(--ink-faint)}
.footer-columns a,.footer-bottom{color:var(--ink-dim)}
.footer-columns a:hover,.footer-bottom a:hover{color:var(--ink)}
.footer-bottom{border-top:1px solid var(--border-soft)}

/* Modals and notices */
.license-modal-overlay,.guest-limit-modal-overlay{background:color-mix(in srgb,var(--bg-deep) 80%,transparent);backdrop-filter:blur(7px)}
.license-modal-box,.guest-limit-modal{border:1px solid var(--border);border-radius:12px;background:var(--bg-raised);box-shadow:var(--shadow-3)}
.license-modal-glow{opacity:.25}
.license-modal-benefits,.guest-limit-plans{border-color:var(--border-soft)}
.guest-limit-plan{background:var(--bg-card);border-color:var(--border)}
.guest-limit-plan.is-highlighted{border-color:color-mix(in srgb,var(--gold) 45%,var(--border));background:color-mix(in srgb,var(--gold) 6%,var(--bg-card))}

/* Generic index / 404 / upgrade */
body.error404 .section,body.blog .section,.page-template-upgrade .section{padding:76px 0 96px;background:var(--bg)}
body.error404 .section-inner,body.blog .section-inner,.page-template-upgrade .section-inner{max-width:var(--container)}

/* Motion is purposeful, never constant. */
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.map-card,.button,.histriphy-download-btn,.map-details-btn{transition:none!important}.map-card:hover,.button:hover,.histriphy-download-btn:hover,.map-details-btn:hover{transform:none!important}}

@media (max-width:1100px){
  .desktop-nav{gap:20px}
  .map-hero-inner-v19{grid-template-columns:1fr;gap:36px}
  .map-hero-preview{min-height:430px}
  .map-body-grid-v19{grid-template-columns:minmax(0,1fr) 280px;gap:30px}
}
@media (max-width:900px){
  .site-header,.header-inner{height:64px}
  .desktop-nav,.header-actions>.account-link,.header-actions>.submit-link{display:none}
  .header-inner{gap:14px}
  .header-actions{margin-left:auto}
  .theme-control{height:36px}
  .theme-option{width:28px;height:28px}
  .map-body-grid-v19{grid-template-columns:1fr}
  .map-sidebar-v19{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .auth-layout{grid-template-columns:1fr;max-width:620px}
  .auth-story-panel{border-right:0;border-bottom:1px solid var(--border-soft)}
  .account-layout-v2{grid-template-columns:1fr}
  .account-sidebar-v2{position:static}
}
@media (max-width:640px){
  .section-inner,.header-inner,.footer-inner,.map-library-wide{width:min(calc(100% - 28px),var(--container))}
  .brand-name{font-size:1rem}
  .map-hero-v19{padding:44px 0 42px}
  .map-hero-copy-v19 h1{font-size:clamp(2.65rem,14vw,4.2rem)}
  .map-hero-preview{min-height:310px}
  .map-body-v19{padding:42px 0 70px}
  .map-sidebar-v19{grid-template-columns:1fr}
  .country-compare-hero{padding-top:40px}
  .country-compare-picker{padding:14px}
  .country-map-grid{grid-template-columns:1fr}
  .country-compare-preview{min-height:290px}
  .simple-page-hero,.simple-submit-section{padding:48px 0 64px}
  .simple-submit-card,.account-content-v2{padding:20px}
  .account-dashboard-page{padding-top:28px}
  .account-hero-panel{padding:20px}
  .footer-main{gap:38px}
  .footer-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px}
}

/* Light mode uses dark primary controls; gold remains a highlight rather than a fill everywhere. */
:root[data-theme="light"] .button-primary,
:root[data-theme="light"] .histriphy-download-btn,
:root[data-theme="light"] .submit-link{background:var(--ink);border-color:var(--ink);color:#fff;box-shadow:none}
:root[data-theme="light"] .button-primary:hover,
:root[data-theme="light"] .histriphy-download-btn:hover,
:root[data-theme="light"] .submit-link:hover{background:#28241f;border-color:#28241f;color:#fff;filter:none}
:root[data-theme="light"] .theme-option[aria-checked="true"]{color:var(--gold-ink);background:color-mix(in srgb,var(--gold) 9%,var(--bg-card))}

/* ========================================================================== 
   HISTRIPHY FRONTEND REFRESH TEST · 20.0.22
   Landing animation integration, neutral map cards, and alignment pass.
   ========================================================================== */

:root,
:root[data-theme="dark"]{
  --map-card-context:#24211d;
  --map-card-context-line:#454039;
  --map-card-shape:#81796f;
  --map-card-shape-line:#b9b1a6;
}
:root[data-theme="light"]{
  --map-card-context:#eee9e1;
  --map-card-context-line:#c8c0b5;
  --map-card-shape:#403b35;
  --map-card-shape-line:#24211d;
}

/* The header uses three deliberate columns so the navigation stays centred. */
.header-inner{
  display:grid;
  grid-template-columns:minmax(190px,1fr) auto minmax(190px,1fr);
  gap:24px;
  align-items:center;
}
.brand{justify-self:start}
.desktop-nav{justify-self:center;margin:0;gap:28px}
.header-actions{justify-self:end;margin:0}
.theme-control{height:38px;padding:3px}
.theme-option{width:31px;height:30px}

/* Keep every major landing section on the same vertical guides. */
.hp-hero-inner{
  width:min(calc(100% - 40px),var(--container));
  max-width:var(--container);
  margin-inline:auto;
  padding:72px 0 76px;
}

/* The search is one control, not an input nested inside another input. */
.hp-search{min-height:54px;padding:5px 5px 5px 14px;gap:10px}
.hp-search input[type="search"]{
  min-height:42px;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  outline:0!important;
  -webkit-appearance:none;
}
.hp-search input[type="search"]::-webkit-search-cancel-button{margin-left:8px}
.hp-search button{align-self:stretch;min-height:42px;padding-inline:21px}

/* Map cards use neutral geometry. Gold is reserved for states and actions. */
.map-card .preview-glow{opacity:0!important;background:none!important}
.map-card .map-preview-svg .base-countries path{
  fill:var(--map-card-context)!important;
  stroke:var(--map-card-context-line)!important;
  stroke-width:.55!important;
}
.map-card .map-preview-svg .highlight-region path{
  fill:var(--map-card-shape)!important;
  stroke:var(--map-card-shape-line)!important;
  stroke-width:1!important;
  filter:none!important;
}
.map-card:hover .map-preview-svg .highlight-region path{
  stroke:var(--gold-ink)!important;
}
.map-card .year,
.map-card .map-source-badge{
  background:color-mix(in srgb,var(--bg-card) 90%,transparent);
  border-color:var(--border-strong);
  color:var(--ink-dim);
  box-shadow:none;
}
.map-card .map-source-badge.is-official{color:var(--ink-dim)}
.map-card .map-source-badge.is-official svg{color:var(--gold-ink)}
.map-card .card-body{min-width:0}
.map-card .card-foot{align-items:flex-end}
.map-card .map-card-actions{margin-left:auto}
.ex-grid{align-items:stretch}
.ex-grid .map-card{height:100%}
.ex-grid .map-card .card-body{height:100%}
.ex-grid .map-card .card-foot{margin-top:auto}

/* New animated Studio section. */
.section.hsd-section{
  position:relative;
  padding:76px 0 66px;
  background:var(--bg-deep);
  overflow:hidden;
}
.hsd-section::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(48% 74% at 82% 42%,color-mix(in srgb,var(--gold) 5%,transparent),transparent 72%);
}
.hsd-section>.section-inner{position:relative}
.hsd-grid{
  display:grid;
  grid-template-columns:minmax(300px,390px) minmax(0,1fr);
  gap:clamp(42px,5vw,72px);
  align-items:center;
}
.hsd-copy{min-width:0}
.hsd-copy h2{
  max-width:11ch;
  margin:22px 0 0;
  color:var(--ink);
  font-size:clamp(2.55rem,4.15vw,4rem);
  font-weight:760;
  line-height:1.01;
  letter-spacing:-.052em;
  text-wrap:balance;
}
.hsd-copy>p:not(.hp-kicker){
  max-width:42ch;
  margin:26px 0 0;
  color:var(--ink-dim);
  font-size:1.02rem;
  line-height:1.72;
  text-wrap:pretty;
}
.hsd-cta{margin-top:44px}
.hsd-demo{min-width:0}
.hsd-demo histriphy-studio-demo{display:block;width:100%}
.hsd-feature-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1px;
  margin:42px 0 0;
  padding:0;
  overflow:hidden;
  list-style:none;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--border);
}
.hsd-feature-list li{
  min-width:0;
  padding:17px 18px;
  background:var(--bg-card);
}
.hsd-feature-list b{
  display:block;
  margin-bottom:5px;
  color:var(--ink);
  font-size:.9rem;
  font-weight:650;
  letter-spacing:-.015em;
}
.hsd-feature-list li:first-child b{color:var(--gold-ink)}
.hsd-feature-list span{
  display:block;
  color:var(--ink-faint);
  font-size:.78rem;
  line-height:1.45;
}

/* Product showcase: editorial navigation rather than a giant generic card. */
.hs-section{padding:82px 0;background:var(--bg)}
.hs-head{align-items:center;margin-bottom:34px}
.hs-head h2{max-width:20ch;font-size:clamp(2rem,3.3vw,2.8rem)}
.hs-stage{
  grid-template-columns:minmax(270px,.7fr) minmax(0,1.3fr);
  gap:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  border-radius:0;
  background:transparent;
}
.hs-nav{gap:0;border-right:1px solid var(--border)}
.hs-nav-item{
  position:relative;
  padding:20px 24px;
  border:0;
  border-bottom:1px solid var(--border-soft);
  border-radius:0;
}
.hs-nav-item:last-child{border-bottom:0}
.hs-nav-item:hover{background:color-mix(in srgb,var(--bg-raised) 70%,transparent)}
.hs-nav-item.is-active{
  border:0;
  border-bottom:1px solid var(--border-soft);
  background:var(--bg-card);
  box-shadow:inset 2px 0 var(--gold);
}
.hs-nav-item.is-active:last-child{border-bottom:0}
.hs-nav-title{font-size:1rem}
.hs-nav-desc{font-size:.82rem}
.hs-panels{padding:28px 0 28px 30px}
.hs-panel{right:0;bottom:28px;top:28px;left:30px}
.hs-panel-foot{padding-right:2px}
.hs-arrow{border-radius:7px}

/* Workflow alignment: title and the three steps share one clear grid. */
.hp-steps-section .section-inner{
  display:grid;
  grid-template-columns:minmax(155px,.56fr) minmax(0,2.44fr);
  gap:36px;
  align-items:start;
}
.hp-steps-title{
  margin:0;
  padding:2px 26px 2px 0;
  border-right:1px solid var(--border);
  color:var(--ink);
  font-size:.96rem;
  font-weight:650;
  line-height:1.45;
}
.hp-steps{grid-template-columns:repeat(3,minmax(0,1fr));gap:34px;margin:0;padding:0;list-style:none}
.hp-steps li{position:relative;min-width:0}
.hp-steps li span{display:block;margin-bottom:8px;font-family:var(--font-mono);font-size:.7rem;color:var(--gold-ink)}
.hp-steps li strong{display:block;margin-bottom:6px;color:var(--ink);font-size:.98rem;font-weight:650;letter-spacing:-.015em}
.hp-steps li em{display:block;color:var(--ink-dim);font-size:.84rem;font-style:normal;line-height:1.55}

/* Footer columns no longer drift or wrap into different baselines. */
.footer-main{
  display:grid;
  grid-template-columns:minmax(240px,.78fr) minmax(0,1.22fr);
  gap:72px;
  align-items:start;
}
.footer-intro{min-width:0}
.footer-columns{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:42px;
  align-items:start;
}
.footer-columns section{min-width:0}
.footer-columns h2{margin:0 0 15px}
.footer-columns a{display:block;margin-top:10px;line-height:1.4}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.footer-bottom>div{display:flex;gap:20px;flex-wrap:wrap}

@media(max-width:1100px){
  .header-inner{grid-template-columns:auto 1fr auto}
  .desktop-nav{gap:20px}
  .hsd-grid{grid-template-columns:minmax(270px,340px) minmax(0,1fr);gap:38px}
  .hs-stage{grid-template-columns:minmax(245px,.72fr) minmax(0,1.28fr)}
}
@media(max-width:980px){
  .hsd-grid{grid-template-columns:1fr;gap:38px}
  .hsd-copy{max-width:650px}
  .hsd-copy h2{max-width:13ch}
  .hsd-cta{margin-top:32px}
  .hsd-feature-list{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:34px}
  .hs-stage{grid-template-columns:1fr}
  .hs-nav{border-right:0;border-bottom:1px solid var(--border)}
  .hs-panels{padding:24px 0}
  .hs-panel{inset:24px 0}
  .hp-steps-section .section-inner{grid-template-columns:1fr;gap:24px}
  .hp-steps-title{padding:0 0 14px;border-right:0;border-bottom:1px solid var(--border)}
  .footer-main{grid-template-columns:1fr;gap:42px}
}
@media(max-width:900px){
  .header-inner{display:flex}
  .brand{justify-self:auto}
  .header-actions{justify-self:auto;margin-left:auto}
}
@media(max-width:700px){
  .hp-hero-inner{width:min(calc(100% - 28px),var(--container));padding:48px 0 54px}
  .hp-search{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:5px 5px 5px 12px}
  .hp-search input[type="search"]{min-width:0}
  .hp-search button{min-width:88px}
  .hsd-section{padding:58px 0 52px}
  .hsd-copy h2{font-size:clamp(2.35rem,12vw,3rem)}
  .hsd-feature-list{grid-template-columns:1fr}
  .hs-head{align-items:flex-start}
  .hs-controls{width:100%;justify-content:flex-end}
  .hp-steps{grid-template-columns:1fr;gap:26px}
  .footer-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px}
}
@media(max-width:480px){
  .footer-columns{grid-template-columns:1fr}
  .footer-bottom{align-items:flex-start;flex-direction:column}
}

/* ========================================================================== 
   20.0.2 · white-first light mode and footer alignment
   A true light interface: white canvas, cool-neutral supporting surfaces,
   crisp dividers and dark controls. Gold remains an accent, not a wash.
   ========================================================================== */
:root[data-theme="light"]{
  --n1:#f7f8fa;--n2:#ffffff;--n3:#ffffff;--n4:#ffffff;--n5:#ffffff;--n6:#fbfcfd;--n7:#f8f9fb;--n8:#f4f6f8;
  --n9:#eef1f4;--n10:#e7eaee;--n11:#dfe3e8;--n12:#d4d9e0;--n13:#c5cbd3;--n14:#b4bbc5;--n15:#a1a9b4;--n16:#8e97a3;
  --n17:#7a8491;--n18:#68727f;--n19:#5a6470;--n20:#4d5661;--n21:#3c444e;--n22:#2b3139;--n23:#1d2228;--n24:#101419;
  --bg:#ffffff;
  --bg-deep:#f7f8fa;
  --bg-card:#ffffff;
  --bg-raised:#ffffff;
  --bg-elevated:#f5f7f9;
  --border:#e2e6eb;
  --border-soft:#edf0f3;
  --border-strong:#cbd1d8;
  --ink:#11151a;
  --ink-dim:#5d6671;
  --ink-faint:#8b949f;
  --gold:#b47d1b;
  --gold-soft:#8a5f12;
  --gold-deep:#6f4d0f;
  --gold-ink:#7a5410;
  --on-gold:#ffffff;
  --input-bg:#ffffff;
  --input-border:#d5dae1;
  --input-ink:#11151a;
  --focus-ring:#b47d1b;
  --map-ocean:#fafbfc;
  --map-land:#eef1f4;
  --map-line:#c9d0d8;
  --map-fill:#e2e6eb;
  --map-hover:#c58a20;
  --map-selected:#b47d1b;
  --map-has-data:#d4d9e0;
  --map-glow:rgba(180,125,27,.12);
  --shadow-1:0 1px 2px rgba(15,23,42,.04);
  --shadow-2:0 10px 28px -22px rgba(15,23,42,.25);
  --shadow-3:0 18px 46px -28px rgba(15,23,42,.28);
  --map-card-context:#f4f6f8;
  --map-card-context-line:#d4d9e0;
  --map-card-shape:#d8dde3;
  --map-card-shape-line:#aeb6c0;
}
:root[data-theme="light"] body,
:root[data-theme="light"] .site-shell{background:#fff}
:root[data-theme="light"] .site-header{
  background:rgba(255,255,255,.92);
  box-shadow:0 1px 0 var(--border-soft);
}
:root[data-theme="light"] .button-primary,
:root[data-theme="light"] .histriphy-download-btn,
:root[data-theme="light"] .submit-link{
  background:#11151a;
  border-color:#11151a;
  color:#fff;
}
:root[data-theme="light"] .button-primary:hover,
:root[data-theme="light"] .histriphy-download-btn:hover,
:root[data-theme="light"] .submit-link:hover{
  background:#252b32;
  border-color:#252b32;
  color:#fff;
}
:root[data-theme="light"] .map-card,
:root[data-theme="light"] .map-card-library{
  background:#fff;
  border-color:#e2e6eb;
  box-shadow:0 8px 24px -22px rgba(15,23,42,.32);
}
:root[data-theme="light"] .map-card:hover,
:root[data-theme="light"] .map-card-library:hover{
  border-color:#cbd1d8;
  box-shadow:0 15px 34px -25px rgba(15,23,42,.34);
}
:root[data-theme="light"] .map-card .preview,
:root[data-theme="light"] .map-card-library .preview{background:#fafbfc}
:root[data-theme="light"] .map-card .year,
:root[data-theme="light"] .map-card .map-source-badge{
  background:rgba(255,255,255,.94);
  border-color:#d8dde3;
  color:#5d6671;
}
:root[data-theme="light"] .map-card .map-source-badge.is-official{color:#7a5410}
:root[data-theme="light"] .map-card .map-source-badge.is-community{color:#5d6671}
:root[data-theme="light"] .theme-option[aria-checked="true"]{
  color:#7a5410;
  background:#f8f3e8;
  box-shadow:inset 0 0 0 1px #eadbb9;
}

/* Footer follows the approved HTML hierarchy and remains left-aligned. */
.footer-main{
  grid-template-columns:minmax(260px,.9fr) minmax(0,1.6fr);
  gap:58px;
}
.footer-intro{max-width:360px}
.footer-intro .footer-contact{margin-top:0}
.footer-columns{grid-template-columns:repeat(3,minmax(150px,1fr));gap:40px}
.footer-columns section{align-items:flex-start;text-align:left}
.footer-columns h2{margin:0 0 12px}
.footer-columns a{margin-top:8px}
.footer-bottom .footer-built{
  margin:0;
  font-family:var(--font-mono);
  font-size:.68rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--ink-faint);
}
@media(max-width:780px){
  .footer-main{grid-template-columns:1fr;gap:34px}
  .footer-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 34px}
}
@media(max-width:520px){
  .footer-columns{grid-template-columns:1fr}
  .footer-bottom{align-items:flex-start;flex-direction:column;gap:10px}
}

/* 20.0.3 · light map preview colour refinement */
:root[data-theme="light"]{
  --map-card-context:#f1f4f7;
  --map-card-context-line:#d7dee6;
  --map-card-shape:#8fa5bb;
  --map-card-shape-line:#6f859b;
}

/* ========================================================================== 
   20.0.6 — preserve original product-page layouts.
   Landing + Build a Map are the only structural redesigns. Explore/library
   cards keep the established Histriphy layout and receive theme colors only.
   ========================================================================== */

/* Library previews intentionally show only the actual GeoJSON geometry. */
.map-card-library .map-preview-svg .base-countries,
.map-card-library .map-preview-svg .base-countries path{
  display:none!important;
}
.map-card-library .preview{
  background:var(--map-ocean)!important;
}
.map-card-library .map-preview-svg .highlight-region path{
  filter:none!important;
}

/* Original card interaction/layout is retained. Theme treatment only. */
.map-library-grid .map-card-library{
  height:auto;
  background:var(--bg-card);
  border-color:var(--border);
  box-shadow:none;
}
.map-library-grid .map-card-library:hover{
  border-color:var(--border-strong);
  box-shadow:var(--shadow-2);
}
.map-library-grid .map-card-library .card-body{
  height:auto;
}
.map-library-grid .map-card-library .map-card-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.map-library-grid .map-card-library .map-details-btn{
  display:inline-flex!important;
}

/* Clean white light mode. Geography gets one calm slate-blue treatment. */
:root[data-theme="light"]{
  --bg:#ffffff;
  --bg-deep:#f7f8fa;
  --bg-card:#ffffff;
  --bg-raised:#ffffff;
  --bg-elevated:#f7f8fa;
  --map-ocean:#f8fafc;
  --map-card-shape:#8ca3b9;
  --map-card-shape-line:#6f879e;
}
:root[data-theme="light"] body,
:root[data-theme="light"] .site-shell{
  background:#ffffff;
}
:root[data-theme="light"] .map-card-library .preview{
  background:#f8fafc!important;
}
:root[data-theme="light"] .map-card-library .map-preview-svg .highlight-region path{
  fill:#8ca3b9!important;
  stroke:#6f879e!important;
  stroke-width:1!important;
  filter:none!important;
}
:root[data-theme="light"] .map-card-library:hover .map-preview-svg .highlight-region path{
  fill:#809ab2!important;
  stroke:#617b94!important;
}
:root[data-theme="light"] .map-card-library .year,
:root[data-theme="light"] .map-card-library .map-source-badge{
  background:rgba(255,255,255,.95)!important;
  border-color:#d9e0e7!important;
  box-shadow:none!important;
}

/* Dark cards remain neutral; gold is reserved for UI state/actions. */
:root[data-theme="dark"] .map-card-library .map-preview-svg .highlight-region path,
:root:not([data-theme]) .map-card-library .map-preview-svg .highlight-region path{
  fill:#777168!important;
  stroke:#aaa49b!important;
  filter:none!important;
}
:root[data-theme="dark"] .map-card-library:hover .map-preview-svg .highlight-region path,
:root:not([data-theme]) .map-card-library:hover .map-preview-svg .highlight-region path{
  stroke:var(--gold)!important;
}

/* ========================================================================== 
   20.0.7-test · header repair, simpler hero, stronger light-map contrast
   ========================================================================== */

/* Header: three stable columns. The navigation remains at the true centre of
   the site canvas and the active underline lives inside the header. */
@media (min-width:901px){
  .site-header{height:72px}
  .header-inner{
    height:72px;
    display:grid;
    grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr);
    align-items:center;
    gap:24px;
  }
  .brand{justify-self:start}
  .desktop-nav{justify-self:center;margin:0;gap:32px;height:72px}
  .desktop-nav>a,
  .desktop-nav>li{height:72px}
  .desktop-nav>a{
    display:inline-flex;
    align-items:center;
    padding:0;
  }
  .header-actions{justify-self:end;margin:0;gap:10px}

  /* Override the older fallback-nav underline rule that could escape below
     the header and appear as a detached gold line. */
  .desktop-nav>a.is-current::after,
  .desktop-nav>li.current-menu-item>a::after,
  .desktop-nav>li.current_page_item>a::after,
  .desktop-nav>li.current-menu-ancestor>a::after,
  .desktop-nav .histriphy-compare-nav-link.is-current::after,
  .desktop-nav .histriphy-compare-menu-item.current-menu-item>a::after,
  .desktop-nav>a[aria-current="page"]::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:6px;
    height:2px;
    border-radius:99px;
    background:var(--gold);
  }
}

/* Hero: less UI on the left, more room for the actual map. */
@media (min-width:1025px){
  body.home .hp-hero,
  body.front-page .hp-hero{min-height:calc(100svh - 72px)}
  .hp-hero-inner{
    grid-template-columns:minmax(390px,.72fr) minmax(0,1.28fr);
    gap:64px;
    padding-top:62px;
    padding-bottom:64px;
  }
  .hp-hero-copy{max-width:520px}
  .hp-h1{font-size:clamp(3rem,4.7vw,4.45rem)}
  .hp-lede{max-width:46ch;margin-bottom:26px}
  .hp-actions{margin-top:18px}
  .hp-hero-map{
    min-height:0;
    aspect-ratio:900/520;
    align-self:center;
  }
  .hp-hero-map .world-map{min-height:0;height:100%}
}

/* No category-chip row in the hero. Categories remain available in Explore
   and the footer, keeping the first screen focused on discovery. */
.hp-hero .hp-chips{display:none!important}

/* Light mode: make geography visible. The old near-white map disappeared into
   the canvas; this slate treatment stays calm while retaining real contrast. */
:root[data-theme="light"]{
  --map-ocean:#f8fafc;
  --map-land:#dce4eb;
  --map-line:#778ba0;
  --map-fill:#91a6ba;
  --map-has-data:#8299af;
  --map-hover:#c58a20;
  --map-selected:#b47d1b;
  --map-card-context:#f2f5f8;
  --map-card-context-line:#d4dce4;
  --map-card-shape:#819ab1;
  --map-card-shape-line:#5f7890;
}
:root[data-theme="light"] .hp-hero-map{
  background:#f8fafc;
  border-color:#dce3e9;
}
:root[data-theme="light"] .hp-hero-map .map-grid,
:root[data-theme="light"] .hp-hero-map .lat-line{
  opacity:.58;
}
:root[data-theme="light"] .world-map path{
  fill:var(--map-fill);
  stroke:var(--map-line);
  stroke-width:.9;
}
:root[data-theme="light"] .world-map path.is-hovered,
:root[data-theme="light"] .world-map .world-map-supplemental path.is-hovered{
  fill:var(--gold);
  stroke:var(--gold-deep);
}

/* Keep the established product-page layouts, but make their surfaces obey the
   same neutral black/white system instead of the previous navy appearance. */
.single-histriphy_map .site-shell,
.single-histriphy_map .map-experience,
.country-compare-page,
.simple-about-page,
.simple-submit-page,
.account-dashboard-page,
.auth-page,
.legal-page{background:var(--bg)!important}
.single-histriphy_map .map-hero-v19,
.country-compare-hero,
.simple-page-hero,
.simple-submit-section,
.legal-masthead{
  background:linear-gradient(180deg,color-mix(in srgb,var(--bg-raised) 38%,transparent),transparent)!important;
  border-color:var(--border-soft)!important;
}
.single-histriphy_map .map-content-section,
.single-histriphy_map .map-download-card-v19,
.single-histriphy_map .map-facts-card-v19,
.single-histriphy_map .community-uploader-card,
.single-histriphy_map .map-technical-details{
  background:var(--bg-card)!important;
  border-color:var(--border)!important;
  box-shadow:none!important;
}

@media(max-width:1180px) and (min-width:901px){
  .header-inner{grid-template-columns:minmax(175px,1fr) auto minmax(175px,1fr);gap:18px}
  .desktop-nav{gap:22px}
  .account-link,.submit-link{padding-left:13px;padding-right:13px}
}
@media(max-width:1024px){
  .hp-hero-inner{grid-template-columns:1fr;gap:32px}
  .hp-hero-copy{max-width:700px}
  .hp-hero-map{aspect-ratio:900/520;min-height:0}
  .hp-hero-map .world-map{min-height:0}
}

@media (min-width:901px){
  .desktop-nav>li>a{
    display:inline-flex;
    align-items:center;
    height:72px;
    padding:0;
  }
}

/* ========================================================================== 
   20.0.11-test · brand reset, restrained interaction states, editorial About
   ========================================================================== */

/* The supplied original red H is the brand mark. Never recolour or circle-crop it. */
.brand-mark,
.brand-mark.small,
.auth-form-brand .brand-mark,
.footer-brand .brand-mark{
  background:transparent!important;
  border-radius:0!important;
  overflow:visible!important;
  box-shadow:none!important;
}
.brand-mark img,
.brand-mark.small img,
.auth-form-brand .brand-mark img,
.footer-brand .brand-mark img{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:contain!important;
  border-radius:0!important;
}

/* Yellow stays an accent, but hover no longer becomes a brighter glowing yellow. */
:root,
:root[data-theme="dark"]{
  --accent-hover:#d59a36;
  --accent-active:#c58b2d;
  --map-hover:#a77c39;
  --map-selected:#d5a34b;
}
.button-primary,
.histriphy-download-btn,
.submit-link{
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease!important;
}
.button-primary:hover,
.histriphy-download-btn:hover,
.submit-link:hover{
  background:var(--accent-hover)!important;
  border-color:var(--accent-hover)!important;
  color:var(--on-gold)!important;
  filter:none!important;
  box-shadow:none!important;
  transform:translateY(-1px);
}
.button-primary:active,
.histriphy-download-btn:active,
.submit-link:active{
  background:var(--accent-active)!important;
  border-color:var(--accent-active)!important;
  transform:translateY(0);
}
.world-map path.is-hovered,
.world-map .world-map-supplemental path.is-hovered{
  fill:var(--map-hover)!important;
  stroke:var(--map-selected)!important;
  filter:none!important;
}
.map-library-tab:hover{background:var(--bg-elevated);color:var(--ink)}
.map-library-clear:hover{color:var(--ink)}

/* Hero: a clear value proposition, enough context, and the map still leads visually. */
.hp-hero-product .hp-hero-copy{max-width:820px}
.hp-hero-product .hp-h1{
  max-width:820px;
  font-size:clamp(2.75rem,4.15vw,4rem);
  line-height:1.02;
  letter-spacing:-.047em;
  font-weight:710;
  text-wrap:balance;
}
.hp-hero-product .hp-lede{
  max-width:710px;
  margin-top:16px;
  font-size:1rem;
  line-height:1.58;
  text-wrap:balance;
}
.hp-hero-product .hp-actions{margin-top:22px}
.hp-hero-product .hp-hero-map{width:min(100%,1280px)}

/* Explore Maps: the filtered country destination uses the same current interface,
   with the new neutral theme rather than the legacy navy presentation. */
.map-library-page,
.map-library-results{background:var(--bg)!important}
.map-library-hero{
  background:var(--bg)!important;
  border-bottom-color:var(--border-soft)!important;
}
.map-library-hero::before,
.map-library-hero::after{display:none!important}
.map-library-stats,
.map-library-page .map-search-form,
.map-library-tabs-wrap,
.library-stat-card{
  background:var(--bg-card)!important;
  border-color:var(--border)!important;
  box-shadow:none!important;
}
.library-stat-card + .library-stat-card{border-color:var(--border-soft)!important}
.map-filter-control{background:var(--input-bg)!important;border-color:var(--input-border)!important}
.map-library-tab{background:transparent}
.map-card-library{background:var(--bg-card)!important;border-color:var(--border)!important;box-shadow:none!important}
.map-card-library:hover{border-color:var(--border-strong)!important;box-shadow:var(--shadow-2)!important}

/* The library is information-dense already; remove decorative gold from metadata. */
.map-source-badge.is-official,
.map-card-library .year{
  box-shadow:none!important;
}

/* Light mode is black/white first. Gold is not used as a default hover or metadata colour. */
:root[data-theme="light"]{
  --gold:#a46f1a;
  --gold-soft:#815710;
  --gold-deep:#68470d;
  --gold-ink:#68470d;
  --map-hover:#303234;
  --map-selected:#111214;
  --focus-ring:#343638;
}
:root[data-theme="light"] .button-primary,
:root[data-theme="light"] .histriphy-download-btn,
:root[data-theme="light"] .submit-link,
:root[data-theme="light"] .map-search-submit{
  background:#171819!important;
  border-color:#171819!important;
  color:#fff!important;
}
:root[data-theme="light"] .button-primary:hover,
:root[data-theme="light"] .histriphy-download-btn:hover,
:root[data-theme="light"] .submit-link:hover,
:root[data-theme="light"] .map-search-submit:hover{
  background:#303234!important;
  border-color:#303234!important;
  color:#fff!important;
  box-shadow:none!important;
  filter:none!important;
}
:root[data-theme="light"] .world-map path.is-hovered,
:root[data-theme="light"] .world-map .world-map-supplemental path.is-hovered{
  fill:#303234!important;
  stroke:#111214!important;
}
:root[data-theme="light"] .library-stat-card > svg{
  stroke:#5f6469!important;
}
:root[data-theme="light"] .map-library-eyebrow{
  color:#686d72!important;
  background:transparent!important;
}
:root[data-theme="light"] .map-library-eyebrow span{
  background-color:#686d72!important;
}
:root[data-theme="light"] .map-source-badge.is-official,
:root[data-theme="light"] .map-card-library .map-source-badge.is-official,
:root[data-theme="light"] .map-card-library .year{
  color:#596067!important;
  border-color:#d9dde1!important;
  background:#fff!important;
}
:root[data-theme="light"] .map-source-badge.is-official svg,
:root[data-theme="light"] .map-card-library .map-source-badge.is-official svg{
  stroke:#6b7177!important;
  color:#6b7177!important;
}
:root[data-theme="light"] .map-library-tab.is-active{
  color:#111214!important;
  background:#f6f7f8!important;
  box-shadow:inset 0 -2px 0 #111214!important;
}
:root[data-theme="light"] .map-library-tab.is-active svg{stroke:#111214!important}
:root[data-theme="light"] .map-library-tab:hover{background:#f6f7f8!important;color:#111214!important}
:root[data-theme="light"] .map-library-page .map-search-form,
:root[data-theme="light"] .map-library-stats,
:root[data-theme="light"] .map-library-tabs-wrap{
  background:#fff!important;
  border-color:#e3e5e7!important;
}
:root[data-theme="light"] .library-stat-card + .library-stat-card{border-color:#eceeef!important}

/* About: editorial, not a collection of generic cards. */
.about-page-v20{background:var(--bg);color:var(--ink)}
.about-v20-shell{max-width:1080px}
.about-v20-hero{
  padding:104px 0 92px;
  border-bottom:1px solid var(--border-soft);
  background:var(--bg);
}
.about-v20-kicker{
  margin:0 0 15px;
  color:var(--ink-faint);
  font-family:var(--font-mono);
  font-size:.67rem;
  font-weight:650;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.about-v20-hero h1{
  max-width:900px;
  margin:0;
  color:var(--ink);
  font-size:clamp(2.75rem,5.3vw,5.25rem);
  line-height:.98;
  letter-spacing:-.055em;
  font-weight:720;
}
.about-v20-lede{
  max-width:720px;
  margin:28px 0 0;
  color:var(--ink-dim);
  font-size:1.05rem;
  line-height:1.72;
}
.about-v20-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:32px}
.about-v20-section{padding:88px 0;border-bottom:1px solid var(--border-soft)}
.about-v20-section-head{display:grid;grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr);gap:70px;align-items:start;margin-bottom:48px}
.about-v20-section-head .about-v20-kicker{margin-top:8px}
.about-v20-section-head h2,
.about-v20-trust h2,
.about-v20-contact h2{
  margin:0;
  color:var(--ink);
  font-size:clamp(2rem,3.4vw,3.15rem);
  line-height:1.08;
  letter-spacing:-.04em;
}
.about-v20-capabilities{border-top:1px solid var(--border)}
.about-v20-capabilities article{
  display:grid;
  grid-template-columns:72px minmax(0,1fr);
  gap:24px;
  padding:26px 0;
  border-bottom:1px solid var(--border-soft);
  background:transparent;
}
.about-v20-capabilities article>span{
  padding-top:4px;
  color:var(--ink-faint);
  font-family:var(--font-mono);
  font-size:.7rem;
}
.about-v20-capabilities h3{margin:0 0 7px;color:var(--ink);font-size:1.02rem;letter-spacing:-.015em}
.about-v20-capabilities p{max-width:690px;margin:0;color:var(--ink-dim);line-height:1.62}
.about-v20-trust{background:var(--bg-deep)}
.about-v20-trust-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:84px;align-items:start}
.about-v20-trust-copy{border-top:1px solid var(--border)}
.about-v20-trust-copy p{margin:0;padding:22px 0;border-bottom:1px solid var(--border-soft);color:var(--ink-dim);line-height:1.68}
.about-v20-trust-copy strong{color:var(--ink);font-weight:680}
.about-v20-contact{padding:64px 0 78px;background:var(--bg)}
.about-v20-contact-inner{display:flex;align-items:end;justify-content:space-between;gap:40px}
.about-v20-contact h2{font-size:clamp(1.65rem,2.8vw,2.45rem)}
.about-v20-contact a{color:var(--ink);font-size:clamp(1.15rem,2vw,1.45rem);font-weight:650;text-underline-offset:5px}
.about-v20-contact a:hover{color:var(--ink-dim)}

@media(max-width:800px){
  .about-v20-hero{padding:70px 0 62px}
  .about-v20-section{padding:62px 0}
  .about-v20-section-head,.about-v20-trust-grid{grid-template-columns:1fr;gap:26px}
  .about-v20-section-head{margin-bottom:32px}
  .about-v20-contact-inner{align-items:flex-start;flex-direction:column;gap:20px}
  .about-v20-capabilities article{grid-template-columns:48px minmax(0,1fr);gap:12px}
}

@media(max-width:700px){
  .hp-hero-product .hp-h1{font-size:clamp(2.2rem,10.5vw,3rem)}
  .hp-hero-product .hp-lede{font-size:.94rem;max-width:35ch}
}


/* ========================================================================== 
   20.0.12-test · card context restored, map-detail cleanup, hero eye-line pass
   ========================================================================== */

/* Hero placement: the message sits in the natural upper-middle eye line instead
   of hugging the header. Only the hero gets this breathing room. */
body.home .hp-hero-product .hp-hero-inner,
body.front-page .hp-hero-product .hp-hero-inner{
  padding-top:82px!important;
  gap:22px!important;
}
.hp-hero-product .hp-hero-copy{max-width:860px!important}
.hp-hero-product .hp-h1{
  font-size:clamp(2.7rem,4.05vw,4rem)!important;
  line-height:1.01!important;
  letter-spacing:-.046em!important;
}
.hp-hero-product .hp-lede{margin-top:17px!important;max-width:680px!important;line-height:1.55!important}
.hp-hero-product .hp-actions{margin-top:21px!important}
.hp-hero-product .hp-hero-map{margin-top:2px!important}

/* Dark world map: readable country borders without turning the map into a
   political-outline poster. */
:root,
:root[data-theme="dark"]{
  --map-land:#36322d;
  --map-has-data:#454039;
  --map-line:#5d5750;
}
:root[data-theme="dark"] .world-map path,
:root:not([data-theme="light"]) .world-map path{
  stroke:var(--map-line)!important;
  stroke-width:.62!important;
  vector-effect:non-scaling-stroke;
}
:root[data-theme="dark"] .world-map path.is-hovered,
:root:not([data-theme="light"]) .world-map path.is-hovered{
  stroke-width:.9!important;
}

/* Library cards again show quiet geographic context behind the selected map. */
:root,
:root[data-theme="dark"]{
  --map-card-context:#171512;
  --map-card-context-line:#3d3933;
  --map-card-shape:#8e877e;
  --map-card-shape-line:#b7afa5;
}
.map-card .map-preview-svg .base-countries path,
.map-card-library .map-preview-svg .base-countries path{
  fill:var(--map-card-context)!important;
  stroke:var(--map-card-context-line)!important;
  stroke-width:.48!important;
  filter:none!important;
}
.map-card .map-preview-svg .highlight-region path,
.map-card-library .map-preview-svg .highlight-region path{
  fill:var(--map-card-shape)!important;
  fill-opacity:1!important;
  stroke:var(--map-card-shape-line)!important;
  stroke-width:.82!important;
  filter:none!important;
}
.map-card:hover .map-preview-svg .highlight-region path,
.map-card-library:hover .map-preview-svg .highlight-region path{
  fill:color-mix(in srgb,var(--map-card-shape) 91%,var(--ink) 9%)!important;
  stroke:var(--ink-dim)!important;
}

:root[data-theme="light"]{
  --map-card-context:#f2f4f5;
  --map-card-context-line:#d3d9de;
  --map-card-shape:#899fb2;
  --map-card-shape-line:#657b8d;
}
:root[data-theme="light"] .map-card .preview,
:root[data-theme="light"] .map-card-library .preview{background:#fbfcfc!important}
:root[data-theme="light"] .map-card .map-preview-svg .base-countries path,
:root[data-theme="light"] .map-card-library .map-preview-svg .base-countries path{
  fill:var(--map-card-context)!important;
  stroke:var(--map-card-context-line)!important;
}
:root[data-theme="light"] .map-card .map-preview-svg .highlight-region path,
:root[data-theme="light"] .map-card-library .map-preview-svg .highlight-region path{
  fill:var(--map-card-shape)!important;
  stroke:var(--map-card-shape-line)!important;
  stroke-width:.82!important;
}
:root[data-theme="light"] .map-card:hover .map-preview-svg .highlight-region path,
:root[data-theme="light"] .map-card-library:hover .map-preview-svg .highlight-region path{
  fill:#768da1!important;
  stroke:#556b7d!important;
}

/* Single map page: reduce repeated labels/boilerplate and let the geometry lead. */
.map-hero-v19{padding:58px 0 52px!important;background:var(--bg)!important}
.map-hero-inner-v19{
  grid-template-columns:minmax(330px,.68fr) minmax(560px,1.32fr)!important;
  gap:58px!important;
  align-items:center!important;
}
.map-breadcrumb{margin-bottom:18px!important}
.map-badge-row{margin-bottom:17px!important}
.map-origin-badge,.map-period-badge{padding:6px 10px!important;font-size:.69rem!important;background:transparent!important;box-shadow:none!important}
.map-hero-copy-v19 h1{
  margin:0 0 20px!important;
  font-size:clamp(3rem,5vw,5rem)!important;
  line-height:.96!important;
  letter-spacing:-.052em!important;
}
.map-hero-summary{font-size:.96rem!important;line-height:1.62!important;max-width:47ch!important;margin-bottom:24px!important}
.map-primary-actions{gap:9px!important;align-items:center!important}
.map-primary-actions .map-text-button{display:none!important}
.map-quick-stats{margin-top:30px!important;padding-top:20px!important;gap:0!important}
.map-quick-stats>div{padding:0 24px!important}
.map-quick-stats>div:first-child{padding-left:0!important}
.map-hero-preview{
  min-height:500px!important;
  border-radius:10px!important;
  box-shadow:none!important;
  background:var(--map-ocean)!important;
}
.map-hero-preview .preview-glow{display:none!important}
.map-preview-caption{margin-top:8px!important;font-size:.69rem!important}

/* Detail preview uses a quiet geographic base and a neutral foreground shape. */
.map-detail-preview .map-preview-svg .base-countries path{
  fill:#1b1916!important;
  stroke:#49443e!important;
  stroke-width:.58!important;
  filter:none!important;
}
.map-detail-preview .map-preview-svg .highlight-region path{
  fill:#8d867c!important;
  fill-opacity:1!important;
  stroke:#beb6ab!important;
  stroke-width:.95!important;
  filter:none!important;
}
:root[data-theme="light"] .map-detail-preview .map-preview-svg .base-countries path,
:root[data-theme="light"] .map-hero-preview .map-preview-svg .base-countries path{
  fill:#f1f3f4!important;
  stroke:#d0d5d8!important;
  stroke-width:.56!important;
}
:root[data-theme="light"] .map-detail-preview .map-preview-svg .highlight-region path,
:root[data-theme="light"] .map-hero-preview .map-preview-svg .highlight-region path{
  fill:#879cad!important;
  stroke:#617789!important;
  stroke-width:.9!important;
}

.map-body-v19{padding:54px 0 88px!important}
.map-body-grid-v19{grid-template-columns:minmax(0,1fr) 292px!important;gap:42px!important;align-items:start!important}
.map-content-section{padding:30px 0!important}
.map-information-section{padding-top:0!important}
.map-section-heading-plain{margin-bottom:22px!important}
.map-section-heading-plain h2{font-size:1.45rem!important;margin:0!important}
.map-description-notes{max-width:72ch;margin-bottom:26px!important}
.map-context-grid-compact{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:22px 28px!important}
.map-context-grid-compact .map-context-group{padding:0!important;border:0!important;background:transparent!important}
.map-context-grid-compact .map-context-group h3{margin:0 0 9px!important;font-size:.68rem!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:var(--ink-faint)!important}
.map-chip-list{gap:6px!important}
.map-chip-list span,.map-chip-list a{padding:6px 9px!important;font-size:.72rem!important;background:transparent!important}
.map-download-card-v19,.map-facts-card-v19{box-shadow:none!important}
.map-sidebar-v19{position:sticky;top:88px!important}
.map-coming-soon{padding:18px!important}
.map-coming-soon p{margin-top:4px!important;font-size:.82rem!important;line-height:1.55!important}

/* About must look intentional even if the WordPress page had no editor content. */
.about-v20-hero{padding:92px 0 78px!important}
.about-v20-hero h1{max-width:880px!important;font-size:clamp(2.7rem,4.9vw,4.8rem)!important}
.about-v20-lede{max-width:760px!important;margin-top:22px!important}
.about-v20-section{padding:72px 0!important}
.about-v20-capabilities article{padding:22px 0!important}

@media(max-width:1024px){
  body.home .hp-hero-product .hp-hero-inner,
  body.front-page .hp-hero-product .hp-hero-inner{padding-top:62px!important}
  .map-hero-inner-v19{grid-template-columns:1fr!important;gap:34px!important}
  .map-hero-preview{min-height:420px!important}
  .map-sidebar-v19{position:static!important}
}
@media(max-width:700px){
  body.home .hp-hero-product .hp-hero-inner,
  body.front-page .hp-hero-product .hp-hero-inner{padding-top:46px!important}
  .map-hero-v19{padding:38px 0 36px!important}
  .map-hero-copy-v19 h1{font-size:clamp(2.6rem,13vw,4rem)!important}
  .map-hero-preview{min-height:300px!important}
  .map-context-grid-compact{grid-template-columns:1fr!important}
}

/* ========================================================================== 
   20.0.13-test · Studio polish, feature showcase, card context, country links
   ========================================================================== */

/* Give the hero map and Studio demo a deliberate visual break without turning
   either section into a giant full-screen chapter. */
body.home .hsd-section,
body.front-page .hsd-section{
  margin-top:clamp(54px,5vw,82px);
  padding-top:clamp(72px,6vw,96px);
}

/* Studio heading: lock every line to the exact same left edge. */
.hsd-title-lines{max-width:none!important;text-wrap:initial!important}
.hsd-title-lines span{display:block;width:max-content;max-width:100%}
.hsd-copy h2.hsd-title-lines{letter-spacing:-.048em!important}

/* The embedded Studio uses the same surfaces as the rest of Histriphy. The
   cursor bitmaps are static assets, so light/dark mode never recolours them. */
.hsd-demo histriphy-studio-demo{
  --n3:var(--bg-card);
  --n4:var(--bg-card);
  --n5:var(--bg-raised);
  --bg-elevated:var(--bg-elevated);
  --map-ocean:var(--bg-card);
}

/* Library previews: always retain geographic context. */
.map-card .map-preview-svg .base-countries,
.map-card-library .map-preview-svg .base-countries{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}
:root,
:root[data-theme="dark"]{
  --map-card-context:#211f1c;
  --map-card-context-line:#4b4741;
  --map-card-shape:#969087;
  --map-card-shape-line:#c0b8ad;
}
:root[data-theme="dark"] .map-card .map-preview-svg .base-countries path,
:root[data-theme="dark"] .map-card-library .map-preview-svg .base-countries path,
:root:not([data-theme="light"]) .map-card .map-preview-svg .base-countries path,
:root:not([data-theme="light"]) .map-card-library .map-preview-svg .base-countries path{
  fill:var(--map-card-context)!important;
  stroke:var(--map-card-context-line)!important;
  stroke-width:.55!important;
  opacity:1!important;
}
:root[data-theme="light"]{
  --map-card-context:#edf0f2;
  --map-card-context-line:#c9d0d6;
  --map-card-shape:#879caf;
  --map-card-shape-line:#607789;
}
:root[data-theme="light"] .map-card .map-preview-svg .base-countries path,
:root[data-theme="light"] .map-card-library .map-preview-svg .base-countries path{
  fill:var(--map-card-context)!important;
  stroke:var(--map-card-context-line)!important;
  stroke-width:.55!important;
  opacity:1!important;
}

/* Feature showcase: one large product surface, quiet inactive items and one
   strong active state. This keeps attention on the real interface preview. */
.hs-section{padding:clamp(78px,7vw,108px) 0!important;background:var(--bg-deep)!important}
.hs-head.hs-head-centered{
  display:block!important;
  max-width:760px;
  margin:0 auto 34px!important;
  text-align:center;
}
.hs-head-centered .hp-kicker{margin:0 0 12px!important;text-align:center}
.hs-head-centered h2{
  max-width:none!important;
  margin:0!important;
  font-size:clamp(2.05rem,3.4vw,3.2rem)!important;
  line-height:1.05!important;
  letter-spacing:-.04em!important;
  text-wrap:balance;
}
.hs-head-centered>p:last-child{
  max-width:640px!important;
  margin:13px auto 0!important;
  font-size:.98rem!important;
  line-height:1.55!important;
  text-wrap:balance;
}
.hs-showcase-shell{
  position:relative;
  padding:72px 26px 26px;
  border:1px solid var(--border);
  border-radius:26px;
  background:var(--bg-card);
  overflow:hidden;
}
.hs-showcase-shell .hs-controls{
  position:absolute;
  top:22px;
  right:24px;
  z-index:4;
  gap:6px;
  padding:5px;
  border-radius:12px;
  background:var(--bg-elevated);
}
.hs-showcase-shell .hs-arrow{
  width:34px;
  height:34px;
  border:0;
  border-radius:9px;
  background:transparent;
}
.hs-showcase-shell .hs-arrow:hover{background:var(--bg-raised)}
.hs-showcase-shell .hs-counter{min-width:48px;color:var(--ink-dim)}
.hs-showcase-shell .hs-counter b{color:var(--ink);font-weight:650}
.hs-showcase-shell .hs-stage{
  display:grid!important;
  grid-template-columns:minmax(300px,.78fr) minmax(0,1.22fr)!important;
  gap:28px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  overflow:visible!important;
}
.hs-showcase-shell .hs-nav{
  display:flex!important;
  flex-direction:column;
  justify-content:center;
  gap:10px!important;
  padding:8px 0!important;
  border:0!important;
}
.hs-showcase-shell .hs-nav-item{
  padding:18px 20px!important;
  border:1px solid transparent!important;
  border-radius:14px!important;
  background:transparent!important;
  opacity:.38!important;
  box-shadow:none!important;
  transition:opacity .2s ease,background .2s ease,border-color .2s ease,transform .2s ease!important;
}
.hs-showcase-shell .hs-nav-item:hover{opacity:.64!important;background:var(--bg-raised)!important}
.hs-showcase-shell .hs-nav-item.is-active{
  opacity:1!important;
  background:var(--bg-elevated)!important;
  border-color:var(--border)!important;
  transform:translateX(2px);
}
.hs-showcase-shell .hs-nav-label{margin-bottom:8px!important}
.hs-showcase-shell .hs-nav-item.is-active .hs-nav-label{color:var(--gold-ink)!important}
.hs-showcase-shell .hs-nav-title{font-size:1.12rem!important;line-height:1.3!important}
.hs-showcase-shell .hs-nav-desc{font-size:.84rem!important;line-height:1.55!important;max-width:40ch!important}
.hs-showcase-shell .hs-panels{
  min-height:520px!important;
  padding:0!important;
  border:0!important;
}
.hs-showcase-shell .hs-panel{
  inset:0!important;
  padding:0!important;
  gap:14px!important;
}
.hs-showcase-shell .hs-mock,
.hs-showcase-shell .hs-compare article,
.hs-showcase-shell .hs-replay,
.hs-showcase-shell .hs-community{
  border-color:var(--border-soft)!important;
}
.hs-showcase-shell .hs-mock,
.hs-showcase-shell .hs-replay{
  border-radius:18px!important;
  background:var(--bg-deep)!important;
}
.hs-showcase-shell .hs-mock-cards .map-card{
  border-radius:12px!important;
  box-shadow:none!important;
}
.hs-showcase-shell .hs-panel-foot{min-height:42px}

:root[data-theme="light"] .hs-showcase-shell{
  background:#fff;
  border-color:#e3e5e7;
}
:root[data-theme="light"] .hs-showcase-shell .hs-controls,
:root[data-theme="light"] .hs-showcase-shell .hs-nav-item.is-active{
  background:#f5f6f7!important;
}

@media(max-width:980px){
  .hs-showcase-shell{padding:70px 18px 18px}
  .hs-showcase-shell .hs-stage{grid-template-columns:1fr!important;gap:18px!important}
  .hs-showcase-shell .hs-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));padding:0!important}
  .hs-showcase-shell .hs-panels{min-height:500px!important}
}
@media(max-width:620px){
  body.home .hsd-section,body.front-page .hsd-section{margin-top:36px;padding-top:58px}
  .hs-showcase-shell{padding:64px 12px 12px;border-radius:18px}
  .hs-showcase-shell .hs-controls{top:15px;right:14px}
  .hs-showcase-shell .hs-nav{grid-template-columns:1fr!important}
  .hs-showcase-shell .hs-nav-item{padding:14px 15px!important}
  .hs-showcase-shell .hs-nav-desc{display:none}
  .hs-showcase-shell .hs-panels{min-height:460px!important}
}

/* ========================================================================== 
   20.0.15-test · final layout cleanup, richer map context, 5-feature showcase
   ========================================================================== */

/* Homepage rhythm: normal document flow at every zoom level. The hero no
   longer reserves a full viewport and the Studio begins after one divider. */
body.home .hp-hero-product,
body.front-page .hp-hero-product{
  min-height:0!important;
  display:block!important;
  border-bottom:0!important;
}
body.home .hp-hero-product .hp-hero-inner,
body.front-page .hp-hero-product .hp-hero-inner{
  width:min(calc(100% - 40px),1240px)!important;
  max-width:1240px!important;
  padding:68px 0 52px!important;
  gap:30px!important;
}
.hp-hero-product .hp-hero-map{
  width:100%!important;
  height:clamp(420px,40vw,540px)!important;
  border:1px solid var(--border-soft)!important;
  border-radius:14px!important;
}
body.home .hsd-section,
body.front-page .hsd-section{
  margin-top:0!important;
  padding-top:76px!important;
  border-top:1px solid var(--border-soft)!important;
}
.hsd-section::before{display:none!important}

/* Map cards: the selected geometry remains dominant, but modern geographic
   context stays visible underneath it in both themes. */
.map-card .map-preview-svg .base-countries path,
.map-card-library .map-preview-svg .base-countries path{
  display:block!important;
  fill:var(--map-card-context)!important;
  stroke:var(--map-card-context-line)!important;
  stroke-width:.62!important;
  stroke-opacity:.92!important;
  opacity:1!important;
  vector-effect:non-scaling-stroke;
}
.map-card .map-preview-svg .highlight-region path,
.map-card-library .map-preview-svg .highlight-region path{
  fill:var(--map-card-shape)!important;
  fill-opacity:.82!important;
  stroke:var(--map-card-shape-line)!important;
  stroke-width:.82!important;
  vector-effect:non-scaling-stroke;
}
:root[data-theme="dark"] .map-card .map-preview-svg .base-countries path,
:root:not([data-theme="light"]) .map-card .map-preview-svg .base-countries path{
  fill:#1d1c1a!important;
  stroke:#504c46!important;
}
:root[data-theme="light"] .map-card .map-preview-svg .base-countries path{
  fill:#eef1f3!important;
  stroke:#c9d0d5!important;
}

/* Five-feature product showcase. The typography is deliberately concise and
   the right side behaves like a product image, not another dashboard grid. */
.hs-section{padding:88px 0!important;background:var(--bg)!important}
.hs-head.hs-head-centered{max-width:720px!important;margin:0 auto 38px!important;text-align:center!important}
.hs-head-centered .hp-kicker{display:none!important}
.hs-head-centered h2{
  max-width:18ch!important;
  margin:0 auto!important;
  font-size:clamp(2rem,3vw,2.7rem)!important;
  line-height:1.08!important;
  letter-spacing:-.038em!important;
  text-wrap:balance;
}
.hs-head-centered>p:last-child{
  max-width:650px!important;
  margin:13px auto 0!important;
  font-size:.98rem!important;
  line-height:1.55!important;
  color:var(--ink-dim)!important;
}
.hs-showcase-shell{
  padding:74px 28px 28px!important;
  border:1px solid var(--border)!important;
  border-radius:24px!important;
  background:var(--bg-card)!important;
  box-shadow:0 28px 70px rgba(0,0,0,.14)!important;
}
.hs-showcase-shell .hs-stage{
  grid-template-columns:minmax(280px,.7fr) minmax(0,1.55fr)!important;
  gap:34px!important;
}
.hs-showcase-shell .hs-nav{justify-content:center!important;gap:5px!important;padding:0!important}
.hs-showcase-shell .hs-nav-item{
  padding:15px 17px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  opacity:.38!important;
}
.hs-showcase-shell .hs-nav-item.is-active{
  opacity:1!important;
  background:var(--bg-elevated)!important;
  border-color:var(--border)!important;
  transform:none!important;
}
.hs-showcase-shell .hs-nav-label{
  margin-bottom:5px!important;
  font-family:var(--font-body)!important;
  font-size:.68rem!important;
  font-weight:650!important;
  letter-spacing:.02em!important;
  text-transform:none!important;
  color:var(--ink-faint)!important;
}
.hs-showcase-shell .hs-nav-item.is-active .hs-nav-label{color:var(--gold-ink)!important}
.hs-showcase-shell .hs-nav-title{
  display:block!important;
  max-width:24ch!important;
  font-size:1.02rem!important;
  line-height:1.25!important;
  text-wrap:balance;
}
.hs-showcase-shell .hs-nav-desc{
  display:block!important;
  max-width:38ch!important;
  margin-top:5px!important;
  font-size:.8rem!important;
  line-height:1.45!important;
}
.hs-showcase-shell .hs-panels{min-height:590px!important}
.hs-showcase-shell .hs-panel{gap:14px!important}
.hs-product-shot{
  position:relative;
  min-height:510px;
  overflow:hidden;
  border:1px solid var(--border-soft);
  border-radius:16px;
  background:var(--bg-deep);
  box-shadow:0 20px 50px rgba(0,0,0,.18);
}
.hs-product-shot img{display:block;width:100%;height:100%;min-height:510px;object-fit:cover;object-position:center}
.hs-library-shot{padding:18px;background:var(--bg-deep)}
.hs-library-toolbar{display:grid;grid-template-columns:minmax(0,1.7fr) repeat(2,minmax(100px,.5fr));gap:8px;margin-bottom:14px}
.hs-library-toolbar span{min-width:0;padding:10px 12px;border:1px solid var(--border-soft);border-radius:8px;color:var(--ink-faint);font-size:.73rem;background:var(--bg-card);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hs-library-toolbar .hs-library-search{color:var(--ink-dim)}
.hs-library-shot .hs-mock-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.hs-library-shot .map-card{min-height:410px!important}
.hs-studio-shot img{object-position:center top}
.hs-shot-callout{
  position:absolute;left:28px;bottom:28px;max-width:270px;padding:13px 15px;border:1px solid var(--border);border-radius:11px;background:color-mix(in srgb,var(--bg-card) 92%,transparent);box-shadow:0 14px 34px rgba(0,0,0,.28);backdrop-filter:blur(10px)
}
.hs-shot-callout span{display:block;margin-bottom:4px;color:var(--gold-ink);font-size:.72rem;font-weight:650}
.hs-shot-callout strong{display:block;color:var(--ink);font-size:.9rem;line-height:1.35}
.hs-operation-panel{
  position:absolute;right:24px;top:24px;width:min(290px,42%);padding:18px;border:1px solid color-mix(in srgb,var(--gold) 30%,var(--border));border-radius:12px;background:color-mix(in srgb,var(--bg-card) 96%,transparent);box-shadow:0 18px 44px rgba(0,0,0,.35);backdrop-filter:blur(12px)
}
.hs-operation-panel>span{display:block;margin-bottom:11px;color:var(--ink-faint);font-size:.7rem;font-weight:650}
.hs-operation-panel strong{display:block;color:var(--ink);font-size:1rem}
.hs-operation-panel p{margin:7px 0 15px;color:var(--ink-dim);font-size:.78rem;line-height:1.45}
.hs-operation-panel button{width:100%;padding:10px 12px;border:0;border-radius:7px;background:var(--gold);color:var(--gold-contrast);font:650 .75rem var(--font-body);pointer-events:none}
.hs-advanced-grid{
  position:absolute;right:24px;bottom:24px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(420px,58%);overflow:hidden;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--bg-card) 96%,transparent);box-shadow:0 18px 44px rgba(0,0,0,.35);backdrop-filter:blur(12px)
}
.hs-advanced-grid span{padding:15px;border-right:1px solid var(--border-soft);border-bottom:1px solid var(--border-soft);color:var(--ink-faint);font-size:.72rem;line-height:1.4}
.hs-advanced-grid span:nth-child(even){border-right:0}.hs-advanced-grid span:nth-last-child(-n+2){border-bottom:0}
.hs-advanced-grid b{display:block;margin-bottom:4px;color:var(--ink);font-size:.82rem}
.hs-product-shot.hs-compare{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;padding:16px!important}
.hs-product-shot.hs-compare article{min-width:0;border:1px solid var(--border-soft)!important;border-radius:12px!important;background:var(--bg-card)!important;overflow:hidden}
.hs-product-shot.hs-compare .hs-compare-preview{height:300px!important;background:var(--bg-deep)!important}
.hs-product-shot.hs-compare article h3{margin:16px 16px 12px!important;font-size:1.05rem!important}
.hs-product-shot.hs-compare article dl{margin:0 16px 16px!important}
.hs-showcase-shell .hs-panel-foot{justify-content:flex-start!important;min-height:48px!important}

/* Small forward-looking note. This replaces the oversized roadmap and keeps
   non-GeoJSON formats visible without making promises look like live tools. */
.section.hp-formats-note{padding:58px 0!important;background:var(--bg-deep)!important}
.hp-formats-inner{display:grid;grid-template-columns:minmax(250px,.7fr) minmax(0,1.3fr);gap:52px;align-items:center}
.hp-formats-inner h2{margin:0;font-size:1.55rem;letter-spacing:-.03em;color:var(--ink)}
.hp-formats-inner p{max-width:48ch;margin:9px 0 0;color:var(--ink-dim);font-size:.9rem;line-height:1.55}
.hp-format-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;overflow:hidden;border:1px solid var(--border-soft);border-radius:12px;background:var(--border-soft)}
.hp-format-list>span{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;background:var(--bg-card);color:var(--ink);font-size:.86rem;font-weight:600}
.hp-format-list small{color:var(--ink-faint);font-size:.68rem;font-weight:500}

/* Single-map page: restore the world-to-map camera move and keep geographic
   context visible through the selected boundary. */
.map-hero-preview .map-preview-svg .base-countries path,
.map-detail-preview .map-preview-svg .base-countries path{
  display:block!important;
  fill:var(--map-card-context)!important;
  stroke:var(--map-card-context-line)!important;
  stroke-width:.62!important;
  stroke-opacity:.92!important;
  vector-effect:non-scaling-stroke;
}
.map-hero-preview .map-preview-svg .highlight-region path,
.map-detail-preview .map-preview-svg .highlight-region path{
  fill:var(--map-card-shape)!important;
  fill-opacity:.82!important;
  stroke:var(--map-card-shape-line)!important;
  stroke-width:.9!important;
  vector-effect:non-scaling-stroke;
}
.map-hero-preview{min-height:500px!important;background:var(--bg-deep)!important}
.map-preview-caption{display:flex!important;justify-content:space-between!important;gap:18px!important}

/* Single map body has one top information row, then full-width sections.
   Nothing is left hanging in an empty sidebar. */
.map-body-v20{padding:58px 0 88px;border-top:1px solid var(--border-soft);background:var(--bg)}
.map-body-v20-inner{display:flex;flex-direction:column;gap:20px}
.map-overview-grid-v20{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;align-items:start}
.map-overview-panel-v20,.map-access-panel-v20,.map-inline-section-v20{border:1px solid var(--border);border-radius:14px;background:var(--bg-card)}
.map-overview-panel-v20{padding:28px 30px}
.map-overview-heading-v20{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid var(--border-soft)}
.map-overview-heading-v20 span,.map-inline-heading-v20 span{display:block;margin-bottom:5px;color:var(--ink-faint);font-size:.68rem;font-weight:650;letter-spacing:.02em}
.map-overview-heading-v20 h2,.map-inline-heading-v20 h2{margin:0;color:var(--ink);font-size:1.35rem;letter-spacing:-.025em}
.map-overview-heading-v20>strong{padding:6px 9px;border:1px solid var(--border);border-radius:7px;color:var(--ink-dim);font-size:.75rem;font-weight:600}
.map-description-notes{max-width:72ch!important;margin:0 0 24px!important;color:var(--ink-dim)}
.map-meta-groups-v20{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 28px}
.map-meta-group-v20>span{display:block;margin-bottom:8px;color:var(--ink-faint);font-size:.65rem;font-weight:650}
.map-meta-group-v20 .map-chip-list span{padding:6px 9px!important;background:transparent!important;font-size:.72rem!important}
.map-community-credit-v20{display:flex;align-items:center;gap:13px;margin-top:24px;padding-top:20px;border-top:1px solid var(--border-soft)}
.map-community-credit-v20 .community-uploader-avatar{width:42px;height:42px}.map-community-credit-v20 span{display:block;color:var(--ink-faint);font-size:.68rem}.map-community-credit-v20 strong{display:block;color:var(--ink);font-size:.9rem}.map-community-credit-v20 p{margin:3px 0 0;color:var(--ink-dim);font-size:.78rem}
.map-access-panel-v20{padding:22px;position:sticky;top:88px}
.map-access-head-v20{display:flex;justify-content:space-between;gap:12px;margin-bottom:20px;padding-bottom:15px;border-bottom:1px solid var(--border-soft);color:var(--ink-faint);font-size:.68rem}.map-access-head-v20 strong{color:var(--gold-ink);font-size:.72rem}
.map-access-panel-v20 .member-allowance-copy{margin-bottom:16px}.map-access-panel-v20 .map-sidebar-primary{width:100%;justify-content:center;margin:0 0 18px}
.map-facts-inline-v20{margin:0;padding:2px 0;border-top:1px solid var(--border-soft)}
.map-facts-inline-v20>div{display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px;padding:11px 0;border-bottom:1px solid var(--border-soft)}
.map-facts-inline-v20 dt{color:var(--ink-faint);font-size:.7rem}.map-facts-inline-v20 dd{margin:0;color:var(--ink-dim);font-size:.75rem;text-align:right}
.map-technical-v20{margin:14px 0 10px!important;border:0!important;border-top:1px solid var(--border-soft)!important;border-radius:0!important}
.map-inline-section-v20{padding:24px 28px}
.map-inline-heading-v20{display:flex;align-items:center;justify-content:space-between;gap:26px}
.map-inline-heading-v20 p,.map-inline-heading-v20>a{max-width:44ch;margin:0;color:var(--ink-dim);font-size:.82rem;line-height:1.5;text-align:right}.map-inline-heading-v20>a{color:var(--gold-ink);text-decoration:none}
.map-timeline-slim-v20{display:flex;align-items:center;justify-content:space-between;gap:24px}
.map-soon-pill-v20{flex:0 0 auto;padding:7px 10px;border:1px solid var(--border);border-radius:999px;color:var(--ink-faint);font-size:.7rem;font-weight:600}
.map-related-wide-v20{padding-bottom:28px}.map-related-grid-v20{grid-template-columns:repeat(3,minmax(0,1fr))!important;margin-top:22px}.map-related-grid-v20 .map-related-preview{height:150px!important}

/* The restored original About page keeps its simple structure while inheriting
   the current light/dark palette. */
.simple-about-page .simple-page-hero{padding-top:80px!important;padding-bottom:64px!important}
.simple-about-page .simple-about-content{padding-bottom:80px!important}
.simple-about-grid article,.simple-about-story,.simple-page-cta{background:var(--bg-card)!important;border-color:var(--border)!important}

@media(max-width:1024px){
  body.home .hp-hero-product .hp-hero-inner,body.front-page .hp-hero-product .hp-hero-inner{padding:54px 0 42px!important}
  .hp-hero-product .hp-hero-map{height:430px!important}
  .hs-showcase-shell .hs-stage{grid-template-columns:1fr!important}
  .hs-showcase-shell .hs-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .hs-showcase-shell .hs-panels{min-height:560px!important}
  .map-overview-grid-v20{grid-template-columns:1fr}
  .map-access-panel-v20{position:static}
  .hp-formats-inner{grid-template-columns:1fr;gap:24px}
}
@media(max-width:700px){
  body.home .hp-hero-product .hp-hero-inner,body.front-page .hp-hero-product .hp-hero-inner{width:min(calc(100% - 28px),1240px)!important;padding:44px 0 34px!important}
  .hp-hero-product .hp-hero-map{width:100%!important;height:310px!important;margin:0!important;border-radius:10px!important}
  body.home .hsd-section,body.front-page .hsd-section{padding-top:56px!important}
  .hs-head-centered h2{font-size:1.85rem!important}
  .hs-showcase-shell{padding:64px 12px 12px!important;border-radius:17px!important}
  .hs-showcase-shell .hs-nav{grid-template-columns:1fr!important}
  .hs-showcase-shell .hs-nav-desc{display:none!important}
  .hs-showcase-shell .hs-panels{min-height:440px!important}
  .hs-product-shot{min-height:365px}.hs-product-shot img{min-height:365px}
  .hs-library-toolbar{grid-template-columns:1fr}.hs-library-toolbar span:not(.hs-library-search){display:none}
  .hs-library-shot .hs-mock-cards{grid-template-columns:1fr!important}.hs-library-shot .hs-mock-cards .map-card:nth-child(n+2){display:none}
  .hs-operation-panel{right:12px;top:12px;width:62%}.hs-advanced-grid{right:12px;bottom:12px;width:72%}
  .hs-product-shot.hs-compare{grid-template-columns:1fr!important}.hs-product-shot.hs-compare article:nth-child(2){display:none}.hs-product-shot.hs-compare .hs-compare-preview{height:230px!important}
  .hp-format-list{grid-template-columns:1fr}
  .map-hero-preview{min-height:330px!important}
  .map-overview-panel-v20,.map-access-panel-v20,.map-inline-section-v20{padding:20px}
  .map-meta-groups-v20{grid-template-columns:1fr}
  .map-inline-heading-v20{align-items:flex-start;flex-direction:column;gap:8px}.map-inline-heading-v20 p,.map-inline-heading-v20>a{text-align:left}
  .map-timeline-slim-v20{align-items:flex-start;flex-direction:column}
  .map-related-grid-v20{grid-template-columns:1fr!important}
}


/* 20.0.16 final-loaded overrides */
.legal-page .legal-document .legal-actions a.button{text-decoration:none!important}
.legal-page .legal-document .legal-actions a.button-primary{color:var(--on-gold)!important}
.legal-page .legal-document .legal-actions a.button-outline{color:var(--gold-soft)!important}
:root[data-theme="light"] .legal-page .legal-document .legal-actions a.button-primary{color:#fff!important}
@media (min-width:961px){
  .account-dashboard-page .section-inner{max-width:1240px}
  .account-layout.account-layout-v2{display:block!important;margin-top:22px}
  .account-sidebar.account-sidebar-v2{position:static!important;display:flex!important;align-items:center;justify-content:space-between;gap:20px;width:100%;padding:10px 12px!important;margin:0 0 22px;overflow:visible}
  .account-sidebar-v2 .account-sidebar-profile{flex:0 1 230px;padding:4px 8px!important;border:0!important}
  .account-sidebar-v2 .account-nav{display:flex!important;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;margin-left:auto}
  .account-sidebar-v2 .account-nav a,.account-sidebar-v2 .account-nav form,.account-sidebar-v2 .account-logout{flex:0 0 auto}
  .account-sidebar-v2 .account-nav a,.account-sidebar-v2 .account-logout{min-height:40px!important;padding:9px 11px!important}
  .account-content.account-content-v2{width:100%;min-width:0}
  .account-map-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.hp-hero-product .hp-hero-map{margin-left:auto!important;margin-right:auto!important}

/* ========================================================================== 
   20.0.17-test · responsive architecture + account navigation cleanup
   This block intentionally sits last so older experimental responsive rules
   cannot win at tablet/phone widths.
   ========================================================================== */

/* ---------- Account dashboard: remove the duplicated identity panel ---------- */
.account-dashboard-page .account-sidebar-v2 .account-sidebar-profile{
  display:none!important;
}
.account-dashboard-page .account-layout.account-layout-v2{
  display:block!important;
  margin-top:18px!important;
}
.account-dashboard-page .account-sidebar.account-sidebar-v2{
  position:static!important;
  width:100%!important;
  margin:0 0 24px!important;
  padding:0!important;
  border:0!important;
  border-bottom:1px solid var(--border-soft)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.account-dashboard-page .account-sidebar-v2 .account-nav{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-direction:row!important;
  gap:4px!important;
  width:100%!important;
  margin:0!important;
}
.account-dashboard-page .account-sidebar-v2 .account-nav a,
.account-dashboard-page .account-sidebar-v2 .account-logout{
  position:relative!important;
  min-height:44px!important;
  padding:10px 13px!important;
  border:0!important;
  border-radius:7px 7px 0 0!important;
  background:transparent!important;
  color:var(--ink-dim)!important;
  box-shadow:none!important;
  white-space:nowrap!important;
}
.account-dashboard-page .account-sidebar-v2 .account-nav a:hover,
.account-dashboard-page .account-sidebar-v2 .account-logout:hover{
  background:var(--bg-raised)!important;
  color:var(--ink)!important;
}
.account-dashboard-page .account-sidebar-v2 .account-nav a.is-active{
  color:var(--ink)!important;
  background:transparent!important;
}
.account-dashboard-page .account-sidebar-v2 .account-nav a.is-active::after{
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  bottom:-1px;
  height:2px;
  border-radius:2px 2px 0 0;
  background:var(--gold);
}
.account-dashboard-page .account-sidebar-v2 .account-nav a.is-active svg{
  stroke:var(--gold)!important;
}
.account-dashboard-page .account-sidebar-v2 .account-nav form{
  margin-left:auto!important;
}
.account-dashboard-page .account-content.account-content-v2{
  width:100%!important;
  min-width:0!important;
}
.account-dashboard-page .account-map-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

/* ---------- Shared responsive foundation ---------- */
img,svg,video,canvas{max-width:100%}
.section-inner,.header-inner,.footer-inner,.map-library-wide{
  box-sizing:border-box;
}
@media (max-width:1024px){
  .section-inner,.header-inner,.footer-inner,.map-library-wide{
    width:min(calc(100% - 32px),var(--container))!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  .section{padding-top:64px;padding-bottom:64px}
}
@media (max-width:640px){
  .section-inner,.header-inner,.footer-inner,.map-library-wide{
    width:calc(100% - 24px)!important;
  }
  .section{padding-top:48px;padding-bottom:48px}
}

/* ---------- Header / mobile navigation ---------- */
@media (max-width:900px){
  .site-header,.header-inner{height:64px!important}
  .site-header{position:sticky!important;top:0!important;z-index:10001!important}
  .admin-bar .site-header{top:32px!important}
  .header-inner{display:flex!important;align-items:center!important;gap:10px!important}
  .brand{gap:9px!important}
  .brand-mark{width:30px!important;height:30px!important}
  .brand-name{font-size:1.02rem!important}
  .desktop-nav,.header-actions>.account-link,.header-actions>.submit-link{display:none!important}
  .header-actions{display:flex!important;align-items:center!important;gap:7px!important;margin-left:auto!important}
  .theme-control{height:36px!important;padding:3px!important}
  .theme-option{width:28px!important;height:28px!important}
  .menu-button{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;border:1px solid var(--border)!important;border-radius:8px!important;background:var(--bg-card)!important;color:var(--ink)!important}
  .menu-button svg{width:19px!important;height:19px!important}
  .mobile-nav{top:64px!important;height:calc(100dvh - 64px)!important;max-height:calc(100dvh - 64px)!important;padding:12px 18px calc(24px + env(safe-area-inset-bottom))!important;background:var(--bg)!important}
  .admin-bar .mobile-nav{top:96px!important;height:calc(100dvh - 96px)!important;max-height:calc(100dvh - 96px)!important}
  .mobile-nav>a,.mobile-nav>li>a,.mobile-nav>.nav-dropdown>.nav-dropdown-label,.mobile-nav>li.nav-dropdown>.nav-dropdown-label{min-height:52px!important;font-size:1rem!important}
  .mobile-submit{margin-top:12px!important;min-height:48px!important}
}
@media (max-width:782px){
  .admin-bar .site-header{top:46px!important}
  .admin-bar .mobile-nav{top:110px!important;height:calc(100dvh - 110px)!important;max-height:calc(100dvh - 110px)!important}
}
@media (max-width:420px){
  .brand-name{font-size:.96rem!important}
  .theme-control{display:none!important}
}

/* ---------- Landing hero ---------- */
@media (max-width:1024px){
  body.home .hp-hero-product,body.front-page .hp-hero-product{min-height:0!important}
  body.home .hp-hero-product .hp-hero-inner,body.front-page .hp-hero-product .hp-hero-inner{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:30px!important;
    padding:52px 0 44px!important;
  }
  .hp-hero-product .hp-hero-copy{max-width:760px!important;text-align:center!important}
  .hp-hero-product .hp-h1{font-size:clamp(2.65rem,7vw,4.1rem)!important;line-height:.98!important;max-width:16ch!important;margin-inline:auto!important}
  .hp-hero-product .hp-lede{max-width:60ch!important;margin:16px auto 0!important;font-size:1rem!important}
  .hp-hero-product .hp-actions{justify-content:center!important;gap:18px!important;margin-top:22px!important}
  .hp-hero-product .hp-hero-map{width:100%!important;height:auto!important;aspect-ratio:900/520!important;margin:0!important}
}
@media (max-width:640px){
  body.home .hp-hero-product .hp-hero-inner,body.front-page .hp-hero-product .hp-hero-inner{gap:24px!important;padding:38px 0 30px!important}
  .hp-hero-product .hp-h1{font-size:clamp(2.15rem,10.5vw,3rem)!important;max-width:13ch!important}
  .hp-hero-product .hp-lede{font-size:.92rem!important;line-height:1.6!important;max-width:39ch!important}
  .hp-hero-product .hp-actions{gap:10px!important;margin-top:18px!important}
  .hp-hero-product .hp-actions .button{min-height:46px!important}
  .hp-hero-secondary{min-height:44px!important;display:inline-flex!important;align-items:center!important}
  .hp-hero-product .hp-hero-map{aspect-ratio:1.34/1!important;min-height:0!important}
  .hp-hero-map .map-label{left:12px!important;bottom:10px!important;font-size:.56rem!important}
}
@media (max-width:390px){
  .hp-hero-product .hp-actions{display:grid!important;grid-template-columns:1fr!important;width:min(100%,300px)!important;margin-inline:auto!important}
  .hp-hero-product .hp-actions>a{width:100%!important;justify-content:center!important}
}

/* ---------- Studio marketing section ---------- */
@media (max-width:1024px){
  .hsd-grid{grid-template-columns:1fr!important;gap:28px!important}
  .hsd-copy{max-width:680px!important}
  .hsd-title-lines{font-size:clamp(2.5rem,7vw,4.1rem)!important;max-width:12ch!important}
  .hsd-demo{width:100%!important;min-width:0!important}
  .hsd-feature-list{grid-template-columns:repeat(3,minmax(0,1fr))!important;margin-top:28px!important}
}
@media (max-width:680px){
  .hsd-title-lines{font-size:clamp(2.25rem,11vw,3.15rem)!important}
  .hsd-copy>p:not(.hp-kicker){font-size:.92rem!important;line-height:1.65!important}
  .hsd-cta{width:100%!important;justify-content:center!important}
  .hsd-demo{overflow:hidden!important;border-radius:10px!important}
  .hsd-feature-list{grid-template-columns:1fr 1fr!important;margin-top:20px!important}
  .hsd-feature-list li{min-height:92px!important;padding:15px!important}
  .hsd-feature-list span{font-size:.72rem!important;line-height:1.45!important}
}
@media (max-width:420px){
  .hsd-feature-list{grid-template-columns:1fr!important}
  .hsd-feature-list li{min-height:0!important}
}

/* ---------- Five-feature showcase: tablet and mobile ---------- */
@media (max-width:1024px){
  .hs-head-centered{max-width:720px!important;margin-inline:auto!important;text-align:center!important}
  .hs-head-centered h2{font-size:clamp(2rem,5.5vw,3rem)!important;line-height:1.05!important}
  .hs-head-centered p{max-width:56ch!important;margin-inline:auto!important}
  .hs-showcase-shell{padding:64px 16px 16px!important;border-radius:18px!important}
  .hs-showcase-shell .hs-controls{top:15px!important;right:16px!important}
  .hs-showcase-shell .hs-stage{display:block!important}
  .hs-showcase-shell .hs-nav{
    display:flex!important;
    gap:6px!important;
    overflow-x:auto!important;
    overscroll-behavior-inline:contain!important;
    scroll-snap-type:x proximity!important;
    padding:0 0 14px!important;
    margin:0 0 14px!important;
    scrollbar-width:none!important;
  }
  .hs-showcase-shell .hs-nav::-webkit-scrollbar{display:none!important}
  .hs-showcase-shell .hs-nav-item{
    flex:0 0 min(270px,72vw)!important;
    scroll-snap-align:start!important;
    min-height:100px!important;
    padding:15px 16px!important;
  }
  .hs-showcase-shell .hs-nav-desc{display:block!important;font-size:.76rem!important;line-height:1.45!important}
  .hs-showcase-shell .hs-panels{min-height:0!important}
  .hs-showcase-shell .hs-panel{min-height:0!important}
  .hs-product-shot{min-height:0!important}
}
@media (max-width:620px){
  .hs-showcase-shell{padding:58px 10px 10px!important;border-radius:14px!important}
  .hs-showcase-shell .hs-controls{top:12px!important;right:11px!important}
  .hs-showcase-shell .hs-nav-item{flex-basis:76vw!important;min-height:86px!important;padding:13px 14px!important}
  .hs-showcase-shell .hs-nav-desc{display:none!important}
  .hs-showcase-shell .hs-nav-title{font-size:.96rem!important}
  .hs-product-shot,.hs-product-shot img{min-height:0!important;height:auto!important}
  .hs-library-shot .hs-mock-cards{grid-template-columns:1fr!important}
  .hs-library-shot .hs-mock-cards .map-card:nth-child(n+2){display:none!important}
  .hs-product-shot.hs-compare{grid-template-columns:1fr!important}
  .hs-product-shot.hs-compare article:nth-child(2){display:none!important}
  .hs-operation-panel,.hs-advanced-grid{position:static!important;width:auto!important;margin:10px!important}
  .hs-showcase-shell .hs-panel-foot{align-items:flex-start!important;flex-direction:column!important;gap:8px!important}
}

/* ---------- Explore library ---------- */
@media (max-width:1024px){
  .map-library-heading-row{grid-template-columns:1fr!important;gap:24px!important}
  .map-library-heading{max-width:720px!important}
  .map-library-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .map-library-page .map-search-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .map-library-page .map-search-form>label:first-child{grid-column:1/-1!important}
  .map-filter-actions{grid-column:1/-1!important;justify-content:flex-end!important}
  .map-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
  .map-library-tabs{overflow-x:auto!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}
  .map-library-tabs::-webkit-scrollbar{display:none!important}
  .map-library-tab{flex:0 0 auto!important;white-space:nowrap!important}
}
@media (max-width:680px){
  .map-library-hero{padding:30px 0 22px!important}
  .map-library-heading h1{font-size:clamp(2rem,10vw,2.8rem)!important}
  .map-library-description{font-size:.86rem!important;line-height:1.6!important}
  .map-library-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .library-stat-card{min-height:74px!important;padding:12px!important}
  .map-library-page .map-search-form{grid-template-columns:1fr!important;padding:12px!important}
  .map-library-page .map-search-form>label:first-child{grid-column:auto!important}
  .map-filter-actions{grid-column:auto!important;display:grid!important;grid-template-columns:1fr 1fr!important}
  .map-filter-actions>*{min-width:0!important;width:100%!important}
  .map-library-grid{grid-template-columns:1fr!important;gap:12px!important}
  .map-card-library .preview{height:210px!important}
  .map-card-library .card-body{padding:14px!important}
  .map-card-library .card-foot{gap:10px!important}
  .map-card-actions{display:grid!important;grid-template-columns:1fr 1.08fr!important;gap:8px!important;width:100%!important}
  .map-card-actions>*{width:100%!important;justify-content:center!important;min-width:0!important}
}
@media (max-width:390px){
  .map-library-stats{grid-template-columns:1fr 1fr!important}
  .map-filter-actions,.map-card-actions{grid-template-columns:1fr!important}
}

/* ---------- Single map pages ---------- */
@media (max-width:1024px){
  .map-hero-v19{padding:44px 0 38px!important}
  .map-hero-inner-v19{grid-template-columns:1fr!important;gap:28px!important}
  .map-hero-copy-v19{max-width:720px!important}
  .map-hero-copy-v19 h1{font-size:clamp(3rem,8vw,4.8rem)!important}
  .map-hero-preview{min-height:0!important;aspect-ratio:16/10!important}
  .map-overview-grid-v20{grid-template-columns:1fr!important}
  .map-access-panel-v20{position:static!important}
  .map-related-grid-v20{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:680px){
  .map-hero-v19{padding:30px 0 30px!important}
  .map-hero-copy-v19 h1{font-size:clamp(2.55rem,13vw,3.8rem)!important;line-height:.98!important}
  .map-hero-summary{font-size:.92rem!important;line-height:1.65!important}
  .map-hero-actions-v19{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .map-hero-actions-v19>*{width:100%!important;justify-content:center!important}
  .map-quick-stats{display:grid!important;grid-template-columns:1fr!important}
  .map-quick-stats>div{padding:10px 0!important;border-left:0!important;border-bottom:1px solid var(--border-soft)!important;text-align:left!important}
  .map-hero-preview{aspect-ratio:4/3!important}
  .map-overview-panel-v20,.map-access-panel-v20,.map-inline-section-v20{padding:18px!important}
  .map-meta-groups-v20{grid-template-columns:1fr!important}
  .map-related-grid-v20{grid-template-columns:1fr!important}
}

/* ---------- Compare ---------- */
@media (max-width:900px){
  .country-compare-hero{padding:38px 0 28px!important}
  .country-compare-heading h1{font-size:clamp(2.5rem,8vw,4rem)!important}
  .country-compare-picker{grid-template-columns:1fr 1fr!important;gap:12px!important}
  .country-picker-versus{grid-column:1/-1!important;margin:auto!important}
  .country-compare-picker .button{grid-column:1/-1!important;width:100%!important}
  .country-map-grid{grid-template-columns:1fr 1fr!important;gap:12px!important}
  .country-compare-preview{min-height:300px!important}
}
@media (max-width:640px){
  .country-compare-picker,.country-map-grid{grid-template-columns:1fr!important}
  .country-picker-versus,.country-compare-picker .button{grid-column:auto!important}
  .country-compare-preview{min-height:240px!important}
}

/* ---------- Account dashboard ---------- */
@media (max-width:1024px){
  .account-dashboard-shell{padding:26px 0 60px!important}
  .account-hero-panel{display:grid!important;grid-template-columns:1fr auto!important;gap:18px!important;padding:20px!important}
  .account-hero-profile{min-width:0!important}
  .account-hero-actions{align-self:center!important}
  .account-dashboard-page .account-sidebar.account-sidebar-v2{overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important}
  .account-dashboard-page .account-sidebar.account-sidebar-v2::-webkit-scrollbar{display:none!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav{min-width:max-content!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav form{margin-left:0!important}
  .account-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .account-map-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .account-section-heading>p{text-align:left!important;max-width:560px!important}
}
@media (max-width:680px){
  .account-dashboard-shell{padding:18px 0 44px!important}
  .account-hero-panel{grid-template-columns:1fr!important;padding:16px!important}
  .account-hero-profile{display:grid!important;grid-template-columns:56px minmax(0,1fr)!important;gap:12px!important;align-items:center!important}
  .account-hero-avatar{width:56px!important;height:56px!important}
  .account-hero-profile>div{min-width:0!important}
  .account-hero-profile h1{font-size:1.3rem!important;line-height:1.15!important}
  .account-hero-profile p:last-child{font-size:.76rem!important;line-height:1.5!important}
  .account-hero-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  .account-hero-actions .button{width:100%!important;justify-content:center!important;padding-inline:10px!important}
  .account-dashboard-page .account-sidebar.account-sidebar-v2{margin-bottom:18px!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a,.account-dashboard-page .account-sidebar-v2 .account-logout{min-height:42px!important;padding:9px 11px!important;font-size:.76rem!important}
  .account-download-allowance{align-items:flex-start!important;flex-direction:column!important;gap:8px!important;padding:14px!important}
  .account-section-heading{align-items:flex-start!important;flex-direction:column!important;gap:7px!important}
  .account-section-heading h2{font-size:1.4rem!important}
  .account-section-heading>p{font-size:.76rem!important}
  .account-stat-grid{gap:8px!important}
  .account-stat-card{padding:13px!important}
  .account-stat-card strong{font-size:1.2rem!important}
  .account-trend-card{padding:14px!important;overflow:hidden!important}
  .account-map-grid{grid-template-columns:1fr!important;gap:12px!important}
  .account-form-grid{grid-template-columns:1fr!important;padding:16px!important}
  .account-field-full{grid-column:auto!important}
  .account-form-actions{padding:0 16px 16px!important}
}
@media (max-width:390px){
  .account-hero-actions,.account-stat-grid{grid-template-columns:1fr!important}
}

/* ---------- Authentication ---------- */
@media (max-width:900px){
  .auth-shell{min-height:auto!important;padding:32px 0 56px!important}
  .auth-layout{grid-template-columns:1fr!important;max-width:640px!important;margin-inline:auto!important}
  .auth-story-panel{min-height:0!important;padding:28px!important;border-right:0!important;border-bottom:1px solid var(--border-soft)!important}
  .auth-story-panel h1{font-size:2.35rem!important}
  .auth-story-foot{display:none!important}
  .auth-form-panel{padding:28px!important}
}
@media (max-width:560px){
  .auth-shell{padding:18px 0 36px!important}
  .auth-layout{border-radius:10px!important}
  .auth-story-panel{display:none!important}
  .auth-form-panel{padding:22px 16px!important}
  .auth-form-card{max-width:none!important}
}

/* ---------- Simple/About/Submit/Legal ---------- */
@media (max-width:900px){
  .simple-page-hero,.simple-submit-section,.legal-masthead{padding:46px 0!important}
  .simple-page-hero h1,.legal-masthead h1{font-size:clamp(2.5rem,8vw,4rem)!important}
  .simple-about-grid,.simple-submit-grid,.legal-layout{grid-template-columns:1fr!important}
}
@media (max-width:620px){
  .simple-page-hero,.simple-submit-section,.legal-masthead{padding:34px 0!important}
  .simple-page-hero h1,.legal-masthead h1{font-size:clamp(2.2rem,11vw,3.1rem)!important}
  .simple-submit-card,.legal-summary,.legal-document>section{padding:18px!important}
}

/* ---------- Footer ---------- */
@media (max-width:900px){
  .site-footer{padding:46px 0 24px!important}
  .footer-main{grid-template-columns:1fr!important;gap:32px!important}
  .footer-intro{max-width:560px!important}
  .footer-columns{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:28px!important}
}
@media (max-width:560px){
  .site-footer{padding:38px 0 22px!important}
  .footer-columns{grid-template-columns:1fr 1fr!important;gap:28px 24px!important}
  .footer-columns section:last-child{grid-column:1/-1!important}
  .footer-bottom{align-items:flex-start!important;flex-direction:column!important;gap:7px!important}
}
@media (max-width:360px){
  .footer-columns{grid-template-columns:1fr!important}
  .footer-columns section:last-child{grid-column:auto!important}
}

/* ---------- Modals ---------- */
@media (max-width:640px){
  .license-modal-overlay,.guest-limit-modal-overlay{padding:12px!important;align-items:flex-end!important}
  .license-modal-box,.guest-limit-modal{width:100%!important;max-height:88dvh!important;overflow:auto!important;border-radius:16px 16px 10px 10px!important;padding:22px 16px!important}
  .license-modal-intro,.guest-limit-heading-row{grid-template-columns:1fr!important}
  .license-modal-actions,.guest-limit-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .license-modal-actions>* ,.guest-limit-actions>*{width:100%!important;justify-content:center!important}
  .guest-limit-plans{grid-template-columns:1fr!important}
}

/* ========================================================================== 
   20.0.18-test · responsive rebuild
   Mobile-first behavior is intentionally defined as the final layer so the
   accumulated desktop experiments above cannot distort phone/iPad layouts.
   Breakpoints are content-driven: 960px = compact navigation, 720px = phone
   composition, 420px = narrow-phone refinements.
   ========================================================================== */

html,body{max-width:100%;overflow-x:clip}
.site-shell{max-width:100%;overflow-x:clip}
img,svg,video,canvas{max-width:100%;height:auto}

/* ---------- Shared tablet foundation ---------- */
@media (max-width:1024px){
  :root{--mobile-gutter:20px}
  .section-inner,.map-library-wide,.header-inner,.footer-inner{
    width:min(calc(100% - 40px),1240px)!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .section{padding-top:56px!important;padding-bottom:56px!important}
  .button,.button-primary,.button-secondary,.button-outline,.submit-link,.account-link{min-height:44px}
}

/* ---------- Header: compact before it gets cramped ---------- */
@media (max-width:960px){
  .site-header{height:64px!important;min-height:64px!important;position:sticky!important;top:0!important;z-index:10010!important;background:color-mix(in srgb,var(--bg) 96%,transparent)!important;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .admin-bar .site-header{top:32px!important}
  .header-inner{height:64px!important;display:flex!important;align-items:center!important;gap:10px!important}
  .brand{min-width:0!important;gap:9px!important}
  .brand-mark{width:30px!important;height:30px!important;flex:0 0 30px!important}
  .brand-name{font-size:1.02rem!important;white-space:nowrap!important}
  .desktop-nav,.header-actions>.account-link,.header-actions>.submit-link{display:none!important}
  .header-actions{display:flex!important;align-items:center!important;gap:7px!important;margin-left:auto!important}
  .theme-control{height:38px!important;padding:3px!important;border-radius:9px!important}
  .theme-option{width:30px!important;height:30px!important}
  .menu-button{display:grid!important;place-items:center!important;width:40px!important;height:40px!important;min-width:40px!important;border:1px solid var(--border)!important;border-radius:9px!important;background:var(--bg-card)!important;color:var(--ink)!important}
  .menu-button svg{width:20px!important;height:20px!important}
  .mobile-nav{position:fixed!important;left:0!important;right:0!important;top:64px!important;height:calc(var(--histriphy-mobile-vh,100dvh) - 64px)!important;max-height:none!important;padding:18px 20px calc(24px + env(safe-area-inset-bottom))!important;background:var(--bg)!important;border-top:1px solid var(--border-soft)!important;overflow-y:auto!important;z-index:10009!important}
  .admin-bar .mobile-nav{top:96px!important;height:calc(var(--histriphy-mobile-vh,100dvh) - 96px)!important}
  .mobile-nav>a,.mobile-nav>li>a,.mobile-nav>.nav-dropdown>.nav-dropdown-label,.mobile-nav>li.nav-dropdown>.nav-dropdown-label{min-height:52px!important;padding:0 4px!important;font-size:1rem!important;border-bottom:1px solid var(--border-soft)!important}
  .mobile-account-link{margin-top:12px!important}
  .mobile-submit{display:flex!important;align-items:center!important;justify-content:center!important;min-height:48px!important;margin-top:12px!important;border-radius:9px!important;background:var(--gold-4)!important;color:var(--on-gold)!important;font-weight:700!important}
}
@media (max-width:782px){
  .admin-bar .site-header{top:46px!important}
  .admin-bar .mobile-nav{top:110px!important;height:calc(var(--histriphy-mobile-vh,100dvh) - 110px)!important}
}

/* ---------- Landing hero ---------- */
@media (max-width:1024px){
  body.home .hp-hero-product,body.front-page .hp-hero-product{min-height:0!important}
  body.home .hp-hero-product .hp-hero-inner,body.front-page .hp-hero-product .hp-hero-inner{
    display:flex!important;flex-direction:column!important;align-items:center!important;gap:28px!important;
    width:min(calc(100% - 40px),900px)!important;padding:48px 0 36px!important;margin:auto!important;
  }
  .hp-hero-product .hp-hero-copy{width:100%!important;max-width:720px!important;text-align:center!important}
  .hp-hero-product .hp-h1{font-size:clamp(2.55rem,6.4vw,3.7rem)!important;line-height:1.01!important;letter-spacing:-.045em!important;max-width:16ch!important;margin:0 auto!important;text-wrap:balance}
  .hp-hero-product .hp-lede{max-width:56ch!important;margin:15px auto 0!important;font-size:1rem!important;line-height:1.55!important;text-wrap:balance}
  .hp-hero-product .hp-actions{display:flex!important;align-items:center!important;justify-content:center!important;gap:14px!important;margin-top:20px!important}
  .hp-hero-product .hp-hero-map{width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:16/9!important;margin:0 auto!important;border-radius:12px!important}
  .hp-hero-product .hp-hero-map .world-map{height:100%!important;min-height:0!important}
}

/* ---------- Landing Studio product demo ---------- */
@media (max-width:1024px){
  .hsd-section{padding-top:58px!important;padding-bottom:54px!important}
  .hsd-grid{display:grid!important;grid-template-columns:1fr!important;gap:28px!important;align-items:start!important}
  .hsd-copy{width:100%!important;max-width:680px!important;margin:0 auto!important;text-align:left!important}
  .hsd-title-lines{font-size:clamp(2.55rem,6vw,3.8rem)!important;line-height:1.02!important;letter-spacing:-.045em!important;max-width:12ch!important;margin:0!important}
  .hsd-copy>p:not(.hp-kicker){max-width:58ch!important;margin-top:16px!important;font-size:1rem!important;line-height:1.6!important}
  .hsd-cta{margin-top:20px!important}
  .hsd-demo{width:100%!important;min-width:0!important;overflow:hidden!important;border-radius:12px!important}
  .hsd-demo histriphy-studio-demo{display:block!important;width:100%!important;max-width:100%!important}
  .hsd-feature-list{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;margin-top:26px!important;border-radius:12px!important;overflow:hidden!important}
  .hsd-feature-list li{min-width:0!important;min-height:88px!important;padding:15px 16px!important}
}

/* ---------- Five-feature showcase ---------- */
@media (max-width:1024px){
  .hs-section{padding-top:56px!important;padding-bottom:56px!important}
  .hs-head-centered{max-width:720px!important;margin:0 auto 24px!important;text-align:center!important}
  .hs-head-centered h2{font-size:clamp(2rem,5vw,2.8rem)!important;line-height:1.08!important;letter-spacing:-.035em!important;text-wrap:balance}
  .hs-head-centered p{max-width:56ch!important;margin:10px auto 0!important;font-size:.96rem!important;line-height:1.55!important}
  .hs-showcase-shell{padding:58px 16px 16px!important;border-radius:16px!important}
  .hs-showcase-shell .hs-controls{top:14px!important;right:16px!important}
  .hs-showcase-shell .hs-stage{display:block!important;padding:0!important;background:transparent!important;border:0!important}
  .hs-showcase-shell .hs-nav{display:flex!important;gap:8px!important;overflow-x:auto!important;overscroll-behavior-inline:contain!important;scroll-snap-type:x proximity!important;padding:0 0 14px!important;margin:0 0 14px!important;scrollbar-width:none!important}
  .hs-showcase-shell .hs-nav::-webkit-scrollbar{display:none!important}
  .hs-showcase-shell .hs-nav-item{flex:0 0 220px!important;min-height:84px!important;padding:13px 14px!important;border:1px solid var(--border-soft)!important;border-radius:10px!important;scroll-snap-align:start!important;background:transparent!important}
  .hs-showcase-shell .hs-nav-item.is-active{background:var(--bg-raised)!important;border-color:var(--border)!important}
  .hs-showcase-shell .hs-nav-label{margin-bottom:5px!important}
  .hs-showcase-shell .hs-nav-title{font-size:.98rem!important;line-height:1.28!important}
  .hs-showcase-shell .hs-nav-desc{font-size:.75rem!important;line-height:1.4!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden!important}
  .hs-showcase-shell .hs-panels,.hs-showcase-shell .hs-panel{min-height:0!important}
  .hs-showcase-shell .hs-product-shot,.hs-showcase-shell .hs-mock,.hs-showcase-shell .hs-replay,.hs-showcase-shell .hs-community{min-height:0!important;max-height:none!important}
  .hs-showcase-shell .hs-product-shot img{display:block!important;width:100%!important;height:auto!important;object-fit:contain!important}
  .hs-showcase-shell .hs-panel-foot{min-height:44px!important;margin-top:12px!important}
}

/* ---------- Explore / archives ---------- */
@media (max-width:1024px){
  .map-library-hero{padding-top:42px!important}
  .map-library-heading-row{display:grid!important;grid-template-columns:1fr!important;gap:22px!important}
  .map-library-heading{max-width:700px!important}
  .map-library-heading h1{font-size:clamp(2.25rem,5.6vw,3.2rem)!important;line-height:1.04!important}
  .map-library-description{max-width:60ch!important}
  .map-library-stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;width:100%!important}
  .library-stat-card{min-width:0!important;padding:15px!important}
  .map-search-form{grid-template-columns:minmax(0,1.6fr) minmax(150px,.8fr)!important;gap:12px!important}
  .map-filter-time,.map-filter-sort{grid-row:2!important}
  .map-filter-actions{grid-row:2!important;align-self:end!important}
  .map-library-tabs-wrap{overflow:hidden!important}
  .map-library-tabs{display:flex!important;overflow-x:auto!important;scroll-snap-type:x proximity!important;scrollbar-width:none!important}
  .map-library-tabs::-webkit-scrollbar{display:none!important}
  .map-library-tab{flex:0 0 auto!important;min-height:46px!important;padding-inline:16px!important;scroll-snap-align:start!important}
  .map-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
  .map-results-footer{gap:16px!important}
}

/* ---------- Single map pages ---------- */
@media (max-width:1024px){
  .map-hero-inner-v19{grid-template-columns:1fr!important;gap:28px!important;padding-top:42px!important;padding-bottom:40px!important}
  .map-hero-copy-v19{max-width:760px!important}
  .map-hero-copy-v19 h1{font-size:clamp(3rem,7vw,4.5rem)!important;line-height:.98!important}
  .map-hero-summary{max-width:58ch!important}
  .map-hero-visual-v19{width:100%!important;max-width:none!important}
  .map-hero-preview{aspect-ratio:16/10!important;min-height:0!important}
  .map-body-v20{padding-top:42px!important}
  .map-overview-grid-v20{grid-template-columns:1fr!important;gap:18px!important}
  .map-access-panel-v20{position:static!important;width:100%!important}
  .map-inline-heading-v20{align-items:flex-start!important;gap:12px!important}
  .map-related-grid-v20{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}

/* ---------- Compare ---------- */
@media (max-width:1024px){
  .country-compare-hero .section-inner{padding-top:42px!important}
  .country-compare-heading{max-width:700px!important}
  .country-compare-picker{grid-template-columns:1fr 1fr auto!important;gap:10px!important}
  .country-compare-grid,.country-compare-results{grid-template-columns:1fr 1fr!important;gap:16px!important}
}

/* ---------- Account dashboard ---------- */
@media (max-width:1024px){
  .account-dashboard-shell{padding:26px 0 54px!important}
  .account-hero-panel{display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;gap:18px!important;padding:20px!important;border-radius:12px!important}
  .account-hero-profile{min-width:0!important}
  .account-hero-profile>div{min-width:0!important}
  .account-hero-avatar{width:58px!important;height:58px!important;flex:0 0 58px!important}
  .account-hero-panel h1{font-size:1.55rem!important;line-height:1.16!important}
  .account-hero-panel p:not(.account-kicker){font-size:.82rem!important;line-height:1.5!important;max-width:58ch!important}
  .account-hero-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important}
  .account-layout.account-layout-v2{display:block!important;margin-top:14px!important}
  .account-dashboard-page .account-sidebar.account-sidebar-v2{position:static!important;width:100%!important;margin:0 0 18px!important;padding:5px!important;border:1px solid var(--border)!important;border-radius:10px!important;background:var(--bg-card)!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important}
  .account-dashboard-page .account-sidebar.account-sidebar-v2::-webkit-scrollbar{display:none!important}
  .account-dashboard-page .account-sidebar-v2 .account-sidebar-profile{display:none!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav{display:flex!important;align-items:center!important;gap:4px!important;min-width:max-content!important;width:max-content!important;margin:0!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a,.account-dashboard-page .account-sidebar-v2 .account-logout{min-height:42px!important;padding:9px 12px!important;border:0!important;border-radius:7px!important;background:transparent!important;font-size:.8rem!important;white-space:nowrap!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a.is-active{background:var(--bg-raised)!important;color:var(--ink)!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a.is-active::after{display:none!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav form{margin:0!important}
  .account-content.account-content-v2{width:100%!important;min-width:0!important;padding:22px!important;border-radius:11px!important}
  .account-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .account-stat-card{min-height:90px!important;padding:14px!important}
  .dashboard-chart-card{padding:16px!important}
  .dashboard-chart-card canvas{min-height:220px!important;max-height:250px!important}
  .account-map-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .account-form-grid{grid-template-columns:1fr 1fr!important}
  .account-field-full{grid-column:1/-1!important}
  .security-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ---------- Footer / modals / forms ---------- */
@media (max-width:1024px){
  .footer-main{grid-template-columns:minmax(220px,.8fr) minmax(0,1.2fr)!important;gap:42px!important}
  .footer-columns{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:24px!important}
  .license-modal-box,.guest-limit-modal{width:min(calc(100% - 40px),620px)!important;max-height:calc(100dvh - 40px)!important;overflow:auto!important}
}

/* ========================================================================== 
   Phones
   ========================================================================== */
@media (max-width:720px){
  :root{--mobile-gutter:16px}
  .section-inner,.map-library-wide,.header-inner,.footer-inner{
    width:calc(100% - 32px)!important;
  }
  .section{padding-top:44px!important;padding-bottom:44px!important}
  .site-header,.header-inner{height:60px!important;min-height:60px!important}
  .mobile-nav{top:60px!important;height:calc(var(--histriphy-mobile-vh,100dvh) - 60px)!important;padding-left:16px!important;padding-right:16px!important}
  .admin-bar .mobile-nav{top:106px!important;height:calc(var(--histriphy-mobile-vh,100dvh) - 106px)!important}
  .brand-mark{width:29px!important;height:29px!important;flex-basis:29px!important}
  .brand-name{font-size:1rem!important}
  .theme-control{height:36px!important}
  .theme-option{width:28px!important;height:28px!important}
  .menu-button{width:38px!important;height:38px!important;min-width:38px!important}
  .button,.button-primary,.button-secondary,.button-outline,.map-search-submit{min-height:46px!important}

  /* Hero */
  body.home .hp-hero-product .hp-hero-inner,body.front-page .hp-hero-product .hp-hero-inner{width:calc(100% - 32px)!important;gap:22px!important;padding:34px 0 28px!important}
  .hp-hero-product .hp-h1{font-size:clamp(2.15rem,10vw,2.85rem)!important;line-height:1.01!important;max-width:13.5ch!important}
  .hp-hero-product .hp-lede{font-size:.94rem!important;line-height:1.55!important;max-width:38ch!important;margin-top:13px!important}
  .hp-hero-product .hp-actions{gap:10px!important;margin-top:17px!important}
  .hp-hero-product .hp-actions .button{padding-inline:16px!important}
  .hp-hero-secondary{min-height:46px!important;padding-inline:10px!important}
  .hp-hero-product .hp-hero-map{aspect-ratio:1.35/1!important;border-radius:10px!important}
  .hp-hero-map .map-label{left:10px!important;bottom:8px!important;font-size:.52rem!important}

  /* Studio */
  .hsd-section{padding-top:46px!important;padding-bottom:44px!important}
  .hsd-grid{gap:22px!important}
  .hsd-copy{max-width:none!important;text-align:left!important}
  .hsd-title-lines{font-size:clamp(2.15rem,10.5vw,2.9rem)!important;line-height:1.02!important;max-width:10.5ch!important}
  .hsd-copy>p:not(.hp-kicker){font-size:.93rem!important;line-height:1.58!important;max-width:38ch!important}
  .hsd-cta{min-height:46px!important;margin-top:17px!important;padding-inline:16px!important}
  .hsd-demo{border-radius:10px!important}
  .hsd-feature-list{grid-template-columns:1fr 1fr!important;margin-top:18px!important;border-radius:10px!important}
  .hsd-feature-list li{min-height:76px!important;padding:12px!important}
  .hsd-feature-list b{font-size:.86rem!important}
  .hsd-feature-list span{font-size:.7rem!important;line-height:1.35!important}

  /* Main feature showcase */
  .hs-section{padding-top:44px!important;padding-bottom:44px!important}
  .hs-head-centered{margin-bottom:18px!important}
  .hs-head-centered h2{font-size:clamp(1.9rem,8vw,2.35rem)!important;line-height:1.08!important;max-width:16ch!important;margin:auto!important}
  .hs-head-centered p{font-size:.9rem!important;line-height:1.5!important;max-width:38ch!important}
  .hs-showcase-shell{padding:52px 10px 10px!important;border-radius:13px!important}
  .hs-showcase-shell .hs-controls{top:10px!important;right:10px!important}
  .hs-showcase-shell .hs-arrow{width:34px!important;height:34px!important}
  .hs-showcase-shell .hs-nav{gap:6px!important;margin-bottom:10px!important;padding-bottom:10px!important}
  .hs-showcase-shell .hs-nav-item{flex-basis:auto!important;min-width:max-content!important;min-height:42px!important;padding:9px 12px!important;border-radius:8px!important}
  .hs-showcase-shell .hs-nav-label,.hs-showcase-shell .hs-nav-desc{display:none!important}
  .hs-showcase-shell .hs-nav-title{font-size:.84rem!important;white-space:nowrap!important}
  .hs-showcase-shell .hs-product-shot{border-radius:10px!important;overflow:hidden!important}
  .hs-showcase-shell .hs-mock-cards{grid-template-columns:1fr!important}
  .hs-showcase-shell .hs-mock-cards .map-card:nth-child(n+2){display:none!important}
  .hs-showcase-shell .hs-panel-foot{align-items:stretch!important;flex-direction:column!important;gap:8px!important}
  .hs-showcase-shell .hs-panel-foot .button{width:100%!important;justify-content:center!important}

  /* Explore */
  .map-library-hero{padding-top:30px!important}
  .map-library-heading-row{gap:16px!important}
  .map-library-heading h1{font-size:2.25rem!important;line-height:1.02!important}
  .map-library-description{font-size:.9rem!important;line-height:1.55!important}
  .map-library-eyebrow{font-size:.62rem!important}
  .map-library-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;border-radius:10px!important}
  .library-stat-card{min-height:72px!important;padding:12px!important}
  .library-stat-card svg{width:19px!important;height:19px!important}
  .library-stat-card strong{font-size:1rem!important}
  .library-stat-card span{font-size:.68rem!important}
  .map-search-form{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:12px!important}
  .map-filter-field,.map-filter-time,.map-filter-sort,.map-filter-actions{grid-column:1!important;grid-row:auto!important;width:100%!important}
  .map-filter-field label{font-size:.7rem!important}
  .map-filter-control,.map-filter-control input,.map-filter-control select{min-height:46px!important}
  .map-filter-actions .button{width:100%!important;justify-content:center!important}
  .map-library-tabs{margin-inline:-16px!important;padding-inline:16px!important}
  .map-library-tab{min-height:44px!important;padding-inline:14px!important;font-size:.78rem!important}
  .map-library-results{padding-top:16px!important}
  .map-library-grid{grid-template-columns:1fr!important;gap:12px!important}
  .map-card-library{max-width:none!important}
  .map-results-footer{display:flex!important;align-items:flex-start!important;flex-direction:column!important;padding:14px!important}
  .map-pagination{align-self:stretch!important;justify-content:center!important}

  /* Single map */
  .map-hero-inner-v19{gap:20px!important;padding-top:28px!important;padding-bottom:30px!important}
  .map-breadcrumb{font-size:.76rem!important}
  .map-badge-row{gap:6px!important}
  .map-origin-badge,.map-period-badge{font-size:.7rem!important}
  .map-hero-copy-v19 h1{font-size:clamp(2.6rem,13vw,3.7rem)!important;line-height:.96!important;letter-spacing:-.04em!important}
  .map-hero-summary{font-size:.94rem!important;line-height:1.55!important}
  .map-primary-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .map-primary-actions .button,.map-primary-actions button{width:100%!important;justify-content:center!important}
  .map-quick-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important}
  .map-quick-stats>div{padding-right:10px!important}
  .map-quick-stats strong{font-size:.88rem!important}
  .map-quick-stats span{font-size:.58rem!important}
  .map-hero-preview{aspect-ratio:4/3!important;border-radius:10px!important}
  .map-preview-caption{font-size:.62rem!important;gap:8px!important}
  .map-body-v20{padding-top:28px!important;padding-bottom:42px!important}
  .map-overview-panel-v20,.map-access-panel-v20,.map-inline-section-v20{padding:16px!important;border-radius:10px!important}
  .map-overview-heading-v20{align-items:flex-start!important;gap:8px!important}
  .map-overview-heading-v20 h2{font-size:1.45rem!important}
  .map-meta-groups-v20{grid-template-columns:1fr!important}
  .map-chip-list{gap:5px!important}
  .map-chip-list span{font-size:.69rem!important;padding:5px 7px!important}
  .map-inline-heading-v20{display:block!important}
  .map-inline-heading-v20 h2{font-size:1.35rem!important;margin-top:3px!important}
  .map-inline-heading-v20 p{font-size:.82rem!important;line-height:1.45!important;margin-top:7px!important}
  .map-related-grid-v20{grid-template-columns:1fr!important;gap:10px!important}
  .map-compare-launch-form{grid-template-columns:1fr!important}

  /* Compare */
  .country-compare-hero .section-inner{padding-top:30px!important}
  .country-compare-heading h1{font-size:2.25rem!important}
  .country-compare-picker{grid-template-columns:1fr!important;gap:9px!important}
  .country-compare-picker select,.country-compare-picker button{width:100%!important;min-height:46px!important}
  .country-compare-grid,.country-compare-results{grid-template-columns:1fr!important;gap:14px!important}
  .country-compare-preview{aspect-ratio:4/3!important}

  /* Account */
  .account-dashboard-shell{padding:18px 0 42px!important}
  .account-hero-panel{display:block!important;padding:16px!important;border-radius:10px!important}
  .account-hero-profile{display:flex!important;align-items:flex-start!important;gap:12px!important}
  .account-hero-avatar{width:48px!important;height:48px!important;flex-basis:48px!important}
  .account-hero-panel h1{font-size:1.35rem!important;line-height:1.15!important}
  .account-hero-panel p:not(.account-kicker){font-size:.78rem!important;line-height:1.45!important;margin-top:5px!important}
  .account-hero-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:14px!important}
  .account-hero-actions .button{width:100%!important;justify-content:center!important;padding-inline:10px!important;font-size:.78rem!important}
  .account-dashboard-page .account-sidebar.account-sidebar-v2{margin-top:12px!important;margin-bottom:14px!important;border-radius:9px!important;padding:4px!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a,.account-dashboard-page .account-sidebar-v2 .account-logout{min-height:40px!important;padding:8px 10px!important;font-size:.75rem!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a svg,.account-dashboard-page .account-sidebar-v2 .account-logout svg{width:15px!important;height:15px!important}
  .account-dashboard-page .account-nav-new{display:none!important}
  .account-content.account-content-v2{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  .account-download-allowance{padding:14px!important;margin-bottom:16px!important;border-radius:9px!important;gap:8px!important}
  .account-download-allowance p{font-size:.72rem!important}
  .account-section-heading{margin-bottom:14px!important}
  .account-section-heading h2{font-size:1.4rem!important}
  .account-section-heading>p{font-size:.76rem!important;line-height:1.45!important}
  .account-stat-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .account-stat-card{min-height:82px!important;padding:12px!important;border-radius:9px!important}
  .account-stat-card strong{font-size:1.25rem!important}
  .account-stat-card span{font-size:.65rem!important}
  .dashboard-chart-card{padding:14px!important;border-radius:9px!important;overflow:hidden!important}
  .dashboard-chart-heading{align-items:flex-start!important;flex-direction:column!important;gap:6px!important}
  .dashboard-chart-card canvas{min-height:210px!important;height:210px!important;max-height:210px!important}
  .account-maps-heading{align-items:flex-end!important;gap:10px!important}
  .account-maps-heading p{display:none!important}
  .account-map-grid{grid-template-columns:1fr!important;gap:10px!important}
  .account-map-preview{aspect-ratio:16/9!important;min-height:0!important}
  .account-map-card-body{padding:12px!important}
  .account-form-grid,.security-overview-grid,.two-factor-action-grid,.authy-setup-grid{grid-template-columns:1fr!important}
  .account-profile-photo-card,.account-security-shortcut{align-items:flex-start!important;flex-direction:column!important}
  .security-panel{padding:16px!important}
  .security-panel-head{align-items:flex-start!important;flex-direction:column!important;gap:10px!important}

  /* Footer */
  .site-footer{padding-top:42px!important}
  .footer-main{grid-template-columns:1fr!important;gap:30px!important}
  .footer-intro{max-width:420px!important}
  .footer-columns{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:26px 20px!important}
  .footer-bottom{align-items:flex-start!important;flex-direction:column!important;gap:7px!important}

  /* Modals become usable sheets instead of tiny desktop dialogs */
  .license-modal-overlay,.guest-limit-modal-overlay{align-items:flex-end!important;padding:0!important}
  .license-modal-box,.guest-limit-modal{width:100%!important;max-width:none!important;max-height:min(88dvh,760px)!important;margin:0!important;border-radius:16px 16px 0 0!important;padding:18px 16px calc(18px + env(safe-area-inset-bottom))!important}
  .license-modal-benefits{grid-template-columns:1fr!important}
  .guest-limit-plans{grid-template-columns:1fr 1fr!important}
}

@media (max-width:420px){
  .section-inner,.map-library-wide,.header-inner,.footer-inner{width:calc(100% - 28px)!important}
  .theme-control{display:none!important}
  .hp-hero-product .hp-h1{font-size:clamp(2rem,10.5vw,2.55rem)!important}
  .hp-hero-product .hp-actions{display:grid!important;grid-template-columns:1fr!important;width:min(100%,290px)!important;margin-inline:auto!important}
  .hp-hero-product .hp-actions>a{width:100%!important;justify-content:center!important}
  .hp-hero-product .hp-hero-map{aspect-ratio:1.18/1!important}
  .hsd-title-lines{font-size:clamp(2.05rem,11vw,2.65rem)!important}
  .hsd-feature-list{grid-template-columns:1fr 1fr!important}
  .hsd-feature-list span{display:none!important}
  .hsd-feature-list li{min-height:54px!important;display:flex!important;align-items:center!important}
  .map-library-stats{grid-template-columns:1fr 1fr!important}
  .account-hero-actions{grid-template-columns:1fr!important}
  .account-stat-grid{grid-template-columns:1fr 1fr!important}
  .footer-columns{grid-template-columns:1fr!important}
  .guest-limit-plans{grid-template-columns:1fr!important}
}


/* ---------- Auth, submit, simple pages and legal reading ---------- */
@media (max-width:1024px){
  .auth-shell{width:min(calc(100% - 40px),860px)!important;margin:auto!important;padding:36px 0 56px!important}
  .auth-layout{grid-template-columns:minmax(0,.85fr) minmax(360px,1.15fr)!important;gap:24px!important}
  .auth-story-panel,.auth-form-panel{min-width:0!important}
  .simple-submit-shell-wide{max-width:900px!important}
  .simple-page-shell,.legal-reading-shell{width:min(calc(100% - 40px),860px)!important}
  .legal-document-section .legal-reading-shell{grid-template-columns:180px minmax(0,1fr)!important;gap:30px!important}
}
@media (max-width:720px){
  .auth-shell{width:calc(100% - 32px)!important;padding:24px 0 42px!important}
  .auth-layout{display:block!important}
  .auth-story-panel{display:none!important}
  .auth-form-panel{width:100%!important;max-width:520px!important;margin:auto!important}
  .auth-form-card{padding:18px!important;border-radius:11px!important}
  .auth-form-heading h1,.auth-form-heading h2{font-size:1.7rem!important;line-height:1.08!important}
  .auth-field input{min-height:48px!important}
  .auth-submit,.auth-google-button,.auth-secondary-action{min-height:48px!important}

  .simple-submit-section{padding-top:28px!important;padding-bottom:44px!important}
  .simple-submit-shell,.simple-submit-shell-wide{width:calc(100% - 32px)!important}
  .simple-submit-header h1{font-size:2rem!important;line-height:1.05!important}
  .simple-submit-card{padding:16px!important;border-radius:10px!important}
  .simple-submit-actions,.simple-submit-footer{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .simple-submit-actions .button,.simple-submit-footer .button{width:100%!important;justify-content:center!important}
  .submit-mode-switch{display:grid!important;grid-template-columns:1fr 1fr!important}
  .submission-category-grid,.batch-defaults-grid{grid-template-columns:1fr!important}
  .file-upload{align-items:stretch!important;flex-direction:column!important}
  .file-upload-btn{width:100%!important;justify-content:center!important}

  .simple-page-hero{padding-top:36px!important;padding-bottom:34px!important}
  .simple-page-shell{width:calc(100% - 32px)!important}
  .simple-page-hero h1{font-size:2.4rem!important;line-height:1.02!important}
  .simple-about-grid{grid-template-columns:1fr!important;gap:10px!important}
  .simple-page-cta{align-items:flex-start!important;flex-direction:column!important;gap:12px!important}

  .legal-masthead{padding-top:34px!important;padding-bottom:28px!important}
  .legal-reading-shell{width:calc(100% - 32px)!important}
  .legal-masthead h1{font-size:2.25rem!important;line-height:1.04!important}
  .legal-document-section .legal-reading-shell{display:block!important}
  .legal-index{position:static!important;display:flex!important;gap:6px!important;overflow-x:auto!important;margin:0 0 20px!important;padding:0 0 8px!important;border:0!important;scrollbar-width:none!important}
  .legal-index::-webkit-scrollbar{display:none!important}
  .legal-index a{flex:0 0 auto!important;white-space:nowrap!important;padding:8px 10px!important;border:1px solid var(--border)!important;border-radius:8px!important}
  .legal-document{min-width:0!important}
  .legal-document h2{font-size:1.45rem!important}
  .legal-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .legal-actions .button{width:100%!important;justify-content:center!important}
}

/* ========================================================================== 
   20.0.19-test · mobile/tablet parity pass
   Mobile is a deliberate composition of the desktop product, not a shrunken
   desktop page. The real Studio animation remains the real Studio UI.
   ========================================================================== */
.mobile-header-cta{display:none}

@keyframes hsProgress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes hsPanelIn{0%{opacity:.35;transform:translateY(12px) scale(.992)}100%{opacity:1;transform:none}}
@keyframes hsShotBreathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}

.hs-progress{display:block;width:74px;height:2px;overflow:hidden;border-radius:999px;background:var(--border-soft)}
.hs-progress>i{display:block;width:100%;height:100%;transform-origin:left center;background:var(--gold)}
.hs-panel.is-entering .hs-product-shot{animation:hsPanelIn .48s cubic-bezier(.22,1,.36,1) both}
.hs-panel.is-active .hs-shot-callout,.hs-panel.is-active .hs-operation-panel,.hs-panel.is-active .hs-advanced-grid{animation:hsPanelIn .55s .12s cubic-bezier(.22,1,.36,1) both}

/* ---------- iPad / compact navigation ---------- */
@media (max-width:960px){
  body{--compact-header-h:76px}
  .site-header{
    height:var(--compact-header-h)!important;min-height:var(--compact-header-h)!important;
    padding:8px 0!important;background:var(--bg)!important;border:0!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  .header-inner{
    position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;
    width:calc(100% - 24px)!important;height:60px!important;margin:0 auto!important;padding:0 10px!important;
    border:1px solid var(--border)!important;border-radius:20px!important;background:var(--bg-card)!important;
    box-shadow:0 10px 32px -28px rgba(0,0,0,.9)!important;
  }
  .brand{
    position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;
    display:flex!important;align-items:center!important;gap:8px!important;z-index:2!important;
  }
  .brand-mark{width:29px!important;height:29px!important;flex:0 0 29px!important}
  .brand-name{font-size:1rem!important;letter-spacing:-.02em!important}
  .desktop-nav,.header-actions>.theme-control,.header-actions>.account-link,.header-actions>.submit-link{display:none!important}
  .header-actions{position:static!important;display:flex!important;width:100%!important;margin:0!important;justify-content:space-between!important;align-items:center!important}
  .mobile-header-cta{
    position:absolute!important;right:8px!important;top:8px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
    height:42px!important;min-width:82px!important;padding:0 16px!important;border:0!important;border-radius:16px!important;
    background:var(--gold)!important;color:var(--on-gold)!important;font-size:.82rem!important;font-weight:750!important;text-decoration:none!important;z-index:4!important;
  }
  :root[data-theme="light"] .mobile-header-cta{background:var(--ink)!important;color:#fff!important}
  .menu-button{
    position:absolute!important;left:8px!important;top:8px!important;display:grid!important;place-items:center!important;
    width:42px!important;height:42px!important;min-width:42px!important;border:0!important;border-radius:14px!important;
    background:var(--bg-raised)!important;color:var(--ink)!important;z-index:4!important;
  }
  .menu-button:hover{background:var(--bg-elevated)!important}
  .menu-button svg{width:21px!important;height:21px!important}

  .mobile-nav{
    position:fixed!important;left:12px!important;right:12px!important;top:84px!important;width:auto!important;height:auto!important;
    max-height:calc(var(--histriphy-mobile-vh,100dvh) - 98px)!important;padding:12px!important;
    border:1px solid var(--border)!important;border-radius:22px!important;background:var(--bg-card)!important;
    box-shadow:0 28px 72px -30px rgba(0,0,0,.92)!important;overflow-y:auto!important;z-index:10009!important;
  }
  .admin-bar .mobile-nav{top:116px!important;max-height:calc(var(--histriphy-mobile-vh,100dvh) - 130px)!important}
  .mobile-nav-main{display:block!important;padding:2px 8px 8px!important}
  .mobile-nav-main>a,.mobile-nav-main>li>a,.mobile-nav-main .nav-dropdown-label{
    display:flex!important;align-items:center!important;min-height:56px!important;padding:0 8px!important;
    border:0!important;border-bottom:1px solid var(--border-soft)!important;border-radius:0!important;
    background:transparent!important;color:var(--ink)!important;font-size:1.05rem!important;font-weight:650!important;text-decoration:none!important;
  }
  .mobile-nav-main>a:last-child,.mobile-nav-main>li:last-child>a{border-bottom:0!important}
  .mobile-nav-main .is-current,.mobile-nav-main [aria-current="page"]{color:var(--gold-ink)!important}
  .mobile-nav-footer{padding:10px 8px 6px!important;border-top:1px solid var(--border-soft)!important}
  .mobile-theme-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:5px 0 13px!important;color:var(--ink-dim)!important;font-size:.8rem!important}
  .mobile-theme-options{display:flex!important;align-items:center!important;gap:4px!important;padding:3px!important;border:1px solid var(--border)!important;border-radius:10px!important;background:var(--bg-deep)!important}
  .mobile-theme-options button{height:34px!important;padding:0 12px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:var(--ink-dim)!important;font:inherit!important;font-weight:650!important}
  .mobile-theme-options button[aria-checked="true"]{background:var(--bg-raised)!important;color:var(--ink)!important}
  .mobile-nav-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .mobile-nav-actions .mobile-submit,.mobile-nav-actions .mobile-account-link{
    display:flex!important;align-items:center!important;justify-content:center!important;min-height:48px!important;margin:0!important;padding:0 12px!important;
    border:1px solid var(--border)!important;border-radius:14px!important;font-size:.9rem!important;font-weight:750!important;text-decoration:none!important;
  }
  .mobile-nav-actions .mobile-submit{background:var(--gold)!important;border-color:var(--gold)!important;color:var(--on-gold)!important}
  .mobile-nav-actions .mobile-account-link{background:var(--bg-raised)!important;color:var(--ink)!important}
  :root[data-theme="light"] .mobile-nav-actions .mobile-submit{background:var(--ink)!important;border-color:var(--ink)!important;color:#fff!important}
  .histriphy-mobile-menu-open::before{content:"";position:fixed;inset:0;z-index:10008;background:rgba(0,0,0,.48);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}

  /* Landing page keeps the desktop story but reflows it cleanly. */
  body.home .hp-hero-product .hp-hero-inner,body.front-page .hp-hero-product .hp-hero-inner{
    width:min(calc(100% - 40px),840px)!important;padding:52px 0 44px!important;gap:28px!important;
  }
  .hp-hero-product .hp-hero-copy{max-width:720px!important}
  .hp-hero-product .hp-h1{font-size:clamp(2.8rem,7vw,4rem)!important;line-height:.98!important;max-width:15ch!important}
  .hp-hero-product .hp-lede{font-size:1rem!important;max-width:57ch!important}
  .hp-hero-product .hp-hero-map{width:100%!important;aspect-ratio:16/9!important;min-height:0!important;height:auto!important}

  .hsd-section{padding:64px 0!important}
  .hsd-grid{grid-template-columns:1fr!important;gap:28px!important}
  .hsd-copy{max-width:680px!important;margin-inline:auto!important}
  .hsd-demo{width:100%!important;max-width:900px!important;margin-inline:auto!important;overflow:hidden!important;border-radius:12px!important}
  .hsd-demo histriphy-studio-demo{display:block!important;width:100%!important}
  .hsd-feature-list{max-width:900px!important;margin:20px auto 0!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}

  /* Feature carousel: active feature + real product visual, not a static stack. */
  .hs-head-centered{max-width:720px!important;margin:0 auto 26px!important;text-align:center!important}
  .hs-showcase-shell{position:relative!important;padding:62px 16px 16px!important;border-radius:20px!important}
  .hs-showcase-shell .hs-controls{top:17px!important;right:18px!important;display:flex!important;align-items:center!important;gap:8px!important}
  .hs-showcase-shell .hs-progress{margin-right:4px!important}
  .hs-showcase-shell .hs-stage{display:block!important}
  .hs-showcase-shell .hs-nav{display:flex!important;gap:8px!important;overflow-x:auto!important;padding:0 0 14px!important;margin:0!important;scrollbar-width:none!important;scroll-snap-type:x proximity!important}
  .hs-showcase-shell .hs-nav::-webkit-scrollbar{display:none!important}
  .hs-showcase-shell .hs-nav-item{flex:0 0 210px!important;min-height:76px!important;padding:12px 13px!important;border:1px solid var(--border-soft)!important;border-radius:12px!important;scroll-snap-align:center!important;opacity:.46!important;background:transparent!important}
  .hs-showcase-shell .hs-nav-item.is-active{opacity:1!important;background:var(--bg-raised)!important;border-color:var(--border)!important}
  .hs-showcase-shell .hs-nav-desc{display:none!important}
  .hs-showcase-shell .hs-nav-label{margin-bottom:4px!important;font-size:.6rem!important}
  .hs-showcase-shell .hs-nav-title{font-size:.92rem!important;line-height:1.2!important}
  .hs-showcase-shell .hs-panels,.hs-showcase-shell .hs-panel{min-height:0!important}
  .hs-showcase-shell .hs-product-shot{min-height:0!important;border-radius:14px!important;overflow:hidden!important}
  .hs-showcase-shell .hs-product-shot img{width:100%!important;height:auto!important;min-height:0!important;object-fit:contain!important}
  .hs-showcase-shell .hs-panel-foot{margin-top:12px!important}

  /* Account: mobile/tablet reads as a dashboard, not desktop chrome wrapped. */
  .account-dashboard-page .section-inner{width:min(calc(100% - 40px),900px)!important}
  .account-dashboard-page .account-hero-panel{padding:18px 20px!important;border-radius:14px!important}
  .account-dashboard-page .account-layout.account-layout-v2{margin-top:14px!important}
  .account-dashboard-page .account-sidebar.account-sidebar-v2{position:sticky!important;top:84px!important;z-index:25!important;margin:0 0 18px!important;padding:4px!important;border:1px solid var(--border)!important;border-radius:12px!important;background:color-mix(in srgb,var(--bg-card) 94%,transparent)!important;backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;overflow-x:auto!important;scrollbar-width:none!important}
  .account-dashboard-page .account-sidebar-v2::-webkit-scrollbar{display:none!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav{display:flex!important;min-width:max-content!important;gap:3px!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a,.account-dashboard-page .account-sidebar-v2 .account-logout{border-radius:8px!important;min-height:42px!important;padding:8px 11px!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a.is-active{background:var(--bg-raised)!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a.is-active::after{display:none!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav form{margin:0!important}
  .account-dashboard-page .account-map-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:782px){
  .admin-bar .site-header{top:46px!important}
  .admin-bar .mobile-nav{top:130px!important;max-height:calc(var(--histriphy-mobile-vh,100dvh) - 144px)!important}
}

/* ---------- Phones ---------- */
@media (max-width:720px){
  :root{--mobile-gutter:16px}
  .section-inner,.map-library-wide,.footer-inner{width:calc(100% - 32px)!important}
  .section{padding-top:46px!important;padding-bottom:46px!important}

  .header-inner{width:calc(100% - 20px)!important}
  .brand-name{font-size:.94rem!important}
  .brand-mark{width:28px!important;height:28px!important;flex-basis:28px!important}
  .mobile-header-cta{min-width:76px!important;height:40px!important;top:10px!important;right:9px!important;padding:0 13px!important;font-size:.78rem!important}
  .menu-button{top:10px!important;left:9px!important;width:40px!important;height:40px!important}
  .mobile-nav{left:10px!important;right:10px!important;top:84px!important;border-radius:20px!important;padding:10px!important}
  .mobile-nav-main>a,.mobile-nav-main>li>a,.mobile-nav-main .nav-dropdown-label{min-height:52px!important;font-size:1rem!important}

  /* Hero: same message and map as desktop, just a deliberate phone hierarchy. */
  body.home .hp-hero-product .hp-hero-inner,body.front-page .hp-hero-product .hp-hero-inner{
    width:calc(100% - 32px)!important;padding:42px 0 34px!important;gap:24px!important;
  }
  .hp-hero-product .hp-h1{font-size:clamp(2.45rem,12vw,3.25rem)!important;line-height:.96!important;letter-spacing:-.05em!important;max-width:12ch!important}
  .hp-hero-product .hp-lede{font-size:.93rem!important;line-height:1.52!important;max-width:35ch!important;margin-top:14px!important}
  .hp-hero-product .hp-actions{margin-top:18px!important;gap:10px!important;flex-wrap:wrap!important}
  .hp-hero-product .hp-actions .button{min-height:46px!important;padding-inline:18px!important}
  .hp-hero-product .hp-hero-secondary{min-height:46px!important;display:inline-flex!important;align-items:center!important;padding:0 4px!important}
  .hp-hero-product .hp-hero-map{aspect-ratio:1.44/1!important;border-radius:12px!important}
  .hp-hero-product .map-label{font-size:.54rem!important;left:10px!important;bottom:9px!important}

  /* Main Studio section. Same desktop editor, cropped/panned by the component. */
  .hsd-section{padding:52px 0 48px!important}
  .hsd-grid{gap:22px!important}
  .hsd-copy{max-width:none!important;text-align:left!important}
  .hsd-copy .hp-kicker{font-size:.62rem!important;margin-bottom:12px!important}
  .hsd-title-lines{font-size:clamp(2.2rem,11.4vw,2.85rem)!important;line-height:.97!important;letter-spacing:-.05em!important;max-width:9.6ch!important;margin:0!important}
  .hsd-copy>p:not(.hp-kicker){font-size:.9rem!important;line-height:1.55!important;margin-top:14px!important;max-width:36ch!important}
  .hsd-cta{margin-top:18px!important;min-height:44px!important;font-size:.78rem!important}
  .hsd-demo{margin-top:2px!important;border-radius:12px!important}
  .hsd-feature-list{display:flex!important;gap:0!important;overflow-x:auto!important;margin-top:16px!important;border:1px solid var(--border)!important;border-radius:12px!important;scroll-snap-type:x proximity!important;scrollbar-width:none!important}
  .hsd-feature-list::-webkit-scrollbar{display:none!important}
  .hsd-feature-list li{flex:0 0 46%!important;min-height:68px!important;padding:12px!important;border:0!important;border-right:1px solid var(--border-soft)!important;scroll-snap-align:start!important}
  .hsd-feature-list b{font-size:.78rem!important}
  .hsd-feature-list span{font-size:.66rem!important;line-height:1.35!important}

  /* Key features: one clean active label, one large moving product visual. */
  .hs-section{padding:50px 0!important}
  .hs-head-centered{margin-bottom:20px!important;padding-inline:4px!important}
  .hs-head-centered h2{font-size:clamp(2rem,9.5vw,2.55rem)!important;line-height:1!important;letter-spacing:-.045em!important}
  .hs-head-centered p{font-size:.9rem!important;line-height:1.5!important;max-width:34ch!important}
  .hs-showcase-shell{padding:56px 10px 10px!important;border-radius:18px!important}
  .hs-showcase-shell .hs-controls{top:14px!important;left:12px!important;right:12px!important;justify-content:flex-end!important}
  .hs-showcase-shell .hs-progress{position:absolute!important;left:4px!important;right:118px!important;width:auto!important}
  .hs-showcase-shell .hs-nav{display:block!important;padding:0!important;margin:0 0 12px!important;overflow:visible!important}
  .hs-showcase-shell .hs-nav-item{display:none!important}
  .hs-showcase-shell .hs-nav-item.is-active{display:block!important;width:100%!important;min-height:72px!important;padding:12px 13px!important;border-radius:12px!important;opacity:1!important;background:var(--bg-raised)!important}
  .hs-showcase-shell .hs-nav-item.is-active .hs-nav-label{font-size:.58rem!important}
  .hs-showcase-shell .hs-nav-item.is-active .hs-nav-title{font-size:1rem!important}
  .hs-showcase-shell .hs-nav-item.is-active .hs-nav-desc{display:block!important;margin-top:5px!important;font-size:.76rem!important;line-height:1.42!important;max-width:38ch!important}
  .hs-showcase-shell .hs-product-shot{border-radius:12px!important}
  .hs-library-toolbar{padding:10px!important;gap:7px!important}
  .hs-library-toolbar span{font-size:.66rem!important}
  .hs-library-shot .hs-mock-cards{grid-template-columns:1fr 1fr!important;gap:7px!important;padding:8px!important}
  .hs-library-shot .hs-mock-cards .map-card{min-width:0!important}
  .hs-library-shot .hs-mock-cards .map-card .card-body{padding:10px!important}
  .hs-library-shot .hs-mock-cards .map-card h3{font-size:.78rem!important}
  .hs-product-shot.hs-compare{grid-template-columns:1fr 1fr!important;gap:7px!important;padding:8px!important}
  .hs-product-shot.hs-compare article:nth-child(2){display:block!important}
  .hs-product-shot.hs-compare .hs-compare-preview{height:150px!important}
  .hs-product-shot.hs-compare article h3{font-size:.78rem!important;margin:9px!important}
  .hs-product-shot.hs-compare article dl{display:none!important}
  .hs-operation-panel{width:min(62%,230px)!important;right:8px!important;top:8px!important;padding:10px!important}
  .hs-advanced-grid{width:min(74%,270px)!important;right:8px!important;bottom:8px!important;gap:5px!important}
  .hs-panel-foot{margin-top:9px!important}
  .hs-panel-foot .button{min-height:44px!important;width:100%!important;justify-content:center!important;font-size:.78rem!important}

  /* Account: content-first and compact, like a real mobile dashboard. */
  .account-dashboard-shell{padding:18px 0 44px!important}
  .account-dashboard-page .section-inner{width:calc(100% - 32px)!important}
  .account-dashboard-page .account-hero-panel{padding:14px!important;border-radius:12px!important}
  .account-dashboard-page .account-hero-profile{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;gap:10px!important;align-items:center!important}
  .account-dashboard-page .account-hero-avatar{width:44px!important;height:44px!important}
  .account-dashboard-page .account-kicker{font-size:.56rem!important;margin-bottom:3px!important}
  .account-dashboard-page .account-hero-panel h1{font-size:1.18rem!important;line-height:1.1!important}
  .account-dashboard-page .account-hero-panel p:not(.account-kicker){display:none!important}
  .account-dashboard-page .account-hero-actions{display:flex!important;gap:7px!important;margin-top:12px!important}
  .account-dashboard-page .account-hero-actions .button{min-height:40px!important;font-size:.72rem!important;padding:0 10px!important}
  .account-dashboard-page .account-sidebar.account-sidebar-v2{top:84px!important;margin:10px 0 14px!important;padding:3px!important;border-radius:11px!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a,.account-dashboard-page .account-sidebar-v2 .account-logout{min-height:39px!important;padding:7px 9px!important;font-size:.72rem!important}
  .account-dashboard-page .account-nav-new{display:none!important}
  .account-download-allowance{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px!important;margin-bottom:16px!important}
  .account-download-allowance span{font-size:.56rem!important}
  .account-download-allowance strong{font-size:.78rem!important}
  .account-download-allowance p{display:none!important}
  .account-dashboard-heading{display:block!important;margin-bottom:12px!important}
  .account-dashboard-heading>p{display:none!important}
  .account-section-heading h2{font-size:1.35rem!important}
  .account-stat-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .account-stat-card{min-height:72px!important;padding:10px!important}
  .account-stat-icon{width:28px!important;height:28px!important}
  .account-stat-card strong{font-size:1.08rem!important}
  .account-stat-card span{font-size:.58rem!important}
  .dashboard-chart-card{padding:12px!important;margin-top:12px!important}
  .dashboard-chart-heading h3{font-size:.88rem!important}
  .dashboard-chart-heading p{display:none!important}
  .dashboard-chart-card canvas{height:180px!important;min-height:180px!important;max-height:180px!important}
  .account-maps-heading{margin-top:18px!important}
  .account-maps-heading h3{font-size:1rem!important}
  .account-maps-heading>a{font-size:.72rem!important}
  .account-map-grid{grid-template-columns:1fr!important;gap:10px!important}

  /* General page parity. Existing desktop components stack without changing identity. */
  .map-library-stats{grid-template-columns:1fr 1fr!important}
  .map-search-form{grid-template-columns:1fr!important}
  .map-filter-time,.map-filter-sort,.map-filter-actions{grid-row:auto!important}
  .map-filter-actions .button,.map-filter-actions button{width:100%!important}
  .ex-grid,.map-grid-cards{grid-template-columns:1fr!important}
  .map-hero-layout{grid-template-columns:1fr!important;gap:20px!important}
  .map-hero-preview{order:2!important}
  .country-compare-grid,.country-compare-results{grid-template-columns:1fr!important}
  .footer-columns{grid-template-columns:1fr 1fr!important}
}

@media (max-width:430px){
  .mobile-nav-actions{grid-template-columns:1fr!important}
  .hp-hero-product .hp-actions{display:flex!important;flex-direction:column!important;align-items:stretch!important;width:min(100%,290px)!important}
  .hp-hero-product .hp-actions>*{width:100%!important;justify-content:center!important}
  .hp-hero-product .hp-hero-map{aspect-ratio:1.32/1!important}
  .hsd-feature-list li{flex-basis:55%!important}
  .hs-library-shot .hs-mock-cards{grid-template-columns:1fr!important}
  .hs-library-shot .hs-mock-cards .map-card:nth-child(2){display:none!important}
  .hs-product-shot.hs-compare{grid-template-columns:1fr!important}
  .hs-product-shot.hs-compare article:nth-child(2){display:none!important}
  .footer-columns{grid-template-columns:1fr!important}
}

@media (prefers-reduced-motion:reduce){
  .hs-panel.is-entering .hs-product-shot,.hs-panel.is-active .hs-shot-callout,.hs-panel.is-active .hs-operation-panel,.hs-panel.is-active .hs-advanced-grid{animation:none!important}
  .hs-progress>i{animation:none!important;transform:scaleX(1)!important}
}
@media (max-width:430px){
  .account-dashboard-page .account-sidebar-v2 .account-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;min-width:0!important;width:100%!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a,.account-dashboard-page .account-sidebar-v2 .account-logout{width:100%!important;justify-content:center!important;padding:7px 4px!important;font-size:.65rem!important;gap:4px!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav a svg,.account-dashboard-page .account-sidebar-v2 .account-logout svg{display:none!important}
  .account-dashboard-page .account-sidebar-v2 .account-nav form{min-width:0!important;width:100%!important}
}
@media (min-width:721px) and (max-width:960px){
  .hs-showcase-shell .hs-nav{flex-direction:row!important;align-items:stretch!important;flex-wrap:nowrap!important}
  .hs-showcase-shell .hs-nav-item{width:210px!important;height:auto!important;flex:0 0 210px!important}
}
@media (min-width:721px) and (max-width:960px){
  .hs-showcase-shell .hs-nav{justify-content:flex-start!important}
}


/* ========================================================================== 
   20.0.20-test · restore desktop Studio + final feature-showcase polish
   ========================================================================== */

/* The feature section is the final desktop product showcase. Keep it visual,
   compact and image-led rather than turning it into another dashboard. */
@media (min-width:1025px){
  .hs-section{padding:92px 0 96px!important}
  .hs-head.hs-head-centered{max-width:760px!important;margin:0 auto 34px!important}
  .hs-head-centered h2{
    max-width:none!important;font-size:clamp(2.35rem,3vw,3rem)!important;
    line-height:1.03!important;letter-spacing:-.045em!important;
  }
  .hs-head-centered>p:last-child{
    max-width:610px!important;margin-top:12px!important;font-size:.96rem!important;line-height:1.5!important;
  }
  .hs-showcase-shell{
    position:relative!important;min-height:620px!important;padding:66px 24px 24px!important;
    border-radius:26px!important;border-color:color-mix(in srgb,var(--border) 82%,transparent)!important;
    background:
      radial-gradient(75% 110% at 82% 54%,color-mix(in srgb,var(--gold) 4%,transparent),transparent 66%),
      var(--bg-card)!important;
    box-shadow:0 32px 88px -54px rgba(0,0,0,.7)!important;
  }
  .hs-showcase-shell .hs-controls{top:20px!important;right:22px!important}
  .hs-showcase-shell .hs-progress{display:none!important}
  .hs-showcase-shell .hs-stage{
    display:grid!important;grid-template-columns:320px minmax(0,1fr)!important;gap:28px!important;
    align-items:stretch!important;
  }
  .hs-showcase-shell .hs-nav{
    display:flex!important;flex-direction:column!important;justify-content:center!important;gap:8px!important;padding:0!important;
  }
  .hs-showcase-shell .hs-nav-item{
    position:relative!important;min-height:86px!important;padding:14px 16px!important;
    border:1px solid transparent!important;border-radius:14px!important;background:transparent!important;
    opacity:.32!important;transition:opacity .2s ease,background .2s ease,border-color .2s ease!important;
  }
  .hs-showcase-shell .hs-nav-item:hover{opacity:.62!important;background:transparent!important}
  .hs-showcase-shell .hs-nav-item.is-active{
    opacity:1!important;background:var(--bg-raised)!important;border-color:var(--border)!important;
    box-shadow:0 14px 34px -28px rgba(0,0,0,.78)!important;
  }
  .hs-showcase-shell .hs-nav-item.is-active::after{
    content:"";position:absolute;left:-1px;top:18px;bottom:18px;width:2px;border-radius:3px;background:var(--gold);
  }
  .hs-showcase-shell .hs-nav-label{display:none!important}
  .hs-showcase-shell .hs-nav-title{
    display:block!important;max-width:none!important;font-size:1.03rem!important;line-height:1.22!important;letter-spacing:-.018em!important;
  }
  .hs-showcase-shell .hs-nav-desc{
    display:block!important;max-width:31ch!important;margin-top:6px!important;font-size:.79rem!important;line-height:1.45!important;
  }
  .hs-showcase-shell .hs-panels{min-height:0!important;height:530px!important}
  .hs-showcase-shell .hs-panel{height:100%!important;min-height:0!important;gap:0!important}
  .hs-product-shot{
    height:488px!important;min-height:0!important;border-radius:18px!important;
    border-color:color-mix(in srgb,var(--border) 82%,transparent)!important;
    box-shadow:0 28px 70px -48px rgba(0,0,0,.9)!important;
  }
  .hs-product-shot::after{
    content:"";position:absolute;inset:auto 0 0;height:13%;pointer-events:none;
    background:linear-gradient(to bottom,transparent,color-mix(in srgb,var(--bg-deep) 75%,transparent));
  }
  .hs-product-shot img{min-height:0!important;height:100%!important;object-fit:cover!important}
  .hs-library-shot{padding:15px!important}
  .hs-library-toolbar{
    grid-template-columns:minmax(0,1.75fr) minmax(110px,.55fr) minmax(100px,.5fr)!important;
    gap:8px!important;margin-bottom:11px!important;
  }
  .hs-library-toolbar span{height:40px!important;padding:0 12px!important;display:flex!important;align-items:center!important}
  .hs-library-shot .hs-mock-cards{grid-template-columns:1fr 1fr!important;gap:10px!important}
  .hs-library-shot .map-card{
    height:402px!important;min-height:0!important;overflow:hidden!important;border-radius:12px!important;
  }
  .hs-library-shot .map-card .preview{height:258px!important;min-height:258px!important}
  .hs-library-shot .map-card .card-body{height:144px!important;min-height:0!important;padding:14px 15px!important}
  .hs-library-shot .map-card .map-card-type{margin:0 0 6px!important;font-size:.61rem!important}
  .hs-library-shot .map-card h3{margin:0!important;font-size:1rem!important;line-height:1.2!important}
  .hs-library-shot .map-card .card-foot{margin-top:10px!important;min-height:24px!important}
  .hs-library-shot .map-card .map-card-actions{display:none!important}
  .hs-library-shot .map-card .map-download-total{font-size:.68rem!important}
  .hs-product-shot.hs-compare{height:488px!important;padding:12px!important;gap:10px!important}
  .hs-product-shot.hs-compare .hs-compare-preview{height:286px!important}
  .hs-product-shot.hs-compare article h3{margin:13px 14px 9px!important}
  .hs-product-shot.hs-compare article dl{margin:0 14px 14px!important}
  .hs-operation-panel{right:20px!important;top:20px!important;width:min(300px,43%)!important}
  .hs-advanced-grid{right:20px!important;bottom:20px!important;width:min(430px,60%)!important}
  .hs-showcase-shell .hs-panel-foot{
    position:absolute!important;left:0!important;bottom:0!important;z-index:3!important;min-height:42px!important;margin:0!important;
  }
  .hs-showcase-shell .hs-panel-foot .button{min-height:42px!important;padding-inline:16px!important}
}

/* On tablet the exact desktop Studio remains visible, simply scaled. The phone
   camera treatment is reserved for actual phone widths by the web component. */
@media (min-width:641px) and (max-width:1024px){
  .hsd-demo{overflow:hidden!important}
  .hsd-demo histriphy-studio-demo{width:100%!important;max-width:none!important}
}

/* 20.0.22 account map controls: keep a large dashboard useful without
   rendering hundreds of cards into the default view. */
.account-maps-heading-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.account-maps-heading-actions a{color:var(--gold-ink);font-size:.76rem;font-weight:700;text-decoration:none}
.account-maps-heading-actions a:hover{color:var(--ink);text-decoration:none}

/* 20.0.22-test · global non-blocking notifications */
.histriphy-toast-stack{position:fixed;z-index:12050;right:18px;bottom:18px;width:min(380px,calc(100vw - 36px));display:flex;flex-direction:column;gap:8px;pointer-events:none}
.histriphy-toast{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:start;gap:10px;padding:12px 10px 12px 13px;border:1px solid var(--border);border-radius:11px;background:color-mix(in srgb,var(--bg-card) 97%,transparent);box-shadow:0 18px 50px rgba(0,0,0,.28);color:var(--ink);font-size:.78rem;line-height:1.45;opacity:0;transform:translateY(8px) scale(.985);transition:opacity .18s ease,transform .18s ease;pointer-events:auto;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.histriphy-toast.is-visible{opacity:1;transform:none}
.histriphy-toast.is-error{border-color:color-mix(in srgb,#ef6a63 42%,var(--border))}
.histriphy-toast.is-success{border-color:color-mix(in srgb,#56b68d 42%,var(--border))}
.histriphy-toast-close{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:var(--ink-faint);font:inherit;font-size:1.05rem;line-height:1;cursor:pointer}
.histriphy-toast-close:hover{background:var(--bg-raised);color:var(--ink)}
.account-map-pagination{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid var(--border-soft)}
.account-map-pagination a,.account-map-pagination span{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 11px;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);color:var(--ink-dim);font-size:.7rem;text-decoration:none}
.account-map-pagination a:hover{border-color:var(--ink-faint);color:var(--ink)}
.account-map-pagination a.is-disabled{opacity:.38;pointer-events:none}
.account-map-pagination span{border-color:transparent;background:transparent}

/* ========================================================================== 
   20.0.44 launch regression guard
   Mobile-only Explore filter markup is progressive enhancement. Keep it out of
   desktop layout completely; tablet/phone layers opt it back in deliberately.
   ========================================================================== */
@media (min-width:1101px){
  .map-mobile-filter-toggle,
  .map-mobile-filter-backdrop,
  .map-mobile-filter-sheet-head,
  .map-mobile-period-options,
  .map-mobile-sort-options{display:none!important}
  .map-mobile-filter-sheet,
  .map-filter-advanced{display:contents!important}
  .map-mobile-sheet-search{display:none!important}
}


/* 20.0.50 emergency About alignment repair. Keep the existing About design,
   but force every section onto one shared content axis. */
.simple-about-page .simple-page-shell{
  width:min(calc(100% - 48px),1040px)!important;
  max-width:1040px!important;
  margin-inline:auto!important;
}
.simple-about-page .simple-about-grid{width:100%!important;margin:0!important}
.simple-about-page .simple-about-story{
  width:100%!important;
  max-width:none!important;
  margin:48px 0 0!important;
  padding:34px 0!important;
  background:transparent!important;
  border-top:1px solid var(--border)!important;
  border-bottom:1px solid var(--border)!important;
  border-radius:0!important;
}
.simple-about-page .simple-about-story p{max-width:760px!important}
.simple-about-page .simple-contact-line{width:100%!important;margin:0!important}
.simple-about-page .simple-page-cta{width:100%!important;margin-top:34px!important}
@media(max-width:900px){
  .simple-about-page .simple-page-shell{width:min(calc(100% - 40px),720px)!important}
  .simple-about-page .simple-about-story{margin-top:28px!important;padding:28px 0!important}
}
@media(max-width:560px){
  .simple-about-page .simple-page-shell{width:calc(100% - 32px)!important}
  .simple-about-page .simple-about-story{margin-top:22px!important;padding:24px 0!important}
  .simple-about-page .simple-page-cta{margin-top:26px!important}
}

/* =========================================================
   20.0.54 · Community identity + profile photo polish
   ========================================================= */

/* Community map hero statistics: three stable columns instead of a wrapping
   flex row. Long category names stay contained in their own column. */
.map-experience-current .map-quick-stats.is-community-stats{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%;
}
.map-experience-current .map-quick-stats.is-community-stats>div{
  min-width:0!important;
  padding:0 16px!important;
  border-left:1px solid var(--border-soft)!important;
}
.map-experience-current .map-quick-stats.is-community-stats>div:first-child{
  padding-left:0!important;
  border-left:0!important;
}
.map-experience-current .map-quick-stats.is-community-stats strong{
  max-width:100%!important;
}

/* Creator identity belongs near the map information heading, not stranded at
   the bottom of the metadata card. */
.map-community-credit-v20.map-community-credit-v54{
  display:flex;
  align-items:center;
  gap:12px;
  margin:16px 0 20px!important;
  padding:11px 13px!important;
  border:1px solid var(--border-soft)!important;
  border-radius:10px;
  background:color-mix(in srgb,var(--bg-elevated) 78%,transparent);
}
.map-community-credit-v54 .community-uploader-avatar{
  width:44px!important;
  height:44px!important;
  font-size:0!important;
}
.map-community-credit-v54 .community-uploader-copy{min-width:0}
.map-community-credit-v54 .community-uploader-copy>span{
  margin-bottom:2px;
  color:var(--ink-faint);
  font-size:.7rem;
  line-height:1.25;
}
.map-community-credit-v54 .community-uploader-copy>strong{
  overflow:hidden;
  color:var(--ink);
  font-size:.88rem;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.map-community-credit-v54 .community-uploader-copy>p{
  display:-webkit-box;
  overflow:hidden;
  margin:4px 0 0!important;
  color:var(--ink-dim);
  font-size:.75rem!important;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

/* Avatars: uploaded photos get a restrained frame; accounts without a photo
   receive a clean built-in portrait instead of loud initials. */
.histriphy-avatar{
  background:var(--bg-elevated)!important;
  border:1px solid var(--border-strong)!important;
  box-shadow:0 3px 12px rgba(0,0,0,.22)!important;
  color:var(--ink)!important;
}
.histriphy-avatar img{display:block}
.histriphy-avatar.is-default{
  isolation:isolate;
  background:
    radial-gradient(circle at 32% 24%,color-mix(in srgb,var(--gold) 12%,transparent),transparent 42%),
    linear-gradient(145deg,var(--bg-elevated),var(--bg-card))!important;
}
.histriphy-avatar.is-default.avatar-variant-1{background:radial-gradient(circle at 70% 25%,color-mix(in srgb,var(--gold) 10%,transparent),transparent 43%),linear-gradient(145deg,var(--bg-elevated),var(--bg-card))!important}
.histriphy-avatar.is-default.avatar-variant-2{background:radial-gradient(circle at 28% 72%,color-mix(in srgb,var(--gold) 11%,transparent),transparent 45%),linear-gradient(145deg,var(--bg-elevated),var(--bg-card))!important}
.histriphy-avatar.is-default.avatar-variant-3{background:radial-gradient(circle at 72% 72%,color-mix(in srgb,var(--gold) 9%,transparent),transparent 44%),linear-gradient(145deg,var(--bg-elevated),var(--bg-card))!important}
.histriphy-avatar-glyph{
  position:absolute;
  inset:0;
  display:block;
}
.histriphy-avatar-glyph::before{
  content:"";
  position:absolute;
  top:22%;
  left:50%;
  width:31%;
  aspect-ratio:1;
  border-radius:50%;
  background:color-mix(in srgb,var(--ink-dim) 78%,var(--ink) 22%);
  transform:translateX(-50%);
}
.histriphy-avatar-glyph::after{
  content:"";
  position:absolute;
  bottom:14%;
  left:50%;
  width:58%;
  height:34%;
  border-radius:50% 50% 36% 36% / 58% 58% 38% 38%;
  background:color-mix(in srgb,var(--ink-dim) 78%,var(--ink) 22%);
  transform:translateX(-50%);
}
:root[data-theme="light"] .histriphy-avatar.is-default{
  background:linear-gradient(145deg,#f2f0eb,#e7e3dc)!important;
  border-color:#d3cec5!important;
}

/* Profile photo: immediate circular preview plus one simple drag/zoom editor. */
.account-profile-photo-card[data-profile-photo-editor]{
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  align-items:start;
  gap:22px;
}
.account-photo-preview-column{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:7px;
}
.account-settings-avatar-frame{
  position:relative;
  width:96px;
  height:96px;
  flex:0 0 96px;
}
.account-settings-avatar-frame .account-settings-avatar,
.account-settings-avatar-frame .account-photo-live-preview{
  position:absolute;
  inset:0;
  width:96px!important;
  height:96px!important;
  border-radius:50%;
}
.account-photo-live-preview{
  display:block;
  border:1px solid var(--border-strong);
  background:var(--bg-elevated);
  box-shadow:0 3px 12px rgba(0,0,0,.22);
}
.account-photo-live-preview[hidden]{display:none!important}
.account-photo-preview-label{
  color:var(--ink-faint);
  font-size:.68rem;
}
.account-photo-controls{min-width:0;max-width:650px}
.account-photo-controls>h3{margin-top:0}
.account-photo-upload{max-width:520px!important}
.account-photo-editor:not([hidden]){
  display:grid;
  width:min(100%,360px);
  gap:11px;
  margin-top:14px;
  padding:13px;
  border:1px solid var(--border-soft);
  border-radius:10px;
  background:color-mix(in srgb,var(--bg-card) 72%,transparent);
}
.account-photo-crop{
  position:relative;
  width:min(100%,260px);
  aspect-ratio:1;
  overflow:hidden;
  border:1px solid var(--border-strong);
  border-radius:10px;
  background:var(--bg-deep);
  cursor:grab;
  touch-action:none;
  user-select:none;
}
.account-photo-crop.is-dragging{cursor:grabbing}
.account-photo-crop-image{
  position:absolute;
  top:0;
  left:0;
  max-width:none!important;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
}
.account-photo-crop-ring{
  position:absolute;
  inset:5%;
  z-index:2;
  border:1.5px solid color-mix(in srgb,var(--ink) 82%,transparent);
  border-radius:50%;
  box-shadow:0 0 0 999px rgba(0,0,0,.34);
  pointer-events:none;
}
.account-photo-adjust-row{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:10px;
  width:min(100%,260px);
}
.account-photo-adjust-row label{
  color:var(--ink-dim);
  font-size:.72rem;
  font-weight:600;
}
.account-photo-zoom{width:100%;accent-color:var(--gold)}
.account-photo-editor-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.account-photo-editor-actions .button{
  min-height:34px;
  padding:7px 11px;
  font-size:.72rem;
}
.account-photo-cancel{
  border:0;
  background:transparent;
  color:var(--ink-dim);
  font:600 .72rem var(--font-body);
  cursor:pointer;
}
.account-photo-cancel:hover{color:var(--ink)}
.account-photo-help{
  margin:0!important;
  color:var(--ink-faint)!important;
  font-size:.68rem!important;
  line-height:1.45;
}

@media (max-width:699px){
  .map-experience-current .map-quick-stats.is-community-stats>div{padding-inline:8px!important}
  .map-community-credit-v20.map-community-credit-v54{margin:13px 0 16px!important;padding:10px 11px!important}
  .account-profile-photo-card[data-profile-photo-editor]{grid-template-columns:1fr!important;gap:14px!important}
  .account-photo-preview-column{align-items:flex-start!important}
  .account-photo-editor:not([hidden]){width:100%}
}


/* 21.1.2 · single-map quick stats placement: Downloads / Category / Format
   always occupy one clean row on desktop/tablet instead of wrapping Format
   under Downloads when the copy column is narrow. */
@media (min-width:681px){
  .single-histriphy_map .map-quick-stats,
  .map-experience-current .map-quick-stats{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;
    align-items:start!important;
  }
  .single-histriphy_map .map-quick-stats>div,
  .map-experience-current .map-quick-stats>div{
    min-width:0!important;
    padding:0 16px!important;
    text-align:left!important;
  }
  .single-histriphy_map .map-quick-stats>div:first-child,
  .map-experience-current .map-quick-stats>div:first-child{padding-left:0!important}
  .single-histriphy_map .map-quick-stats strong,
  .map-experience-current .map-quick-stats strong{
    max-width:none!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}
