/* KLS Articles – article page UI. Uses the Kitchen Label Studio theme colours when present. */
.kls-meta, .kls-takeaways, .kls-toc, .kls-tip, .kls-note, .kls-faq, .kls-pins, .kls-guide, .kls-cta-box, .kls-fig, .kls-table-wrap {
  --k-ink: var(--ink, #23302A);
  --k-soft: var(--ink-soft, #55625B);
  --k-pale: var(--pistachio, #EDF2E7);
  --k-gold: var(--saffron, #F2B630);
  --k-red: var(--sumac, #8E2C48);
  --k-line: var(--line, #DCE3D6);
}

/* Reading bar */
.kls-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .9rem; color: var(--k-soft); margin: 0 0 28px; }
.kls-guide-tag { display: inline-block; padding: .3rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--kls-c, #23302A) 12%, #fff); color: var(--kls-c, #23302A); font-weight: 600; text-decoration: none; }
.kls-guide-tag:hover { background: var(--kls-c, #23302A); color: #fff; }

/* Short answer box */
.kls-takeaways { background: var(--k-pale); border-radius: 20px; padding: 24px 28px; margin: 28px 0; }
.kls-takeaways .kls-box-title { font-family: var(--f-display, Georgia, serif); font-size: 1.35rem; margin: 0 0 10px; color: var(--k-ink); }
.kls-takeaways ul { margin: 0; padding-left: 1.2em; }
.kls-takeaways li + li { margin-top: 6px; }

/* Table of contents */
.kls-toc { border: 1px solid var(--k-line); border-radius: 16px; margin: 28px 0 36px; }
.kls-toc summary { cursor: pointer; padding: 14px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.kls-toc summary::-webkit-details-marker { display: none; }
.kls-toc summary::after { content: "–"; font-size: 1.3rem; color: var(--k-red); }
.kls-toc details:not([open]) summary::after { content: "+"; }
.kls-toc ol { margin: 0; padding: 0 20px 18px 44px; columns: 2; column-gap: 32px; font-size: 1rem; }
.kls-toc li { break-inside: avoid; padding: 3px 0; }
.kls-toc a { color: var(--k-ink); text-decoration: none; }
.kls-toc a:hover { color: var(--k-red); text-decoration: underline; }

/* Headings get room when jumped to */
.entry-content h2[id], .entry-content h3[id] { scroll-margin-top: 90px; }

/* Tip and note boxes */
.kls-tip, .kls-note { border-radius: 16px; padding: 18px 22px; margin: 26px 0; }
.kls-tip { background: #FFF6DC; }
.kls-note { background: #F3EEF7; }
.kls-tip > :first-child, .kls-note > :first-child { margin-top: 0; }
.kls-tip > :last-child, .kls-note > :last-child { margin-bottom: 0; }
.kls-tip strong:first-child, .kls-note strong:first-child { color: var(--k-ink); }

/* Photos */
.kls-fig { position: relative; margin: 32px 0; }
.kls-fig img { width: 100%; height: auto; border-radius: 18px; display: block; }
.kls-fig figcaption { font-size: .9rem; color: var(--k-soft); margin-top: 8px; }
.kls-save { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px; background: #E60023; color: #fff !important; font: 700 .9rem/1 system-ui, sans-serif; padding: .55rem .85rem; border-radius: 999px; text-decoration: none; opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
.kls-fig:hover .kls-save, .kls-save:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .kls-save { opacity: 1; transform: none; } }

/* Tables */
.kls-table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--k-line); border-radius: 16px; }
.kls-table-wrap table { width: 100%; border-collapse: collapse; font-size: 1rem; min-width: 480px; }
.kls-table-wrap th { background: var(--k-pale); text-align: left; font-weight: 700; }
.kls-table-wrap th, .kls-table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--k-line); vertical-align: top; }
.kls-table-wrap tr:last-child td { border-bottom: 0; }

/* FAQ */
.kls-faq { margin: 16px 0 40px; }
.kls-faq details { border-bottom: 1px solid var(--k-line); padding: 18px 0; }
.kls-faq details:first-child { border-top: 1px solid var(--k-line); }
.kls-faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.kls-faq summary::-webkit-details-marker { display: none; }
.kls-faq summary::after { content: "+"; color: var(--k-red); font-size: 1.4rem; line-height: 1; }
.kls-faq details[open] summary::after { content: "–"; }
.kls-faq details p { margin: 10px 0 0; color: var(--k-soft); }

/* Ads */
.kls-ad { margin: 36px 0; min-height: 100px; text-align: center; }

/* Pins */
.kls-pins { margin: 56px 0 0; padding: 32px 0 0; border-top: 1px solid var(--k-line); }
.kls-pins-title { font-size: 1.6rem; margin: 0; }
.kls-pins > p { color: var(--k-soft); margin: 8px 0 18px; }
.kls-pins-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.kls-pin { position: relative; margin: 0; scroll-snap-align: start; }
.kls-pin img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; display: block; box-shadow: 0 10px 24px -16px rgba(0,0,0,.5); }
.kls-pin-save { position: absolute; top: 10px; right: 10px; background: #E60023; color: #fff !important; font: 700 .9rem/1 system-ui, sans-serif; padding: .6rem 1.1rem; border-radius: 999px; text-decoration: none; }
.kls-pin-save:hover { background: #ad081b; }

/* More from this guide */
.kls-guide { margin: 48px 0 0; padding: 28px; border-radius: 22px; background: color-mix(in srgb, var(--kls-c, #23302A) 7%, #fff); }
.kls-guide-title { font-size: 1.5rem; margin: 0 0 18px; }
.kls-guide ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.kls-guide a { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 14px; padding: 10px; text-decoration: none; color: var(--k-ink); height: 100%; }
.kls-guide a:hover { color: var(--k-red); }
.kls-guide-thumb { flex: none; width: 96px; }
.kls-guide-thumb img { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; display: block; }
.kls-guide-text { font-weight: 600; line-height: 1.35; font-size: 1rem; }
.kls-guide-main { display: block; font-size: .78rem; font-weight: 700; color: var(--kls-c, #23302A); margin-bottom: 2px; }

/* Label maker box (only when the theme doesn't have one) */
.kls-cta-box { margin-top: 48px; padding: 28px; border-radius: 22px; background: var(--k-pale); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.kls-cta-box p { margin: 0; font-size: 1.3rem; font-family: var(--f-display, Georgia, serif); }
.kls-cta-btn { background: var(--k-gold); color: var(--k-ink) !important; font-weight: 700; padding: .9rem 1.4rem; border-radius: 999px; text-decoration: none; }

@media (max-width: 640px) {
  .kls-toc ol { columns: 1; }
  .kls-guide ul { grid-template-columns: 1fr; }
  .kls-takeaways { padding: 20px; }
  .kls-guide { padding: 20px; }
}
@media print { .kls-ad, .kls-pins, .kls-guide, .kls-cta-box, .kls-save { display: none !important; } }
