/* landing page. built from landing/ (see landing/README.md); design agreed in mockup/ */
:root {
  --brand: #1e5162;
  --brand-dark: #153a47;
  --brand-tint: #e8f0f2;
  --ink: #0a0a0a;
  --muted: #666;
  --line: #e7e7e7;
  --fill: #f5f5f5;
  --bg: #fff;
  --font: "Inter", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 16px/1.6 var(--font); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--font); font-weight: 300; color: var(--ink); margin: 0; }

/* logged-in vs logged-out. body.in is set once /session-check answers; until then (html.auth-pending)
   anything that differs between the two is hidden, so the page doesn't flash the wrong one */
body.in .out-only, body:not(.in) .in-only { display: none !important; }
.auth-pending .acct, .auth-pending .in-only, .auth-pending .out-only,
.auth-pending .t1 .count, .auth-pending .lock { visibility: hidden; }
.lock { width: 14px; height: 14px; flex: none; color: var(--muted); }
body.in .lock { display: none; }

/* header */
header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
header img { height: 22px; display: block; }
nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; font-weight: 600; }
nav a { color: var(--muted); }
.acct { font-size: 14px; white-space: nowrap; }
.who { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; line-height: 1.35; }
.who b { color: var(--ink); font-weight: 600; }
.linkbtn { font: inherit; color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* buttons + tags */
.btn { display: inline-block; background: var(--brand); color: #fff; border-radius: 4px; padding: 8px 16px; font-weight: 600; font-size: 14px; border: 0; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.btn.ghost:hover { background: var(--brand-tint); }
.btn.sm { padding: 6px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; white-space: nowrap; }
.badge { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--brand); background: #fff; border-radius: 3px; padding: 1px 5px; margin-left: 2px; }
.btn.ghost .badge { border: 1px solid #cfdfe3; }
select { font: inherit; font-size: 14px; color: var(--ink); padding: 6px 24px 6px 8px; border: 1px solid #c9d3d6; border-radius: 4px; background: #fff; max-width: 100%; }

/* welcome */
.hero { border-bottom: 1px solid var(--line); }
.hero .wrap { max-width: 880px; padding-top: 44px; padding-bottom: 44px; text-align: center; }
.hero h1 { font-size: 30px; line-height: 1.25; }
.hero p { margin: 14px 0 0; text-align: justify; hyphens: auto; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }

/* sections, headed like the old site */
section { padding: 52px 0; border-bottom: 1px solid var(--line); }
.old-head { text-align: center; margin-bottom: 32px; }
.old-head h2 { font-size: 32px; }
.old-head p { color: var(--muted); margin: 6px 0 0; font-size: 14px; }

/* the login panel that stands in for a gated section's controls when logged out */
.login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: var(--fill); border-radius: 6px; padding: 24px; }
.login-panel p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
body:not(.in) .with-login { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }

/* dashboards: 2-column rows */
.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--ink); align-items: start; }
.row:hover { text-decoration: none; background: var(--fill); }
.row.off { opacity: .45; cursor: default; }
.row.off:hover { background: none; }
.row .badge, .pod-ep .badge { border: 1px solid var(--line); }
.row .mini { aspect-ratio: 16/10; border: 1px solid var(--line); background: var(--fill) top center/cover no-repeat; }
.row h3 { font-size: 17px; font-weight: 400; display: flex; gap: 6px; align-items: center; }
.row p { margin: 2px 0 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* risk suite: one row per tool - version dropdown(s) + download; logged out, a workbook count */
.tools { border-top: 1px solid var(--line); }
.tname { font-weight: 600; display: flex; gap: 6px; align-items: center; }
.tdesc { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.t1 { display: grid; grid-template-columns: 1fr 470px 132px; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.t1 .pick { grid-column: 2; grid-row: 1; display: flex; gap: 8px; }
.t1 .pick select { flex: 1; min-width: 0; }
.t1 .pick select[data-d="0"] { flex: 0 0 124px; }
.t1 .pick select[data-m] { flex: 0 0 172px; }
.t1 .count { grid-column: 2; grid-row: 1; font-size: 14px; color: var(--muted); white-space: nowrap; }
.t1 .count .badge { color: var(--muted); border: 1px solid var(--line); }
.t1 .acts { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; gap: 6px; }
body:not(.in) .t1 { grid-template-columns: 1fr auto; }
body:not(.in) .t1 .pick, body:not(.in) .t1 .acts, body.in .t1 .count { display: none; }
.mblurb { font-size: 14px; margin: 10px 0 0; padding-left: 10px; border-left: 3px solid var(--brand); }
.mblurb b { font-weight: 600; }

/* field guides: 2-column rows, one pdf each */
.guides { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.guide { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.guide .acts { display: flex; flex-direction: column; gap: 6px; }
body:not(.in) .guide { grid-template-columns: 1fr; }
body:not(.in) .guide .acts { display: none; }


/* podcast: one public tile */
.pod { max-width: 640px; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; padding: 20px 24px; display: flex; gap: 16px; align-items: center; }
.play { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.pod-ep { flex: 1; }
.pod-ep small { color: var(--muted); display: block; font-size: 13px; }
button.play { border: 0; cursor: pointer; padding: 0; }
button.play:hover { background: var(--brand-dark); }
.pod-ep audio { display: block; width: 100%; height: 36px; margin-top: 8px; }
.pod-ep audio[hidden] { display: none; }
.pod-all { font-weight: 600; font-size: 14px; white-space: nowrap; }

/* team contacts, as on the old page */
#team { border-bottom: 0; }
.team-note { max-width: 880px; margin: 0 auto 28px; text-align: justify; }
.team { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; text-align: center; font-size: 14px; }
.team b { display: block; font-weight: 600; }
.team span { display: block; color: var(--muted); }
.team a { word-break: break-all; }

/* footer */
footer { background: #32373c; color: #b9bec3; font-size: 13px; }
footer .wrap { padding-top: 36px; padding-bottom: 36px; display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
footer h4 { color: #fff; font-size: 13px; margin: 0 0 8px; font-weight: 600; }
footer a { color: #dfe3e6; }
footer ul { list-style: none; margin: 0; padding: 0; line-height: 1.9; }
.fine { grid-column: 1 / -1; border-top: 1px solid #474d53; padding-top: 16px; color: #8d9399; }

@media (max-width: 960px) {
  nav { display: none; }
  header .acct { margin-left: auto; }
  .team { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .guides, body:not(.in) .with-login { grid-template-columns: 1fr; }
  .t1, body:not(.in) .t1 { grid-template-columns: 1fr; gap: 10px; }
  .t1 .acts { flex-direction: row; }
  .t1 .count, .t1 .pick, .t1 .acts { grid-column: auto; grid-row: auto; }
}
@media (max-width: 640px) {
  .rows, .team, footer .wrap { grid-template-columns: 1fr; }
  .row { grid-template-columns: 88px 1fr; }
  .hero h1 { font-size: 24px; }
  .pod { flex-wrap: wrap; }
  .who .email { display: none; }
}

/* login / verify pages: same header + footer, one narrow centered column */
[hidden] { display: none !important; }
.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-body header .back { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--muted); }
.auth-page { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 64px 16px; text-align: center; }
.auth-page h1 { font-size: 32px; margin-bottom: 16px; }
.auth-page p { margin: 0 0 16px; }
.auth-page .muted { color: var(--muted); }
.auth-page .error { color: #a61b1b; }
.auth-page .note { font-size: 13px; }
.auth-page button.btn { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.auth-page button.btn:disabled { opacity: .6; cursor: default; }
form.auth { display: flex; gap: 8px; margin: 8px 0 16px; }
form.auth input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 8px 12px; border: 1px solid #c9d3d6; border-radius: 4px; }
form.auth input:focus { outline: 2px solid var(--brand-tint); border-color: var(--brand); }
.auth-body footer .wrap { grid-template-columns: 1fr; }
@media (max-width: 640px) { form.auth { flex-direction: column; } }

/* /podcast/: show page - Buzzsprout's large player + where else to listen */
.podcast-page { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 48px 16px 64px; text-align: center; }
.podcast-page h1 { font-size: 32px; margin-bottom: 12px; }
.podcast-page .lede { color: var(--muted); max-width: 848px; margin: 0 auto 28px; }
.pod-player { display: block; width: 100%; height: 375px; border: 0; }
.pod-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 32px 0 40px; }
.pod-links h2 { flex-basis: 100%; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.pod-links .btn { min-width: 150px; text-align: center; }
.pod-disc { border-top: 1px solid var(--line); padding-top: 20px; text-align: left; }
.pod-disc p { font-size: 12px; color: var(--muted); margin: 0 0 10px; }

/* /videos/: SproutVideo library - the podcast page's frame, a big player + thumbnail grid (js/videos.js) */
.vid-feature { max-width: 880px; margin: 0 auto 36px; scroll-margin-top: 80px; }
.vid-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-caption { padding: 10px 2px 0; text-align: left; }
.vid-caption b { font-weight: 600; font-size: 18px; }
.vid-fallback { margin: 8px 0 32px; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 20px; text-align: left; }
.vid-card { display: flex; flex-direction: column; color: var(--ink); }
.vid-card:hover { text-decoration: none; }
.vid-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--fill); border-radius: 4px; overflow: hidden; margin-bottom: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.vid-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vid-thumb svg { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; padding: 11px 9px 11px 13px; margin: -20px 0 0 -20px; border-radius: 50%; color: #fff; background: rgba(30, 81, 98, .85); opacity: 0; transition: opacity .15s; }
.vid-card:hover .vid-thumb svg, .vid-card.on .vid-thumb svg { opacity: 1; }
.vid-card.on .vid-thumb { box-shadow: 0 0 0 3px var(--brand); }
.vid-card b { font-weight: 600; font-size: 15px; line-height: 1.35; }
.vid-card:hover b { color: var(--brand); }
@media (max-width: 640px) { .vid-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; } }
