/* ---------------------------------------------------------------------------
   The Source — menu boards, coffee cards, elevation axis, tap wall, wine.

   Paired with mu-plugins/013-thesource-boards.php. Every class below is
   emitted by that file; a class added there and not styled here renders
   unstyled on a live page, and a rule here with no emitter is dead weight.

   Loaded only on pages that actually run one of the board shortcodes, from
   tsr_boards_need_css(). It inherits the palette and the motif from
   style.css, which is its declared dependency, so nothing here redefines a
   colour — it uses the custom properties.

   Shape language, unchanged from style.css: 0 radius, no shadows, structure
   from 1px rules and solid bars, and the only circle on the site is the disc
   off the wordmark's O.
   ------------------------------------------------------------------------- */

/* ========================================================== menu board == */

.tsr-board + .tsr-board{margin-top:clamp(1.75rem,3.5vw,2.75rem)}
.tsr-board{scroll-margin-top:calc(var(--tsr-stick-h,76px) + 4rem)}

.tsr-board__head{
  display:flex;flex-wrap:wrap;gap:.6rem 1.5rem;align-items:flex-end;
  justify-content:space-between;
  border-bottom:3px solid var(--ink);padding-bottom:.7rem;
}
.tsr-board__name{font-size:clamp(1.3rem,2.8vw,1.8rem)}
.tsr-board__lede{margin:.45rem 0 0;max-width:64ch;color:var(--body);font-size:.98rem;line-height:1.5}

/* The section's shared modifier line. It used to repeat under all nine
   espresso drinks; now it is said once, here, and only an item that differs
   from its neighbours carries its own .tsr-mi__mods. */
.tsr-board__mods{margin:.4rem 0 0;font-size:.88rem;color:var(--muted);line-height:1.45;max-width:70ch}
.tsr-board__mods span{
  font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:600;
  color:var(--ink);
}

/* The per-section order link. A ghost button would be four buttons down a
   menu page shouting at once; a ruled link reads as part of the board. */
.tsr-board__order{
  font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:600;font-size:.98rem;
  color:var(--claret);white-space:nowrap;text-decoration:none;
  border-bottom:2px solid var(--wine);padding-bottom:2px;
  display:inline-flex;align-items:center;min-height:44px;
}
.tsr-board__order:hover{color:var(--ink);border-bottom-color:var(--ink)}

/* ── Two columns from 52rem ───────────────────────────────────────────────
   A menu row is a name, a short line of description and a price: about 420px
   of useful width. Run as one column inside an 84rem page that is 1,100px of
   empty measure per row, and 33 rows of it made this board 5,462px tall on a
   laptop. Two columns is both denser AND easier to read, because the measure
   stops being twice what the text wants.

   `align-items:start` so a two-line row does not stretch its neighbour, and
   a column gap drawn as a rule rather than air, which is the device the rest
   of the site uses for a grid. */
.tsr-mlist{list-style:none;margin:0;padding:0}
@media (min-width:52rem){
  .tsr-mlist{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:clamp(2rem,4vw,3.5rem);
    /* stretch, NOT start. With align-items:start each row ends at its own
       content, so the hairline under a one-line item sits ten pixels above the
       hairline beside it and the board reads as two lists that happen to be
       next to each other. Stretched, the rules line up across the gutter and
       it reads as one table — which is what a menu is. */
    align-items:stretch;
  }
  .tsr-mlist > li{align-content:start}
  /* The last row of a 2-up grid has one or two cells; :last-child alone would
     leave a dangling rule under an odd-numbered left-hand item. */
  .tsr-mlist > :nth-last-child(-n+2):nth-child(odd),
  .tsr-mlist > :nth-last-child(-n+2):nth-child(odd) + li{border-bottom:0}
}

/* A menu row. Name and description on the left, the price run hard right,
   a hairline between rows. No dotted leaders — they belong to a different
   kind of restaurant and they fall apart at two sizes per item. */
