/* ==========================================================================
   Top10Easy -- consumer design system
   Local-first discovery redesign (presentation only; no ranking logic here)
   ========================================================================== */

:root {
  --ink: #171a1f;
  --ink-soft: #565c66;
  --ink-faint: #838993;
  --paper: #faf9f6;
  --surface: #ffffff;
  --border: #e7e4dd;
  --border-soft: #eeece6;

  --brand: #1c6e66;
  --brand-dark: #12463f;
  --brand-soft: #e4f1ee;
  --brand-tint: #f2f8f6;

  --gold: #b8862f;
  --gold-tint: #fbf1de;
  --silver: #8a8f98;
  --silver-tint: #f1f1f3;
  --bronze: #a56a3d;
  --bronze-tint: #f7ece1;

  --danger: #b23b3b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(23, 26, 31, 0.04), 0 1px 1px rgba(23, 26, 31, 0.03);
  --shadow-raised: 0 10px 30px rgba(23, 26, 31, 0.08), 0 2px 8px rgba(23, 26, 31, 0.05);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.muted {
  color: var(--ink-soft);
}

/* -----------------------------------------------------------------------
   Layout shell
   ----------------------------------------------------------------------- */

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark__accent {
  color: var(--brand);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.main-nav__link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.main-nav__link:hover {
  color: var(--brand);
  text-decoration: none;
}

.preview-banner {
  background: var(--brand-tint);
  color: var(--brand-dark);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 16px;
  border-bottom: 1px solid var(--border-soft);
}

main {
  display: block;
}

.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 56px;
  padding: 32px 0 48px;
}

.site-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.site-footer__inner a {
  font-weight: 600;
}

/* -----------------------------------------------------------------------
   Hero + local search
   ----------------------------------------------------------------------- */

.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  margin: 0 0 14px;
  line-height: 1.12;
}

.hero__sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 32px;
}

.search-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  padding: 22px;
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
}

.search-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  position: relative;
}

.search-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-field select,
.search-field input[type="text"] {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}

.search-field select:focus,
.search-field input[type="text"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.search-fields-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-fields-row .search-field {
  flex: 1 1 220px;
}

.search-card__cta {
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  width: 100%;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn-secondary:hover {
  background: #d9ece7;
}

.search-field__hint {
  font-size: 0.8rem;
  color: var(--danger);
  min-height: 1.1em;
}

.use-location-link {
  align-self: flex-start;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: underline;
}

.use-location-link:hover {
  color: var(--brand-dark);
}

.use-location-link:disabled {
  color: var(--ink-faint);
  cursor: default;
  text-decoration: none;
}

/* Combobox */

.combobox {
  position: relative;
}

.combobox__listbox {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
}

.combobox__option {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.combobox__option-count {
  font-size: 0.78rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.combobox__option:hover,
.combobox__option[aria-selected="true"] {
  background: var(--brand-tint);
}

.combobox__empty {
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Popular places */

.popular-places {
  padding: 36px 0 8px;
  text-align: center;
}

.popular-places__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.popular-places__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
}

.pill:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  text-decoration: none;
  background: var(--brand-tint);
}

.pill__count {
  color: var(--ink-faint);
  font-weight: 500;
  font-size: 0.82rem;
}

/* -----------------------------------------------------------------------
   Section framing (used on home + listing pages)
   ----------------------------------------------------------------------- */

.section {
  padding: 40px 0;
}

.section--tight {
  padding: 24px 0;
}

.section--divider {
  border-top: 1px solid var(--border-soft);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section__head h2 {
  font-size: 1.3rem;
  margin: 0;
}

.section__head-link {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.quicklinks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.quicklinks .pill {
  background: var(--brand-tint);
  border-color: var(--brand-soft);
  color: var(--brand-dark);
}

.province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.province-grid__item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 700;
}

.province-grid__item:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
  text-decoration: none;
}

.province-grid__item span {
  display: block;
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* -----------------------------------------------------------------------
   Page intro (listing / profile / methodology headers)
   ----------------------------------------------------------------------- */

.page-header {
  padding: 36px 0 8px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.breadcrumb a {
  color: var(--ink-soft);
  font-weight: 600;
}

.page-intro h1,
.page-header h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin: 0 0 8px;
}

.page-intro__lede,
.page-header__lede {
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 640px;
  margin: 0 0 6px;
}

.trust-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 6px 0 22px;
}

.trust-bar a {
  font-weight: 600;
}

.capped-note {
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  color: var(--brand-dark);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  margin: 0 0 26px;
}

/* -----------------------------------------------------------------------
   Ranked cards
   ----------------------------------------------------------------------- */

.tier-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tier-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-tie-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: -4px 0 0 2px;
}

.rank-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease;
}

.rank-card:hover {
  border-color: var(--brand);
}

.rank-card__badge {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink-soft);
  border: 1.5px solid var(--border);
}

