@font-face {
  font-family: "StoWeb";
  src: url("/fonts/StoWeb-Light.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 300;
}

@font-face {
  font-family: "StoWeb";
  src: url("/fonts/StoWeb-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "StoWeb";
  src: url("/fonts/StoWeb-Medium.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "StoWeb";
  src: url("/fonts/StoWeb-Bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "StoWeb";
  src: url("/fonts/StoWeb-Heavy.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 900;
}

@font-face {
  font-family: "StoWeb Cond";
  src: url("/fonts/StoWeb-CondRegular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "StoWeb Cond";
  src: url("/fonts/StoWeb-CondBold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  color-scheme: light;
  --sto-yellow: #ffd800;
  --ink: #050505;
  --text: #202020;
  --muted: #676767;
  --line: #dedede;
  --soft: #f3f3f3;
  --soft-strong: #e7e7e7;
  --panel: #ffffff;
  --danger: #b42318;
  --focus: #006f9f;
  font-family: "StoWeb", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #ffffff;
  color: var(--text);
}

html.is-embedded,
html.is-embedded body {
  min-height: 0;
}

body {
  font-family: "StoWeb", Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
  font-family: "StoWeb", Arial, Helvetica, sans-serif;
  font-weight: 700;
}

button:hover {
  background: #303030;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 111, 159, 0.28);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: inset 0 -1px 0 var(--line);
  color: var(--text);
}

textarea {
  resize: vertical;
}

label,
legend {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.08;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.85rem, 3.1vw, 3rem);
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.finder-shell {
  display: grid;
  gap: 0;
  width: min(1380px, 100%);
  margin: 0 auto;
  min-width: 0;
}

.finder-panel {
  background: var(--soft);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(230px, 0.75fr) minmax(260px, 0.85fr) minmax(420px, 2fr);
  gap: clamp(18px, 2.5vw, 34px);
  align-items: start;
  padding: 26px clamp(20px, 5vw, 54px) 24px;
}

.service-picker,
.size-picker {
  display: grid;
  gap: 7px;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.size-picker legend {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
}

.size-info {
  position: relative;
  display: inline-flex;
}

.size-info-button {
  display: inline-grid;
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  line-height: 1;
}

.size-info-button:hover,
.size-info-button:focus-visible {
  background: #ffffff;
}

.size-info-tooltip {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: min(290px, calc(100vw - 30px));
  padding: 10px 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 2px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms;
  visibility: hidden;
}

.size-info:hover .size-info-tooltip,
.size-info:focus-within .size-info-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.size-picker[hidden] {
  display: none;
}

.search-form.is-akustik {
  grid-template-columns: minmax(230px, 0.75fr) minmax(420px, 2.85fr);
}

.choice-row {
  display: flex;
  min-width: 0;
  gap: 5px;
}

.segment {
  flex: 1 1 0;
  min-width: 0;
  min-height: 50px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
}

.segment:hover {
  background: var(--soft-strong);
}

.segment.is-active {
  background: var(--ink);
  color: #ffffff;
}

.address-field {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.address-input-wrap {
  position: relative;
  min-width: 0;
}

.search-button {
  min-width: 84px;
}

.address-help {
  display: block;
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.quote-link {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: var(--sto-yellow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.quote-link:hover {
  background: #f0ca00;
}

.suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: none;
  max-height: 250px;
  overflow: auto;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.suggestions.is-open {
  display: block;
}

.suggestion {
  display: block;
  width: 100%;
  min-height: 44px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  font-weight: 500;
}

.suggestion:hover,
.suggestion.is-selected {
  background: var(--soft);
}

.results-panel {
  min-width: 0;
  padding: clamp(28px, 4vw, 52px) 0 70px;
}

.results-heading {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(26px, 4vw, 48px);
  padding: 14px 16px;
  background: var(--soft);
}

.result-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.landpart-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.landpart-button,
.reset-button,
.ghost-button,
.secondary-button {
  min-height: 36px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.88rem;
}

.landpart-button:hover,
.reset-button:hover,
.ghost-button:hover,
.secondary-button:hover {
  background: var(--soft-strong);
}

.landpart-button.is-active {
  background: var(--ink);
  color: #ffffff;
}

.reset-button {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-list {
  display: grid;
  gap: clamp(34px, 5vw, 64px);
  min-width: 0;
}

.result-card,
.card-layout,
.card-content {
  min-width: 0;
}

.result-card {
  display: block;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease;
}

@media (hover: hover) {
  .result-card:hover {
    background: #f8f8f8;
  }
}

.result-card:focus-visible {
  background: #f8f8f8;
}

@media (prefers-reduced-motion: reduce) {
  .result-card,
  .size-info-tooltip {
    transition: none;
  }
}

.card-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(28px, 4vw, 54px);
  align-items: center;
}

.card-content {
  display: grid;
  gap: 10px;
  align-content: center;
}

.image-wrap {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--soft);
}

.profile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--soft);
  color: var(--ink);
  font-size: 2.2rem;
  font-weight: 700;
}

.card-topline,
.service-tags,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.card-topline {
  min-height: 28px;
}

.distance {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 4px 11px;
  background: var(--soft-strong);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.badge.national {
  background: var(--soft-strong);
}

.badge.missing,
.badge.fallback {
  color: var(--muted);
}

.meta,
.notes {
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.meta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
}

.meta[hidden] {
  display: none;
}

.location-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes {
  max-width: 58ch;
}

.notes:empty,
.meta:empty {
  display: none;
}

.service-tags {
  margin-top: 8px;
}

.card-link-label {
  justify-self: start;
  margin-top: 4px;
  padding: 1px 4px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: background-color 150ms ease;
}

.card-link-label::after {
  content: " →";
}

@media (hover: hover) {
  .result-card:hover .card-link-label {
    background: var(--sto-yellow);
  }
}

.result-card:focus-visible .card-link-label {
  background: var(--sto-yellow);
}

.empty-state {
  padding: 36px 20px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
}

/* Admin */
.admin-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-grid {
  display: grid;
  gap: 16px;
}

.admin-list-panel,
.editor-panel {
  padding: 16px;
  background: var(--soft);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}

.token-panel,
.publish-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  background: #ffffff;
}

.admin-list {
  display: grid;
  gap: 6px;
  max-height: 70vh;
  overflow: auto;
}

.admin-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 54px;
  padding: 10px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.admin-item.is-finder-inactive {
  background: var(--sto-yellow);
  color: var(--ink);
}

.admin-item.is-active {
  background: var(--ink);
  color: #ffffff;
}

.admin-item.is-finder-inactive.is-active {
  background: var(--sto-yellow);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.admin-item small {
  color: inherit;
  font-weight: 400;
  opacity: 0.75;
}

.editor-form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  gap: 12px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 0;
  padding: 14px;
  border: 0;
  background: #ffffff;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.checkbox-group input {
  width: auto;
  min-height: 0;
  box-shadow: none;
}

.geo-row,
.editor-actions,
.publish-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.publish-panel strong {
  display: block;
  margin-bottom: 3px;
}

a.ghost-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 16px;
  color: var(--ink);
  text-decoration: none;
}

.danger-button,
.danger-button:hover {
  background: var(--danger);
}

@media (min-width: 720px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }

  .form-row.three {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .admin-grid {
    grid-template-columns: 360px 1fr;
    align-items: start;
  }
}

@media (max-width: 1080px) {
  .search-form {
    grid-template-columns: 1fr 1fr;
  }

  .address-field {
    grid-column: 1 / -1;
  }

  .search-form.is-akustik .address-field {
    grid-column: 2;
  }

  .results-heading {
    grid-template-columns: auto 1fr auto;
  }

  .result-count {
    justify-self: start;
  }

  .landpart-filter {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .search-form,
  .search-form.is-akustik {
    grid-template-columns: 1fr;
  }

  .address-field,
  .search-form.is-akustik .address-field {
    grid-column: auto;
  }

  .results-panel {
    background: var(--soft);
    padding-bottom: 18px;
  }

  .result-list {
    gap: 18px;
    background: var(--soft);
  }

  .result-card {
    background: #ffffff;
  }

  .card-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .card-content {
    padding: 20px 16px 28px;
  }
}

@media (max-width: 540px) {
  .search-form,
  .admin-shell {
    padding-left: 15px;
    padding-right: 15px;
  }

  .choice-row {
    flex-wrap: wrap;
  }

  .segment {
    flex-basis: 30%;
  }

  .address-row {
    grid-template-columns: 1fr 1fr;
  }

  .address-input-wrap {
    grid-column: 1 / -1;
  }

  .results-heading {
    grid-template-columns: 1fr auto;
  }

  .result-count {
    grid-column: 1;
    grid-row: 2;
  }

  .landpart-filter {
    grid-row: 3;
  }

  .reset-button {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .app-header,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
