/* DailyFinnish.fi – site styles on top of Beer CSS. Hand-written, no build step. */

/* Colour tokens. Everything except the four brand accents aliases Beer CSS variables, which Beer
   defines on :root/body.light and body.dark, so every component follows light and dark automatically.
   Aliases live on body (not :root) because var() inside a custom property resolves on the element
   where it is declared, and Beer's dark palette is declared on body.dark. */
:root {
  --df-gold: #e8b23a;
  --df-berry: #b23a5e;
  --df-green: #2f7d4f;
  --df-amber: #c2701a;
  --df-radius: 10px;
  --df-radius-sm: 10px;
  --df-maxw: 76rem;
  --df-article-w: 46rem;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --df-ease: cubic-bezier(.2, .8, .2, 1);
  --df-speed: .22s;
}
/* Beer's own rounded utilities (.round, .small-round, fields, chips, cards) all read --_round; one value for all. */
.round, [class*=-round], article, .chip, .field { --_round: 10px; }
article { border-radius: 10px; }
.field.round, .field.round.small, .field.round.large, .field.round.extra { border-radius: 10px; }
body {
  --df-blue: var(--primary);
  --df-blue-2: var(--primary);
  --df-ink: var(--on-surface);
  --df-muted: var(--on-surface-variant);
  --df-line: var(--outline-variant);
  --df-surface: var(--surface-container-lowest);
  --df-surface-2: var(--surface-container-high);
  --df-bg: var(--surface);
  --df-shadow: var(--elevate1);
}
body.dark {
  --df-gold: #f2c65c;
  --df-berry: #e08aa4;
  --df-green: #7fcf9a;
  --df-amber: #f0a458;
}