.tsr-mi{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem 1.25rem;
  align-items:baseline;padding:.8rem 0;border-bottom:1px solid var(--rule);
}
.tsr-mi:last-child{border-bottom:0}
.tsr-mi__name{
  font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:600;
  font-size:1.1rem;line-height:1.2;letter-spacing:-.01em;color:var(--ink);margin:0;
  display:flex;align-items:baseline;gap:.6rem;flex-wrap:wrap;
}
.tsr-mi__tag{
  font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;
  color:var(--paper);background:var(--wine);padding:.2rem .45rem;line-height:1.3;
}
.tsr-mi__desc{margin:.3rem 0 0;font-size:.96rem;line-height:1.45;color:var(--body);max-width:58ch}
.tsr-mi__notes{
  margin:.45rem 0 0;font-size:.9rem;color:var(--muted);
  font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:500;
}
/* The "oat milk +75c" line. Deliberately quieter than the description: it is
   reference, read once, and it is under every row. */
.tsr-mi__mods{margin:.4rem 0 0;font-size:.88rem;color:var(--muted);line-height:1.45}

.tsr-mi__price{text-align:right;display:flex;flex-direction:column;gap:.3rem;align-items:flex-end}
.tsr-mi__pair{display:flex;align-items:baseline;gap:.6rem;justify-content:flex-end}
.tsr-mi__sz{font-size:.86rem;color:var(--muted);min-width:2.6rem;text-align:right}
.tsr-mi__p{
  font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:600;
  /* Wide enough for "$98.00" so a column of two- and three-figure prices
     stays flush right without a table. */
  font-size:1.1rem;color:var(--ink);min-width:4.2rem;text-align:right;
}

/* ── The price column stays a column, at every width ──────────────────────
   This used to collapse to one column below 30rem, which put the price on its
   own line UNDER the description. That is an extra row on every one of 33
   items — about 1,300px of phone scroll — to move a number four inches left,
   and it breaks the one thing a menu is for: running your eye down a price
   column. Two columns hold fine at 320px; the price column just gets narrower
   and the name wraps, which is what a printed menu does too. */
@media (max-width:34rem){
  .tsr-mi{gap:.3rem .75rem;padding:.7rem 0}
  .tsr-mi__p{font-size:1rem;min-width:3.4rem}
  .tsr-mi__sz{font-size:.8rem;min-width:2.1rem}
  .tsr-mi__desc{font-size:.92rem}
  .tsr-board__name{font-size:1.25rem}
}

/* The honest note about whose prices these are. A left-ruled aside, the same
   device as .tsr-note, because it is the same kind of statement. */
.tsr-pricenote{
  margin-top:clamp(1.4rem,2.8vw,2rem);padding:.95rem 1.15rem;
  border-left:4px solid var(--wine);background:var(--paper);
}
.tsr-band--paper .tsr-pricenote{background:var(--sage)}
.tsr-pricenote p{margin:0;font-size:.98rem;line-height:1.6;max-width:70ch;color:var(--body)}

/* ====================================================== coffee cards ==== */

/* One card on its own must not stretch to a third of the row and leave two
   empty columns beside it; the 605 Blend is rendered alone above the five. */
.tsr-origins--solo{grid-template-columns:minmax(0,1fr)!important}
@media (min-width:60rem){
  .tsr-origins--solo .tsr-origin__in{
    display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);
    gap:0 clamp(2rem,4vw,3.5rem);align-items:start;
  }
  /* The top row and the notes stay in the left column; the cupping chart and
     the sourcing record stack in the right, so a solo card reads as a spread
     rather than one very long column. */
  .tsr-origins--solo .tsr-origin__top,
  .tsr-origins--solo .tsr-notes,
  .tsr-origins--solo .tsr-origin__cup,
  .tsr-origins--solo .tsr-origin__about{grid-column:1}
  .tsr-origins--solo .tsr-cup{grid-column:2;grid-row:1/3;margin-top:0}
  .tsr-origins--solo .tsr-spec{grid-column:2;margin-top:1.5rem}
  .tsr-origins--solo .tsr-origin__buy{grid-column:1/-1}
}

