/* A place page (/eat/<town>/<slug>/), ep-. Joins site.css after eat.css (.eat-h2, .eat-b, the report dialog) and
   happyhour.css (.hh-card inside the happy hour block). Live states: open = sage green, soon = sun, happy hour = amber. */
.ph.ep-hero { padding-bottom: var(--sp-32); background: radial-gradient(70% 80% at 92% 0%, rgba(239, 161, 58, .22), transparent 62%), var(--paper); }
.ph.ep-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); /* type-ok: display */ max-width: 16ch; margin: var(--sp-12) 0 var(--sp-8); overflow-wrap: anywhere; }
.ep-crumbs { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-8); align-items: center; font: 600 .82rem var(--sans); }
.ep-crumbs a { color: var(--tile); text-decoration: none; white-space: nowrap; padding: var(--sp-4) 0; }
.ep-crumbs a:hover { text-decoration: underline; }
.ep-crumbs span { color: var(--ink-3); }
.ep-kind { margin: 0; font: 500 1.12rem var(--sans); color: var(--ink-2); display: flex; align-items: center; gap: var(--sp-8); flex-wrap: wrap; }
.ep-line { margin: var(--sp-8) 0 0; max-width: 60ch; font-size: 1.12rem; line-height: 1.45; color: var(--ink-2); }
.ep-links { margin: var(--sp-12) 0 0; font-weight: 600; }

