/* Forecast Poland — shared styles.
 *
 * The palette is Poland's own, and unlike Forecast Arabia — which serves
 * seventeen countries and deliberately uses no flag colour — this is a
 * one-country site and the flag is the right place to start. So: white and
 * red, but the useful versions of them. The white is a warm paper rather than
 * a screen white, because half this country's year is overcast and a page that
 * glares is unreadable in it; the red is #c1272d, the flag's crimson taken two
 * steps darker so that text can sit on it and pass contrast.
 *
 * The second accent is amber — bursztyn, the Baltic amber that has come off
 * this coast and gone down the Amber Road since the Bronze Age. It carries the
 * warm end of everything: hover states, the footer rule, the highlight on a
 * live value. Links are pine, from the other Polish landscape — Białowieża and
 * the Bory — because a page of crimson links is a page nobody can read.
 *
 * Structure is the network's: ink header with a coloured rule under it, paper
 * body, card, note, tag, ink footer.
 */

:root {
  --ink: #131a21;
  --ink-2: #1d2833;
  --ink-3: #2e3d4b;
  --paper: #faf8f5;
  --linen: #efe9e1;
  --linen-2: #e3dace;
  --line: #d9cfc2;
  --text: #16202a;
  --mut: #5e6f7e;
  --crimson: #c1272d;
  --crimson-2: #e04b4b;
  --amber: #c0871d;
  --amber-2: #e6b04a;
  --pine: #1f6b5c;
  --pine-2: #2c8f79;
  --maxw: 1180px;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--pine); }
a:hover { color: var(--amber); }

/* ---- header ------------------------------------------------------------ */

.top { background: var(--ink); color: var(--linen); border-bottom: 3px solid var(--crimson); }
.top-in {
  max-width: var(--maxw); margin: 0 auto; padding: .55rem 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand {
  font-size: 1.05rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #fff; text-decoration: none;
  white-space: nowrap; display: inline-flex; align-items: center; gap: .5rem;
}
/* The flag, at text size: white over red, two bars and no drawing. */
.brand::before {
  content: ""; width: 20px; height: 13px; border-radius: 2px;
  background: linear-gradient(to bottom, #fff 0 50%, var(--crimson) 50% 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.25);
}
.top nav { margin-left: auto; display: flex; gap: .15rem; flex-wrap: wrap; }
.top nav a {
  color: #b8c6d2; text-decoration: none; font-size: .82rem;
  padding: .3rem .62rem; border-radius: 6px; white-space: nowrap;
}
.top nav a:hover { background: var(--ink-3); color: #fff; }
.top nav a.on { background: var(--crimson); color: #fff; font-weight: 600; }

/* ---- layout ------------------------------------------------------------ */

main { max-width: var(--maxw); margin: 0 auto; padding: 1.2rem 1rem 3rem; }
main.wide { max-width: 1560px; }

h1 { font-size: 1.9rem; line-height: 1.2; letter-spacing: -.01em; margin: .2rem 0 .5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .6rem; letter-spacing: -.005em; }
h3 { font-size: 1.02rem; margin: 1.3rem 0 .4rem; color: var(--ink-2); }
p { margin: .7rem 0; }
ul, ol { margin: .7rem 0 .7rem 1.3rem; }
li { margin: .3rem 0; }

.lede { font-size: 1.08rem; color: var(--ink-2); }
.dek { color: var(--mut); font-size: .95rem; margin-bottom: 1rem; }
.pl { font-style: italic; color: var(--mut); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin: 1rem 0;
}
.card.linen { background: var(--linen); border-color: var(--linen-2); }

.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }

.note {
  border-left: 3px solid var(--amber); background: var(--linen);
  padding: .7rem .9rem; border-radius: 0 8px 8px 0; margin: 1rem 0;
  font-size: .93rem;
}
.note.red { border-left-color: var(--crimson); }

table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
th, td { text-align: left; padding: .42rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--linen); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
tbody tr:hover { background: #fffdf9; }

code { font-family: var(--mono); font-size: .87em; background: var(--linen); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--ink); color: #d6e0ea; padding: .8rem 1rem; border-radius: 8px; overflow-x: auto; font-size: .82rem; line-height: 1.5; }
pre code { background: none; color: inherit; padding: 0; }

.tag {
  display: inline-block; font-size: .7rem; letter-spacing: .06em;
  text-transform: uppercase; padding: .15rem .45rem; border-radius: 4px;
  background: var(--pine); color: #fff; font-weight: 600; vertical-align: middle;
}
.tag.warn { background: var(--amber); color: var(--ink); }
.tag.hot { background: var(--crimson); }
.tag.no { background: #93a3b0; }

.stat { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.big { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }

/* IMGW warning degrees, which are 1, 2 and 3 and are the same three colours on
 * every Polish forecast anyone reads. Matching them is not decoration; a
 * reader who knows the yellow/orange/red scale should not have to learn ours. */
.deg { display:inline-block; width:1.35rem; height:1.35rem; line-height:1.35rem;
       text-align:center; border-radius:4px; font-weight:700; font-size:.8rem; }
.deg1 { background:#f3d24b; color:#3a2c00; }
.deg2 { background:#e88b28; color:#301700; }
.deg3 { background:#c1272d; color:#fff; }

/* ---- footer ------------------------------------------------------------ */

footer { background: var(--ink); color: #9dafbd; margin-top: 2.5rem; border-top: 3px solid var(--amber); }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: 1.4rem 1rem 2rem; font-size: .82rem; line-height: 1.6; }
footer a { color: var(--amber-2); }
.foot-grid { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 1rem; }
.foot-grid h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .35rem; }
.foot-grid a { display: block; padding: .12rem 0; text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  body { font-size: 15px; }
  .top-in { padding: .5rem .7rem; }
}

/* ---- the live-data pages ----------------------------------------------- */

.mini { width: 100%; height: auto; background: #eef3f7; border: 1px solid var(--line);
        border-radius: var(--radius); display: block; }
.mm-ctx { fill: #e2e9ef; stroke: #cdd8e1; stroke-width: 1.2; }
.mm-reg { fill: #fff; fill-opacity: .55; stroke: #b9c6d1; stroke-width: 1.4; }
.pill { display: inline-block; font-size: .7rem; letter-spacing: .04em; padding: .1rem .45rem;
        border-radius: 999px; font-weight: 700; color: #fff; text-transform: uppercase; }
.d-alarm { background: var(--crimson); } .d-warn { background: #e88b28; }
.d-ok { background: var(--pine); } .d-none { background: #93a3b0; }
circle.d-alarm { fill: var(--crimson); stroke: #fff; stroke-width: 1.2; }
circle.d-warn { fill: #e88b28; stroke: #fff; stroke-width: 1.2; }
circle.d-near { fill: #6f93b5; fill-opacity: .8; stroke: none; }
circle.aq { stroke: #ffffffaa; stroke-width: .8; }
circle.aq0 { fill: #3f9c5a; } circle.aq1 { fill: #9fd44e; } circle.aq2 { fill: #f0dc63; }
circle.aq3 { fill: #f0a83f; } circle.aq4 { fill: #e05c33; } circle.aq5 { fill: #a8243c; }
.redtext { color: var(--crimson); }
.two { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }
