/* ==========================================================================
   Flick Academy — the blog (blog/index.html, the list; blog/<post>.html, one post each).
   Plain and quiet: navy and grey text on a white page, no orange words (only the main button keeps the
   logo orange). Blog pages live in /blog/, so they link with paths that start with "/".
   ========================================================================== */
body { background: #fff; color: var(--navy); display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1; width: min(820px, 100% - 32px); }   /* pushes the footer to the bottom of the window on short pages */
.blog { width: min(820px, 100% - 32px); margin: 0 auto; padding: calc(46 * var(--px) + 40px) 0 64px; }
.blog .kicker { margin: 0 0 8px; font: 800 12px var(--font-heading); letter-spacing: .14em; text-transform: uppercase; color: #6b7486; }
.blog h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }

/* ---------- the list ---------- */
.blog-head { padding: 0 4px 28px; }
/* the Flick News logo (blog page heading, and the top of each post): a neon sign. NEWS glows and every 5 seconds
   flickers like a tube catching; FLICK has a steady soft glow. Still for anyone who turns motion off. */
.news-logo { display: block; width: 260px; height: auto; overflow: visible;
  filter: drop-shadow(0 0 5px rgba(252, 180, 23, .6)) drop-shadow(0 0 16px rgba(254, 132, 46, .38));   /* the frame's neon glow */
  animation: neon-frame 5s linear infinite; }
.news-logo .nl-news { animation: neon-flicker 5s linear infinite; }
/* every 5 seconds: NEWS stutters like a tube catching, and the frame's glow dips with it */
@keyframes neon-flicker {
  0%, 60%, 100% { opacity: 1; }
  61% { opacity: .35; } 62% { opacity: 1; } 63.5% { opacity: .5; } 64.5% { opacity: 1; }
  85% { opacity: 1; } 86% { opacity: .7; } 87% { opacity: 1; }
}
@keyframes neon-frame {
  0%, 60%, 64.5%, 100% { filter: drop-shadow(0 0 5px rgba(252, 180, 23, .6)) drop-shadow(0 0 16px rgba(254, 132, 46, .38)); }
  61%, 63.5% { filter: drop-shadow(0 0 2px rgba(252, 180, 23, .25)) drop-shadow(0 0 6px rgba(254, 132, 46, .12)); }
  62% { filter: drop-shadow(0 0 7px rgba(252, 180, 23, .75)) drop-shadow(0 0 20px rgba(254, 132, 46, .45)); }
}
@media (prefers-reduced-motion: reduce) { .news-logo, .news-logo .nl-news { animation: none; } }
.post-logo { display: inline-block; margin: 0 0 26px; }
.post-logo .news-logo { width: 220px; }
.blog-head .intro { margin: 12px 0 0; max-width: 600px; font-size: 16.5px; line-height: 1.6; color: #34405a; }
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.post-card a { display: block; padding: 28px 32px; border: 1px solid #dde2ea; border-radius: 12px; background: #fff; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.post-card a:hover, .post-card a:focus-visible { border-color: var(--navy); transform: translateY(-2px); }
.post-card h2 { margin: 6px 0 0; font-size: 22px; font-weight: 800; line-height: 1.25; }
.post-card p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.6; color: #34405a; }
.post-card .read { display: inline-block; margin-top: 14px; font: 700 14px var(--font-heading); color: var(--navy); }
.post-meta { margin: 0; font-size: 13.5px; color: #6b7486; }
.post-meta b { font: 800 11px var(--font-heading); letter-spacing: .12em; text-transform: uppercase; color: #6b7486; }
.posts .empty { padding: 40px 32px; border: 1px dashed #c9d0dc; border-radius: 12px; text-align: center; color: #6b7486; }

/* ---------- one post ---------- */
.back { display: inline-block; margin: 0 0 16px 4px; font: 700 14px var(--font-heading); color: #6b7486; text-decoration: none; }
.back:hover, .back:focus-visible { color: var(--navy); }
.post { padding: 0; }                                    /* plain text on the white page, no box */
.post .post-meta { margin-top: 12px; }
.post .lead { margin: 26px 0 0; font-size: 18.5px; line-height: 1.6; color: var(--navy); }
.post h2 { margin: 38px 0 10px; font-size: 22px; font-weight: 800; line-height: 1.3; }
.post h3 { margin: 26px 0 6px; font-size: 17px; font-weight: 700; }
.post p, .post li { font-size: 16.5px; line-height: 1.7; color: #34405a; }
.post ul, .post ol { padding-left: 24px; }
.post li + li { margin-top: 6px; }
.post a { color: var(--navy); font-weight: 600; text-decoration-color: #a8b3c7; text-underline-offset: 3px; }
.post a:hover { text-decoration-color: var(--navy); }
.post strong { color: var(--navy); }
.post blockquote { margin: 26px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--navy); font: 600 19px/1.5 var(--font-heading); color: var(--navy); }
.post blockquote p { margin: 0; font: inherit; color: inherit; }
.post figure { margin: 30px 0; }
.post figure img, .post figure svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.post figcaption { margin-top: 10px; font-size: 13.5px; color: #6b7486; text-align: center; }
/* a tip box: the legal pages' "In short" summary */
.post .note { margin: 26px 0; padding: 18px 22px; border-left: 3px solid #a8b3c7; border-radius: 0 10px 10px 0; background: #f5f7fa; }
.post .note p { margin: 0; }
.post .note p + p { margin-top: 8px; }
.post hr { margin: 40px 0; border: 0; border-top: 1px solid #e6e9f0; }

/* the end of every post: what to do next */
.post-next { margin-top: 44px; padding: 28px 30px; border: 1px solid #dde2ea; border-radius: 12px; background: #f7f9fc; }
.post-next h2 { margin: 0; font-size: 20px; }
.post-next p { margin: 8px 0 0; font-size: 15.5px; }
.post-next .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 24px;
  border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; font: 700 15px var(--font-heading);
  background: var(--logo-orange); color: #fff; transition: transform .2s ease, background .2s;
}
.btn:hover, .btn:focus-visible { transform: scale(1.04); background: #f0761f; color: #fff; }
.btn.line { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px #dde2ea; }
.btn.line:hover, .btn.line:focus-visible { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }

/* ---------- Flick News branding on a post ---------- */

/* the five-tools infographic: framed like the cards; opens full size on click */
.post figure.infographic { margin: 26px auto 30px; max-width: 620px; }
.post figure.infographic img { border: 1px solid #dde2ea; }
[data-theme="dark"] .post figure.infographic img { border-color: rgba(168, 179, 199, .25); }

/* the pro settings tables */
.post .table-note { margin: 0 0 10px; font-size: 14.5px; color: #6b7486; }
.table-wrap { overflow-x: auto; margin: 0 0 8px; border: 1px solid #dde2ea; border-radius: 10px; }
.sens-table { width: 100%; border-collapse: collapse; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.sens-table th, .sens-table td { padding: 11px 16px; text-align: right; white-space: nowrap; color: #34405a; }
.sens-table th:first-child { text-align: left; }
.sens-table thead th { font: 700 12px var(--font-heading); letter-spacing: .06em; text-transform: uppercase; color: #6b7486; background: #f5f7fa; border-bottom: 1px solid #dde2ea; }
.sens-table tbody th { font-weight: 700; color: var(--navy); }
.sens-table tbody tr + tr > * { border-top: 1px solid #eef1f5; }
.sens-table td:last-child { font-weight: 700; color: var(--navy); }
.post .fine { margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: #6b7486; }

/* the cm/360 bar chart (plain HTML bars so it fits any screen; scale 0 to 90 cm) */
.travel-chart { margin: 30px 0; padding: 22px 24px 20px; border: 1px solid #dde2ea; border-radius: 12px; background: #fff; }
.tc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 6px; }
.tc-title { font: 800 16px var(--font-heading); color: var(--navy); }
.tc-unit { font-size: 13px; color: #6b7486; }
.tc-game { margin: 14px 0 6px !important; font: 800 11px var(--font-heading) !important; letter-spacing: .12em; text-transform: uppercase; color: #6b7486 !important; }
.tc-row { display: grid; grid-template-columns: 76px 1fr 64px; align-items: center; gap: 12px; margin: 6px 0; }
.tc-name { font: 700 14px var(--font-heading); color: var(--navy); }
.tc-track { height: 16px; border-radius: 4px; background: #eef1f5; overflow: hidden; }
.tc-track i { display: block; height: 100%; width: calc(var(--v) / 90 * 100%); border-radius: 4px; background: var(--navy); }
.tc-row.hl .tc-track i { background: var(--logo-orange); }
.tc-val { font: 700 14px var(--font-body); font-variant-numeric: tabular-nums; color: var(--navy); text-align: right; }

/* each tool: question / what you do / what you learn */
.tool-card { margin: 14px 0 0; padding: 20px 22px; border: 1px solid #dde2ea; border-radius: 12px; background: #f7f9fc; }
.tool-card dl { margin: 0; }
/* a small picture of the tool at the top of its card; clicking it opens the tool */
.tool-shot { display: block; max-width: 440px; margin-bottom: 16px; border-radius: 8px; overflow: hidden; border: 1px solid #dde2ea; background: #fff; transition: transform .2s, border-color .2s; }
.tool-shot:hover { transform: translateY(-2px); border-color: var(--navy); }
.tool-shot img { display: block; width: 100%; height: auto; }
.tool-card dt { font: 800 11.5px var(--font-heading); letter-spacing: .12em; text-transform: uppercase; color: #6b7486; }
.tool-card dt:not(:first-child) { margin-top: 14px; }
.tool-card dd { margin: 4px 0 0; font-size: 16.5px; line-height: 1.65; color: #34405a; }
.tool-card dt:first-child + dd { font-weight: 600; color: var(--navy); }
.tool-card .tool-link { margin-top: 14px; }
.tool-card .tool-link a { font: 700 14.5px var(--font-heading); text-decoration: none; }
.tool-card .tool-link a:hover { text-decoration: underline; }

/* a day with the tools: numbered steps */
.post ol.day { list-style: none; padding: 0; counter-reset: day; }
.post ol.day li { counter-increment: day; position: relative; padding-left: 42px; }
.post ol.day li + li { margin-top: 12px; }
.post ol.day li::before { content: counter(day); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font: 800 13px var(--font-heading); color: #fff; background: var(--navy); }

/* sources at the end */
.sources { margin-top: 44px; padding-top: 26px; border-top: 1px solid #e6e9f0; }
.sources h2 { margin-top: 0; font-size: 18px; }
.sources p, .sources li { font-size: 14.5px; line-height: 1.6; }
.sources p { margin: 6px 0 0; }
.sources ul { margin: 12px 0 0; }
.sources li + li { margin-top: 4px; }
.sources + .post-next { margin-top: 36px; }

/* the writer's byline under the title: round avatar, name, then date and read time */
.byline { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.byline img { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.post .byline p { margin: 0; }
.post .byline .by { font: 600 15.5px var(--font-heading); color: var(--navy); line-height: 1.3; }
.post .byline .by b { font-weight: 800; }
.post .byline .post-meta { margin-top: 2px; line-height: 1.45; }

/* ---------- dark mode (the switch at the top of each blog page; blog.js) ---------- */
.blog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 4px 16px; }
.blog-bar .back { margin: 0; }
.theme-switch {
  position: relative; flex: none; width: 46px; height: 26px; padding: 0; cursor: pointer;
  border: 1.5px solid var(--logo-orange); border-radius: 999px; background: #fff; transition: background-color .25s;
}
.theme-switch .knob {
  position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; background: var(--logo-orange); color: #fff; transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}
.theme-switch svg { grid-area: 1 / 1; width: 12px; height: 12px; transition: opacity .2s; }
.theme-switch .moon { opacity: 0; }
.theme-switch[aria-checked="true"] { background: #0f1b2e; }
.theme-switch[aria-checked="true"] .knob { transform: translateX(20px); }
.theme-switch[aria-checked="true"] .sun { opacity: 0; }
.theme-switch[aria-checked="true"] .moon { opacity: 1; }
.theme-switch:focus-visible { outline: 2px solid var(--logo-orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .theme-switch, .theme-switch .knob, .theme-switch svg { transition: none; } }

[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] body { background: #0f1b2e; color: #fff; }
[data-theme="dark"] .blog { --navy: #fff; }
[data-theme="dark"] .blog .kicker, [data-theme="dark"] .post-meta, [data-theme="dark"] .post-meta b,
[data-theme="dark"] .back, [data-theme="dark"] .post .fine, [data-theme="dark"] .post .table-note,
[data-theme="dark"] .tc-unit, [data-theme="dark"] .tc-game, [data-theme="dark"] .tool-card dt,
[data-theme="dark"] .sens-table thead th { color: #9aa6ba !important; }
[data-theme="dark"] .back:hover { color: #fff; }
[data-theme="dark"] .post p, [data-theme="dark"] .post li, [data-theme="dark"] .post-card p, [data-theme="dark"] .blog-head .intro,
[data-theme="dark"] .tool-card dd, [data-theme="dark"] .sens-table th, [data-theme="dark"] .sens-table td { color: #d3dae6; }
[data-theme="dark"] .post .lead, [data-theme="dark"] .tool-card dt:first-child + dd, [data-theme="dark"] .sens-table tbody th,
[data-theme="dark"] .sens-table td:last-child { color: #fff; }
[data-theme="dark"] .post a { text-decoration-color: #5d6b84; }
[data-theme="dark"] .post-card a, [data-theme="dark"] .travel-chart, [data-theme="dark"] .tool-card, [data-theme="dark"] .post-next,
[data-theme="dark"] .table-wrap { background: #1c2d4a; border-color: rgba(168, 179, 199, .16); }
[data-theme="dark"] .tool-shot { border-color: rgba(168, 179, 199, .25); }
[data-theme="dark"] .tool-shot:hover { border-color: #fff; }
[data-theme="dark"] .post-card a:hover, [data-theme="dark"] .post-card a:focus-visible { border-color: #fff; }
[data-theme="dark"] .sens-table thead th { background: #16243d; border-bottom-color: rgba(168, 179, 199, .16); }
[data-theme="dark"] .sens-table tbody tr + tr > * { border-top-color: rgba(168, 179, 199, .12); }
[data-theme="dark"] .tc-track { background: #0f1b2e; }
[data-theme="dark"] .tc-track i { background: #a8b3c7; }
[data-theme="dark"] .tc-row.hl .tc-track i { background: var(--logo-orange); }
[data-theme="dark"] .post ol.day li::before { background: #fff; color: #0f1b2e; }
[data-theme="dark"] .sources, [data-theme="dark"] .post hr { border-top-color: rgba(168, 179, 199, .16); }
[data-theme="dark"] .post blockquote { border-left-color: #fff; }
[data-theme="dark"] .post .note { background: #1c2d4a; border-left-color: #5d6b84; }
[data-theme="dark"] .btn.line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(168, 179, 199, .4); }
[data-theme="dark"] .btn.line:hover, [data-theme="dark"] .btn.line:focus-visible { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
[data-theme="dark"] body > .site-footer { border-top: 1px solid rgba(168, 179, 199, .16); }

@media (max-width: 640px) {
  .post { padding: 0; }
  .post-card a { padding: 22px 20px; }
  .post .lead { font-size: 17px; }
  .post-next { padding: 22px 20px; }
  .news-logo { width: 210px; }
  .post-logo .news-logo { width: 180px; }
  .sens-table { font-size: 14px; }
  .sens-table th, .sens-table td { padding: 10px 10px; }
  .sens-table thead th { font-size: 10.5px; letter-spacing: .03em; white-space: normal; }
  .travel-chart { padding: 18px 16px 16px; }
  .tc-row { grid-template-columns: 64px 1fr 58px; gap: 8px; }
  .tool-card { padding: 18px 18px; }
  .tool-shot { margin-bottom: 14px; }
}