/* live pills under the name */
.ep-hhsum { margin: var(--sp-8) 0 0; font: 600 1rem/1.4 var(--sans); }
.ep-hhsum a { color: var(--ink); text-decoration: none; }
.ep-hhsum a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ep-hhsum span { margin-right: var(--sp-8); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #6b3d00; }
.ep-status { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin: var(--sp-16) 0 0; }
.ep-status:not(:has(> :not([hidden]))) { display: none; }
.ep-now { display: inline-flex; align-items: center; gap: var(--sp-8); margin: 0; padding: .55em 1.05em .55em .9em; border-radius: var(--r-ctl); background: #fffaf2; border: 1px solid var(--line);  font: 600 1rem/1.2 var(--sans); color: var(--ink); text-decoration: none; }
.ep-now[hidden] { display: none; }
.ep-now-dot { flex: none; position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.ep-now.is-open .ep-now-dot { background: #3f7d47; box-shadow: 0 0 0 4px rgba(63, 125, 71, .16); }
.ep-now.is-open .ep-now-dot::after, .ep-now.is-live .ep-now-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; color: #3f7d47; animation: ep-ping 2s var(--ease) infinite; }
.ep-now.is-soon .ep-now-dot { background: var(--sun); box-shadow: 0 0 0 4px rgba(239, 161, 58, .2); }
.ep-now.is-closed { color: var(--ink-2); }
.ep-now-hh { background: #fde9c7; border-color: rgba(122, 70, 0, .14); color: #6b3d00; }
.ep-now-hh .ep-now-dot { background: var(--sun); }
.ep-now-hh.is-live .ep-now-dot::after { color: var(--sun); }
a.ep-now:hover { box-shadow: var(--shadow-2); }
@keyframes ep-ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(2); opacity: 0; } }

.ep-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-32); }
.ep-main, .ep-side { min-width: 0; }

/* the visit card */
.ep-card { padding: clamp(20px, 3.4vw, 28px); border-radius: var(--radius); background: #fffaf2;  border: 1px solid var(--line); }
.ep-k { margin: 0 0 var(--sp-8); font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--tile); }
.ep-addr { margin: 0; font: 400 clamp(1.55rem, 4.2vw, 2rem)/1.15 var(--serif); /* type-ok: display */ color: var(--ink); overflow-wrap: anywhere; }
.ep-addr span { display: block; margin-top: var(--sp-4); font: 500 1rem var(--sans); color: var(--ink-3); }
.ep-acts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); margin: var(--sp-16) 0 0; }
.ep-act { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--sp-12); min-height: 58px; padding: var(--sp-8) var(--sp-16); border-radius: var(--radius); background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.ep-act:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--ink-3); }
.ep-act svg { grid-row: span 2; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; color: var(--tile); }
.ep-act-k { font: 600 .75rem/1.1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ep-act-v { font: 600 1rem/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-act-go { grid-column: 1 / -1; background: var(--tile); border-color: var(--tile); color: #fffaf2; }
.ep-act-go:hover { border-color: var(--tile-deep); background: var(--tile-deep); }
.ep-act-go svg { color: #fffaf2; }
.ep-act-go .ep-act-k { color: #fffaf2; }
.ep-act:nth-child(2):last-child { grid-column: 1 / -1; }

.ep-hours { margin: var(--sp-24) 0 0; padding: var(--sp-16) 0 0; border-top: 1px dashed var(--line); }
/* the week of hours: seven columns on one time axis; a bar is when it's open, today's column is tinted, and (fresh
   hours only, set by eatplace.js) a tile-red line marks the time now */
.ep-wk-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-4) var(--sp-16); }
.ep-wk-head .ep-k { margin: 0; }
.ep-wk-sum { margin: 0; font: 600 .9rem/1.3 var(--sans); color: var(--ink); }
.ep-wk { --wk-h: 172px; --wk-l: 1.7rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-8); margin: var(--sp-12) 0 0; }
.ep-wk-ax { position: relative; height: var(--wk-h); margin-top: var(--wk-l); min-width: 2.9em; font: 500 .75rem/1 var(--sans); color: var(--ink-3); }
.ep-wk-ax span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.ep-wk-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-8); }
.ep-wk-days > li { display: grid; grid-template-rows: var(--wk-l) var(--wk-h) auto; justify-items: center; min-width: 0; }
.ep-wk-l { align-self: start; padding: 2px var(--sp-4) 0; font: 600 .75rem/1 var(--sans); color: var(--ink-2); }
.ep-wk-col { position: relative; width: 100%; border-radius: 9px; background: color-mix(in srgb, var(--paper-2) 75%, transparent); overflow: hidden; }
.ep-wk-g { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.ep-wk-col.wk-off { background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(24, 34, 46, .05) 5px 6px), var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.ep-wk-col.wk-note { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.ep-wk-col.wk-off .ep-wk-g, .ep-wk-col.wk-note .ep-wk-g { display: none; }
.ep-wk-bar { position: absolute; left: 20%; right: 20%; min-height: 4px; border-radius: 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--sea) 78%, #fff), var(--sea)); transform-origin: top; animation: ep-grow .6s var(--ease) both; }
.ep-wk-days > li:nth-child(2) .ep-wk-bar { animation-delay: .03s; } .ep-wk-days > li:nth-child(3) .ep-wk-bar { animation-delay: .06s; }
.ep-wk-days > li:nth-child(4) .ep-wk-bar { animation-delay: .09s; } .ep-wk-days > li:nth-child(5) .ep-wk-bar { animation-delay: .12s; }
.ep-wk-days > li:nth-child(6) .ep-wk-bar { animation-delay: .15s; } .ep-wk-days > li:nth-child(7) .ep-wk-bar { animation-delay: .18s; }
.ep-wk-t { margin-top: var(--sp-8); font: 500 .75rem/1.25 var(--sans); color: var(--ink-2); text-align: center; overflow-wrap: anywhere; }
.ep-wk-t.wk-off { font-style: italic; color: var(--ink-2); }
a.ep-wk-t.wk-note { font-weight: 600; color: var(--tile-deep); text-decoration: underline; text-underline-offset: 2px; }
.ep-wk-days > li.is-today .ep-wk-l { color: var(--tile-deep); box-shadow: inset 0 -2px 0 var(--tile); padding-bottom: var(--sp-4); }
.ep-wk-days > li.is-today .ep-wk-col { background: color-mix(in srgb, var(--sun-2) 38%, transparent); }
.ep-wk-days > li.is-today .ep-wk-col.wk-off { background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(24, 34, 46, .07) 5px 6px), color-mix(in srgb, var(--sun-2) 30%, transparent); }
.ep-wk-days > li.is-today .ep-wk-t { color: var(--ink); font-weight: 600; }
.ep-wk-now { position: absolute; left: 0; right: 0; height: 2px; margin-top: -1px; background: var(--tile-deep); z-index: 2; }
/* no hours to draw (every day closed or in the venue's words): the seven days as one row, no axis */
.ep-wk-flat { --wk-h: 0px; grid-template-columns: minmax(0, 1fr); }
.ep-wk-flat .ep-wk-col { visibility: hidden; }
.ep-wk-notes { list-style: none; margin: var(--sp-12) 0 0; padding: 0; display: grid; gap: var(--sp-4); font-size: .9rem; color: var(--ink-2); }
.ep-wk-notes b { font-weight: 600; color: var(--ink); }
@media (max-width: 479px) {
  .ep-wk { --wk-h: 150px; gap: var(--sp-4); }
  .ep-wk-ax { min-width: 2.5em; font-size: .62rem; }
  .ep-wk-days { gap: var(--sp-4); }
  .ep-wk-l { font-size: .75rem; padding-inline: 1px; }
  .ep-wk-t { font-size: .62rem; letter-spacing: -.01em; }
  .ep-wk-bar { left: 16%; right: 16%; }
}
.ep-src { margin: var(--sp-8) 0 0; font-size: .82rem; color: var(--ink-3); }
.ep-src a { color: inherit; }

/* One fact per row: label left, the fact beside it, its source in small type underneath */
.ep-facts { list-style: none; margin: var(--sp-20) 0 0; padding: 0; border-top: 1px dashed var(--line); display: grid; }
.ep-facts li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: var(--sp-16); row-gap: var(--sp-4); padding: var(--sp-12) 0; border-bottom: 1px solid var(--line); }
.ep-facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.ep-facts li > span { grid-row: 1 / span 2; padding-top: .3em; font: 600 .75rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ep-facts b { grid-column: 2; font-weight: 500; line-height: 1.45; color: var(--ink); }
.ep-facts small { grid-column: 2; font-size: .82rem; color: var(--ink-3); }
.ep-facts small a { color: inherit; }
@media (max-width: 479px) {
  .ep-facts li { grid-template-columns: minmax(0, 1fr); }
  .ep-facts li > span { grid-row: auto; padding-top: 0; }
  .ep-facts b, .ep-facts small { grid-column: 1; }
}
.ep-fixrow { margin: var(--sp-16) 0 0; }

/* happy hour */
.ep-block .eat-h2 { margin-top: var(--sp-48); }
.ep-hhb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-8) var(--sp-16); margin: var(--sp-48) 0 var(--sp-16); }
.ep-hhb-head .eat-h2 { margin: 0; }
.ep-hh-now { margin: 0; align-self: center; font: 600 .9rem/1.2 var(--sans); padding: .45em .85em; border-radius: var(--r-tag); background: var(--paper-2); color: var(--ink-2); }
.ep-hh-now[hidden] { display: none; }
.ep-hh-now.is-live { background: #fde9c7; color: #6b3d00; }
.ep-hh-now.is-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: var(--sp-8); border-radius: 50%; background: var(--sun); vertical-align: 1px; }
.ep-hhb-in { display: grid; gap: var(--sp-16); }
.hh-grid.ep-hh { grid-template-columns: 1fr; }
.ep-hh .hh-name, .ep-hh .hh-addr, .ep-hh .hh-status { display: none; }