html { scroll-behavior: smooth; }
body { background: var(--df-bg); color: var(--df-ink); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--df-blue-2); }
main.df-main { max-width: var(--df-maxw); margin: 0 auto; padding: 1rem 1rem 4rem; }
@media (min-width: 993px) { main.df-main { padding: 1.5rem 2rem 5rem; } }
.df-skip { position: absolute; left: -999px; top: 0; background: var(--df-gold); color: #000; padding: .5rem 1rem; z-index: 100; }
.df-skip:focus { left: 1rem; }
.df-muted { color: var(--df-muted); }
.df-i { width: 1.25em; height: 1.25em; vertical-align: -0.28em; flex: none; }

/* Top nav */
nav.top.df-top { background: color-mix(in srgb, var(--df-surface) 78%, transparent); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--df-line) 70%, transparent); gap: .25rem; box-shadow: none; padding-inline: 1rem; }
/* Desktop: inset the bar exactly like main.df-main (max-width --df-maxw, centred, 2rem side padding) so the logo lines up with the content column. */
@media (min-width: 993px) { nav.top.df-top { padding-inline: max(2rem, calc((100% - var(--df-maxw)) / 2 + 2rem)); } }
/* Brand: logo icon left, wordmark right. The link sits in .df-brand-wrap so Beer's nav>a column rule skips it. */
.df-brand-wrap { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; }
.df-brand { display: inline-flex; flex-direction: row; align-items: center; gap: .5rem; text-decoration: none; color: var(--df-ink); font-weight: 700; font-size: 1.75rem; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.df-brand__logo { display: block; flex: none; height: 2.25rem; width: auto; }
.df-brand { min-width: 0; }
.df-brand__name { overflow: hidden; text-overflow: ellipsis; }
.df-brand__name b { color: var(--df-blue); }
/* Phones: the bar holds menu, brand, search and theme. Shrink the brand and the
   gutter so all four fit at 360px instead of pushing the document sideways. */
@media (max-width: 600px) {
  nav.top.df-top { padding-inline: .6rem; }
  .df-brand { font-size: 1.02rem; gap: .4rem; }
  .df-brand__logo { height: 1.95rem; }
}
.df-topnav { display: flex; gap: .15rem; margin-right: .5rem; }
.df-topnav__a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border-radius: var(--df-radius); color: var(--df-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.df-topnav__a:hover, .df-topnav__a.is-active { background: var(--df-surface-2); color: var(--df-blue); }
/* The one YouTube red on the site: the top bar button and the "Watch on
   YouTube" link on a lesson. Beer sets a button's own colours, hence !important. */
.df-yt-btn { background: #cc0000 !important; color: #fff !important; }
.df-yt-btn:hover { background: #a80000 !important; }
.df-yt-btn .df-i { color: #fff; }
nav.bottom.df-bottom { background: color-mix(in srgb, var(--df-surface) 82%, transparent); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid color-mix(in srgb, var(--df-line) 70%, transparent); }
nav.bottom.df-bottom a { font-size: .7rem; }
/* Five slots have to share a 320px screen. Beer gives each one a fixed 3.5rem,
   which "Resources" overflows and that pushes the whole document sideways. */
nav.bottom.df-bottom > a { inline-size: auto; min-inline-size: 0; flex: 1 1 0; padding-inline: .1rem; }
nav.bottom.df-bottom > a > span { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.bottom.df-bottom a.active { color: var(--df-blue); }

/* Drawer */
.df-drawer { max-width: 22rem; }
.df-drawer__pillar { font-weight: 600; }
.df-drawer__hubs { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 1rem .75rem 3.5rem; }
.df-drawer__hubs a { font-size: .8rem; padding: .2rem .6rem; border: 1px solid var(--df-line); border-radius: var(--df-radius); text-decoration: none; color: var(--df-muted); }
.df-drawer__hubs a:hover { color: var(--df-blue); border-color: var(--df-blue); }

/* Search dialog */
.df-searchdlg { width: min(44rem, 94vw); max-height: 80vh; border-radius: var(--df-radius); padding: 1rem; }
.df-searchfield { margin: 0 0 .75rem; }
.df-results a { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem .5rem; border-radius: var(--df-radius-sm); text-decoration: none; color: var(--df-ink); }
.df-results a:hover, .df-results a:focus { background: var(--df-surface-2); }
.df-results .df-i { color: var(--df-muted); margin-top: .15rem; }
.df-results small { display: block; color: var(--df-muted); }
.df-results__empty { color: var(--df-muted); padding: 1rem .5rem; }

/* Breadcrumbs, hero, meta. The hero is a <div>, not <header>: Beer CSS turns header into a grid app bar. */
.df-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 0 0 .75rem; font-size: .85rem; color: var(--df-muted); white-space: normal; }
.df-crumbs li { min-width: 0; overflow-wrap: anywhere; }
.df-crumbs li + li::before { content: "›"; margin: 0 .35rem; color: var(--df-muted); }
.df-crumbs a { color: var(--df-muted); text-decoration: none; }
.df-crumbs a:hover { color: var(--df-blue); text-decoration: underline; }
.df-hero { max-width: var(--df-article-w); margin: 0 0 1.5rem; }
.df-hero--pillar { max-width: none; }
.df-hero h1 { font-size: clamp(1.75rem, 2.2vw + 1.2rem, 2.6rem); line-height: 1.15; letter-spacing: -.02em; margin: .25rem 0 .5rem; font-weight: 800; }
.df-lead { font-size: 1.12rem; color: var(--df-muted); margin: 0 0 .5rem; }
.df-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--df-blue); background: color-mix(in srgb, var(--df-blue) 10%, transparent); padding: .25rem .7rem .25rem .5rem; border-radius: var(--df-radius); }
.df-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; color: var(--df-muted); margin: .25rem 0 0; }
.df-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.df-meta__sep { opacity: .5; }
.df-eyebrow { display: inline-flex; align-items: center; gap: .4rem; color: var(--df-blue); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; margin: 0 0 .5rem; }
.df-accent { color: var(--df-blue); }
.df-hero-video { max-width: var(--df-article-w); margin: 0 0 1.5rem; }

/* Article typography */
.df-article { max-width: var(--df-article-w); font-size: 1.05rem; }
.df-article > :first-child { margin-top: 0; }
.df-article h2 { font-size: 1.5rem; margin: 2.25rem 0 .75rem; letter-spacing: -.01em; scroll-margin-top: 5rem; }
.df-article h3 { font-size: 1.2rem; margin: 1.75rem 0 .5rem; scroll-margin-top: 5rem; }
.df-article p { margin: 0 0 1rem; }
.df-article ul, .df-article ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.df-article li { margin: .25rem 0; }
.df-article blockquote { margin: 1rem 0; padding: .5rem 1rem; border-left: 4px solid var(--df-gold); background: var(--df-surface-2); border-radius: 0 var(--df-radius-sm) var(--df-radius-sm) 0; }
.df-article code { background: var(--df-surface-2); padding: .1rem .35rem; border-radius: 6px; font-size: .92em; }
.df-article pre { background: var(--df-surface-2); padding: .9rem 1rem; border-radius: var(--df-radius-sm); overflow: auto; }
.df-article img { max-width: 100%; height: auto; border-radius: var(--df-radius-sm); }
.df-article hr { border: 0; border-top: 1px solid var(--df-line); margin: 2rem 0; }
.df-article strong { font-weight: 700; }
.df-article .fi, .df-article em.fi { font-style: normal; font-weight: 600; color: var(--df-blue); }

/* Tables */
.df-table { overflow-x: auto; margin: 1rem 0 1.25rem; border: 1px solid var(--df-line); border-radius: var(--df-radius-sm); background: var(--df-surface); }
.df-table table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0; }
.df-table th, .df-table td { padding: .55rem .75rem; text-align: left; border-bottom: 1px solid var(--df-line); vertical-align: top; }
.df-table thead th { background: var(--df-surface-2); font-weight: 700; white-space: nowrap; }
.df-table tbody tr:last-child td { border-bottom: 0; }
.df-table tbody tr:hover { background: color-mix(in srgb, var(--df-surface-2) 60%, transparent); }

/* TOC: box, colour, radius and padding come from Beer utility classes; only the columns are ours. */
.df-toc { margin: 0 0 1.5rem; font-size: .95rem; max-width: 100%; }
.df-toc__list { display: block; margin: .35rem 0 0; padding: 0 0 0 1.4rem; list-style: decimal; columns: 2; column-gap: 1.5rem; white-space: normal; }
.df-toc__list li { display: list-item; break-inside: avoid; margin: .15rem 0; overflow-wrap: anywhere; }
.df-toc__list a { text-decoration: none; }
.df-toc__list a:hover { text-decoration: underline; }
@media (max-width: 600px) { .df-toc__list { columns: 1; } }

/* Callouts */
.df-callout { display: flex; gap: .75rem; padding: .9rem 1rem; border-radius: var(--df-radius-sm); margin: 1.25rem 0; background: var(--df-surface-2); border-left: 4px solid var(--df-blue); }
.df-callout > .df-i { flex: none; width: 1.5rem; height: 1.5rem; color: var(--df-blue); margin-top: .1rem; }
.df-callout__body > :last-child { margin-bottom: 0; }
.df-callout--tip { border-color: var(--df-green); } .df-callout--tip > .df-i { color: var(--df-green); }
.df-callout--warning { border-color: var(--df-amber); background: color-mix(in srgb, var(--df-amber) 10%, var(--df-surface-2)); } .df-callout--warning > .df-i { color: var(--df-amber); }
.df-callout--finnish { border-color: var(--df-berry); } .df-callout--finnish > .df-i { color: var(--df-berry); }
.df-callout--note { border-color: var(--df-muted); } .df-callout--note > .df-i { color: var(--df-muted); }

/* Life tip */
.df-lifetip { display: flex; gap: .9rem; max-width: var(--df-article-w); margin: 2rem 0; padding: 1rem 1.1rem; border-radius: var(--df-radius); background: linear-gradient(135deg, color-mix(in srgb, var(--df-gold) 22%, var(--df-surface)), var(--df-surface)); border: 1px solid color-mix(in srgb, var(--df-gold) 50%, var(--df-line)); }
.df-lifetip > .df-i { flex: none; width: 1.75rem; height: 1.75rem; color: var(--df-amber); }
.df-lifetip p { margin: .25rem 0 .5rem; }
.df-lifetip__link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; text-decoration: none; }

