/* The directory’s paper sheet extends to the right edge. The header and filter rail share a tint. */
.directory-list-page {
  --listing-frame: color-mix(in srgb, var(--accent) 6%, #f1f1ed);
  --listing-sheet: #fcfcfc;
  --listing-rule: #dedfd8;
  --listing-control: #a3a79d;
  --listing-muted: #555950;
  --listing-ink: #20241f;
  background: var(--listing-frame);
  color: var(--listing-ink);
}
.directory-list-page .stage { display: block; padding: 0; }
.directory-list-page .sheet { --serif: Georgia, "Times New Roman", serif; margin: 0; background: var(--listing-frame); }
.directory-list-page .sheet > :is(.section, .copy) { max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.directory-list-page .sheet-head {
  position: static; min-height: 60px; margin: 0 auto; max-width: 1472px;
  padding: 10px 28px; background: transparent; border-radius: 0; color: var(--listing-ink);
}
.directory-list-page .sheet-head .mark { color: color-mix(in srgb, var(--accent) 63%, #26362a); }
.directory-list-page .sheet-head nav a { min-height: 44px; display: inline-flex; align-items: center; }
.directory-list-page .sheet-head .cta { border-radius: 8px; }
.directory-list-page .crumbs { max-width: 1416px; margin: 0 auto; padding: 8px 28px 0; }
.directory-list-page .foot { --ink-inv: #f1f1ef; --ink-inv-2: #b8b9b2; }
.directory-list-page .foot .legal a { color: var(--ink-inv); }

.f { --f-radius: 8px; --f-accent: color-mix(in srgb, var(--accent) 24%, #edf1e9); --f-green: #285c40; }
.f [hidden] { display: none !important; }
.sheet > .f { margin: 0 auto; max-width: 1416px; padding: 0 24px; }
.f-hero { padding: 23px 0 21px; }
.f-hero h1 {
  font: 600 clamp(1.6rem, 1.32rem + 1vw, 2rem)/1.14 var(--serif);
  letter-spacing: -.032em; margin-bottom: 7px; text-wrap: pretty;
}
.f-hero p { color: var(--listing-muted); font-size: 1rem; line-height: 1.5; }

/* 224–264px rail + 16px gap + the remaining width, with equal outer gutters. */
.f-layout { display: grid; grid-template-columns: clamp(224px, 21vw, 264px) minmax(0, 1fr); gap: 16px; align-items: start; }
.f-rail { position: sticky; top: 16px; min-width: 0; max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-width: thin; }
.f-results { min-width: 0; padding: 18px 24px 22px; background: var(--listing-sheet); border: 1px solid var(--listing-rule); border-radius: 16px; }
.f :focus-visible { outline: 2px solid #275a40; outline-offset: 2px; }
.f :where(button, input, select) { font: inherit; color: inherit; }
.f-search { position: relative; margin-bottom: 12px; }
.f-search-field { position: relative; }
.f-search-field input {
  width: 100%; min-height: 48px; padding: 9px 47px 9px 43px;
  border: 1px solid var(--listing-control); border-radius: var(--f-radius); background: #fff; font-size: 1rem;
}
.f-search input::placeholder, .f-filters input::placeholder { color: var(--listing-muted); }
.f-search input::-webkit-search-cancel-button { display: none; }
.f-mag { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--listing-muted); pointer-events: none; }
.f-search-clear { position: absolute; inset: 2px 2px 2px auto; width: 44px; border: 0; background: none; cursor: pointer; font-size: 1.3rem !important; }
.f-suggestions {
  position: absolute; z-index: 5; inset: calc(100% + 5px) 0 auto; padding: 4px; max-height: 240px; overflow: auto;
  list-style: none; background: var(--listing-sheet); border: 1px solid var(--listing-rule); border-radius: var(--f-radius);
  box-shadow: 0 8px 20px rgb(0 0 0 / .12); /* taste-skill-ignore: search popup */
}
.f-suggestions li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; min-height: 44px;
  cursor: pointer; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; border-radius: 4px;
}
.f-suggestions li:hover, .f-suggestions li[aria-selected="true"] { background: var(--f-accent); }
.f-suggestions li span + span { color: var(--listing-muted); text-align: right; font-size: .82rem; }

.f-bar { display: flex; align-items: center; justify-content: space-between; gap: 7px 12px; flex-wrap: wrap; min-height: 44px; }
.f-count { font-size: 1.03rem; font-weight: 500; letter-spacing: 0; line-height: 1.3; }
.f-count strong { font-variant-numeric: tabular-nums; }
.f-sort { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--listing-muted); }
.f-sort select {
  min-height: 40px; min-width: 0; padding: 5px 4px 5px 8px; border: 1px solid var(--listing-control);
  border-radius: var(--f-radius); background: #fff; color: var(--listing-ink); font-size: .89rem;
}
.f-active { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; padding: 6px 0 12px; }
.f-active li { min-width: 0; max-width: 100%; }
.f-active button {
  display: flex; align-items: center; min-height: 32px; max-width: 100%; gap: 8px; text-align: left;
  overflow-wrap: anywhere; border-radius: 999px; border: 0; background: var(--f-accent); padding: 4px 10px; font-size: .86rem; cursor: pointer;
}
.f-active button:hover { background: var(--listing-frame); }
.f-active button span { font-size: 1.12rem; line-height: 1; }

.f-list { list-style: none; padding: 0; }
.f-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 16px 0 16px 10px;
  border-top: 1px solid var(--listing-rule); border-inline-start: 2px solid transparent; min-width: 0;
}
.f-card-selected { border-inline-start-color: #557560; background: color-mix(in srgb, var(--f-accent) 26%, transparent); }
.f-card h3 { font: 600 1.14rem/1.24 var(--serif); overflow-wrap: anywhere; }
.f-card h3 a, .f-table th a { color: var(--listing-ink); text-decoration-color: #777c72; }
.f-card h3 a { text-decoration-color: transparent; }
.f-card h3 a:hover, .f-table th a:hover { text-decoration-color: currentColor; }
.f-meta, .f-rating { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; line-height: 1.45; }
.f-meta { margin-top: 4px; color: var(--listing-muted); font-size: .86rem; }
.f-meta > span:first-child::after { content: "·"; margin-inline-start: 8px; }
.f-rating { gap: 0 5px; font-variant-numeric: tabular-nums; }
.f-rating strong { color: var(--listing-ink); }
.f-icon { width: 15px; height: 15px; }
.f-rating .f-icon-star { align-self: center; color: #526346; width: 14px; height: 14px; fill: currentColor; stroke: none; }
.f-review-count { color: var(--listing-muted); font-size: .82rem; }
.f-no-facts { margin: 6px 0 0; font-size: .84rem; color: var(--listing-muted); }

.f-services, .f-facts { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0; list-style: none; margin: 7px 0 0; }
.f-services li { background: #eeefe9; border-radius: 5px; padding: 2px 6px; font-size: .79rem; line-height: 1.45; }
.f-facts { gap: 3px 13px; }
.f-facts li { font-size: .84rem; line-height: 1.4; }
.f-source { display: inline-flex; align-items: baseline; gap: 4px; color: var(--f-green, #285c40); text-decoration-color: #6a8870; text-decoration-style: dotted; }
.f-source:hover { color: #203725; text-decoration-style: solid; }
.f-source .f-icon { align-self: center; width: 13px; height: 13px; }
.f-card-actions, .f-contact { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.f-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 5px 9px;
  border: 1px solid var(--listing-control); border-radius: var(--f-radius); background: #fff; color: var(--listing-ink);
  font-size: .88rem !important; font-weight: 600 !important; line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer;
}
.f-action:hover { background: var(--f-accent); color: var(--listing-ink); }
.f-action:active { translate: 0 1px; }
.f-action[aria-pressed="true"] { background: var(--f-accent); border-color: #526e56; }
.f-action[aria-disabled="true"] { cursor: default; color: var(--listing-muted); background: #eeefe9; }
.f-primary, .f-card-actions .f-call { background: var(--listing-ink); border-color: var(--listing-ink); color: #fff; }
.f-primary:hover, .f-card-actions .f-call:hover { background: #384439; color: #fff; }
.f-pick > span { font-size: 1.05rem; line-height: .8; }
.f:not(.f-ready) .f-pick { display: none; }
.f-more { margin-top: 12px; }
.f-empty { padding: 22px 16px; background: #eeefe9; border-radius: var(--f-radius); }
.f-empty p, .f-index-error { margin: 5px 0 2px; color: var(--listing-muted); font-size: .95rem; }
#f-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 8px; }
#f-empty-actions .f-action { flex-wrap: wrap; justify-content: space-between; text-align: left; font-weight: 400 !important; }
#f-empty-actions span { color: var(--f-green); font-variant-numeric: tabular-nums; }
#f-fallback a { color: var(--f-green); }
#f-fallback summary { cursor: pointer; }

.f-filter-head { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 8px; }
.f-filter-head h2 { font: 600 1.1rem/1.2 var(--serif); letter-spacing: 0; }
.f-filters { padding-right: 5px; }
.f-text-button {
  padding: 3px 0; border: 0; color: var(--listing-ink); background: none; text-align: left;
  font-size: .86rem !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.f-text-button:hover { color: var(--f-green); }
.f-group { border: 0; margin: 0; min-inline-size: 0; padding: 0 0 13px; }
.f-group legend { display: block; width: 100%; padding: 8px 0 3px; border-top: 1px solid #d6d9d1; font-weight: 600; font-size: .96rem; }
.f-hint { color: var(--listing-muted); margin: 0 0 4px; font-size: .82rem; line-height: 1.4; }
.f-filters input[type="search"] {
  width: 100%; min-height: 36px; padding: 5px 8px; margin: 4px 0; background: #fff;
  border: 1px solid var(--listing-control); border-radius: var(--f-radius); font-size: .9rem;
}
.f-option { display: flex; align-items: center; gap: 8px; padding: 2px 2px 2px 0; min-height: 28px; font-size: .9rem; line-height: 1.25; cursor: pointer; }
.f-option:hover .f-option-label { text-decoration: underline; text-underline-offset: 2px; }
.f-option input { accent-color: #3b6046; width: 16px; height: 16px; margin: 0; flex: none; }
.f-option-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.f-n { font-size: .82rem; font-variant-numeric: tabular-nums; color: var(--listing-muted); }
.f-sheet-footer, .f-open { display: none; }

.f-lock { overflow: hidden; }
.f-side, .f-compare {
  background: var(--listing-sheet); color: var(--listing-ink); border: 1px solid var(--listing-rule);
  padding: 0; border-radius: 16px; max-width: calc(100% - 32px);
}
.f-side::backdrop, .f-compare::backdrop { background: rgb(23 29 22 / .47); }
.f-dock {
  position: sticky; bottom: 0; z-index: 10; margin-inline: -24px; padding: 10px max(16px, env(safe-area-inset-left))
    calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  background: var(--listing-sheet); border-top: 1px solid var(--listing-rule);
}
.f-dock-inner { max-width: 1370px; margin: auto; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.f:not(.f-has-selection) .f-dock { display: none; }
.f-shortlist { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.f-shortlist ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0; list-style: none; min-width: 0; }
.f-shortlist li { min-width: 0; max-width: 100%; }
.f-selected-company {
  display: flex; align-items: center; gap: 7px; padding: 2px 8px; min-width: 0; max-width: 100%; min-height: 34px;
  font-size: .87rem !important; background: var(--f-accent); border: 0; border-radius: 5px; cursor: pointer;
}
.f-selected-company span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24ch; }
.f-selected-company span:last-child { font-size: 1.1rem; }
#f-compare-open { min-height: 44px; white-space: nowrap; }

.f-compare { width: min(960px, calc(100% - 32px)); max-height: min(86dvh, 740px); overflow: auto; }
.f-compare-head { position: sticky; top: 0; z-index: 1; background: var(--listing-sheet); display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 17px 20px 12px; }
.f-compare-head h2 { font: 600 1.45rem/1.15 var(--serif); text-wrap: pretty; }
.f-compare-head p { font-size: .86rem; margin-top: 3px; color: var(--listing-muted); }
.f-compare-head .f-action { min-height: 44px; }
.f-comparison { padding: 0 20px 20px; }
.f-table { border-collapse: collapse; table-layout: fixed; width: 100%; font-size: .94rem; line-height: 1.35; }
.f-table :is(td, th) { border-top: 1px solid var(--listing-rule); vertical-align: top; text-align: left; padding: 9px 8px; overflow-wrap: anywhere; }
.f-table thead th { width: calc((100% - 9rem) / var(--companies)); }
.f-table tbody th { font-weight: 500; }
.f-table tr > :first-child { width: 9rem; padding-left: 0; color: var(--listing-muted); }
.f-table tr > :last-child { padding-right: 0; }
.f-table .f-services { margin: 0; }
.f-unknown { font-size: .84rem; color: var(--listing-muted); }
.f-profile-facts { margin-top: 14px; }
.f-profile-facts .f-services li { background: var(--paper-2); color: var(--ink); }

@media (max-width: 1000px) {
  .f-card { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  .directory-list-page .sheet { margin: 0; border-radius: 0; }
  .directory-list-page .sheet-head { margin: 0; min-height: 54px; padding: 6px 16px; gap: 10px; }
  .directory-list-page .sheet-head .brand { min-width: 0; font-size: 1rem; overflow-wrap: anywhere; }
  .directory-list-page .sheet-head .cta { display: none; }
  .directory-list-page .crumbs { padding: 4px 16px 0; }
  .directory-list-page .sheet > :is(.section, .copy) { padding-inline: 16px; }
  .sheet > .f { padding-inline: 16px; }
  .f-hero { padding: 14px 0 12px; }
  .f-hero h1 { margin-bottom: 4px; }
  .f-hero p { font-size: .93rem; }
  .f-layout { display: block; }
  .f-rail { display: none; }
  .f-results { padding: 12px 13px; border-radius: 12px; }
  .f-search { margin-bottom: 5px; }
  .f-active button { min-height: 44px; }
  .f-card { padding-block: 12px; }
  .f-card h3 { font-size: 1.08rem; }
  .f-card .f-action, .f-more, .f-empty .f-action { min-height: 44px; }
  .f-dock, .f:not(.f-has-selection) .f-dock { display: block; margin-inline: -16px; }
  .f-dock-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .f-open { display: inline-flex; min-height: 44px; white-space: nowrap; justify-self: start; }
  .f-shortlist { display: contents; }
  .f-shortlist ul { grid-column: 1 / -1; grid-row: 1; flex-wrap: nowrap; }
  .f-shortlist li { flex: 0 1 auto; }
  .f-selected-company { min-height: 44px; }
  .f-selected-company span:first-child { max-width: none; }
  .f-side {
    position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; max-height: 88dvh;
    margin: 0; border-radius: 16px 16px 0 0; overflow: hidden;
  }
  .f-side[open] { display: flex; }
  .f-filters { padding: 0; min-width: 0; width: 100%; max-height: 87dvh; display: flex; flex-direction: column; }
  .f-filter-head { padding: 8px 16px 0; }
  .f-filter-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px; }
  .f-filter-head button, .f-filters input[type="search"] { min-height: 44px; }
  .f-option { min-height: 44px; }
  .f-sheet-footer { display: block; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--listing-rule); }
  .f-sheet-footer .f-action { width: 100%; min-height: 48px; }
  .f-compare { width: calc(100% - 32px); max-height: 88dvh; }
  .f-compare-head { padding: 12px 10px 9px; }
  .f-compare-head h2 { font-size: 1.21rem; }
  .f-comparison { padding: 0 9px 12px; }
  .f-table { font-size: .81rem; }
  .f-table, .f-table :is(thead, tbody) { display: block; }
  .f-table tr { display: grid; grid-template-columns: repeat(var(--companies), minmax(0, 1fr)); }
  .f-table thead td { display: none; }
  .f-table thead th, .f-table tr > :first-child { width: auto; }
  .f-table tbody th { grid-column: 1 / -1; padding: 7px 3px 1px; font-weight: 600; }
  .f-table :is(td, th) { padding: 5px 3px; }
  .f-table tbody td { border-top: 0; }
  .f-table .f-rating { gap: 0 3px; }
  .f-table :is(.f-review-count, .f-services li, .f-unknown) { font-size: .75rem; }
  .f-table .f-action { min-height: 44px; padding-inline: 4px; font-size: .76rem !important; }
  .f-table .f-action .i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .f *, .f *::before, .f *::after { animation: none !important; transition: none !important; }
  .f-action:active { translate: none; }
}