/* the week: seven columns, the bar is when it runs; today's column carries a line at the current time */
.ep-hhw { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-8); padding: var(--sp-16) var(--sp-16) var(--sp-16); border-radius: var(--radius); background: #fffaf2; border: 1px solid var(--line);  }
.ep-hhw-ax { display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-24) 0 0; font: 500 .75rem/1 var(--sans); color: var(--ink-3); text-align: right; white-space: nowrap; }
.ep-hhw-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-8); }
.ep-hhw-d { display: grid; grid-template-rows: auto 1fr; gap: var(--sp-8); justify-items: center; }
.ep-hhw-l { font: 600 .75rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: var(--sp-4) 0; }
.ep-hhw-bar { position: relative; width: 100%; max-width: 34px; height: 104px; border-radius: 9px; background: var(--paper-2); overflow: hidden; }
.ep-hhw-d:not(.has) .ep-hhw-bar { background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(24, 34, 46, .05) 5px 6px), var(--paper); border: 1px dashed var(--line); }
.ep-hhw-bar i { position: absolute; left: 0; right: 0; top: var(--a); bottom: calc(100% - var(--b)); min-height: 4px; border-radius: 7px; background: linear-gradient(180deg, var(--sun-2), var(--sun)); transform-origin: top; animation: ep-grow .7s var(--ease) both; }
.ep-hhw-bar i.is-vague { background: repeating-linear-gradient(180deg, var(--sun-2) 0 6px, transparent 6px 10px); }
.ep-hhw-d:nth-child(2) i { animation-delay: .04s; } .ep-hhw-d:nth-child(3) i { animation-delay: .08s; } .ep-hhw-d:nth-child(4) i { animation-delay: .12s; }
.ep-hhw-d:nth-child(5) i { animation-delay: .16s; } .ep-hhw-d:nth-child(6) i { animation-delay: .2s; } .ep-hhw-d:nth-child(7) i { animation-delay: .24s; }
@keyframes ep-grow { from { transform: scaleY(0); } }
.ep-hhw-d.is-today .ep-hhw-l { color: var(--tile); box-shadow: inset 0 -2px 0 var(--tile); }
.ep-hhw-d.is-today .ep-hhw-bar { box-shadow: 0 0 0 2px var(--ink); }
.ep-hhw-d.is-today .ep-hhw-bar i { background: linear-gradient(180deg, var(--sun), var(--tile-2)); }
.ep-hhw.has-now .ep-hhw-d.is-today .ep-hhw-bar::after { content: ""; position: absolute; left: -2px; right: -2px; top: var(--now); height: 2px; margin-top: -1px; background: var(--tile-deep); }