/* Cards */
.df-cards { margin: 2rem 0; }
.df-cards__h { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; margin: 0 0 .75rem; }
.df-cards__h .df-i { color: var(--df-blue); }
.df-cards__grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.df-card { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; background: var(--df-surface); border: 1px solid var(--df-line); border-radius: var(--df-radius); text-decoration: none; color: var(--df-ink); box-shadow: var(--df-shadow); transition: transform var(--df-speed) var(--df-ease), box-shadow var(--df-speed) var(--df-ease), border-color var(--df-speed); }
.df-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--df-blue) 45%, var(--df-line)); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--df-blue) 35%, transparent), var(--df-shadow); }
.df-card:hover .df-card__icon { background: var(--primary-container); color: var(--on-primary-container); transform: scale(1.06); }
.df-card:active { transform: translateY(0) scale(.985); transition-duration: .08s; }
.df-card__icon { transition: transform var(--df-speed) var(--df-ease), background var(--df-speed); }
.df-card__icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 12px; background: var(--df-surface-2); color: var(--df-blue); }
.df-card__icon .df-i { width: 1.4rem; height: 1.4rem; vertical-align: 0; }
.df-card__body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.df-card__title { font-weight: 700; line-height: 1.3; }
.df-card__desc { font-size: .88rem; color: var(--df-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.df-card__meta { font-size: .75rem; color: var(--df-blue); font-weight: 700; letter-spacing: .04em; }
.df-card__chev { color: var(--df-muted); flex: none; }

/* FAQ, sources */
.df-faq { max-width: var(--df-article-w); margin: 2rem 0; }
.df-faq h2 { font-size: 1.5rem; margin: 0 0 .75rem; }
.df-faq__item { border: 1px solid var(--df-line); border-radius: var(--df-radius-sm); background: var(--df-surface); margin: 0 0 .5rem; }
.df-faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem; cursor: pointer; font-weight: 600; list-style: none; }
.df-faq__item summary::-webkit-details-marker { display: none; }
.df-faq__item[open] summary .df-faq__chev { transform: rotate(180deg); }
.df-faq__chev { transition: transform .2s; color: var(--df-muted); }
.df-faq__a { padding: 0 1rem .9rem; color: var(--df-ink); }
.df-faq__a p { margin: 0; }
.df-sources { max-width: var(--df-article-w); margin: 1.5rem 0; font-size: .92rem; }
.df-sources h2 { font-size: 1.1rem; margin: 0 0 .35rem; }
.df-sources ul { margin: 0; padding-left: 1.2rem; }

/* Partner block */
.df-partners { max-width: var(--df-article-w); margin: 2rem 0; padding: 1rem 1.1rem; border-radius: var(--df-radius); background: var(--df-surface); border: 1px solid var(--df-line); }
.df-partners__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.df-partners__head h2 { display: flex; align-items: center; gap: .4rem; font-size: 1.1rem; margin: 0; }
.df-chip { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .15rem .55rem; border-radius: var(--df-radius); }
.df-chip--ad { background: color-mix(in srgb, var(--df-gold) 30%, transparent); color: var(--df-ink); }
.df-partners__grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.df-partner { display: flex; flex-direction: column; gap: .2rem; padding: .8rem .9rem; border: 1px solid var(--df-line); border-radius: var(--df-radius-sm); text-decoration: none; color: var(--df-ink); background: var(--df-surface-2); }
.df-partner:hover { border-color: var(--df-blue); }
.df-partner__name { font-weight: 700; }
.df-partner__tag { font-size: .85rem; color: var(--df-muted); }
.df-partner__cta { margin-top: .35rem; display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; color: var(--df-blue); font-size: .9rem; }
.df-partners__note { font-size: .8rem; color: var(--df-muted); margin: .75rem 0 0; }
.df-golink { font-weight: 600; text-decoration: none; }
.df-golink__i { width: .9em; height: .9em; }

/* Home */
.df-homehero { display: grid; gap: 1.5rem; padding: 1.5rem 0 1rem; }
.df-homehero h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.6rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 .75rem; font-weight: 800; }
.df-homehero .df-lead { font-size: 1.2rem; max-width: 40rem; }
.df-homehero__cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.df-today { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin: 1.5rem 0; }
.df-today__item { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem .9rem; background: var(--df-surface); border: 1px solid var(--df-line); border-radius: var(--df-radius-sm); font-size: .92rem; }
.df-today__item > .df-i { color: var(--df-blue); flex: none; margin-top: .15rem; }
.df-today__item strong { display: block; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--df-muted); }
.df-pillars { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin: 1.5rem 0; }
.df-pillarcard { --c: var(--df-blue); display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem; border-radius: var(--df-radius); background: var(--df-surface); border: 1px solid var(--df-line); text-decoration: none; color: var(--df-ink); box-shadow: var(--df-shadow); position: relative; overflow: hidden; transition: transform .15s; }
.df-pillarcard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c); }
.df-pillarcard:hover { transform: translateY(-4px); box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--c) 45%, transparent), var(--df-shadow); }
.df-pillarcard:active { transform: translateY(-1px) scale(.99); }
.df-pillarcard { transition: transform var(--df-speed) var(--df-ease), box-shadow var(--df-speed) var(--df-ease); }
.df-pillarcard:hover .df-pillarcard__go .df-i { transform: translateX(3px); }
.df-pillarcard__go .df-i { transition: transform var(--df-speed) var(--df-ease); }
.df-pillarcard--living { --c: var(--df-green); }
.df-pillarcard--finnish-culture { --c: var(--df-berry); }
.df-pillarcard--resources { --c: var(--df-amber); }
.df-pillarcard--living-in-finland { --c: var(--df-green); }
.df-pillarcard__icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.df-pillarcard__icon .df-i { width: 1.6rem; height: 1.6rem; vertical-align: 0; }
.df-pillarcard__name { font-size: 1.2rem; font-weight: 800; margin-top: .25rem; }
.df-pillarcard__desc { color: var(--df-muted); font-size: .92rem; }
.df-pillarcard__go { margin-top: .5rem; font-weight: 600; color: var(--c); display: inline-flex; align-items: center; gap: .25rem; }
.df-ytblock { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-radius: var(--df-radius); background: var(--df-surface); border: 1px solid var(--df-line); margin: 2rem 0; }
.df-ytblock h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .35rem; font-size: 1.3rem; }
.df-ytblock h2 .df-i { color: #cc0000; }
.df-ytblock p { margin: 0; color: var(--df-muted); max-width: 40rem; }

/* YouTube facade + audio */
.df-yt { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--df-radius-sm); overflow: hidden; }
.df-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.df-yt__play { position: absolute; inset: 0; margin: auto; width: 4.5rem; height: 4.5rem; border: 0; border-radius: 50%; background: rgb(204 0 0 / .95); color: #fff; cursor: pointer; display: grid; place-items: center; }
.df-yt__play .df-i { width: 2.6rem; height: 2.6rem; vertical-align: 0; }
.df-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Beer gives every <button> a 2.5rem minimum and side padding; the audio button is a compact circle. */
.df-audio { display: inline-grid; place-items: center; width: 2rem; height: 2rem; min-inline-size: 0; block-size: 2rem; padding: 0; box-sizing: border-box; border: 1px solid var(--df-line); border-radius: 50%; background: var(--df-surface); color: var(--df-blue); cursor: pointer; vertical-align: middle; margin-left: .25rem; }
.df-audio .df-i { width: 1.1rem; height: 1.1rem; vertical-align: 0; }
.df-audio.is-playing { background: var(--primary); color: var(--on-primary); }

/* Footer. Must stay a <footer>: Beer lays out body as a grid with named areas and places footer in the
   footer area; any other direct child of body is auto-placed and breaks the page. Only the inner
   container is ours, because Beer's .responsive means full width, not a centred column. */
/* Vertical spacing lives on the inner container: Beer's `nav.bottom ~ footer { padding-block: 0 }` outranks
   any class on the footer itself, so padding on .df-footer would silently be zeroed. */
.df-footer { background: var(--df-surface); border-top: 1px solid var(--df-line); margin-top: 3rem; padding: 0; }
.df-footer__inner { max-width: var(--df-maxw); margin: 0 auto; padding: 2.25rem 1rem 2.5rem; }
@media (min-width: 993px) { .df-footer__inner { padding: 2.5rem 2rem 2.5rem; } }
.df-footer__grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.df-footer__h { display: flex; justify-content: flex-start; align-items: center; gap: .4rem; font-weight: 700; text-decoration: none; color: var(--df-ink); margin-bottom: .4rem; }
.df-footer__col ul { list-style: none; margin: 0; padding: 0; }
.df-footer__col li a { display: block; padding: .15rem 0; color: var(--df-muted); text-decoration: none; font-size: .9rem; }
.df-footer__col li a:hover { color: var(--df-blue); }
.df-footer__bottom { border-top: 1px solid var(--df-line); margin-top: 1.5rem; padding-top: 1rem; }
.df-footer__links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .5rem 0; }
.df-footer__links a { color: var(--df-muted); text-decoration: none; font-size: .9rem; }

