/* Masthead (frontend-v4 §2.1 items 1–2; b2 direction.css "masthead, identity line, tabs"):
   wordmark and Menu, the identity line, the place row, the Forecast · Map tabs. Tokens only. */
.mast {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "word menu" "id id" "place place" "tabs tabs";
  align-items: center; column-gap: var(--space-3); padding: var(--space-2) var(--gutter) var(--space-3); background: var(--bg);
}
.mast:empty { min-height: calc(var(--tap) + var(--space-5)); }
.wordmark { grid-area: word; display: inline-flex; align-items: center; min-height: var(--tap); width: max-content; }
.lockup { display: block; width: auto; height: 2.5rem; }
.lockup-dark { display: none; }
:root[data-theme="dark"] .lockup-light { display: none; }
:root[data-theme="dark"] .lockup-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockup-light { display: none; }
  :root:not([data-theme="light"]) .lockup-dark { display: block; }
}
.menubtn { grid-area: menu; border: 0; background: none; cursor: pointer; font: inherit; align-self: start; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 2px 0 var(--space-3); font-size: var(--t-sub); font-weight: var(--weight-bold); color: var(--action); text-decoration: none; }
/* the identity line (DRAFT copy): small, muted, one line; it may wrap only at large text sizes */
.identity { grid-area: id; margin: 2px 0 0; max-width: none; font-size: var(--t-small); font-weight: var(--weight-medium); line-height: 1.35; color: var(--text-muted); }
.placebtn { grid-area: place; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--space-3); min-height: var(--tap); padding-top: var(--space-1); text-decoration: none; }
.placebtn .place { min-width: 0; overflow-wrap: anywhere; font-size: var(--t-head); font-weight: var(--weight-heavy); letter-spacing: -0.015em; color: var(--text); }
.placebtn .chev { font-size: 0.7em; }
.placebtn .change { font-size: var(--t-sub); font-weight: var(--weight-bold); color: var(--action); }
.tabs { grid-area: tabs; display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--space-2); padding: 3px; border-radius: 14px; background: var(--surface-2); }
.tab { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 11px; text-align: center; font-size: var(--t-sub); font-weight: var(--weight-bold); color: var(--action); text-decoration: none; }
.tab[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card), 0 0 0 1px var(--card-edge); }
/* Laptop (F14 #286; b2 quiet-laptop.png): one row. The lockup over the identity line at the left,
   the place and Change place beside it, the Forecast · Map tabs and Menu at the right. */
@media (min-width: 1024px) {
  .mast {
    max-width: none; grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "word place . tabs menu" "id place . tabs menu";
    column-gap: 28px; padding: 10px max(32px, calc((100% - var(--page-wide)) / 2 + 32px));
  }
  .wordmark { min-height: 0; }
  .menubtn { align-self: center; }
  .placebtn { align-self: center; justify-content: flex-start; flex-wrap: nowrap; gap: 14px; min-height: 48px; padding-top: 0; }
  .placebtn .place { white-space: nowrap; }
  .tabs { align-self: center; width: 248px; margin-top: 0; }
}

/* The Menu sheet (card #554; layout from the prototype's masthead surface): the phone covers the screen, from
   1024 px a 440 px panel on the right over a dimmed page. Tokens only; the rise is off with reduced motion. */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-scrim { position: absolute; inset: 0; background: rgb(12 22 36 / 0.45); }
.sheet { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; background: var(--bg); color: var(--text); animation: sheet-rise 300ms ease-out; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) var(--gutter); min-height: var(--tap); }
.sheet-title { margin: 0; text-transform: none; letter-spacing: normal; outline: 0; font-size: var(--t-head); font-weight: var(--weight-heavy); }
.sheet-close { border: 0; background: none; padding: 0 2px 0 var(--space-3); color: var(--action); font-size: var(--t-sub); }
.sheet-body { display: grid; gap: var(--space-4); padding: 0 var(--gutter) var(--space-6); align-content: start; }
.mgroup { display: grid; gap: 6px; }
.mgroup-l { margin: 0; padding: 0 4px; font-size: var(--t-small); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-small); color: var(--text-muted); }
.mcard { display: grid; padding: 0 var(--space-4); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-card), 0 0 0 1px var(--card-edge); }
.mrow { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); min-height: 60px; padding: 10px 0; border-top: var(--rule) solid var(--line); color: var(--text); text-decoration: none; }
.mrow:first-child { border-top: 0; }
/* Row icons (#726): a 40 px soft circle, a 20 px line icon in action blue, as the forecast's drop-down rows. */
.mrow-ic { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--action-soft); color: var(--action); }
.ic-line20 { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mrow-t { display: grid; gap: 1px; min-width: 0; }
.mrow-l { font-size: 1rem; font-weight: var(--weight-heavy); line-height: 1.3; color: var(--action); }
.mrow-x { font-size: var(--t-sub); font-weight: var(--weight-medium); line-height: 1.35; color: var(--text-muted); }
.mrow-go { font-size: 1.25rem; font-weight: var(--weight-bold); line-height: 1; color: var(--action); }
.mrow:hover .mrow-l { text-decoration: underline; text-underline-offset: 3px; }
.mrow[aria-current="page"] .mrow-l { color: var(--text); }
/* The glance on the sky (#726): the app's .sky (set from the open place's now; it stays a sky in dark mode), then
   Your places as a white pill on it. The band runs the sheet's full width, under the title row. */
.mband { margin: 0 calc(-1 * var(--gutter)); padding: var(--space-4) var(--gutter) var(--space-5); display: grid; gap: var(--space-4); }
.mglance { display: grid; gap: 4px; }
.mglance .label { margin: 0; font-size: var(--t-small); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-small); text-transform: uppercase; color: var(--on-sky-muted); }
.mglance-now { margin: 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 var(--space-3); }
.mglance-temp { font-size: 2.8rem; font-weight: var(--weight-light, 300); line-height: 1.05; letter-spacing: -0.02em; }
.mglance-word { display: grid; padding-bottom: 6px; font-size: var(--t-body); font-weight: var(--weight-bold); line-height: 1.25; }
.mglance-hilo { font-size: var(--t-sub); font-weight: var(--weight-medium); color: var(--on-sky-muted); }
.mglance-head { margin: var(--space-2) 0 0; font-size: var(--t-body); font-weight: var(--weight-bold); line-height: 1.35; text-wrap: pretty; color: var(--on-sky); }
.mrow-pill { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); min-height: 56px; color: var(--sky-pill-text); text-decoration: none; }
.mrow-pill .mrow-ic { background: var(--sky-pill-soft); color: var(--sky-pill-text); }
.mrow-pill .mrow-l, .mrow-pill .mrow-go { color: var(--sky-pill-text); }
.mrow-pill .mrow-x { color: var(--sky-pill-text-muted); }
.mempty, .mfoot { margin: 0; padding: 0 4px; font-size: var(--t-small); color: var(--text-muted); max-width: var(--measure); }
@media (min-width: 1024px) {
  .sheet { inset: 0 0 0 auto; width: 440px; border-radius: var(--radius-sheet) 0 0 var(--radius-sheet); box-shadow: var(--shadow-float); animation-name: sheet-slide; }
}
@keyframes sheet-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
