html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.5;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.56fr);
  column-gap: clamp(2rem, 7vw, 6rem);
  row-gap: var(--section-space);
  align-items: end;
}

.hero-copy {
  min-width: 0;
  max-width: 750px;
  container-type: inline-size;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--theme-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

#page-title {
  margin-bottom: 1rem;
}

h1 .title-line {
  max-width: 680px;
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.hero-copy > p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--theme-text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.temperature-card {
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-lg);
  background: var(--theme-surface);
}

.temperature-card > div {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
}

.temperature-card > div + div {
  border-top: 1px solid var(--theme-border);
}

.temperature-icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--theme-decor);
  color: var(--theme-accent-strong);
}

.temperature-card strong,
.temperature-card small {
  display: block;
}

.temperature-card strong {
  font-size: 1rem;
}

.temperature-card small {
  margin-top: 0.05rem;
  color: var(--theme-text-subtle);
  font-size: 0.77rem;
}

.safety-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  margin: var(--section-space) 0;
  padding: 1rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--theme-highlight-strong) 35%, var(--theme-border));
  border-radius: var(--radius-lg);
  background: var(--theme-highlight);
}

.safety-strip-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--theme-decor);
}

.safety-strip h2 {
  margin-top: 0;
  margin-bottom: 0.1rem;
  font-size: 0.92rem;
}

.safety-strip p {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.84rem;
}

.safety-strip a {
  color: var(--theme-text);
  font-size: 0.78rem;
  font-weight: 750;
  text-underline-offset: 0.2rem;
  white-space: nowrap;
}

.browser {
  scroll-margin-top: 1rem;
}

.browser-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.browser-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.result-count {
  margin: 0 0 0.25rem;
  color: var(--theme-text-subtle);
  font-size: 0.82rem;
  white-space: nowrap;
}

.toolbar {
  position: sticky;
  z-index: 10;
  top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-box {
  display: block;
}

.toolbar .filter-bar {
  margin-top: 0.75rem;
}

.list-actions button,
.empty-state button {
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text-muted);
  cursor: pointer;
}

.list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0 0.2rem;
  color: var(--theme-text-subtle);
  font-size: 0.74rem;
}

.list-actions button {
  padding: 0.25rem 0.45rem;
  border: 0;
  background: transparent;
  color: var(--theme-accent-strong);
  font-size: 0.74rem;
  font-weight: 750;
}

.category-group + .category-group {
  margin-top: 1.5rem;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  padding: 0 0.25rem;
  color: var(--theme-text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.category-title span:last-child {
  color: var(--theme-text-subtle);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.food-item {
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-lg);
  background: var(--theme-surface);
  transition: border-color 150ms ease;
}

.food-item + .food-item {
  margin-top: 0.55rem;
}

.food-item[open] {
  border-color: var(--theme-border-strong);
}

.food-summary {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) minmax(170px, 0.72fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 1rem;
  cursor: pointer;
  list-style: none;
}

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

.food-summary:hover {
  background: var(--theme-surface-hover);
}

.food-emoji {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border-radius: 12px;
  background: var(--theme-decor);
  font-size: 1.25rem;
}

.food-name {
  min-width: 0;
}

.food-name strong {
  display: block;
  font-size: 0.94rem;
}

.quick-facts {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  min-width: 0;
}

.quick-fact {
  overflow: hidden;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  background: var(--theme-surface-raised);
  color: var(--theme-text-muted);
  font-size: 0.68rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-fact.primary {
  background: var(--theme-decor);
  color: var(--theme-accent-strong);
}

.chevron {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: var(--theme-accent);
  transition: transform 160ms ease;
}

.food-item[open] .chevron {
  transform: rotate(180deg);
}

.food-details {
  padding: 0 1rem 1rem 4.45rem;
  border-top: 1px solid var(--theme-border);
  background: var(--theme-canvas);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  padding-top: 0.9rem;
}

.detail-card {
  min-width: 0;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--theme-surface-raised);
}

.detail-card span,
.detail-card strong {
  display: block;
}

.detail-card span {
  margin-bottom: 0.16rem;
  color: var(--theme-text-subtle);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-card strong {
  font-size: 0.79rem;
  line-height: 1.35;
}

.storage-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.storage-copy h3 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
}

.storage-copy p {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.78rem;
}

.safety-copy {
  position: relative;
  padding-left: 0.75rem;
}

.safety-copy::before {
  position: absolute;
  top: 0.2rem;
  bottom: 0.1rem;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--theme-highlight-strong);
  content: "";
}

.source-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--theme-border);
}

.source-row a {
  color: var(--theme-accent-strong);
  font-size: 0.72rem;
  font-weight: 750;
  text-underline-offset: 0.18rem;
}

.empty-state {
  padding: 4rem 1rem;
  border: 1px dashed var(--theme-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-state > span {
  font-size: 2.5rem;
}

.empty-state h2 {
  margin: 0.5rem 0 0.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 500;
}

.empty-state p {
  margin-bottom: 1rem;
  color: var(--theme-text-subtle);
  font-size: 0.85rem;
}

.empty-state button {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
}

footer {
  width: 100%;
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .temperature-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .temperature-card > div {
    padding: 0.9rem;
  }

  .temperature-card > div + div {
    border-top: 0;
    border-left: 1px solid var(--theme-border);
  }

  .safety-strip {
    grid-template-columns: auto 1fr;
  }

  .safety-strip a {
    grid-column: 2;
  }

  .food-summary {
    grid-template-columns: auto 1fr auto;
  }

  .quick-facts {
    display: none;
  }

  .food-details {
    padding-left: 1rem;
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-card:first-child {
    grid-column: 1 / -1;
  }

  .storage-copy {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

}

@media (max-width: 450px) {
  h1 .title-line {
    font-size: clamp(2.4rem, 14.5cqi, 4.2rem);
  }

  .temperature-card {
    grid-template-columns: 1fr;
  }

  .temperature-card > div + div {
    border-top: 1px solid var(--theme-border);
    border-left: 0;
  }

  .safety-strip {
    align-items: start;
  }

  .browser-heading {
    display: block;
  }

  .result-count {
    margin-top: 0.45rem;
  }

  .food-summary {
    gap: 0.65rem;
    padding: 0.8rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-card:first-child {
    grid-column: auto;
  }

  .source-row {
    justify-content: flex-start;
  }
}
