/* NotBOM v2: refined, editorial parody. Original look: not the Bureau's colours, logo or layout. */
:root {
  --paper:   #F7F3EA;
  --paper-2: #EEE7D6;
  --card:    #FFFFFF;
  --ink:     #10262B;
  --ink-2:   #3B5258;
  --muted:   #6B7C80;
  --line:    rgba(16, 38, 43, .13);
  --line-2:  rgba(16, 38, 43, .22);
  --teal:    #1F8A8A;
  --teal-d:  #14686A;
  --teal-l:  #DCEFEC;
  --coral:   #E4572E;
  --gold:    #E9B44C;
  --plum:    #5B3A7A;
  --radius:  16px;
  --shadow-s: 0 1px 2px rgba(16, 38, 43, .06), 0 2px 8px -2px rgba(16, 38, 43, .08);
  --shadow:   0 1px 2px rgba(16, 38, 43, .05), 0 18px 40px -18px rgba(16, 38, 43, .28);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "DM Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease:  cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.015em; font-variation-settings: "opsz" 96; }
h1 { font-size: clamp(40px, 6.2vw, 74px); letter-spacing: -.025em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 21px; font-variation-settings: "opsz" 24; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--coral); }
p { margin: 0 0 1em; }
a { color: var(--teal-d); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--coral); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 720px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; top: 0; }
label.sr { position: absolute; left: -9999px; }

