/* Find your coffee: the CoffeeBuddy guide. Loaded after buddy.css and pages.css. */

:root {
  --cg-spectrum: linear-gradient(90deg, #6B4123 0%, #9A6538 20%, #C98A45 38%, #F0A03C 56%, #EE7F5F 72%, #C2569A 88%, #8C5AD6 100%);
  --cg-kraft: #C9A173;
}

.cg-hero .squiggle { white-space: nowrap; }
.cg-credit { margin-top: 18px; max-width: 46ch; }
.cg-credit a, .cg-small a { color: inherit; }

/* The bag illustration */
.cg-bag { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cg-bag svg { width: min(100%, 330px); height: auto; overflow: visible; }
.cg-bag figcaption { color: var(--ink-muted); font-size: .92rem; text-align: center; max-width: 30ch; }
.cg-bag__roaster { font: 800 15px/1 var(--body); letter-spacing: .18em; fill: #3B2A1E; }
.cg-bag__sub { font: 700 7.5px/1 var(--body); letter-spacing: .3em; fill: #8A6A4E; }
.cg-bag__lines text { font: 700 13.5px/1 var(--body); fill: #3B2A1E; }
.cg-bag__lines .cg-bag__n { font: 800 10px/1 var(--body); fill: #fff; }
.cg-bag__notes { font: 600 italic 11px/1 var(--body); fill: #8A6A4E; }

/* Sections */
.cg-section { padding: clamp(46px, 7vw, 84px) 0; }
.cg-section--tint { background: var(--cream-deep); }
.cg-step {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--coral-deep); margin: 0 0 .5em;
}
.cg-intro { max-width: 58ch; margin-bottom: 1.6em; }
.cg-note { font-size: .9rem; color: var(--ink-muted); background: var(--beige); border-radius: 12px; padding: .7em 1em; margin: .8em 0 0; }
.cg-tip { margin-top: 18px; }
.cg-small { font-size: .85rem; max-width: 70ch; margin: 22px auto 0; }

/* Step 1: the styles, on one spectrum */
.cg-spectrum {
  height: 12px; border-radius: 999px; background: var(--cg-spectrum); margin: 0 0 12px;
  display: flex; justify-content: space-between; position: relative;
}
.cg-spectrum span {
  position: absolute; top: 18px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint);
}
.cg-spectrum span:last-child { right: 0; }
.cg-styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
@media (max-width: 900px) { .cg-styles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .cg-styles { grid-template-columns: 1fr; } }
.cg-style {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  background: var(--card); border: 2px solid transparent; border-radius: var(--r-card); padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft); cursor: pointer; color: var(--ink); font: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cg-style:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.cg-style[aria-checked="true"] { border-color: var(--ink); box-shadow: var(--shadow-lift); }
.cg-style[aria-checked="true"] .cg-style__name::after { content: " ✓"; color: var(--coral-deep); }
.cg-style__icon svg { width: 46px; height: 46px; display: block; margin-bottom: 4px; }
.cg-style__name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.cg-style__notes { color: var(--ink-muted); font-size: .92rem; min-height: 2.6em; }
.cg-style__for { font-size: .86rem; color: var(--ink-muted); margin-top: 6px; border-top: 1px dashed var(--beige-deep); padding-top: 8px; width: 100%; }
.cg-meter { display: flex; align-items: center; justify-content: space-between; width: 100%; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.cg-meter i { display: inline-flex; gap: 4px; font-style: normal; }
.cg-meter b { width: 14px; height: 6px; border-radius: 3px; background: var(--beige); }
.cg-meter b.on { background: var(--ink-muted); }

.cg-journal {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--card); border-radius: var(--r-tile); padding: 12px 16px; margin: 0 0 22px; box-shadow: var(--shadow-soft);
}
.cg-journal img { border-radius: 10px; }
.cg-journal p { margin: 0; flex: 1; min-width: 220px; }

/* Step 2: the ladder of clues, bars sized by weight */
.cg-ladder { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cg-clue details { background: var(--card); border-radius: var(--r-tile); box-shadow: var(--shadow-soft); overflow: hidden; }
.cg-clue summary {
  display: grid; grid-template-columns: 34px auto 1fr auto; column-gap: 12px; row-gap: 8px;
  grid-template-areas: "n title tag sign" "n bar bar bar";
  align-items: center; padding: 14px 18px; cursor: pointer; list-style: none;
}
.cg-clue summary::-webkit-details-marker { display: none; }
.cg-clue summary::after { content: "+"; grid-area: sign; font-weight: 800; color: var(--ink-faint); font-size: 1.2rem; line-height: 1; }
.cg-clue details[open] summary::after { content: "\2013"; }
.cg-clue__n {
  grid-area: n; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.cg-clue__title { grid-area: title; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.cg-clue__tag { grid-area: tag; font-size: .8rem; color: var(--ink-muted); font-weight: 700; }
.cg-clue__bar { grid-area: bar; height: 8px; border-radius: 999px; background: var(--beige); position: relative; overflow: hidden; }
.cg-clue__bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c); border-radius: 999px; }
.cg-clue__body { padding: 0 18px 18px 64px; }
@media (max-width: 560px) { .cg-clue__body { padding-left: 18px; } }
.cg-clue__body p { margin: 0 0 .6em; }
.cg-roast { display: flex; gap: 6px; margin: 4px 0 12px; }
.cg-roast span {
  flex: 1; text-align: center; padding: .55em 0; border-radius: 10px; background: var(--r); color: #fff;
  font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.cg-roast span:first-child { color: #3B2A1E; }
.cg-alt {
  display: flex; justify-content: space-between; gap: 10px; margin: 4px 0 12px; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(90deg, #E9DCC8, #D8E7E8); font-size: .82rem; font-weight: 700; color: #3B2A1E;
}
.cg-alt span:last-child { text-align: right; }
.cg-grid4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.cg-mini { background: var(--cream); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.cg-mini b { font-size: .95rem; }
.cg-mini span { font-size: .86rem; color: var(--ink-muted); }

.cg-wildcard {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 18px; padding: 18px 20px; border-radius: var(--r-card);
  background: linear-gradient(120deg, rgba(194, 86, 154, .14), rgba(140, 90, 214, .14)); border: 2px dashed rgba(181, 85, 155, .45);
}
.cg-wildcard h3 { margin: 0 0 .3em; }
.cg-wildcard p { margin: 0; color: var(--ink-muted); }
.cg-wildcard__icon {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #C2569A, #8C5AD6); color: #fff; font-size: 1.2rem;
}

/* Step 3: the decoder */
.cg-decoder { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: clamp(16px, 3vw, 26px); }
.cg-examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.cg-decoder__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(18px, 3vw, 32px); align-items: start; }
@media (max-width: 860px) { .cg-decoder__grid { grid-template-columns: 1fr; } }
.cg-field { margin-bottom: 16px; }
.cg-field__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cg-field__head .faint { font-size: .82rem; }
.cg-field__n {
  width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--cream);
  display: inline-grid; place-items: center; font-size: .75rem; font-weight: 800; align-self: center;
}
.cg-field__n--notes { background: var(--cg-kraft); color: #fff; }
.cg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cg-chip {
  border: 2px solid var(--beige-deep); background: transparent; color: var(--ink); font: inherit; font-size: .86rem; font-weight: 700;
  padding: .38em .85em; border-radius: 999px; cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.cg-chip:hover { border-color: var(--ink-faint); }
.cg-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.cg-chip--example { border-style: dashed; }
.cg-chip--example:hover { background: var(--beige); }

.cg-result {
  position: sticky; top: 84px; background: var(--cream); border-radius: var(--r-tile); padding: 18px 18px 16px;
}
@media (max-width: 860px) { .cg-result { position: static; } }
.cg-result h3 { margin: 0 0 10px; font-size: 1.6rem; }
.cg-result__kicker { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 4px; }
.cg-result__style { color: var(--c); }
.cg-meterbar { position: relative; padding: 34px 0 26px; margin: 4px 0 8px; }
.cg-meterbar__track { height: 14px; border-radius: 999px; background: var(--cg-spectrum); }
.cg-meterbar { display: grid; grid-template-columns: repeat(4, 1fr); }
.cg-meterbar__track { grid-column: 1 / -1; grid-row: 1; }
.cg-meterbar__label { grid-row: 2; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); text-align: center; margin-top: 8px; }
.cg-mark { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; transition: left .45s cubic-bezier(.34, 1.36, .64, 1); }
.cg-mark span { font-size: .7rem; font-weight: 800; padding: .15em .55em; border-radius: 999px; white-space: nowrap; }
.cg-mark--you { top: 0; }
.cg-mark--you span { background: var(--ink); color: var(--cream); }
.cg-mark--you::after { content: ""; width: 0; height: 0; border: 6px solid transparent; border-top-color: var(--ink); }
.cg-mark--bag { top: 30px; }
.cg-mark--bag::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 4px solid var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.cg-mark--bag span { display: none; }
.cg-verdict { font-weight: 800; border-radius: 12px; padding: .65em .9em; margin: 4px 0 6px; }
.cg-verdict--good { background: color-mix(in srgb, var(--mint) 30%, var(--card)); }
.cg-verdict--warn { background: color-mix(in srgb, var(--butter) 40%, var(--card)); }
.cg-verdict--bad { background: color-mix(in srgb, var(--coral) 32%, var(--card)); }
.cg-why { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.cg-why li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.cg-why__dir {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem;
  background: var(--beige); color: var(--ink-muted);
}
.cg-why--up .cg-why__dir { background: #F3D7E8; color: #9A3D7E; }
.cg-why--down .cg-why__dir { background: #EADBC9; color: #6B4123; }
.cg-result .cg-small { margin: 10px 0 12px; }

/* Shortcuts, checklist, CTA */
.cg-shortcuts .card h3 { margin-top: 0; }
.cg-checklist { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.cg-checklist label {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card); padding: 12px 14px; border-radius: var(--r-tile);
  box-shadow: var(--shadow-soft); cursor: pointer;
}
.cg-checklist input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--coral-deep); }
.cg-checklist input:checked + * , .cg-checklist label:has(input:checked) { color: var(--ink-muted); }
.cg-cta { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--coral) 14%, transparent)); }

@media (prefers-reduced-motion: reduce) {
  .cg-style, .cg-mark { transition: none; }
}
/* A light tile behind each style icon, so the roasty browns read on dark cards too. */
.cg-style__icon { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: #F6EEE4; margin-bottom: 4px; }
.cg-style__icon svg { width: 40px; height: 40px; margin: 0; }