/* Learn: verb/noun tables, quiz, flashcards */
.df-conj { max-width: var(--df-article-w); margin: 1.25rem 0; }
.df-conj__tabs { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--df-surface-2); border-radius: var(--df-radius); margin-bottom: .75rem; }
.df-conj__tab { border: 0; background: transparent; padding: .4rem .9rem; border-radius: var(--df-radius); font-weight: 600; cursor: pointer; color: var(--df-muted); }
.df-conj__tab.is-active { background: var(--df-surface); color: var(--df-blue); box-shadow: var(--df-shadow); }
.df-conj [data-register] { display: none; }
.df-conj [data-register].is-active { display: block; }
.df-conj-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.df-conj-card { background: var(--df-surface); border: 1px solid var(--df-line); border-radius: var(--df-radius-sm); padding: .75rem .9rem; }
.df-conj-card h3 { margin: 0 0 .4rem; font-size: 1rem; display: flex; justify-content: space-between; align-items: baseline; }
.df-conj-card h3 small { color: var(--df-muted); font-weight: 500; }
.df-conj-card table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.df-conj-card td { padding: .2rem 0; border-bottom: 1px dashed var(--df-line); }
.df-conj-card td:first-child { color: var(--df-muted); width: 34%; }
.df-conj-card td:last-child { font-weight: 600; }
.df-conj-card tr:last-child td { border-bottom: 0; }
.df-wordhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.df-wordhead .df-chip { background: var(--df-surface-2); color: var(--df-muted); }
.df-examples li { margin: .35rem 0; }
.df-examples .en { color: var(--df-muted); display: block; font-size: .95rem; }