/* Tasting notes as chips. Their own published words, and the most quotable
   thing on the page, so they are lifted out of the paragraph. */
.tsr-notes{list-style:none;margin:.8rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.35rem}
.tsr-notes li{
  font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:500;font-size:.85rem;
  color:var(--ink);background:transparent;box-shadow:inset 0 0 0 1.5px var(--ink);
  padding:.22rem .5rem;line-height:1.3;
}
/* The folded origin note. A disclosure, drawn like everything else here:
   square, no shadow, and the marker is the bar field rather than a triangle. */
.tsr-origin__more{margin:.7rem 0 0}
.tsr-origin__more > summary{
  cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:.5rem;
  min-height:38px;font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:500;
  font-size:.9rem;color:var(--claret);
}
.tsr-origin__more > summary::-webkit-details-marker{display:none}
.tsr-origin__more > summary::after{
  content:"";width:9px;height:9px;flex:0 0 auto;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:translateY(-2px) rotate(45deg);transition:transform .15s linear;
}
.tsr-origin__more[open] > summary::after{transform:translateY(2px) rotate(-135deg)}
.tsr-origin__more > summary:hover{color:var(--ink)}
.tsr-origin__more p{margin:.5rem 0 0}
@media (prefers-reduced-motion:reduce){.tsr-origin__more > summary::after{transition:none}}
@media print{.tsr-origin__more > summary{display:none}.tsr-origin__more > p{margin-top:.7rem}}
.tsr-origin__buy{margin:1rem 0 0}
.tsr-btn--sm{min-height:44px;padding:.6rem 1.1rem;font-size:.94rem}

/* ---- the cupping chart ----
   Five squares a row, filled to the score. It is the bar field off the
   wordmark used as a scale, which is why it is squares and not a dot or a
   rounded meter. The scores are read off their own tasting notes — see the
   comment on tsr_coffees(). */
.tsr-cup{margin-top:1rem;padding-top:.95rem;border-top:1px solid var(--rule)}
.tsr-cup__cap{
  margin:0 0 .55rem;font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:600;
  font-size:.86rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);
}
.tsr-cup__row{display:grid;grid-template-columns:4.9rem 1fr;gap:.7rem;align-items:center;margin-bottom:.3rem}
.tsr-cup__row:last-child{margin-bottom:0}
.tsr-cup__lab{font-size:.9rem;color:var(--muted)}
.tsr-cup__scale{display:flex;gap:3px}
.tsr-cup__scale i{display:block;flex:1 1 0;height:9px;background:var(--rule);max-width:24px}
.tsr-cup__scale i.on{background:var(--ink)}

/* ======================================================= elevation axis = */
/* The axis itself lives in style.css (it is on the front page, which always
   loads it). Only the shortcode's additions are here. */
.tsr-axis__lab{flex-wrap:wrap}

/* ============================================================ tap wall == */

.tsr-tapwall__head{
  display:flex;flex-wrap:wrap;gap:1rem 1.5rem;
  align-items:flex-end;justify-content:space-between;
}
.tsr-tapwall__h{font-size:clamp(1.6rem,3.2vw,2.2rem);color:var(--paper)}
.tsr-tapwall__stamp{
  margin:0;font-size:.86rem;color:var(--dimsage);text-align:right;line-height:1.4;
}
.tsr-tapwall__stamp strong{color:var(--paper);font-weight:600}

/* Four rows of four: it is a wall, and the grid is the point. Taller cells
   than before, because each one now carries a style, an ABV and the brewery
   line that is the field they fill in. */
.tsr-tapgrid{grid-template-columns:repeat(4,minmax(0,1fr))}
.tsr-tap{min-height:104px;justify-content:flex-start}
.tsr-tap__s{
  font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:600;
  font-size:1.02rem;line-height:1.2;color:var(--paper);
}
.tsr-tap__meta{font-size:.84rem;color:var(--highlight)}
/* The empty slot, drawn as an empty slot. A dash would read as "none"; a
   dotted hairline reads as "type here", which is exactly what it is. */
