/* Which potato? — the market decoder, printed on the same sack paper. */

.guide-main { max-width: var(--page); margin: 0 auto; }

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
}

.section-heading { max-width: 900px; margin-bottom: 40px; }

.section-heading h2 {
  max-width: 20ch;
  margin: 12px 0 14px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.section-heading p {
  max-width: 66ch;
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.guide-section {
  padding: clamp(48px, 6vw, 96px) clamp(20px, 5vw, 84px);
  border-bottom: var(--rule);
}

/* ------------------------------------------------------------------- hero */

.guide-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
  border-bottom: var(--rule);
}

.guide-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 5vw, 84px);
  background: var(--paper);
}

.hero-flag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 5px 11px 4px;
  color: var(--cream);
  background: var(--rust);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.guide-hero-copy h1 {
  max-width: 13ch;
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(2.3rem, 4.4vw, 4.2rem);
  line-height: 0.98;
}

.guide-intro {
  max-width: 48ch;
  margin: 0;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  text-wrap: pretty;
}

.jump-link {
  align-self: flex-start;
  margin-top: 32px;
  padding: 12px 16px 10px;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.jump-link:hover { background: var(--ink); color: var(--cream); }

.guide-hero-image { position: relative; min-width: 0; margin: 0; background: var(--ink); }

.guide-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.guide-hero-image figcaption {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 7px 10px 5px;
  color: var(--light);
  background: rgba(29, 26, 19, .88);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------- texture */

.texture-section { background: var(--cream); }

.texture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.texture-card { min-width: 0; border: var(--rule); background: var(--paper); }

.texture-code {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.texture-firm .texture-code { color: var(--cream); background: var(--band-a); }
.texture-balanced .texture-code { color: var(--ink); background: var(--band-b); }
.texture-floury .texture-code { color: var(--cream); background: var(--band-c); }

.texture-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-top: var(--rule);
  border-bottom: var(--rule);
}

.texture-body { padding: 22px; }

.texture-body h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.1;
}

.texture-body p { margin: 0; }

.bag-words {
  margin: 15px 0 0 !important;
  padding-top: 13px;
  border-top: 1px dashed rgba(29, 26, 19, .4);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.65;
}

.texture-note {
  max-width: 74ch;
  margin: 30px 0 0;
  padding: 16px 18px;
  background: var(--paper);
  border-left: 8px solid var(--rust);
}

/* ------------------------------------------------------- market decoder */

.country-section { color: var(--rail-text); background: var(--cellar); }

.country-section .eyebrow { color: var(--sage); }

.country-finder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 40px;
  align-items: end;
  margin-bottom: 24px;
}

.country-finder h2 {
  max-width: 16ch;
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  color: var(--light-bright);
}

.country-control { padding: 18px; border: 2px solid #6f7a5c; background: var(--ink); }

.country-control label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.country-control select {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.country-status {
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}

.country-cards { display: grid; gap: 22px; }

.country-card { color: var(--ink); background: var(--paper); border: var(--rule); }

.country-card > header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px 18px;
  color: var(--light);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.country-card > header strong { color: var(--ember); font-weight: 700; }

.country-answer { padding: clamp(24px, 3.4vw, 48px); border-bottom: var(--rule); }

.country-answer > span {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.country-answer h3 {
  max-width: 18ch;
  margin: 10px 0 14px;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1;
}

.country-answer p { max-width: 64ch; margin: 0; font-size: 1.05rem; }

.country-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2px;
  margin: 0;
  background: var(--ink);
}

.country-labels > div { padding: 20px; background: var(--cream); }

.country-labels dt {
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.country-labels > div:nth-child(1) dt { color: var(--band-a); }
.country-labels > div:nth-child(2) dt { color: #8a6a1e; }
.country-labels > div:nth-child(3) dt { color: var(--band-c); }

.country-labels dd { margin: 0; }

.country-tip {
  margin: 0;
  padding: 15px 20px;
  color: var(--cream);
  background: var(--rust);
  font-size: 0.9rem;
}

/* ------------------------------------------------------------ dish grid */

.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2px;
  background: var(--ink);
  border: var(--rule);
}

.dish-grid article { padding: 26px; background: var(--cream); }
.dish-grid article:nth-child(even) { background: var(--paper); }

.dish-grid span {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.dish-grid h3 {
  margin: 14px 0 9px;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.05;
}

.dish-grid p { margin: 0; }

/* -------------------------------------------------------- name decoder */

.decoder-section { background: var(--cream); }

.decoder-tabs { display: flex; flex-wrap: wrap; gap: 0; border: 2px solid var(--ink); }

.decoder-tabs button {
  flex: 1 1 auto;
  min-height: 52px;
  padding: 8px 18px;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-right: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.decoder-tabs button:last-child { border-right: 0; }
.decoder-tabs button:hover { background: var(--sack); }
.decoder-tabs button[aria-selected="true"] { color: var(--cream); background: var(--rust); }

.decoder-panels article {
  padding: clamp(24px, 3vw, 40px);
  background: var(--paper);
  border: var(--rule);
  border-top: 0;
}

.decoder-type {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.decoder-panels h3 {
  margin: 12px 0 10px;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.05;
}

.decoder-panels p { max-width: 66ch; margin: 0; }

/* ------------------------------------------------------- the one-potato test */

.test-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  background: var(--paper);
}

.test-section h2 {
  max-width: 16ch;
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1;
}

.test-section ol {
  display: grid;
  gap: 16px;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.test-section li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(29, 26, 19, .4);
}

.test-section li:last-child { padding-bottom: 0; border-bottom: 0; }

.test-number { font-family: var(--display); font-size: 1.4rem; color: var(--rust); }

/* ------------------------------------------------------------- evidence */

.source-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  background: var(--cream);
  border-bottom: 0;
}

.source-section h2 {
  max-width: 18ch;
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.source-copy p { max-width: 66ch; margin: 0 0 18px; }

.source-copy details {
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid rgba(29, 26, 19, .35);
}

.source-copy summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  list-style: none;
}

.source-copy ul { margin: 16px 0 0; padding-left: 20px; font-size: 0.92rem; line-height: 1.9; }

.source-date {
  margin: 18px 0 0 !important;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* --------------------------------------------------------- responsive */

@media (max-width: 1040px) {
  .guide-hero { grid-template-columns: minmax(0, 1fr); }
  .country-finder { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 620px) {
  .decoder-tabs { flex-direction: column; }
  .decoder-tabs button { border-right: 0; border-bottom: 2px solid var(--ink); }
  .decoder-tabs button:last-child { border-bottom: 0; }
  .guide-hero-image img { min-height: 300px; }
}
