*{box-sizing:border-box}
:root{--ink:#172c22;--muted:#65786d;--green:#254d37;--line:#dce8df;--bg:#e9eeeb;--paper:#f8faf7}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--ink)}
.app{max-width:680px;min-height:100vh;margin:auto;background:var(--paper);padding:calc(20px + env(safe-area-inset-top)) 20px calc(100px + env(safe-area-inset-bottom))}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.brand{font-size:23px;font-weight:800;color:#193b2c;letter-spacing:-.04em}
.net{background:#fff2d6;color:#715416;padding:6px 10px;border-radius:10px;font-size:12px}
h1{font-size:30px;line-height:1.15;margin:20px 0 10px}
h2{font-size:20px;margin:28px 0 10px}
p{line-height:1.5}
.muted{color:var(--muted);font-size:14px}
.error{color:#9c2626}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;margin:12px 0}
.hero{background:#dcece2;border:1px solid #cce2d3;border-radius:16px;padding:18px 20px;margin:16px 0}
.hero label{display:block;font-size:14px;color:#425e4d}
select{margin-left:8px;padding:8px 12px;background:#fff;border:1px solid #c8d9cd;border-radius:9px;font:inherit}
input[type=text],input[type=password],input[type=search],input[type=time],input:not([type]){width:100%;border:1px solid #d5e3d9;border-radius:10px;padding:12px;font:inherit;background:#fff}
label{display:block;margin:10px 0}
.check{display:flex;gap:8px;align-items:center}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.chip{border:1px solid #d5e3d9;border-radius:30px;background:#fff;padding:10px 14px;color:var(--green);font:inherit;font-size:15px;cursor:pointer;min-height:44px}
.chip.active,.btn{background:var(--green);color:#fff;border-color:var(--green)}
.btn{border:0;border-radius:30px;padding:12px 18px;font:inherit;font-weight:650;cursor:pointer;min-height:44px}
.btn:disabled{opacity:.6;cursor:progress}
.link{border:0;background:none;padding:6px 0;color:#286548;font:inherit;font-size:14px;font-weight:700;margin:4px 14px 0 0;cursor:pointer}
.nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);max-width:680px;width:100%;display:flex;justify-content:space-around;background:#fff;padding:10px 4px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--line);box-shadow:0 -8px 30px #1735270a}
.nav[hidden]{display:none}
.nav a{color:#48685a;text-decoration:none;padding:10px 6px;font-size:14px}
.nav a.active{font-weight:800;color:#155533}
.edition{margin:30px 0}
.edition-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 10px}
.edition-heading h2{font-size:23px;margin:0}
.edition-date{font-size:13px;color:#718479}
.edition-disclaimer{font-size:12px;color:#75877c;line-height:1.5;margin:8px 0 16px}
.edition-footer{color:#61796c;font-size:13px;padding:8px 2px}
.edition-footer summary{cursor:pointer;padding:6px 0}
.news-card{background:#fff;border:1px solid #e0eae2;border-radius:18px;margin:0 0 12px;padding:20px 22px;box-shadow:0 4px 18px #193b2c08;overflow-wrap:anywhere}
.news-topic{font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:750;color:#497f60}
.news-card h3{font-size:20px;line-height:1.3;letter-spacing:-.02em;margin:9px 0 12px;color:#193027}
.news-copy{color:#40554a;font-size:15px;line-height:1.6}
.news-copy p{margin:0 0 10px}
.news-sources{border-top:1px solid #edf2ee;margin-top:14px;padding-top:12px;display:flex;gap:8px;flex-wrap:wrap}
.news-sources a{color:#286548;background:#eff6f1;border-radius:20px;padding:8px 12px;text-decoration:none;font-size:13px;font-weight:650}
.actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.actions .chip{padding:8px 12px;font-size:14px;min-height:40px}
.job{display:flex;gap:10px;align-items:center}
.spinner{width:18px;height:18px;border:3px solid #b9d3c2;border-top-color:var(--green);border-radius:50%;animation:spin 1s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #669d76;outline-offset:3px}
@media(max-width:380px){.app{padding-left:14px;padding-right:14px}.news-card{padding:16px}.news-card h3{font-size:18px}h1{font-size:26px}}
@media(prefers-reduced-motion:reduce){.spinner{animation:none}}
/* Recommendations: visually separate from news, each rubric with its own colour */
.edition-count{font-size:13px;color:#61796c;margin:0 0 10px}
.recs{margin:30px 0 8px;padding-top:22px;border-top:2px dashed #d3e0d6}
.recs-title{font-size:22px;margin:0 0 4px;letter-spacing:-.02em}
.recs-grid{display:grid;grid-template-columns:1fr;gap:12px;margin-top:14px}
@media(min-width:560px){.recs-grid{grid-template-columns:1fr 1fr}}
.rubric-card{--accent:#4b6b5a;--tint:#f3f6f4;background:var(--tint);border:1px solid #0000000f;border-top:5px solid var(--accent);border-radius:20px;padding:18px 18px 14px;overflow-wrap:anywhere;display:flex;flex-direction:column}
.rubric-card h3{font-size:18px;line-height:1.3;margin:10px 0 8px;color:#1d2a24}
.rubric-card .news-copy{font-size:14px;flex:1}
.rubric-head{display:flex;align-items:center;gap:10px}
.rubric-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-size:22px;background:#fff;box-shadow:0 2px 8px #0000000f}
.rubric-name{font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--accent)}
.rubric-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.brand-link{display:inline-flex;align-items:center;min-height:36px;padding:7px 12px;border-radius:20px;font-size:13px;font-weight:700;text-decoration:none;background:#fff;color:var(--accent);border:1px solid #00000014}
.brand-link.find{background:transparent;border:1px dashed var(--accent);font-weight:600}
.b-spotify{background:#1db954;color:#fff;border-color:#1db954}
.b-youtube{background:#ff0033;color:#fff;border-color:#ff0033}
.b-imdb{background:#f5c518;color:#000;border-color:#f5c518}
.b-steam{background:#1b2838;color:#fff;border-color:#1b2838}
.b-goodreads{background:#f4f1ea;color:#382110;border-color:#d8cfbd}
.rubric-card .actions{margin-top:10px}
.rubric-card .actions .chip{background:#ffffffb3}
.rubric-card .actions .chip.active{background:var(--accent);border-color:var(--accent);color:#fff}
.r-music{--accent:#7a3fd1;--tint:#f5f0fd}
.r-film{--accent:#c2410c;--tint:#fdf3ee}
.r-book{--accent:#a16207;--tint:#fdf8ec}
.r-comic{--accent:#db2777;--tint:#fdf0f6}
.r-game{--accent:#1d4ed8;--tint:#eff4fe}
.r-learn{--accent:#0f766e;--tint:#ecf8f6}
.r-fun{--accent:#b45309;--tint:#fff7e6}
.r-discovery{--accent:#4338ca;--tint:#f0f0fd}
.subhead{font-size:16px;margin:18px 0 2px}
.filters{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 4px}.filters select{margin:0}
table.usage{width:100%;border-collapse:collapse;font-size:14px}table.usage th{font-weight:600;color:#61796c;text-align:left}table.usage td,table.usage th{padding:6px 4px;border-bottom:1px solid #edf2ee}
#generation select{max-width:100%}

/* ---------- new elements */
.recs-title small{font-size:13px;font-weight:400;color:#75877c;letter-spacing:0}
.badge{display:inline-block;margin-left:6px;padding:2px 8px;border-radius:10px;background:#fff1d6;color:#8a5a00;font-size:10px;letter-spacing:.06em}
.story{margin:6px 0 0;font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;color:#75877c}
.checked{align-self:center;color:#2f8a57;font-weight:800;font-size:14px}
.listen{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 14px}
.listen p{width:100%;margin:2px 0}
.speaking{outline:3px solid #669d76;outline-offset:2px}
textarea{width:100%;border:1px solid #d5e3d9;border-radius:10px;padding:10px 12px;font:inherit;background:#fff;color:inherit;resize:vertical}
.lang-switch{text-align:center}.lang-switch .link.active{text-decoration:underline}
.invite-link{display:flex;gap:8px}.invite-link input{flex:1;font-size:13px}

/* ---------- dark theme */
html[data-theme=dark]{--ink:#e3ebe6;--muted:#9fb3a7;--line:#2a3a31;--bg:#0b100d;--paper:#121a16}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] .app{background:var(--paper)}
html[data-theme=dark] .brand,html[data-theme=dark] h1,html[data-theme=dark] h2,html[data-theme=dark] h3{color:#e9f2ec}
html[data-theme=dark] .muted,html[data-theme=dark] .edition-disclaimer,html[data-theme=dark] .edition-footer,html[data-theme=dark] .edition-count,html[data-theme=dark] .edition-date,html[data-theme=dark] .story{color:var(--muted)}
html[data-theme=dark] .card,html[data-theme=dark] .news-card{background:#18221d;border-color:var(--line);box-shadow:none}
html[data-theme=dark] .news-card h3{color:#eef5f0}
html[data-theme=dark] .news-copy{color:#c9d6ce}
html[data-theme=dark] .news-topic{color:#7fc79c}
html[data-theme=dark] .news-sources{border-color:var(--line)}
html[data-theme=dark] .news-sources a{background:#1f2d26;color:#9ad6b1}
html[data-theme=dark] .hero{background:#17241d;border-color:#24372c}
html[data-theme=dark] .hero label{color:var(--muted)}
html[data-theme=dark] .chip{background:#1b2721;border-color:#2e4237;color:#cfe3d6}
html[data-theme=dark] .chip.active,html[data-theme=dark] .btn{background:#3f8f62;border-color:#3f8f62;color:#fff}
html[data-theme=dark] .link,html[data-theme=dark] a{color:#8fd0aa}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#0f1612;border-color:#2e4237;color:var(--ink)}
html[data-theme=dark] .nav{background:#121a16;border-color:var(--line);box-shadow:none}
html[data-theme=dark] .nav a{color:#9fb3a7}html[data-theme=dark] .nav a.active{color:#e9f2ec}
html[data-theme=dark] .note,html[data-theme=dark] .net{background:#3a2f16;color:#f1d79a}
html[data-theme=dark] .error{color:#ff9b9b}
html[data-theme=dark] .recs{border-color:#2a3a31}
html[data-theme=dark] .rubric-card{background:color-mix(in srgb,var(--accent) 14%,#121a16);border-color:#ffffff14}
html[data-theme=dark] .rubric-card h3{color:#f1f5f2}
html[data-theme=dark] .rubric-card .news-copy{color:#cfd9d3}
html[data-theme=dark] .rubric-icon{background:#0f1612}
html[data-theme=dark] .rubric-name{color:color-mix(in srgb,var(--accent) 55%,#fff)}
html[data-theme=dark] .brand-link{background:#0f1612;color:color-mix(in srgb,var(--accent) 50%,#fff)}
html[data-theme=dark] .rubric-card .actions .chip{background:#0f161299}
html[data-theme=dark] table.usage td,html[data-theme=dark] table.usage th{border-color:var(--line)}
html[data-theme=dark] .badge{background:#4a3a12;color:#ffd98a}
html[data-theme=dark] .spinner{border-color:#2e4237;border-top-color:#8fd0aa}

/* ---------- newspaper theme: serif type, paper, rules instead of cards, columns on wide screens */
html[data-theme=newspaper]{--ink:#1a1712;--muted:#5d564a;--line:#1a1712;--bg:#d9d3c4;--paper:#f3eee2}
html[data-theme=newspaper] body{background:var(--bg);color:var(--ink);font-family:Georgia,"Times New Roman","PT Serif",serif}
html[data-theme=newspaper] .app{background:var(--paper);max-width:980px;box-shadow:0 0 0 1px #00000014}
html[data-theme=newspaper] .top{border-bottom:3px double var(--line);padding-bottom:10px}
html[data-theme=newspaper] .brand{font-family:"Old English Text MT","UnifrakturMaguntia",Georgia,serif;font-size:34px;letter-spacing:0;color:var(--ink);text-transform:uppercase}
html[data-theme=newspaper] h1,html[data-theme=newspaper] h2,html[data-theme=newspaper] h3{font-family:Georgia,"Times New Roman",serif;color:var(--ink)}
html[data-theme=newspaper] h1{font-size:40px;text-align:center;font-style:italic}
html[data-theme=newspaper] .muted,html[data-theme=newspaper] .edition-disclaimer,html[data-theme=newspaper] .edition-footer,html[data-theme=newspaper] .edition-count,html[data-theme=newspaper] .story{color:var(--muted);font-style:italic}
html[data-theme=newspaper] .edition-heading{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px 0;justify-content:center;text-align:center}
html[data-theme=newspaper] .edition-heading h2{text-transform:uppercase;letter-spacing:.12em;font-size:22px}
html[data-theme=newspaper] .card,html[data-theme=newspaper] .hero{background:transparent;border:1px solid var(--line);border-radius:0;box-shadow:none}
html[data-theme=newspaper] .news-list{column-gap:28px;column-rule:1px solid #1a171255}
@media(min-width:760px){html[data-theme=newspaper] .news-list{column-count:2}}
@media(min-width:960px){html[data-theme=newspaper] .news-list{column-count:3}}
html[data-theme=newspaper] .news-card{background:transparent;border:0;border-bottom:1px solid #1a171266;border-radius:0;box-shadow:none;padding:4px 0 16px;margin:0 0 16px;break-inside:avoid}
html[data-theme=newspaper] .news-topic{color:#7a1d12;font-family:Georgia,serif;letter-spacing:.14em}
html[data-theme=newspaper] .news-card h3{font-size:22px;line-height:1.15;font-weight:700;letter-spacing:-.01em;color:var(--ink)}
html[data-theme=newspaper] .news-copy{color:#2a251d;font-size:16px;line-height:1.55;text-align:justify;hyphens:auto}
html[data-theme=newspaper] .news-copy p:first-child::first-letter{float:left;font-size:3.1em;line-height:.8;padding:4px 6px 0 0;font-weight:700}
html[data-theme=newspaper] .news-sources{border-top:0;padding-top:4px}
html[data-theme=newspaper] .news-sources a{background:transparent;padding:0;border-radius:0;color:var(--ink);font-style:italic;text-decoration:underline}
html[data-theme=newspaper] .chip{border-radius:0;background:transparent;border-color:var(--line);color:var(--ink);font-family:Georgia,serif}
html[data-theme=newspaper] .chip.active,html[data-theme=newspaper] .btn{background:var(--ink);color:var(--paper);border-color:var(--ink);border-radius:0}
html[data-theme=newspaper] .actions .chip{min-height:34px;padding:4px 10px}
html[data-theme=newspaper] .link,html[data-theme=newspaper] a{color:#7a1d12}
html[data-theme=newspaper] input,html[data-theme=newspaper] select,html[data-theme=newspaper] textarea{background:#fbf8f0;border-color:#1a171288;border-radius:0}
html[data-theme=newspaper] .nav{background:var(--paper);border-top:3px double var(--line);box-shadow:none;max-width:980px}
html[data-theme=newspaper] .nav a{color:var(--ink);font-family:Georgia,serif;text-transform:uppercase;letter-spacing:.08em;font-size:12px}
html[data-theme=newspaper] .recs{border-top:3px double var(--line)}
html[data-theme=newspaper] .recs-title{text-align:center;text-transform:uppercase;letter-spacing:.14em}
html[data-theme=newspaper] .rubric-card{background:transparent;border:1px solid var(--line);border-top:4px solid var(--line);border-radius:0}
html[data-theme=newspaper] .rubric-icon{background:transparent;box-shadow:none;filter:grayscale(1)}
html[data-theme=newspaper] .rubric-name{color:#7a1d12}
html[data-theme=newspaper] .brand-link{border-radius:0;background:transparent;color:var(--ink);border-color:var(--line)}
html[data-theme=newspaper] .b-spotify,html[data-theme=newspaper] .b-youtube,html[data-theme=newspaper] .b-imdb,html[data-theme=newspaper] .b-steam,html[data-theme=newspaper] .b-goodreads{background:var(--ink);color:var(--paper)}
html[data-theme=newspaper] .badge{background:#7a1d12;color:#fff;border-radius:0}
html[data-theme=newspaper] .speaking{outline-color:#7a1d12}