.tsr-tap__brew{
  margin-top:auto;font-size:.8rem;color:var(--dimsage);line-height:1.3;
  border-top:1px dashed var(--rule-dark);padding-top:.45rem;
}
@media (max-width:52rem){.tsr-tapgrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:38rem){
  .tsr-tapgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tsr-tap{min-height:104px;padding:.8rem .7rem}
}

.tsr-tapnote{margin-top:1.1rem;padding-left:1.1rem;border-left:3px solid var(--dimsage)}
.tsr-tapnote p{margin:0;font-size:.95rem;line-height:1.6;max-width:68ch;color:var(--highlight)}
.tsr-tapnote strong{color:var(--paper)}

/* ============================================================ wine list = */

.tsr-wine__list{list-style:none;margin:1.1rem 0 0;padding:0;border-top:1px solid var(--rule)}
.tsr-wine__list li{
  display:grid;grid-template-columns:minmax(7rem,10rem) minmax(0,1fr) auto;
  gap:.3rem 1.5rem;align-items:baseline;
  padding:.7rem 0;border-bottom:1px solid var(--rule);
}
.tsr-wine__name{
  font-family:Jost,ui-sans-serif,system-ui,sans-serif;font-weight:600;
  font-size:1.1rem;color:var(--ink);
}
.tsr-wine__note{font-size:.98rem;color:var(--body)}
.tsr-wine__price{font-size:.86rem;color:var(--muted);white-space:nowrap}
.tsr-wine__ask{
  margin:1.4rem 0 0;padding-left:1.1rem;border-left:3px solid var(--wine);
  font-size:.95rem;line-height:1.6;color:var(--muted);max-width:66ch;
}
@media (max-width:34rem){
  .tsr-wine__list li{grid-template-columns:1fr}
  .tsr-wine__price{text-align:left}
}

@media print{
  .tsr-board__order,.tsr-pricenote,.tsr-tapnote,.tsr-origin__buy{display:none}
  .tsr-mi{break-inside:avoid}
  .tsr-origin{break-inside:avoid}
}

/* ------------------------------------------------- compact origin cards */
/* The home-page teaser. Name, price, tasting notes, one line of provenance.
   Everything else is on /coffee/, which is where the link goes — a teaser
   that reprints the page it is teasing is not a teaser, it is the page. */
.tsr-origins--compact{gap:1px;background:var(--rule);border:1px solid var(--rule)}
.tsr-band--sage .tsr-origins--compact{background:var(--rule);border-color:var(--rule)}
.tsr-origins--compact .tsr-origin{background:var(--paper)}
.tsr-band--sage .tsr-origins--compact .tsr-origin{background:var(--sage)}
.tsr-origins--compact .tsr-origin__bars{height:6px}
.tsr-origins--compact .tsr-origin__in{padding:.95rem 1.1rem 1.1rem}
.tsr-origins--compact .tsr-origin__name{font-size:1.14rem}
.tsr-origins--compact .tsr-notes{margin-top:.6rem}
.tsr-origin__line{
  margin:.7rem 0 0;padding-top:.6rem;border-top:1px solid var(--rule);
  font-size:.86rem;color:var(--muted);line-height:1.45;
}
.tsr-band--sage .tsr-origin__line{border-top-color:var(--dimsage)}

/* ---------------------------------------------- the spec, on a phone --- */
/* Three label/value rows is 85px to say three short things. Below 34rem the
   labels go and the values run as one line, which is how the compact card
   does it anyway — so a phone gets one component, not two. */
@media (max-width:34rem){
  .tsr-spec{display:block;font-size:.86rem;color:var(--muted);line-height:1.5}
  .tsr-spec dt{display:none}
  .tsr-spec dd{display:inline;text-align:left;font-weight:400;color:var(--muted)}
  .tsr-spec dd + dd::before{content:" \00B7  "}
  .tsr-origin__buy{margin-top:.85rem}
  .tsr-origin__buy .tsr-btn{width:100%}
}
