/* Desktop presentation for the canonical consular directory.
   Mobile continues to use page.css unchanged. */
@media (min-width: 901px) {
  body.consulate-pro-page main {
    --cp-ink: #0b1f3a;
    --cp-muted: #61708a;
    --cp-blue: #0753c7;
    --cp-purple: #6836c8;
    --cp-line: #dfe7f2;
    --cp-soft-blue: #f3f7ff;
    --cp-soft-purple: #f7f3ff;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--cp-ink);
    font-family: "Google Sans Text", "Google Sans", Roboto, Arial, sans-serif !important;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  body.consulate-pro-page main :where(*, *::before, *::after) {
    box-sizing: border-box;
  }

  body.consulate-pro-page main :where(h1, h2, h3, p) {
    margin: 0;
  }

  body.consulate-pro-page main a {
    color: inherit;
    text-decoration: none;
  }

  body.consulate-pro-page main button,
  body.consulate-pro-page main input,
  body.consulate-pro-page main select {
    color: inherit;
    font: inherit;
  }

  body.consulate-pro-page main button {
    cursor: pointer;
  }

  body.consulate-pro-page main :where(a, button, input, select):focus-visible {
    outline: 3px solid rgba(104, 54, 200, .36);
    outline-offset: 3px;
  }

  body.consulate-pro-page main .consulate-pro-content {
    width: 100%;
    background: #fff;
  }

  body.consulate-pro-page main .page {
    display: grid;
    width: min(100%, 1500px);
    max-width: 1500px;
    grid-template-columns: minmax(250px, 280px) minmax(0, 1fr) minmax(260px, 300px);
    grid-template-areas:
      "hero hero hero"
      "stats stats stats"
      "geo geo geo"
      "nearby nearby nearby"
      "filters results side";
    align-items: start;
    gap: 20px 24px;
    margin: 0 auto;
    padding: 32px clamp(24px, 3.2vw, 48px) 72px;
  }

  body.consulate-pro-page main .hero {
    position: relative;
    display: grid;
    min-height: 0;
    grid-area: hero;
    grid-template-columns: minmax(0, 1fr) 128px;
    align-items: center;
    gap: 28px;
    overflow: hidden;
    margin: 0;
    padding: 18px 0 26px;
    border: 0;
    border-bottom: 1px solid var(--cp-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  body.consulate-pro-page main .hero::before,
  body.consulate-pro-page main .hero::after,
  body.consulate-pro-page main .hero-orbit,
  body.consulate-pro-page main .hero-stamp,
  body.consulate-pro-page main .hero-art-label {
    display: none;
  }

  body.consulate-pro-page main .hero-copy {
    position: relative;
    z-index: 1;
    max-width: 920px;
  }

  body.consulate-pro-page main .hero-kicker,
  body.consulate-pro-page main .section-kicker {
    margin-bottom: 7px;
    color: var(--cp-purple);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .055em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  body.consulate-pro-page main .hero h1 {
    max-width: 900px;
    color: var(--cp-ink);
    font-family: "Google Sans", "Google Sans Text", Roboto, Arial, sans-serif;
    font-size: clamp(38px, 3.25vw, 48px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.1;
  }

  body.consulate-pro-page main .hero h1 .cp-title-accent {
    color: var(--cp-purple);
  }

  body.consulate-pro-page main .hero-intro {
    max-width: 820px;
    margin-top: 12px;
    color: var(--cp-muted);
    font-size: 18px;
    line-height: 1.55;
  }

  body.consulate-pro-page main .hero-note {
    display: none;
  }

  body.consulate-pro-page main .hero-art {
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    justify-self: end;
  }

  body.consulate-pro-page main .hero-emblem {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border: 1px solid #dce5fb;
    border-radius: 22px;
    background: #f0f4ff url("/assets/icons/diaspora-ro-pro/embassy.svg") center / 60px 60px no-repeat;
    box-shadow: none;
    font-size: 0;
  }

  body.consulate-pro-page main .stats {
    display: grid;
    grid-area: stats;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
  }

  body.consulate-pro-page main .stat {
    display: flex;
    min-width: 0;
    min-height: 82px;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--cp-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
  }

  body.consulate-pro-page main .stat-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border: 1px solid #dce6fb;
    border-radius: 13px;
    background: var(--cp-soft-blue);
    color: var(--cp-blue);
  }

  body.consulate-pro-page main .stat-icon svg {
    width: 25px;
    height: 25px;
  }

  body.consulate-pro-page main .stat-mint .stat-icon {
    border-color: #d4ebde;
    background: #f1f9f4;
    color: #16804a;
  }

  body.consulate-pro-page main .stat-lilac .stat-icon {
    border-color: #e2d8f8;
    background: var(--cp-soft-purple);
    color: var(--cp-purple);
  }

  body.consulate-pro-page main .stat-amber .stat-icon {
    border-color: #eee3cc;
    background: #fbf8f1;
    color: #946b1e;
  }

  body.consulate-pro-page main .stat-n {
    color: var(--cp-ink);
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.05;
  }

  body.consulate-pro-page main .stat-l {
    margin-top: 4px;
    color: var(--cp-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
  }

  body.consulate-pro-page main .geo-banner {
    display: flex;
    min-height: 58px;
    grid-area: geo;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #e5ddf5;
    border-radius: 13px;
    background: #faf8ff;
    color: #4d3680;
    box-shadow: none;
  }

  body.consulate-pro-page main .geo-txt {
    color: #3c3158;
    font-size: 15px;
    line-height: 1.45;
  }

  body.consulate-pro-page main .geo-btn,
  body.consulate-pro-page main .btn-prog,
  body.consulate-pro-page main .submit-btn {
    border: 1px solid #0753c7;
    border-radius: 10px;
    background: #0753c7;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
  }

  body.consulate-pro-page main .geo-btn {
    display: inline-flex;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 16px;
  }

  body.consulate-pro-page main .geo-btn svg {
    width: 19px;
    height: 19px;
  }

  body.consulate-pro-page main .geo-btn:hover,
  body.consulate-pro-page main .btn-prog:hover {
    border-color: #0648ad;
    background: #0648ad;
  }

  body.consulate-pro-page main .nearest-section {
    grid-area: nearby;
    margin: 0;
    padding: 18px 0 2px;
    border-top: 1px solid var(--cp-line);
  }

  body.consulate-pro-page main .nearest-section.hidden {
    display: none;
  }

  body.consulate-pro-page main .section-heading,
  body.consulate-pro-page main .results-heading,
  body.consulate-pro-page main .toolbar-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
  }

  body.consulate-pro-page main .section-title,
  body.consulate-pro-page main .toolbar h2,
  body.consulate-pro-page main .results h2,
  body.consulate-pro-page main .cp-rail-heading h2 {
    color: var(--cp-ink);
    font-family: "Google Sans", "Google Sans Text", Roboto, Arial, sans-serif;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.2;
  }

  body.consulate-pro-page main .section-aside,
  body.consulate-pro-page main .toolbar-help,
  body.consulate-pro-page main .results-help {
    color: var(--cp-muted);
    font-size: 14px;
    line-height: 1.5;
  }

  body.consulate-pro-page main .nearest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
  }

  body.consulate-pro-page main .btn-prog {
    display: none;
  }

  body.consulate-pro-page main .toolbar {
    grid-area: filters;
    align-self: start;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--cp-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: none;
  }

  body.consulate-pro-page main .toolbar-heading {
    display: block;
    margin-bottom: 16px;
  }

  body.consulate-pro-page main .toolbar h2 {
    font-size: 22px;
  }

  body.consulate-pro-page main .toolbar-help {
    margin-top: 7px;
    text-align: left;
  }

  body.consulate-pro-page main .search-wrap {
    position: relative;
    margin-bottom: 14px;
  }

  body.consulate-pro-page main .search-icon {
    position: absolute;
    top: 50%;
    left: 13px;
    color: var(--cp-blue);
    font-size: 23px;
    line-height: 1;
    transform: translateY(-52%);
    pointer-events: none;
  }

  body.consulate-pro-page main .search-wrap input,
  body.consulate-pro-page main .filters select {
    display: block;
    width: 100%;
    min-height: 48px;
    border: 1px solid #cdd8e8;
    border-radius: 9px;
    background: #fff;
    color: var(--cp-ink);
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none;
  }

  body.consulate-pro-page main .search-wrap input {
    padding: 10px 12px 10px 42px;
  }

  body.consulate-pro-page main .search-wrap input::placeholder {
    color: #687890;
    opacity: 1;
  }

  body.consulate-pro-page main .search-wrap input:focus,
  body.consulate-pro-page main .filters select:focus {
    border-color: var(--cp-purple);
    background: #fff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(104, 54, 200, .12);
  }

  body.consulate-pro-page main .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.consulate-pro-page main .filter-control {
    display: grid;
    min-width: 0;
    gap: 6px;
  }

  body.consulate-pro-page main .filter-label {
    color: var(--cp-ink);
    font-size: 14px;
    font-weight: 700;
  }

  body.consulate-pro-page main .filters select {
    padding: 9px 38px 9px 12px;
  }

  body.consulate-pro-page main .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
    border: 0;
  }

  body.consulate-pro-page main .results {
    grid-area: results;
    min-width: 0;
    margin: 0;
  }

  body.consulate-pro-page main .results-heading {
    align-items: center;
    margin-bottom: 14px;
  }

  body.consulate-pro-page main .results h2 {
    font-size: 25px;
  }

  body.consulate-pro-page main .results-help {
    margin-top: 6px;
  }

  body.consulate-pro-page main .list-head {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: var(--cp-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
  }

  body.consulate-pro-page main .list-head .count {
    color: var(--cp-purple);
    font-size: 22px;
    font-weight: 750;
  }

  body.consulate-pro-page main .cp-country-overview {
    display: none;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #e1d8f3;
    border-radius: 12px;
    background: #faf8ff;
    box-shadow: none;
  }

  body.consulate-pro-page main .cp-country-overview.show {
    display: flex;
  }

  body.consulate-pro-page main .cp-country-flag {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  body.consulate-pro-page main .cp-country-overview-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  body.consulate-pro-page main .cp-country-overview-copy > span {
    color: var(--cp-purple);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  body.consulate-pro-page main .cp-country-overview-copy strong {
    color: var(--cp-ink);
    font-size: 17px;
    font-weight: 700;
  }

  body.consulate-pro-page main .cp-country-overview-copy small {
    color: var(--cp-muted);
    font-size: 13px;
  }

  body.consulate-pro-page main .cp-country-overview-count {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    margin-left: auto;
    border: 1px solid #e1d8f3;
    border-radius: 11px;
    background: #fff;
    color: var(--cp-purple);
    font-size: 18px;
    font-weight: 750;
  }

  body.consulate-pro-page main .cp-country-prompt {
    display: grid;
    min-height: 190px;
    grid-column: 1 / -1;
    align-content: center;
    justify-items: center;
    gap: 10px;
    padding: 24px;
    border: 1px solid #e1d8f3;
    border-radius: 14px;
    background: #fcfbff;
    color: var(--cp-muted);
    text-align: center;
  }

  body.consulate-pro-page main .cp-country-prompt img {
    width: 40px;
    height: 40px;
  }

  body.consulate-pro-page main .cp-country-prompt strong {
    color: var(--cp-purple);
    font-size: 18px;
  }

  body.consulate-pro-page main .cp-country-prompt span {
    max-width: 420px;
    font-size: 15px;
    line-height: 1.5;
  }

  body.consulate-pro-page main .list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
  }

  body.consulate-pro-page main .card,
  body.consulate-pro-page main .ncard {
    min-width: 0;
    border: 1px solid var(--cp-line);
    border-radius: 13px;
    background: #fff;
    color: var(--cp-ink);
    box-shadow: none;
    transition: border-color .15s ease, background-color .15s ease;
  }

  body.consulate-pro-page main .card {
    display: flex;
    min-height: 172px;
    flex-direction: column;
    padding: 16px;
  }

  body.consulate-pro-page main .card:hover,
  body.consulate-pro-page main .ncard:hover {
    border-color: #c8b5ef;
    background: #fdfcff;
    transform: none;
    box-shadow: none;
  }

  body.consulate-pro-page main .card-top {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 10px;
  }

  body.consulate-pro-page main .card-ico {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid #dce6fb;
    border-radius: 11px;
    background: var(--cp-soft-blue);
    font-size: 22px;
  }

  body.consulate-pro-page main .card-ico.consulate {
    border-color: #e2d8f8;
    background: var(--cp-soft-purple);
  }

  body.consulate-pro-page main .card-ico.honorary {
    border-color: #eee3cc;
    background: #fbf8f1;
  }

  body.consulate-pro-page main .card-ico.liaison {
    border-color: #d4ebde;
    background: #f1f9f4;
  }

  body.consulate-pro-page main .card-info {
    flex: 1 1 auto;
    min-width: 0;
  }

  body.consulate-pro-page main .card-name {
    color: var(--cp-ink);
    font-family: "Google Sans", "Google Sans Text", Roboto, Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  body.consulate-pro-page main .card-meta {
    margin-top: 4px;
    color: var(--cp-muted);
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  body.consulate-pro-page main .card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
  }

  body.consulate-pro-page main .badge {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid #dce6fb;
    border-radius: 999px;
    background: var(--cp-soft-blue);
    color: #28528a;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
  }

  body.consulate-pro-page main .badge.consulate,
  body.consulate-pro-page main .badge.liaison {
    border-color: #e2d8f8;
    background: var(--cp-soft-purple);
    color: #5b329e;
  }

  body.consulate-pro-page main .badge.honorary {
    border-color: #eee3cc;
    background: #fbf8f1;
    color: #806024;
  }

  body.consulate-pro-page main .badge.dist,
  body.consulate-pro-page main .badge.open {
    border-color: #cde7d7;
    background: #f1f9f4;
    color: #18774a;
  }

  body.consulate-pro-page main .badge.closed {
    border-color: #f0d2d0;
    background: #fff7f6;
    color: #a12b27;
  }

  body.consulate-pro-page main .card-footer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: auto;
    padding-top: 11px;
    border-top: 1px solid #edf0f5;
  }

  body.consulate-pro-page main .card-footer span {
    color: var(--cp-muted);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  body.consulate-pro-page main .card-arrow,
  body.consulate-pro-page main .ncard-arrow,
  body.consulate-pro-page main .ncard-rank {
    display: none;
  }

  body.consulate-pro-page main .empty {
    display: grid;
    min-height: 180px;
    grid-column: 1 / -1;
    align-content: center;
    justify-items: center;
    padding: 22px;
    border: 1px solid var(--cp-line);
    border-radius: 13px;
    background: #fff;
    color: var(--cp-muted);
    font-size: 15px;
    text-align: center;
    box-shadow: none;
  }

  body.consulate-pro-page main .nearest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.consulate-pro-page main .ncard {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
  }

  body.consulate-pro-page main .ncard-ico {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid #dce6fb;
    border-radius: 10px;
    background: var(--cp-soft-blue);
    font-size: 20px;
  }

  body.consulate-pro-page main .ncard-body {
    flex: 1 1 auto;
    min-width: 0;
  }

  body.consulate-pro-page main .ncard-name {
    color: var(--cp-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  body.consulate-pro-page main .ncard-meta {
    margin: 5px 0 8px;
    color: var(--cp-muted);
    font-size: 13px;
    line-height: 1.45;
  }

  body.consulate-pro-page main .cp-action-rail {
    display: grid;
    grid-area: side;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 10px;
    margin: 0;
    padding: 0;
  }

  body.consulate-pro-page main .cp-rail-heading {
    padding: 2px 1px 4px;
  }

  body.consulate-pro-page main .cp-rail-heading .section-kicker {
    margin-bottom: 5px;
  }

  body.consulate-pro-page main .cp-rail-heading h2 {
    font-size: 23px;
  }

  body.consulate-pro-page main .cp-rail-heading > p:last-child {
    margin-top: 5px;
    color: var(--cp-muted);
    font-size: 14px;
    line-height: 1.45;
  }

  body.consulate-pro-page main .cp-rail-card {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 11px;
    padding: 13px;
    border: 1px solid #e0d8f1;
    border-radius: 12px;
    color: var(--cp-ink);
    transition: border-color .15s ease, background-color .15s ease;
    box-shadow: none;
  }

  body.consulate-pro-page main .cp-rail-card:hover {
    transform: none;
    border-color: #c7b5eb;
    background-color: #fdfcff;
    box-shadow: none;
  }

  body.consulate-pro-page main .cp-rail-violet {
    border-color: #e1d7f4;
    background: #faf8ff;
  }

  body.consulate-pro-page main .cp-rail-blue {
    border-color: #dce6f5;
    background: #f7faff;
  }

  body.consulate-pro-page main .cp-rail-green {
    border-color: #d6e9dc;
    background: #f7fbf8;
  }

  body.consulate-pro-page main .cp-rail-rose {
    border-color: #e1d7f4;
    background: #faf8ff;
  }

  body.consulate-pro-page main .cp-rail-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid #e4e9f2;
    border-radius: 10px;
    background: #fff;
  }

  body.consulate-pro-page main .cp-rail-icon img {
    display: block;
    width: 23px;
    height: 23px;
  }

  body.consulate-pro-page main .cp-rail-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  body.consulate-pro-page main .cp-rail-copy strong {
    color: var(--cp-purple);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
  }

  body.consulate-pro-page main .cp-rail-copy small {
    color: var(--cp-muted);
    font-size: 13px;
    line-height: 1.45;
  }

  @media (min-width: 901px) and (max-width: 1199px) {
    body.consulate-pro-page main .page {
      grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
      grid-template-areas:
        "hero hero"
        "stats stats"
        "geo geo"
        "nearby nearby"
        "filters results"
        "side side";
      gap: 18px 20px;
      padding-inline: 28px;
    }

    body.consulate-pro-page main .cp-action-rail {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    body.consulate-pro-page main .cp-rail-heading {
      grid-column: 1 / -1;
    }

    body.consulate-pro-page main .list,
    body.consulate-pro-page main .nearest-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
}