.df-quiz, .df-flash, .df-drill { max-width: var(--df-article-w); margin: 1.5rem 0; padding: 1rem 1.1rem; border-radius: var(--df-radius); background: var(--df-surface); border: 1px solid var(--df-line); box-shadow: var(--df-shadow); }
.df-quiz__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; font-size: .9rem; color: var(--df-muted); }
.df-quiz__q { font-size: 1.1rem; font-weight: 600; margin: 0 0 .75rem; }
.df-quiz__opts { display: grid; gap: .5rem; }
.df-quiz__opt { display: flex; justify-content: flex-start; width: 100%; min-inline-size: 0; block-size: auto; box-sizing: border-box; text-align: left; padding: .8rem 1rem; border: 1px solid var(--df-line); border-radius: var(--df-radius-sm); background: var(--df-surface-2); cursor: pointer; font: inherit; color: inherit; }
.df-quiz__opt:hover { border-color: var(--df-blue); }
.df-quiz__opt.is-selected { border-color: var(--df-blue); background: color-mix(in srgb, var(--df-blue) 10%, var(--df-surface-2)); }
.df-quiz__opt.is-correct { border-color: var(--df-green); background: color-mix(in srgb, var(--df-green) 14%, var(--df-surface-2)); }
.df-quiz__opt.is-wrong { border-color: var(--df-berry); background: color-mix(in srgb, var(--df-berry) 12%, var(--df-surface-2)); }
.df-quiz__input { width: 100%; padding: .7rem .9rem; border: 1px solid var(--df-line); border-radius: var(--df-radius-sm); font: inherit; background: var(--df-surface-2); color: inherit; }
.df-quiz__fb { margin: .75rem 0 0; padding: .6rem .8rem; border-radius: var(--df-radius-sm); font-size: .95rem; }
.df-quiz__fb.ok { background: color-mix(in srgb, var(--df-green) 14%, transparent); }
.df-quiz__fb.bad { background: color-mix(in srgb, var(--df-berry) 12%, transparent); }
.df-quiz__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.df-quiz__done { text-align: center; padding: 1rem 0; }
.df-quiz__done strong { font-size: 2rem; display: block; }
.df-bar { height: 6px; border-radius: 3px; background: var(--df-surface-2); overflow: hidden; margin-top: .5rem; }
.df-bar i { display: block; height: 100%; background: var(--df-blue); transition: width .3s; }
.df-flash__card { min-height: 9rem; display: grid; place-items: center; text-align: center; padding: 1rem; border-radius: var(--df-radius-sm); background: var(--df-surface-2); cursor: pointer; font-size: 1.4rem; font-weight: 600; }
.df-flash__card small { display: block; font-size: .9rem; color: var(--df-muted); font-weight: 400; margin-top: .35rem; }
.df-flash__rate { display: none; gap: .5rem; margin-top: .75rem; }
.df-flash__rate.is-open { display: flex; flex-wrap: wrap; }
.df-flash__rate button { flex: 1; }
.df-flash__stats { font-size: .85rem; color: var(--df-muted); display: flex; justify-content: space-between; margin-bottom: .5rem; }
.df-kbd { font-family: ui-monospace, monospace; font-size: .85em; padding: .05rem .35rem; border: 1px solid var(--df-line); border-radius: 5px; background: var(--df-surface-2); }

