:root {
  --bg: #f4f1ec;
  --surface: #ffffff;
  --text: #2b2118;
  --text-muted: #6b5f52;
  --accent: #b5602a;
  --accent-dark: #9a4f22;
  --warm: #8a4a12;
  --warm-bg: #fde6d2;
  --cold: #1c5a8a;
  --cold-bg: #d9ecfb;
  --border: #e3dbcd;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(43, 33, 24, .06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent-dark); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.1rem 3rem;
}

header.site {
  padding: 1.3rem 1.1rem 1rem;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.logo .emoji { font-size: 1.4rem; }

nav.site {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .9rem;
}
nav.site a {
  text-decoration: none;
  color: var(--text-muted);
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
nav.site a:hover, nav.site a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.hero {
  text-align: center;
  padding: 1rem 0 1.6rem;
}
.hero h1 {
  font-size: 1.6rem;
  margin: 0 0 .5rem;
}
.hero p {
  color: var(--text-muted);
  font-size: .95rem;
  margin: 0;
}
.product-count-badge {
  display: inline-block;
  margin: .9rem auto 0;
  padding: .4rem .9rem;
  background: var(--warm-bg);
  color: var(--warm);
  border-radius: 999px;
  font-size: .85rem !important;
  font-weight: 600;
}
.product-count-badge strong { font-size: 1rem; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  margin-bottom: 1.3rem;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.search-form .row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.search-form input {
  flex: 1 1 200px;
  padding: .7rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: #fffdfa;
}
.search-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .7rem 1.3rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s;
}
button.primary:hover { background: var(--accent-dark); }

.manual-price-row {
  display: none;
  flex-direction: column;
  gap: .5rem;
  background: #faf6ef;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: .8rem;
}
.manual-price-row.visible { display: flex; }
.manual-price-row label { font-size: .85rem; color: var(--text-muted); }

#result { margin-top: .2rem; }

.result-heading {
  font-size: .95rem;
  color: var(--text-muted);
  margin: 0 0 .8rem;
}
.result-heading strong { color: var(--text); }

.harnas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
}
@media (min-width: 560px) {
  .harnas-grid { grid-template-columns: 1fr 1fr; }
}

.harnas-tile {
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.harnas-tile.warm { background: var(--warm-bg); }
.harnas-tile.cold { background: var(--cold-bg); }
.harnas-tile .label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.harnas-tile.warm .label { color: var(--warm); }
.harnas-tile.cold .label { color: var(--cold); }
.harnas-tile .count {
  font-size: 2.1rem;
  font-weight: 800;
  margin: .2rem 0;
}
.harnas-tile .sub { font-size: .8rem; color: var(--text-muted); }

.error-box, .info-box {
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .9rem;
}
.error-box { background: #fbe4e1; color: #8a241c; }
.info-box { background: #eef4fb; color: #1c5a8a; }

.sources {
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: .9rem;
  margin-top: .3rem;
}
.sources a { color: var(--text-muted); text-decoration: underline; }

footer.site {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.1rem 2rem;
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
}

.chart-wrap { position: relative; height: 320px; }

form.stacked { display: flex; flex-direction: column; gap: .7rem; }
form.stacked label { font-size: .85rem; color: var(--text-muted); }
form.stacked input { padding: .65rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }

table.simple { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.simple th, table.simple td { text-align: left; padding: .45rem .3rem; border-bottom: 1px solid var(--border); }
