/* Front-page presentation layer.
 *
 * The brief: approachable, colourful, easy to
 * scan, with obvious doors into each part of the site. None of that is a reason
 * to change what the page is allowed to say -- every block here renders values
 * the view already vetted, and an empty block stays empty.
 *
 * Loaded only by graph/today.html, after today.css, so the proven calendar rows,
 * weekend grid, desk tiles and forecast keep their existing rules. */

:root{
  --door-navy:#123c56;--door-green:#2f6b4f;--door-red:#b31f2b;
  /* Every door clears WCAG AA against --hero-ink for its 12px note, which is
     the smallest text on the tile; the amber had to go darker than the brand
     amber to get there. */
  --door-amber:#855a05;--door-slate:#43606f;--door-plum:#6a3760;
  --hero-ink:#f7f4ec;
}

/* The front heading no longer has to carry the whole page: the doors and the
   feature do the inviting, so the deck can sit tighter above them. */
.front-heading{margin-bottom:18px}

/* 1. Practical strip: the day, then the official forecast, on one line. */
.practical-strip{display:grid;grid-template-columns:minmax(190px,auto) minmax(0,1fr);gap:14px;align-items:stretch;margin-bottom:22px}
.practical-day{display:flex;flex-direction:column;justify-content:center;gap:4px;margin:0;padding:12px 18px;background:var(--navy);color:var(--hero-ink);border-radius:12px}
.practical-day strong{font:700 30px/1 var(--display);letter-spacing:.02em}
.practical-day span{font:11px var(--mono);letter-spacing:.09em;text-transform:uppercase;color:#cfdbe2}
.practical-strip .compact-weather{margin-bottom:0;border-radius:12px}

/* 2. Category doors. Six existing routes, given a front door each. */
.front-doors{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:30px}
.front-door{display:flex;flex-direction:column;gap:5px;min-height:96px;padding:15px 16px;border-radius:12px;color:var(--hero-ink);background:var(--door-navy);position:relative;transition:transform .12s}
.front-door strong{font:700 21px/1.05 var(--display);letter-spacing:.015em}
.front-door small{font-size:12px;line-height:1.35;color:#e6edf1}
.front-door>span{position:absolute;right:14px;bottom:12px;font-size:17px;line-height:1}
.front-door:hover,.front-door:focus-visible{color:var(--amber);transform:translateY(-2px)}
.front-door:focus-visible{outline:3px solid var(--navy);outline-offset:3px}
.door-green{background:var(--door-green)}.door-red{background:var(--door-red)}
.door-amber{background:var(--door-amber)}.door-slate{background:var(--door-slate)}
.door-plum{background:var(--door-plum)}

/* 3. The feature. One upcoming item, chosen by evidence in views.front_feature. */
.front-feature{display:grid;grid-template-columns:minmax(0,1fr);gap:0;background:linear-gradient(135deg,#0e2e44,#15506a 70%,#1c6276);color:var(--hero-ink);border-radius:16px;border-top:6px solid var(--amber);overflow:hidden;margin-bottom:34px}
.front-feature:has(.feature-art){grid-template-columns:minmax(0,1.55fr) minmax(220px,.95fr)}
.feature-body{padding:26px 30px 28px;min-width:0}
.feature-flag{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0}
.feature-flag .eyebrow{color:var(--amber)}
.feature-tag{font:600 11px var(--mono);letter-spacing:.08em;text-transform:uppercase;padding:4px 9px;border:1px solid #6e93a6;border-radius:999px}
.feature-date{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin:14px 0 6px;color:var(--hero-ink)}
.feature-date time{font:700 17px var(--mono);letter-spacing:.04em;text-transform:uppercase}
.feature-date time b{font:700 34px/1 var(--display);margin-right:4px;color:var(--amber)}
.feature-when{font:600 19px var(--body)}
.front-feature .event-locality{color:#c9dae3;margin:6px 0 2px}
.front-feature h2{font-size:46px;line-height:1.02;margin:6px 0 0;letter-spacing:-.01em}
.front-feature h2 a:hover{color:var(--amber)}
.feature-summary{color:#e2ebf0;font-size:17px;line-height:1.5;max-width:62ch;margin:14px 0 0}
.feature-address{color:#c9dae3;font-size:14px;margin:10px 0 0}
.front-feature .time-warning{color:#ffd9a8;border-left-color:var(--amber)}
.feature-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:22px 0 18px}
.feature-actions .button{background:var(--amber);border-color:var(--amber);color:#2b1d00}
.feature-actions .button:hover{background:#ffc960;color:#2b1d00}
.feature-actions .button.outline{background:transparent;color:var(--hero-ink);border-color:#7fa3b4}
.feature-actions .button.outline:hover{background:#1d5873;color:var(--hero-ink)}
.feature-actions .save{background:transparent;border-color:#7fa3b4;color:var(--hero-ink)}
.feature-actions .save[aria-pressed=true]{background:var(--amber);border-color:var(--amber);color:#2b1d00}
.front-feature .source,.front-feature .source small,.front-feature .source strong{color:#d7e4eb}
.front-feature .source:hover strong{color:var(--amber)}
.front-feature .publisher-avatar{border-color:#5d8296;background:#fff}
/* The art panel is a contained illustration on its own ground, never a crop of
   one: reader.css sets object-fit:contain !important for exactly that reason,
   and the disclosure label travels with the picture. */
.feature-art{display:flex;flex-direction:column;justify-content:center;gap:10px;margin:0;padding:20px 22px;background:#f3f0e7;min-height:190px}
.feature-art .card-media{float:none;display:block;width:100%;margin:0}
.feature-art .card-media img{width:100%;height:auto;max-height:260px;background:transparent;border-radius:10px}
.feature-art figcaption{font-size:12px;line-height:1.45;color:#5b5a50;text-align:center}

/* 4. Today and Next up, side by side on a wide screen. */
.front-lanes{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(250px,.9fr);gap:26px;align-items:start;margin-bottom:30px}
.next-up{margin:0}
.next-list{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.next-item{display:flex;gap:13px;align-items:center;min-height:62px;padding:10px 12px;background:var(--surface,#fffefa);border:1px solid var(--line);border-left:4px solid var(--red);border-radius:10px}
.next-item:hover{border-left-color:var(--navy);color:var(--navy)}
.next-item:hover strong{text-decoration:underline;text-underline-offset:3px}
.next-date{flex:0 0 46px;text-align:center;line-height:1.05;font:11px var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ink2)}
.next-date b{display:block;font:700 27px/1 var(--display);color:var(--navy)}
.next-copy{min-width:0}
.next-copy strong{display:block;font-size:16px;line-height:1.25;font-weight:600}
.next-copy small{display:block;margin-top:4px;font-size:12px;color:var(--ink2)}

/* 5. Exchange teaser: real doors, real counts, honest empty state. */
.exchange-teaser{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.85fr);gap:30px;align-items:center;padding:28px 32px;margin:36px 0 30px;background:#f3ead8;border:1px solid #e0cfa8;border-top:5px solid var(--amber);border-radius:14px}
.exchange-teaser h2{font-size:44px;margin:12px 0 6px}
.exchange-teaser p{font-size:17px;max-width:48ch;margin:8px 0 0;color:#5a5240}
.teaser-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}
.teaser-doors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.teaser-door{display:flex;flex-direction:column;justify-content:center;gap:3px;min-height:62px;padding:11px 14px;background:#fffdf6;border:1px solid #e0cfa8;border-radius:10px}
.teaser-door:last-child{grid-column:1/-1}
.teaser-door strong{font-size:16px;font-weight:600}
.teaser-door small{font:11px var(--mono);letter-spacing:.05em;text-transform:uppercase;color:#7b6c4c}
.teaser-door:hover{border-color:var(--navy);color:var(--navy)}

/* 6. The weekly invitation keeps its promise exactly as the view states it. */
.weekly-invite{border-radius:14px}

@media(max-width:1050px){
.front-doors{grid-template-columns:repeat(3,minmax(0,1fr))}
.front-lanes{grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr);gap:18px}
.front-feature h2{font-size:38px}
.feature-body{padding:22px 24px 24px}
.exchange-teaser{padding:24px;gap:22px}
.exchange-teaser h2{font-size:38px}
}
@media(max-width:860px){
.practical-strip{grid-template-columns:1fr}
.practical-day{flex-direction:row;align-items:baseline;gap:10px;padding:10px 14px}
.front-feature,.front-feature:has(.feature-art){grid-template-columns:1fr}
.feature-art{order:-1;min-height:0;padding:16px}
.feature-art .card-media img{max-height:170px;object-position:center}
.front-lanes{grid-template-columns:1fr;gap:4px}
.exchange-teaser{grid-template-columns:1fr}
}
@media(max-width:760px){
.front-doors{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:24px}
.front-door{min-height:84px;padding:13px}
.front-door strong{font-size:19px}
.front-door small{font-size:11.5px}
.front-feature{border-radius:13px;margin-bottom:26px}
.front-feature h2{font-size:32px}
.feature-body{padding:18px 18px 20px}
.feature-date time b{font-size:29px}
.feature-when{font-size:17px}
.feature-summary{font-size:16px}
.feature-actions{gap:10px;margin:18px 0 14px}
.feature-actions .button{flex:1;min-width:150px}
.exchange-teaser{padding:20px;margin:28px 0 24px}
.exchange-teaser h2{font-size:33px}
.exchange-teaser p{font-size:16px}
.teaser-actions .button{flex:1;min-width:150px}
.teaser-doors{grid-template-columns:1fr}
.teaser-door:last-child{grid-column:auto}
}
@media(max-width:360px){
.front-doors{grid-template-columns:1fr}
.front-feature h2{font-size:28px}
}
@media print{.front-doors,.teaser-doors,.feature-actions,.teaser-actions{display:none!important}
.front-feature,.exchange-teaser{background:white;color:black;border:1px solid #999;break-inside:avoid}
.front-feature h2,.feature-summary,.feature-date,.front-feature .source{color:black}
.feature-art{display:none}
.front-lanes{display:block}}