.rank-card--top1 .rank-card__badge {
  background: linear-gradient(155deg, #f0d48a, var(--gold));
  color: #4a3410;
  border-color: transparent;
}

.rank-card--top2 .rank-card__badge {
  background: linear-gradient(155deg, #eceef1, var(--silver));
  color: #33363b;
  border-color: transparent;
}

.rank-card--top3 .rank-card__badge {
  background: linear-gradient(155deg, #ecd3ba, var(--bronze));
  color: #442a15;
  border-color: transparent;
}

.rank-card--top1,
.rank-card--top2,
.rank-card--top3 {
  border-width: 1.5px;
}

.rank-card--top1 {
  border-color: var(--gold);
  background: var(--gold-tint);
}

.rank-card--top2 {
  border-color: var(--silver);
  background: var(--silver-tint);
}

.rank-card--top3 {
  border-color: var(--bronze);
  background: var(--bronze-tint);
}

.rank-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.rank-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 2px;
}

.rank-card__name a {
  color: inherit;
}

.rank-card__name a:hover {
  color: var(--brand);
  text-decoration: none;
}

.rank-card__place {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.rank-card__tied-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  margin-left: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

.rank-card__aside {
  flex: none;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.rank-card__score {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.rank-card__score-label {
  font-size: 0.68rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rank-card__link {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .rank-card {
    flex-wrap: wrap;
  }
  .rank-card__aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-left: 62px;
  }
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  color: var(--ink-soft);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 28px 0 8px;
  font-size: 0.9rem;
}

.pagination a {
  font-weight: 700;
}

/* -----------------------------------------------------------------------
   Business profile
   ----------------------------------------------------------------------- */

.profile-hero {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin: 18px 0 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.profile-hero__main h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 6px;
}

.profile-hero__location {
  color: var(--ink-soft);
  margin: 0;
}

.profile-hero__primary-rank {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 10px 0 0;
}

.profile-hero__score {
  flex: none;
  text-align: center;
  background: var(--brand-tint);
  border-radius: var(--radius-md);
  padding: 16px 26px;
}

.profile-hero__score-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1;
}

.profile-hero__score-max {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.profile-hero__score-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-top: 4px;
}

.rank-scopes {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.rank-scope {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.rank-scope__place {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

.rank-scope__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.rank-scope__value--muted {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}

.rank-scope__note {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 4px 0 0;
}

.details-block {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin: 8px 0 20px;
  overflow: hidden;
}

.details-block summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  background: var(--surface);
  list-style: none;
}

.details-block summary::-webkit-details-marker {
  display: none;
}

.details-block summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--brand);
}

.details-block[open] summary::before {
  content: "▾";
}

.details-block__body {
  padding: 4px 18px 18px;
  background: var(--paper);
}

.details-block__body h3 {
  font-size: 0.95rem;
  margin: 14px 0 8px;
}

.evidence-table {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  margin: 0 0 6px;
}

.evidence-table dt {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.evidence-table dd {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
}

.claim-cta {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  margin: 24px 0 8px;
}

.claim-cta h2 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.claim-cta p {
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto 16px;
  font-size: 0.92rem;
}

.claim-cta .btn {
  width: auto;
}

/* -----------------------------------------------------------------------
   Methodology
   ----------------------------------------------------------------------- */

.methodology-section {
  padding: 8px 0 32px;
  max-width: 720px;
}

.methodology-section h2 {
  font-size: 1.15rem;
  margin: 32px 0 10px;
}

.methodology-section p {
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .site-header__inner {
    gap: 10px;
  }
  .main-nav {
    gap: 14px;
  }
  .main-nav__link {
    font-size: 0.85rem;
  }
  .hero {
    padding: 36px 0 28px;
  }
  .search-card {
    padding: 16px;
  }
  .profile-hero {
    padding: 20px;
  }
  .profile-hero__score {
    padding: 12px 20px;
  }
}