/* Vocabulary list */
.df-vocab { max-width: var(--df-article-w); margin: 1rem 0; }
.df-vocab table { width: 100%; border-collapse: collapse; }
.df-vocab td { padding: .5rem .4rem; border-bottom: 1px solid var(--df-line); vertical-align: top; }
.df-vocab td.fi { font-weight: 700; width: 38%; }
.df-vocab td.ex { color: var(--df-muted); font-size: .9rem; }

/* Utility */
.df-grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.df-btnrow { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.df-badge { display: inline-block; padding: .1rem .5rem; border-radius: var(--df-radius); font-size: .75rem; font-weight: 700; background: var(--df-surface-2); color: var(--df-muted); }
.df-404 .df-hero { text-align: center; max-width: none; }
@media print { nav.top, nav.bottom, .df-footer, .df-partners, .df-drawer, .df-searchdlg { display: none !important; } }

/* ------------------------------------------------------------------ *
 *  Alive: motion, depth and feedback (iOS-like, corners unchanged)    *
 * ------------------------------------------------------------------ */
/* Entrance motion never touches opacity: content must be visible in the very first frame for people,
   screenshots and search engines that snapshot before animations run. */
@keyframes df-fadeup { from { transform: translateY(10px); } to { transform: none; } }
@keyframes df-pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes df-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes df-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 45%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
@keyframes df-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(12px, -10px); } }

/* Content slides in; stagger the first blocks. */
.df-main > * { animation: df-fadeup .45s var(--df-ease) backwards; }
.df-main > :nth-child(2) { animation-delay: .05s; }
.df-main > :nth-child(3) { animation-delay: .1s; }
.df-main > :nth-child(4) { animation-delay: .15s; }

/* Buttons and tappable things answer the finger. */
.button, button.button, .df-quiz__opt, .df-conj__tab, .df-audio, .df-topnav__a, .df-pill, .df-lifetip__link, .df-partner {
  transition: transform .12s var(--df-ease), background var(--df-speed), color var(--df-speed), box-shadow var(--df-speed), border-color var(--df-speed);
}
.button:active, button.button:active, .df-quiz__opt:active, .df-conj__tab:active, .df-partner:active { transform: scale(.97); }
.button:not(.border):not(.transparent):not(.circle) { box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary) 55%, transparent); }
.button:not(.border):not(.transparent):not(.circle):hover { box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--primary) 60%, transparent); transform: translateY(-1px); }
/* iOS-style tinted secondary button: Beer's tonal class does the colour. */
.button.primary-container { box-shadow: none; }
.button.primary-container:hover { background: color-mix(in srgb, var(--primary-container) 85%, var(--primary)) !important; }
/* Keyboard focus that is visible and tidy. */
:is(a, button, .button, input, select, summary, [tabindex]):focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: var(--df-radius-sm); }

/* Homepage hero: a soft moving glow behind the title, gradient on the accent line. */
.df-homehero { position: relative; isolation: isolate; }
.df-homehero::before { content: ""; position: absolute; z-index: -1; inset: -3rem auto auto -3rem; width: 26rem; height: 18rem; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%); filter: blur(8px); animation: df-float 9s ease-in-out infinite; pointer-events: none; }
.df-homehero::after { content: ""; position: absolute; z-index: -1; inset: auto -4rem -4rem auto; width: 22rem; height: 16rem; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--df-gold) 24%, transparent), transparent 70%); filter: blur(10px); animation: df-float 11s ease-in-out infinite reverse; pointer-events: none; }
.df-accent { background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--df-berry))); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Today strip as widget tiles with tinted icon circles. */
.df-today__item { transition: transform var(--df-speed) var(--df-ease), box-shadow var(--df-speed) var(--df-ease); }
.df-today__item:hover { transform: translateY(-2px); box-shadow: var(--df-shadow); }
.df-today__item > .df-i { width: 2.1rem; height: 2.1rem; padding: .45rem; border-radius: 50%; background: var(--primary-container); color: var(--on-primary-container); margin-top: 0; box-sizing: border-box; }
.df-today__item:nth-child(2) > .df-i { background: color-mix(in srgb, var(--df-berry) 16%, var(--df-surface)); color: var(--df-berry); }
.df-today__item:nth-child(3) > .df-i { background: color-mix(in srgb, var(--df-gold) 24%, var(--df-surface)); color: var(--df-amber); }
.df-today__item:nth-child(4) > .df-i { background: color-mix(in srgb, var(--df-green) 16%, var(--df-surface)); color: var(--df-green); }