.eyebrow, .dateline { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal-d); }
.dateline { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(247, 243, 234, .82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font: 700 24px var(--serif); letter-spacing: -.02em; line-height: 1; display: block; }
.brand-name i { font-style: normal; color: var(--coral); }
.brand small { display: block; font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.nav-links { display: flex; gap: 26px; align-items: center; font-weight: 500; font-size: 15px; }
.nav-links a { color: var(--ink-2); text-decoration: none; padding: 6px 0; position: relative; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line-2); border-radius: 10px; font-size: 18px; padding: 5px 11px; cursor: pointer; color: var(--ink); }

.strip { background: var(--ink); color: rgba(247, 243, 234, .86); font: 500 12.5px var(--mono); text-align: center; padding: 8px 16px; letter-spacing: .03em; }
.strip a { color: var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 999px; font: 600 15.5px var(--sans); border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; box-shadow: var(--shadow-s); transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(16, 38, 43, .35); border-color: var(--ink); color: var(--ink); }
.btn:active { transform: translateY(0); }
.btn-tang, .btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-tang:hover, .btn-ink:hover { background: var(--teal-d); border-color: var(--teal-d); color: #fff; }
.btn-sun { background: var(--teal-l); border-color: #b9dcd7; }
.btn-lg { padding: 15px 32px; font-size: 17px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; border-bottom: 1px solid var(--line); background: radial-gradient(900px 420px at 88% -10%, rgba(31, 138, 138, .13), transparent 70%), radial-gradient(700px 360px at 0% 110%, rgba(233, 180, 76, .14), transparent 70%), var(--paper); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; }
.hero h1 { margin: 14px 0 20px; }
.hero .lead { font-size: 20px; color: var(--ink-2); max-width: 52ch; margin: 0 0 30px; }
.isobars { width: 100%; max-width: 420px; justify-self: end; color: var(--teal); opacity: .9; }
.isobars text { font-family: var(--mono); fill: var(--muted); }
.search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 600px; padding: 7px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
.search input { flex: 1 1 220px; min-width: 0; font: 500 17px var(--sans); padding: 11px 20px; border: 0; background: transparent; color: var(--ink); border-radius: 999px; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(31, 138, 138, .16), var(--shadow); }
.search input::placeholder { color: #9aa8ab; }
.search .btn { box-shadow: none; padding: 11px 26px; }
.hero-note { font: 500 12.5px var(--mono); color: var(--muted); margin: 16px 0 0; letter-spacing: .02em; }

/* Panels & forecast */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 32px; }
.fc-head { display: flex; gap: 22px; align-items: center; margin-bottom: 22px; }
.fc-icon { flex: none; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(145deg, var(--teal-l), #F3E9CF); color: var(--teal-d); border: 1px solid var(--line); }
.fc-icon svg { width: 40px; height: 40px; }
.fc-kicker { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 6px; overflow-wrap: anywhere; }
.fc-headline { font-size: clamp(26px, 3.2vw, 36px); }
.fc-list { list-style: none; margin: 0; padding: 0; }
.fc-row { display: grid; grid-template-columns: minmax(130px, 36%) 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline; }
.fc-label { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.fc-value { font-weight: 600; font-size: 17.5px; line-height: 1.4; }
.fc-special { margin: 22px 0 8px; padding: 14px 18px; border-left: 3px solid var(--coral); background: linear-gradient(90deg, rgba(228, 87, 46, .07), transparent); border-radius: 0 12px 12px 0; font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.45; }
.fc-outlook { margin-top: 26px; }
.fc-outlook h3 { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 12px; }
.fc-days { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.fc-day { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.35; border-left: 1px solid var(--line); }
.fc-day:first-child { border-left: 0; }
.fc-day strong { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.fc-day-icon { color: var(--teal-d); }
.fc-day-icon svg { width: 28px; height: 28px; }
.fc-foot { font: 500 12px var(--mono); color: var(--muted); margin: 18px 0 0; letter-spacing: .02em; }

.layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 32px; align-items: start; padding: 48px 0 72px; }
.side { display: grid; gap: 14px; }
.tile { display: grid; grid-template-columns: 48px 1fr; gap: 4px 16px; align-items: center; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-s); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s; position: relative; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); color: var(--ink); }
.tile .ico { grid-row: span 2; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--teal-l); color: var(--teal-d); }
.tile:nth-child(2) .ico { background: #F6E6C5; color: #8a5d12; }
.tile:nth-child(3) .ico { background: #E6DDF1; color: var(--plum); }
.tile:nth-child(4) .ico { background: #F9DDD2; color: #b0401f; }
.tile .ico svg { width: 24px; height: 24px; }
.tile h3 { font-size: 19px; align-self: end; }
.tile p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.4; align-self: start; }
.tile::after { content: "\2197"; position: absolute; right: 18px; top: 16px; color: var(--muted); opacity: 0; transition: opacity .2s, transform .3s var(--ease); font-size: 15px; }
.tile:hover::after { opacity: 1; transform: translate(2px, -2px); }

/* Inner pages */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background: radial-gradient(600px 260px at 100% 0%, rgba(31, 138, 138, .11), transparent 70%), var(--paper); }
.page-head h1 { font-size: clamp(36px, 5vw, 58px); margin: 12px 0 14px; }
.page-head p { color: var(--ink-2); max-width: 56ch; margin: 0; font-size: 19px; }
.page-body { padding: 44px 0 76px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }

/* Friend */
.friend-name { font-size: clamp(34px, 5vw, 52px); color: var(--coral); overflow-wrap: anywhere; margin: 2px 0 6px; }
.canvas-wrap canvas { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); background: var(--ink); display: block; }
.search.plain { max-width: none; }

/* Notices */
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.faff-chip { font: 500 11.5px var(--mono); letter-spacing: .06em; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); display: inline-block; }
.notices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.notice { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; box-shadow: var(--shadow-s); position: relative; overflow: hidden; }
.notice::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lv, var(--teal)); }
.notice h3 { margin: 12px 0 6px; font-size: 20px; }
.notice p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.level-1 { --lv: #A9E6DD; } .level-2 { --lv: #5DCFC3; } .level-3 { --lv: #1F8A8A; } .level-4 { --lv: #7A57A0; } .level-5 { --lv: #4B2D69; }
.faff-chip.l1 { background: #E3F6F3; } .faff-chip.l2 { background: #CDEFEA; } .faff-chip.l3 { background: #1F8A8A; color: #fff; border-color: #1F8A8A; } .faff-chip.l4 { background: #7A57A0; color: #fff; border-color: #7A57A0; } .faff-chip.l5 { background: #4B2D69; color: #fff; border-color: #4B2D69; }
.random-notice { font: 500 clamp(21px, 2.6vw, 28px)/1.3 var(--serif); margin: 6px 0 18px; }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 24px; box-shadow: var(--shadow-s); }

/* Radar */
.radar-wrap { max-width: 560px; margin: 0 auto; }
.radar-wrap canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 30px 60px -28px rgba(16, 38, 43, .55), 0 0 0 1px var(--line-2); background: #0d2226; display: block; }
.radar-status { text-align: center; font: 500 14.5px var(--mono); margin: 22px 0 6px; min-height: 1.6em; color: var(--ink-2); }
.blips { columns: 2; padding-left: 20px; margin-top: 16px; color: var(--muted); }

/* Knee */
.gauge { max-width: 440px; margin: 0 auto; }
.gauge svg { width: 100%; height: auto; display: block; overflow: visible; }
.needle { transform-origin: 210px 200px; transition: transform 1.1s cubic-bezier(.3, 1.7, .5, 1); }
.knee-level { font: 600 38px var(--serif); text-align: center; margin: 6px 0 2px; }
.knee-out { text-align: center; font: italic 500 21px/1.4 var(--serif); max-width: 32ch; margin: 0 auto 26px; min-height: 3em; color: var(--ink-2); }

/* Prose */
.prose p, .prose li { max-width: 64ch; color: var(--ink-2); }
.prose h2 { margin: 42px 0 12px; font-size: 28px; }
.prose ul { padding-left: 20px; }
.prose strong { color: var(--ink); }

/* Footer */
.site-footer { background: var(--ink); color: rgba(247, 243, 234, .78); padding: 48px 0 28px; flex-shrink: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral)); }
.site-footer a { color: var(--gold); text-decoration-color: rgba(233, 180, 76, .4); }
.site-footer a:hover { color: #fff; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.foot-brand .brand-name { color: #fff; }
.foot-brand .brand small { color: rgba(247, 243, 234, .55); }
.disclaimer { font-size: 15px; line-height: 1.65; margin: 0; max-width: 66ch; }
.disclaimer strong { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 22px 0 0; font-size: 14.5px; }
.foot-bottom { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(247, 243, 234, .14); font: 500 12.5px var(--mono); color: rgba(247, 243, 234, .5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Entrance motion */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero .wrap > div:first-child > *, .panel, .tile, .notice, .page-head .wrap > * { animation: rise .7s var(--ease) both; }
.hero h1 { animation-delay: .06s; } .hero .lead { animation-delay: .12s; } .hero .search { animation-delay: .18s; }
.tile:nth-child(2) { animation-delay: .08s; } .tile:nth-child(3) { animation-delay: .16s; } .tile:nth-child(4) { animation-delay: .24s; }

@media (max-width: 860px) {
  .hero { padding: 52px 0 48px; }
  .hero .wrap, .layout, .two, .foot-top { grid-template-columns: 1fr; }
  .isobars { display: none; }
  .nav-toggle { display: inline-block; }
  .nav-links { display: none; position: absolute; top: 69px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 16px; background: var(--paper); padding: 20px 28px 26px; border-bottom: 1px solid var(--line-2); box-shadow: 0 20px 30px -20px rgba(16, 38, 43, .3); }
  .nav-links.open { display: flex; }
  .fc-row { grid-template-columns: 1fr; gap: 2px; }
  .fc-days { grid-template-columns: repeat(2, 1fr); }
  .fc-day:nth-child(3) { border-left: 0; }
  .fc-day:nth-child(n+3) { border-top: 1px solid var(--line); }
  .blips { columns: 1; }
  .panel { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } .btn, .tile, .needle, .nav-links a::after { transition: none; } html { scroll-behavior: auto; } }