/* the place in a Savvy Picks guide, in the guide's words */
.ep-gcard { margin-top: var(--sp-20); padding: clamp(20px, 3.4vw, 26px); border-radius: var(--radius); background: #fffaf2;  border: 1px solid var(--line); scroll-margin-top: 100px; }
.ep-gcard-h { margin: 0; display: grid; gap: var(--sp-8); }
.ep-gcard-k { display: flex; align-items: center; gap: var(--sp-8); font: 600 .82rem/1.2 var(--sans); letter-spacing: .02em; color: var(--ink-2); }
.ep-rank { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tile); color: #fffaf2; font: 700 .9rem/1 var(--sans); font-variant-numeric: lining-nums; }
.ep-gcard-t { font: 400 var(--h3-card)/1.15 var(--serif); color: var(--ink); }
.ep-gcard > p { margin: var(--sp-8) 0 0; color: var(--ink-2); line-height: 1.5; }
.ep-gcard-more { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-4) var(--sp-16); padding-top: var(--sp-12); border-top: 1px dashed var(--line); margin-top: var(--sp-16) !important; }
.ep-gcard-more > a { font-weight: 600; color: var(--sea); text-decoration: none; }
.ep-gcard-more > a:hover { text-decoration: underline; }
.ep-gcard-src { font-size: .82rem; color: var(--ink-3); }
.ep-gcard-src a { color: inherit; }
.ep-gpill { display: inline-flex; align-items: center; margin: 0; padding: .55em 1.05em; border-radius: var(--r-ctl); background: #fffaf2; border: 1px solid var(--line);  font: 600 1rem/1.2 var(--sans); color: var(--tile-deep); text-decoration: none; }
.ep-gpill:hover { box-shadow: var(--shadow-2); }

/* history */
.ep-events { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); }
.ep-events li { display: flex; gap: var(--sp-16); }
.ep-events span { min-width: 7.5em; color: var(--ink-3); font-size: .9rem; }
.ep-was { margin: 0; } /* Before it was here: name and trade on one line, under the year column */
.ep-was-note { margin: var(--sp-12) 0 0; color: var(--ink-3); font-size: .9rem; }
.ep-more { margin: var(--sp-12) 0 0; font-weight: 600; }
.ep-more a, .ep-back a { color: var(--sea); text-decoration: none; }
.ep-more a:hover, .ep-back a:hover { text-decoration: underline; }