/* Section headings get a coloured icon badge. */
.df-cards__h .df-i { width: 1.6rem; height: 1.6rem; padding: .3rem; border-radius: 50%; background: var(--primary-container); color: var(--on-primary-container); box-sizing: border-box; }

/* Learning feedback. */
.df-quiz__opt.is-correct { animation: df-pop .35s var(--df-ease); }
.df-quiz__opt.is-wrong { animation: df-shake .4s var(--df-ease); }
.df-quiz__fb { animation: df-fadeup .3s var(--df-ease) both; }
.df-quiz__done strong { animation: df-pop .5s var(--df-ease); display: block; }
.df-quiz.is-correct { box-shadow: 0 0 0 2px color-mix(in srgb, var(--df-green) 55%, transparent), var(--df-shadow); }
.df-quiz.is-wrong { box-shadow: 0 0 0 2px color-mix(in srgb, var(--df-berry) 55%, transparent), var(--df-shadow); }
.df-quiz, .df-flash, .df-drill { transition: box-shadow var(--df-speed); }
.df-bar i { transition: width .4s var(--df-ease); background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--df-green))); }
.df-audio.is-playing { animation: df-pulse 1s ease-out infinite; }

/* Flashcards: a real 3D flip. */
.df-flash__card { perspective: 1000px; background: transparent; padding: 0; cursor: pointer; }
.df-flash__inner { position: relative; width: 100%; min-height: 9rem; transform-style: preserve-3d; transition: transform .5s var(--df-ease); }
.df-flash__card.is-flipped .df-flash__inner { transform: rotateY(180deg); }
.df-flash__face { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; border-radius: var(--df-radius-sm); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--df-surface-2); font-size: 1.4rem; font-weight: 600; text-align: center; }
.df-flash__face.back { transform: rotateY(180deg); background: var(--primary-container); color: var(--on-primary-container); }
.df-flash__face small { display: block; font-size: .9rem; font-weight: 400; margin-top: .35rem; opacity: .8; }

/* Verb and noun tables: the ending is the lesson, so colour it. */
.df-end { color: var(--primary); font-weight: 800; }
.df-conj-card { transition: transform var(--df-speed) var(--df-ease), box-shadow var(--df-speed) var(--df-ease); }
.df-conj-card:hover { transform: translateY(-2px); box-shadow: var(--df-shadow); }
.df-conj-card td:last-child { font-weight: 600; }

/* ------------------------------------------------------------------ *
 *  Video lessons: courses (YouTube playlists), lesson lists, chapters.
 *  List selectors carry their element (ol.df-lessons) because .df-article ol
 *  is equally specific and would otherwise put the bullets back.
 * ------------------------------------------------------------------ */

/* Course cards on the hub */
.df-course-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.df-course { display: flex; align-items: flex-start; gap: .85rem; padding: 1rem; background: var(--df-surface); border: 1px solid var(--df-line); border-radius: var(--df-radius); text-decoration: none; color: var(--df-ink); transition: transform var(--df-speed) var(--df-ease), border-color var(--df-speed), box-shadow var(--df-speed); }
.df-course:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--df-blue) 45%, var(--df-line)); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--df-blue) 35%, transparent); }
.df-course:active { transform: translateY(0) scale(.99); transition-duration: .08s; }
.df-course__icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none; border-radius: 12px; background: var(--df-surface-2); color: var(--df-blue); }
.df-course__icon .df-i { width: 1.5rem; height: 1.5rem; vertical-align: 0; }
.df-course__body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; flex: 1; }
.df-course__title { font-weight: 700; line-height: 1.3; }
.df-course__desc { font-size: .88rem; color: var(--df-muted); }
.df-course__meta { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--df-muted); margin-top: .2rem; }
.df-level { display: inline-flex; padding: .1rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--df-blue) 12%, transparent); color: var(--df-blue); font-weight: 700; letter-spacing: .03em; }

/* Course header: start button and progress */
.df-coursebar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 0 0 1.5rem; }
.df-coursebar__start { background: var(--df-blue); color: var(--on-primary); }
.df-coursebar__progress { flex: 1; min-width: min(12rem, 100%); }
.df-vbar { height: 6px; border-radius: 999px; background: var(--df-surface-2); overflow: hidden; margin-bottom: .35rem; }
.df-vbar span { display: block; height: 100%; width: 0; background: var(--df-blue); border-radius: 999px; transition: width var(--df-speed) var(--df-ease); }

