/* The Briefing pages (briefing.html, briefing-surnadal.html). Loaded after watch.css, whose panel, top bar, bulletin,
   tile and about styles it shares; this file lays out the board (.board.br): a row of glance tiles, three columns of text and a 24-hour timeline.
   Same unit (--u) and the same three layouts as the other live pages. Red stays for alarms: a red warning, a closed
   road, a live power cut, a cancelled ferry or flight. */

.board.br { grid-template-areas: "top" "glance" "tl" "a" "b" "c" "bulletin" "about"; }
#col-a { grid-area: a; } #col-b { grid-area: b; } #col-c { grid-area: c; }

/* ── at a glance: one row of state tiles; the top edge is the state (as nodash's Briefing) ── */
.glance { grid-area: glance; display: grid; gap: var(--gap); grid-template-columns: repeat(2, 1fr); }
.gt { padding: calc(0.6 * var(--u)) calc(0.9 * var(--u)); border-top-width: calc(0.6 * var(--u)); min-width: 0; }
.gt.ok { border-top-color: #1D7A45; } .gt.warn { border-top-color: var(--yellow); } .gt.bad { border-top-color: var(--red); }
.gt .v { font-size: calc(1.9 * var(--u)); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: calc(0.2 * var(--u)); }
.gt .v small { font-size: 0.55em; font-weight: 500; letter-spacing: 0; }
.gt.ok .v { color: #1D7A45; } .gt.bad .v { color: var(--red); }
.gt .s { font-size: calc(1.05 * var(--u)); color: var(--stone); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt .ico { display: inline-block; width: 0.9em; height: 0.9em; vertical-align: -0.1em; margin-right: 0.15em; }
.gt .ico svg { width: 100%; height: 100%; }
html.wall .gt.ok { border-top-color: #4CB27A; } html.wall .gt.ok .v { color: #4CB27A; } html.wall .gt.bad .v { color: #FF6A4A; }

/* ── today and tonight: a 24-hour timeline drawn by briefing.js in the box's own pixels ── */
.tl { grid-area: tl; padding: calc(0.7 * var(--u)) calc(1.1 * var(--u)); display: flex; flex-direction: column; gap: calc(0.3 * var(--u)); min-height: calc(9.5 * var(--u)); }
#tl-svg { flex: 1 1 auto; width: 100%; min-height: 0; display: block; font-size: calc(1.1 * var(--u)); font-family: 'Space Grotesk', sans-serif; overflow: visible; }
#tl-svg .night { fill: var(--ink); opacity: 0.07; }
#tl-svg .grid { stroke: var(--ink); opacity: 0.12; }
#tl-svg .ax, #tl-svg .sun { fill: var(--stone); font-weight: 500; }
#tl-svg .temp { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; }   /* 2.5 was faint on the dark wall (review 2026-11-25) */
#tl-svg .tv { fill: var(--ink); font-weight: 700; }
#tl-svg .tide { fill: #2F7FA8; font-size: 0.9em; }
#tl-svg .tidel { fill: #2F7FA8; font-size: 0.85em; font-weight: 600; }
html.wall #tl-svg .tidel { fill: #6FB7DB; }
#tl-svg .rain { fill: #2F7FA8; opacity: 0.55; } #tl-svg .rainl { fill: #2F7FA8; font-weight: 700; font-size: 0.9em; }
html.wall #tl-svg .rain, html.wall #tl-svg .rainl { fill: #6FB7DB; }
/* snow and sleet bars, the gust label (2026-11-25) */
#tl-svg .rain.snow, #tl-svg .rainl.snow { fill: #8A8F98; } #tl-svg .rain.sleet, #tl-svg .rainl.sleet { fill: #6E7FA8; }
html.wall #tl-svg .rain.snow, html.wall #tl-svg .rainl.snow { fill: #E6E1D6; } html.wall #tl-svg .rain.sleet, html.wall #tl-svg .rainl.sleet { fill: #A9B8DD; }
#tl-svg .gustl { fill: var(--stone); font-weight: 700; font-size: 0.9em; }
#tl-svg .gustl.strong { fill: var(--ink); }
#tl-svg .bar.bad { fill: var(--red); } #tl-svg .bar.warn { fill: var(--yellow); }
#tl-svg .bar.detour, #tl-svg .bar.thin { fill-opacity: 0.25; stroke-width: 2; } #tl-svg .bar.bad:is(.detour, .thin) { stroke: var(--red); } #tl-svg .bar.warn:is(.detour, .thin) { stroke: var(--yellow); }   /* a closure is an outline, the solid bar is a red warning's (review 2026-11-25) */
#tl-svg .bl { fill: var(--ink); font-weight: 700; } #tl-svg .bl.in.bad { fill: #fff; } #tl-svg .bl.in.warn { fill: #111; }
#tl-svg .now { stroke: var(--red); stroke-width: 2; } #tl-svg .nowl { fill: var(--red); font-weight: 700; }
#tl-svg .quiet { fill: var(--stone); font-weight: 500; }
html.wall #tl-svg .night { opacity: 0.25; fill: #000; } html.wall #tl-svg .tide { fill: #6FB7DB; }

/* ── the columns ── */
.col { padding: calc(0.9 * var(--u)) calc(1.2 * var(--u)); display: flex; flex-direction: column; gap: calc(0.4 * var(--u)); }
.sec { display: flex; flex-direction: column; flex: none; }   /* never shrunk: overflow is fit()'s job (a shrunk section drew over the next) */
.sec + .sec { margin-top: calc(0.7 * var(--u)); }
.sec > .k { display: flex; gap: calc(0.8 * var(--u)); align-items: baseline; white-space: nowrap; padding-bottom: calc(0.3 * var(--u));
  border-bottom: var(--line); margin-bottom: calc(0.2 * var(--u)); }
.sec > .k > span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sec > .k .n { margin-left: auto; letter-spacing: 0.06em; }
.it { padding: calc(0.45 * var(--u)) 0; border-top: calc(0.12 * var(--u)) solid #D9D1BC; font-size: calc(1.4 * var(--u)); min-width: 0; }
.sec > .k + .it { border-top: 0; }
.it .h { display: flex; gap: calc(0.6 * var(--u)); align-items: baseline; font-weight: 700; min-width: 0; }
/* a title wraps to a second line instead of an ellipsis (2026-11-25 review: "Malmefjorden, Hustadvika" and headlines cut) */
.it .h .ti { overflow: hidden; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.it .h .r { margin-left: auto; color: var(--stone); font-weight: 500; font-size: 0.86em; white-space: nowrap; }
.it p { font-weight: 500; line-height: 1.3; margin-top: calc(0.15 * var(--u)); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.it p.dim, .it .dim { color: var(--stone); }
.it a { color: inherit; text-decoration: none; }
.it a:hover { text-decoration: underline; }
.row2 a { color: inherit; text-decoration: none; }
.row2 a:hover { text-decoration: underline; }
.news .it.far { opacity: 0.62; }
.news .it p { -webkit-line-clamp: 2; }
.more { font-size: calc(1.15 * var(--u)); color: var(--stone); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding-top: calc(0.3 * var(--u)); }
.tag { display: inline-block; font-size: calc(1.0 * var(--u)); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  padding: calc(0.25 * var(--u)) calc(0.45 * var(--u)); border: calc(0.15 * var(--u)) solid var(--ink); background: var(--bg); white-space: nowrap; vertical-align: 0.1em; flex: none; }
.tag.red { background: var(--red); color: var(--bg); }
.tag.orange { background: #FF9A3C; }
.tag.yel { background: var(--yellow); }
html.wall .tag.yel { color: #111; }   /* dark text on yellow on a wall (2026-11-25) */
.sec .rmore { font-size: calc(1.15 * var(--u)); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--stone); padding-top: calc(0.3 * var(--u)); }
.tag.ink { background: var(--ink); color: var(--bg); }
.row2 { display: flex; gap: calc(0.8 * var(--u)); align-items: baseline; font-size: calc(1.4 * var(--u)); padding: calc(0.25 * var(--u)) 0; min-width: 0; }
.row2 .t { font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.row2 .w { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.row2 .r { color: var(--stone); font-size: 0.86em; white-space: nowrap; flex: none; }
.row2.gone .t, .row2.gone .w { text-decoration: line-through; color: var(--stone); }
.clear { font-size: calc(1.4 * var(--u)); font-weight: 500; line-height: 1.35; padding: calc(0.3 * var(--u)) 0; }
.clear small { display: block; color: var(--stone); font-size: 0.82em; margin-top: calc(0.2 * var(--u)); }

@media (min-width: 600px) { .glance { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 700px) and (max-width: 999px), (min-width: 1000px) and (max-aspect-ratio: 13/10) {
  .board.br { grid-template-columns: 1fr 1fr; grid-template-areas: "top top" "glance glance" "tl tl" "a b" "c c" "bulletin bulletin" "about about"; }
}

/* Landscape wall (as watch.css): the glance row, three columns, the timeline under them. Columns that overflow hide whole items (briefing.js fit). */
@media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
  .board.br {
    grid-template-columns: 1fr 1fr 1.15fr;
    grid-template-rows: auto auto minmax(0, 1fr) calc(10 * var(--u)) calc(3.6 * var(--u));   /* timeline 10u (was 13u): the columns needed the height more (2026-11-25) */
    grid-template-areas: "top top top" "glance glance glance" "a b c" "tl tl tl" "bulletin bulletin bulletin";
  }
  /* flex, not an auto-flowing grid: the summary line (website only) takes a row of its own and the tiles share the next */
  .glance { display: flex; flex-wrap: wrap; }
  .glance > .gt { flex: 1 1 0; min-width: 0; }
  .glance > .sum { flex: 1 0 100%; }
  .col { overflow: hidden; }
  /* denser, as nodash's Briefing wall (2026-11-25): smaller rows, a teaser of one line, the police text of two */
  .col .it, .col .row2, .col .clear { font-size: calc(1.15 * var(--u)); }
  .col .it { padding: calc(0.3 * var(--u)) 0; }
  .col .row2 { padding: calc(0.15 * var(--u)) 0; }
  .col .it p { -webkit-line-clamp: 2; }
  .col.news .it p, .news .it p { -webkit-line-clamp: 1; }   /* after the rule above: same weight, so order decides */
}

/* Portrait wall (?wall only): the glance tiles in two rows, the timeline, A|B side by side, news under them. */
@media (max-aspect-ratio: 3/4) {
  .wall .board.br {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto calc(14 * var(--u)) minmax(0, 1fr) minmax(0, 0.9fr) calc(3.6 * var(--u));
    grid-template-areas: "top top" "glance glance" "tl tl" "a b" "c c" "bulletin bulletin";
  }
  .wall .glance { grid-template-columns: repeat(4, 1fr); }
  .wall .col { overflow: hidden; }
}

/* hidden means gone: a class that sets display (flex/grid rows) would otherwise beat the browser's [hidden] rule and keep a fitted-out row on screen */
.board [hidden] { display: none !important; }

/* snow depth (NVE seNorge): a row per spot, the depth on the right, two weeks as a small area between */
.br .snow .h { align-items: center; }
.br .snow .spark { flex: 1 1 0; min-width: 2.5em; max-width: 7em; height: 1.15em; margin: 0 0.6em 0 auto; }
.br .snow .spark .p { fill: #5B8DB8; }
.br .snow .spark .f { fill: #5B8DB8; opacity: .38; }
.br .snow .spark line { stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
html.wall .br .snow .spark .p, html.wall .br .snow .spark .f { fill: #8FC1E8; }
.br .snow .ti { flex: 0 1 auto; white-space: nowrap; -webkit-line-clamp: 1; }
.br .snow .r { margin-left: 0; color: var(--ink); font-size: 1em; font-weight: 700; min-width: 3.4em; text-align: right; }
.br .snow .r small { font-weight: 500; color: var(--stone); }

/* air quality strip along the hours (MET Norway's class colours, set per cell) and its label */
#tl-svg .air { opacity: .85; }
#tl-svg .airl { fill: var(--stone); font-size: .8em; font-weight: 600; }

/* ── TV floor (?wall, landscape): no text under 20 px at 1920x1080 (1.05u); a TV review 2026-11-25, owner "go" ── */
@media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
  html.wall .br .tag { font-size: calc(1.05 * var(--u)); }
  html.wall .br .it .h .r, html.wall .br .row2 .r, html.wall .br .snow .r small { font-size: calc(1.05 * var(--u)); }
  html.wall #tl-svg .tidel { font-size: 0.95em; }
  html.wall #tl-svg .tide { font-size: 1em; }
}

/* ── what nodash's Briefing had (2026-11-25): the summary line, "new", day headings, the tide curve, Sea and sky, tile icons ── */
.glance .sum { grid-column: 1 / -1; font-size: calc(1.5 * var(--u)); line-height: 1.35; margin: 0; }
.glance .sum .warn { color: #A85A00; font-weight: 700; }
.newbtn { font: inherit; font-size: 0.9em; font-weight: 700; background: var(--yellow); color: #111; border: calc(0.15 * var(--u)) solid var(--ink); padding: 0 calc(0.4 * var(--u)); cursor: pointer; }
.newbtn:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.newbtn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.new { display: inline-block; font-size: 0.7em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--yellow); color: #111; padding: 0 0.35em; vertical-align: 0.15em; }
.day { font-size: calc(1.05 * var(--u)); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); margin-top: calc(0.4 * var(--u)); }
#tl-svg .tidea { fill: #2F7FA8; opacity: 0.16; } #tl-svg .tidel2 { fill: none; stroke: #2F7FA8; stroke-width: 2; opacity: 0.6; }
html.wall #tl-svg .tidea { fill: #6FB7DB; opacity: 0.18; } html.wall #tl-svg .tidel2 { stroke: #6FB7DB; }
#tl-svg .bar.aur { fill: #3FA66B; opacity: 0.85; }
.skyc svg { display: block; width: 100%; height: auto; font-family: 'Space Grotesk', sans-serif; }
.skyc .night { fill: var(--ink); opacity: 0.07; } .skyc .thr { stroke: #3FA66B; stroke-dasharray: 4 4; stroke-width: 1.5; }
.skyc .kp { fill: var(--stone); opacity: 0.55; } .skyc .kp.hi { fill: #3FA66B; opacity: 0.9; } .skyc .kp.pred { opacity: 0.4; } .skyc .kp.hi.pred { opacity: 0.7; }
.skyc .kpv { font-size: 19px; font-weight: 700; fill: var(--ink); } .skyc .ax { font-size: 17px; fill: var(--stone); }   /* SVG units: the chart is drawn about 0.75x in a desktop column */
.skyc .cl { fill: #8A96A0; opacity: 0.6; } .skyc .nowl { stroke: var(--red); stroke-width: 2; }
.gt .k .ti-ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 0.35em; opacity: 0.85; }
@media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
  html.wall .skyc .kpv { font-size: 24px; } html.wall .skyc .ax { font-size: 23px; }
}