/* map and nearby */
.ep-map { height: 240px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); background: var(--paper-2); }
.ep-pin { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--tile); border: 3px solid #fffaf2; box-shadow: 0 0 0 1px var(--ink), 0 4px 10px rgba(0, 0, 0, .25); }
.ep-side-h { font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--tile); margin: var(--sp-24) 0 var(--sp-12); }
/* phones: a row of cards that scrolls sideways inside its own box; wide screens: a list beside the page */
.ep-near { position: relative; list-style: none; margin: 0; padding: 2px 2px var(--sp-8); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 78%); gap: var(--sp-8); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.ep-near li { scroll-snap-align: start; min-width: 0; }
.ep-near a { height: 100%; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-12); padding: var(--sp-12) var(--sp-16) var(--sp-12) var(--sp-12); border-radius: var(--radius); background: #fffaf2; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.ep-near a:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--ink-3); }
.ep-near-t { display: grid; place-items: center; align-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--paper-2); font: 600 .75rem/1 var(--sans); letter-spacing: .02em; color: var(--ink-2); text-transform: uppercase; }
.ep-near-t b { font: 700 1.12rem/1.1 var(--sans); letter-spacing: 0; color: var(--ink); text-transform: none; }
.ep-near-t.is-door { font-size: .62rem; text-align: center; line-height: 1.15; color: var(--tile-deep); background: color-mix(in srgb, var(--tile) 12%, transparent); padding: 0 var(--sp-4); }
.ep-near-b { display: grid; gap: 2px; min-width: 0; }
.ep-near-n { font: 600 1rem/1.25 var(--sans); overflow-wrap: anywhere; }
.ep-near a:hover .ep-near-n { color: var(--tile); }
.ep-near-k { font-size: .82rem; color: var(--ink-3); }
.ep-near-hh { color: #7a4600; font-weight: 600; }
.ep-near-o { font: 600 .75rem var(--sans); color: var(--ink-3); }
.ep-near-o[hidden] { display: none; }
.ep-near-o::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: var(--sp-8); border-radius: 50%; background: currentColor; vertical-align: 1px; }
.ep-near-o.is-open { color: #3f7d47; }
.ep-near-o.is-soon { color: #9a5b00; }
.ep-back { margin: var(--sp-16) 0 0; font-weight: 600; }

@media (min-width: 480px) {
  .ep-acts { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 560px) {
  .ep-hhb-in:has(.ep-hhw) { grid-template-columns: minmax(250px, .9fr) minmax(0, 1.1fr); align-items: start; }
}
@media (min-width: 700px) {
  .ep-grid { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; gap: var(--sp-48); }
  .ep-side { position: sticky; top: 100px; }
  .ep-map { height: 280px; }
  .ep-near { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; padding: 0; scroll-snap-type: none; gap: var(--sp-8); }
  .ep-hhb-in:has(.ep-hhw) { grid-template-columns: 1fr; }
}
@media (min-width: 1100px) {
  .ep-acts { display: flex; }
  .ep-act { flex: 1 1 0; min-width: 0; }
}
@media (min-width: 1000px) {
  .ep-hhb-in:has(.ep-hhw) { grid-template-columns: minmax(250px, .85fr) minmax(0, 1.15fr); }
}
@media (prefers-reduced-motion: reduce) {
  .ep-now-dot::after { animation: none !important; display: none; }
  .ep-hhw-bar i, .ep-wk-bar { animation: none; }
  .ep-act, .ep-near a { transition: none; }
  .ep-act:hover, .ep-near a:hover { transform: none; }
}
.ep-since { font: 600 .82rem/1 var(--sans); letter-spacing: .04em; color: var(--tile-deep); padding: var(--sp-4) var(--sp-8); border-radius: var(--r-tag); background: var(--paper-2); }
.ep-since-f small a { margin-left: var(--sp-4); }

/* Green means the venue's own hours. Map-listed hours get the same words ("Listed hours: open now") on a plain dot. */
.ep-now[data-venue-hours="0"].is-open .ep-now-dot { background: var(--ink-3); box-shadow: none; }
.ep-now[data-venue-hours="0"].is-open .ep-now-dot::after { content: none; }
.ep-near-o[data-venue-hours="0"].is-open { color: var(--ink-3); }