/* Lesson list */
ol.df-lessons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
ol.df-lessons > li { margin: 0; }
.df-lesson__a { display: flex; align-items: center; gap: .85rem; padding: .6rem .75rem; border: 1px solid var(--df-line); border-radius: var(--df-radius); background: var(--df-surface); text-decoration: none; color: var(--df-ink); transition: border-color var(--df-speed), background var(--df-speed), transform var(--df-speed) var(--df-ease); }
.df-lesson__a:hover { border-color: color-mix(in srgb, var(--df-blue) 45%, var(--df-line)); background: var(--df-surface-2); transform: translateX(2px); }
.df-lesson__n { flex: none; width: 1.75rem; text-align: center; font-weight: 700; color: var(--df-muted); font-variant-numeric: tabular-nums; }
.df-lesson__thumb { position: relative; flex: none; width: 7.5rem; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--df-surface-2); }
.df-lesson__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.df-lesson__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / .35); opacity: 0; transition: opacity var(--df-speed); }
.df-lesson__play .df-i { width: 2rem; height: 2rem; vertical-align: 0; }
.df-lesson__a:hover .df-lesson__play, .df-lesson__a:focus-visible .df-lesson__play { opacity: 1; }
.df-lesson__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.df-lesson__title { font-weight: 600; line-height: 1.35; }
.df-lesson__desc { font-size: .85rem; color: var(--df-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.df-lesson__dur { font-size: .75rem; color: var(--df-muted); font-variant-numeric: tabular-nums; }


.df-lesson__tick { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--df-line); color: transparent; }
.df-lesson__tick .df-i { width: 1rem; height: 1rem; vertical-align: 0; }
.df-lesson.is-done .df-lesson__tick { background: var(--df-green); border-color: var(--df-green); color: #fff; }
.df-lesson.is-done .df-lesson__title { color: var(--df-muted); }
@media (max-width: 600px) {
  .df-lesson__thumb { width: 5.5rem; }
  .df-lesson__desc { display: none; }
}

/* Lesson page: watched button and course position */
.df-lessonhead { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 0 0 1.5rem; }
.df-watch { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem; border: 1px solid var(--df-line); border-radius: 999px; background: var(--df-surface); color: var(--df-ink); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background var(--df-speed), border-color var(--df-speed), color var(--df-speed); }
.df-watch .df-i { width: 1.1rem; height: 1.1rem; vertical-align: 0; color: var(--df-muted); }
.df-watch:hover { border-color: var(--df-blue); }
.df-watch.is-done { background: color-mix(in srgb, var(--df-green) 14%, transparent); border-color: var(--df-green); color: var(--df-green); }
.df-watch.is-done .df-i { color: var(--df-green); }
.df-watchyt { margin-left: auto; flex: none; }

/* Chapters */
.df-chapters { margin: 0 0 1.75rem; }
.df-chapters h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; margin: 0 0 .5rem; }
.df-chapters h2 .df-i { color: var(--df-blue); }
ol.df-chapters__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .15rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
ol.df-chapters__list > li { margin: 0; }
.df-chapter { display: flex; align-items: baseline; justify-content: flex-start; gap: .6rem; width: 100%; min-inline-size: 0; block-size: auto; text-align: left; text-transform: none; letter-spacing: normal; padding: .4rem .6rem; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.df-chapter:hover { background: var(--df-surface-2); }
.df-chapter__t { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--df-blue); font-size: .85rem; }
.df-chapter__l { font-size: .92rem; }

/* Previous and next lesson */
.df-lessonnav { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 2rem 0 0; }
.df-lessonnav__a { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border: 1px solid var(--df-line); border-radius: var(--df-radius); background: var(--df-surface); text-decoration: none; color: var(--df-ink); transition: border-color var(--df-speed), background var(--df-speed); }
.df-lessonnav__a:hover { border-color: color-mix(in srgb, var(--df-blue) 45%, var(--df-line)); background: var(--df-surface-2); }
.df-lessonnav__a > span { display: flex; flex-direction: column; min-width: 0; }
.df-lessonnav__a strong { font-size: .92rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.df-lessonnav__a .df-i { flex: none; color: var(--df-muted); }
.df-lessonnav__a--next { grid-column: 2; text-align: right; justify-content: flex-end; }
@media (max-width: 600px) { .df-lessonnav { grid-template-columns: 1fr; } .df-lessonnav__a--next { grid-column: 1; } }

/* Video tiles: thumbnail over title. Used by the shorts strip and by the
   archive of lessons that have no course, so both read as one component. */
.df-tiles { display: grid; gap: 1rem .75rem; grid-template-columns: repeat(auto-fill, minmax(min(45%, 13rem), 1fr)); }
.df-tile { display: flex; flex-direction: column; gap: .45rem; text-decoration: none; color: var(--df-ink); }
.df-tile__thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--df-radius-sm); overflow: hidden; background: var(--df-surface-2); }
.df-tile__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; transition: transform var(--df-speed) var(--df-ease); }
.df-tile:hover .df-tile__thumb img { transform: scale(1.05); }
.df-tile__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / .3); opacity: 0; transition: opacity var(--df-speed); }
.df-tile__play .df-i { width: 2.4rem; height: 2.4rem; vertical-align: 0; }
.df-tile:hover .df-tile__play, .df-tile:focus-visible .df-tile__play { opacity: 1; }
.df-tile__dur { position: absolute; right: .35rem; bottom: .35rem; padding: .05rem .3rem; border-radius: 4px; background: rgb(0 0 0 / .78); color: #fff; font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.5; }
.df-tile__title { font-size: .86rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.df-tile:hover .df-tile__title { color: var(--df-blue); }

/* People who asked for less motion get less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
