/* ---- Landing ----------------------------------------------------------------
   The front door, as the hub has always had it: a wordmark, a panel that
   explains itself, and the four things the hub does. */
.landing { position: relative; min-height: 100dvh; height: 100dvh; overflow-y: auto; background: var(--bg); }
.landing-inner { position: relative; z-index: 1; }
.landing-nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 22px; border-bottom: 1px solid var(--glass-brd); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); }
.landing-inner { max-width: 1040px; margin: 0 auto; padding: 78px 28px 60px; }
.rise { animation: riseIn .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero { text-align: center; margin-bottom: 74px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 7px; border: 1px solid var(--glass-brd); border-radius: 22px; margin-bottom: 30px; font-size: 12px; color: var(--text-2); }
.brand-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 10px; }
.hero h1 { font-family: var(--font-display); font-weight: 650; font-size: clamp(52px, 9vw, 104px); line-height: .98; letter-spacing: -.035em; margin: 0 0 24px; }
.hero p { font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: var(--text-2); margin: 0 auto 34px; max-width: 540px; text-wrap: pretty; }
.hero .btn-lg { height: 46px; padding: 0 24px; border-radius: 11px; font-size: 14.5px; }
.hero-note { margin: 0 auto !important; font-size: 12.5px !important; color: var(--text-3) !important; }
.home-panels { display: flex; flex-wrap: wrap; border: 1px solid var(--glass-brd); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); margin-bottom: 72px; min-height: 290px; }
.home-panels-tabs { flex: 1 1 240px; min-width: 0; padding: 26px 22px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; position: relative; }
.home-panels-tabs button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; border: none; border-radius: 11px; text-align: left; background: transparent; color: var(--text-2); transition: background .25s var(--ease), color .25s var(--ease); }
.home-panels-tabs button.on { background: var(--accent-soft); color: var(--text); }
.home-panels-tabs button b { display: block; font-size: 13.5px; font-weight: 500; }
.home-panels-tabs button span.ellipsis { display: block; font-size: 11.5px; color: var(--text-3); }
.home-panels-tabs .dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--border-strong); transition: all .3s var(--ease); }
.home-panels-tabs button.on .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.home-panels-bar { height: 2px; border-radius: 2px; background: var(--border); overflow: hidden; }
.home-panels-bar i { display: block; height: 100%; background: var(--accent); transition: width .5s var(--ease); }
.home-panels-body { flex: 2 1 400px; min-width: 0; padding: 34px 34px 30px; display: flex; flex-direction: column; justify-content: center; position: relative; animation: slideIn .45s var(--ease) both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.home-panels-body .kicker, .home-feature .kicker { font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); margin-bottom: 13px; }
.home-panels-body h2 { font-family: var(--font-display); font-weight: 650; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; }
.home-panels-body p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.68; color: var(--text-2); }
.home-panels-body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.home-panels-body li { font-size: 13px; line-height: 1.55; color: var(--text-3); }
.home-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 14px; margin-bottom: 64px; }
.home-feature { padding: 24px 22px 26px; border: 1px solid var(--glass-brd); border-radius: 16px; transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease); }
.home-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.home-feature .icon { font-size: 22px; line-height: 1; margin-bottom: 14px; color: var(--text); }
.home-feature .kicker { letter-spacing: .11em; margin-bottom: 8px; }
.home-feature h3 { font-family: var(--font-display); font-weight: 650; font-size: 18px; margin: 0 0 8px; line-height: 1.25; }
.home-feature p { margin: 0; font-size: 12.5px; line-height: 1.62; color: var(--text-2); }
.home-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 58px; }
.home-stats > div { padding: 24px 20px; text-align: center; }
.home-stats .v { font-family: var(--font-display); font-weight: 650; font-size: 32px; line-height: 1; letter-spacing: -.02em; color: var(--accent); margin-bottom: 7px; }
.home-stats .k { font-size: 11.5px; line-height: 1.5; color: var(--text-3); }
.home-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 26px; border-top: 1px solid var(--border); flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
@media (max-width: 700px) { .landing-inner { padding: 48px 18px 40px; } .home-panels-tabs { border-right: none; border-bottom: 1px solid var(--border); } .home-panels-body { padding: 24px 20px; } }
.feature-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.feature-icon svg { width: 20px; height: 20px; }

.auth-card { width: 100%; max-width: 420px; }
.oauth-btn { gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---- Home dashboard ----------------------------------------------------------- */
.dash { flex: 1; overflow-y: auto; }
.dash-inner { max-width: 1100px; margin: 0 auto; padding: 32px 28px 60px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 24px; }
.dash-cell { display: flex; flex-direction: column; min-width: 0; }
.dash-cell > .card { flex: 1; }
.dash-grid > .span-7 { grid-column: span 7; } .dash-grid > .span-5 { grid-column: span 5; }
.dash-grid > .span-12 { grid-column: span 12; } .dash-grid > .span-6 { grid-column: span 6; }
@media (max-width: 900px) { .dash-grid > * { grid-column: span 12 !important; } .dash-inner { padding: 22px 16px 40px; } }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.quick button { display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; border-radius: 12px; }
.quick .q-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.quick .q-icon svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .quick { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .quick { gap: 10px; margin-top: 16px; } .quick button { padding: 12px; gap: 10px; } .quick .q-icon { width: 32px; height: 32px; } .quick .tiny { display: none; } }

/* ---- Home: this week ---------------------------------------------------------- */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 10px 12px 4px; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--text-2); transition: background .15s, border-color .15s; }
.week-day:hover { background: var(--hover); }
.week-day .wd { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.week-day .dn { font-size: 17px; font-weight: 600; color: var(--text); }
.week-day.today .dn { color: var(--accent); }
.week-day.on { background: var(--accent-soft); border-color: var(--accent); }
.week-day .dots { display: flex; gap: 3px; height: 5px; }
.week-day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---- Home: the hero ----------------------------------------------------------------
   A picture of the hour (a winter night in season) on the right of the
   greeting, faded out under the text so it never fights with it. */
.dash-grid > .span-4 { grid-column: span 4; } .dash-grid > .span-8 { grid-column: span 8; }
.home-hero { position: relative; min-height: 0; isolation: isolate; }
.home-hero-text { position: relative; padding: 30px 2px 14px; max-width: 680px; }
.home-hero .h1 { font-size: clamp(30px, 3.6vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; text-shadow: var(--pop); }
.home-hero .eyebrow, .home-hero-sub { text-shadow: var(--pop-soft); }
.home-hero .eyebrow { color: var(--text-2); }
.home-hero-sub { margin: 8px 0 0; color: var(--text); opacity: .86; font-size: 15px; font-weight: 500; }
/* The ask box and the chips are glass, so the view shows through them. */
.home-ask { margin-top: 20px; display: flex; align-items: center; padding: 6px 6px 6px 16px; gap: 8px; max-width: 580px;
  background: color-mix(in srgb, var(--surface) 62%, transparent) !important; border-color: color-mix(in srgb, var(--border-strong) 80%, transparent) !important;
  backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); box-shadow: var(--shadow) !important; }
.home-ask:focus-within { border-color: var(--accent) !important; box-shadow: var(--focus), var(--shadow) !important; }
.home-ask input { border: none; background: none; outline: none; font-size: 15px; height: 42px; min-width: 0; }
.home-hero .chip { background: color-mix(in srgb, var(--surface) 55%, transparent); border-color: color-mix(in srgb, var(--border-strong) 70%, transparent);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
.home-hero .winter-badge { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (max-width: 760px) { .home-hero-text { padding: 18px 2px 8px; } }

/* Text that pops off whatever is behind it: a halo in the page's own tone. */
:root, [data-tone="light"] { --pop: 0 1px 1px rgba(255, 255, 255, .85), 0 0 22px rgba(255, 255, 255, .8); --pop-soft: 0 0 14px rgba(255, 255, 255, .85); }
[data-tone="dark"] { --pop: 0 2px 6px rgba(0, 0, 0, .45), 0 0 26px rgba(0, 0, 0, .35); --pop-soft: 0 1px 8px rgba(0, 0, 0, .5); }

/* The season's scene behind the top of Home, fading into the page, with the
   left side washed toward the background so the greeting reads. */
.dash { position: relative; isolation: isolate; }
.home-banner { position: absolute; left: 0; right: 0; top: 0; height: 430px; z-index: -1; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 52%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 52%, transparent 100%);
  animation: bannerIn .5s var(--ease-out) both; }
.home-banner-art, .home-banner-art svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.home-banner::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 78%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 34%, transparent 62%); }
@keyframes bannerIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 760px) {
  .home-banner { height: 340px; }
  .home-banner::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, transparent), color-mix(in srgb, var(--bg) 55%, transparent)); }
}
@media (prefers-reduced-motion: reduce) { .home-banner { animation: none; } }
.art-glow { animation: flicker 4s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 40% { opacity: .82; } 44% { opacity: 1; } 70% { opacity: .9; } }

/* ---- Picture of the day ----------------------------------------------------------- */
.potd { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); overflow: hidden; min-height: 230px; }
.potd-img { display: block; position: relative; min-height: 200px; background: var(--surface-2); overflow: hidden; }
.potd-img img, .potd-img svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.23, 1, .32, 1); }
@media (hover: hover) and (pointer: fine) { .potd-img:hover img { transform: scale(1.03); } }
.potd-cap { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.potd-cap b { font-family: var(--font-display); font-weight: 650; font-size: 20px; line-height: 1.25; white-space: normal; }
.potd-desc { margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) { .potd { grid-template-columns: 1fr; } .potd-img { min-height: 190px; } }

/* ---- Today's article ------------------------------------------------------------------ */
.article { display: flex; gap: 14px; padding: 6px 16px 16px; color: var(--text); }
.article:hover { color: var(--text); }
.article img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.article b { font-family: var(--font-display); font-weight: 650; font-size: 19px; }
.article p { margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- The front page: screenshots and the season --------------------------------- */
.landing-art { position: absolute; top: 0; left: 0; right: 0; height: 620px; z-index: 0; opacity: .6; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
.landing-art svg { width: 100%; height: 100%; display: block; }
.gallery { margin: -30px auto 72px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.gallery-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.gallery-tabs::-webkit-scrollbar { display: none; }
.gallery-tabs button { gap: 6px; display: inline-flex; align-items: center; }
.gallery-tabs svg { width: 15px; height: 15px; }
.shot-frame { position: relative; width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-brd);
  background: var(--glass); box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .25); }
[data-tone="light"] .shot-frame { box-shadow: 0 30px 80px rgba(16, 24, 40, .18), 0 8px 24px rgba(16, 24, 40, .08); }
.shot-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--glass-brd); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.shot-bar i:nth-child(1) { background: #ff5f57; } .shot-bar i:nth-child(2) { background: #febc2e; } .shot-bar i:nth-child(3) { background: #28c840; }
.shot-bar span { margin-left: 10px; font-size: 11.5px; color: var(--text-3); letter-spacing: .02em; }
.shot-stack { position: relative; aspect-ratio: 16 / 10; background: var(--surface); }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; filter: blur(4px);
  transition: opacity .24s cubic-bezier(.23, 1, .32, 1), filter .24s cubic-bezier(.23, 1, .32, 1); }
.shot.on { opacity: 1; filter: none; }
.gallery-cap { margin: 0; max-width: 620px; text-align: center; color: var(--text-2); font-size: 14.5px; line-height: 1.6; animation: fadeUp .24s cubic-bezier(.23, 1, .32, 1) both; }
@media (max-width: 700px) { .gallery { margin: -30px auto 48px; } .shot-bar { height: 26px; } }
@media (prefers-reduced-motion: reduce) { .shot { transition: opacity .2s ease; filter: none; } }

/* ---- Study ------------------------------------------------------------------------- */
.study-card-body { padding: 4px 16px 16px; }
.streak-row { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.streak { display: flex; align-items: baseline; gap: 6px; }
.streak b { font-size: 34px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--accent); }
.streak span { font-size: 13px; color: var(--text-2); }
.streak-week { display: flex; gap: 6px; margin-left: auto; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-3); }
.sw i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border-strong); }
.sw.on i { background: var(--accent); border-color: var(--accent); }
.sw.today .tiny { color: var(--text); font-weight: 700; }
.exam-list { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.exam-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; border-left: 3px solid var(--cls, var(--accent)); transition: transform .12s cubic-bezier(.23, 1, .32, 1); }
.exam-row:active { transform: scale(.98); }
.exam-days { display: flex; flex-direction: column; align-items: center; min-width: 42px; line-height: 1.05; }
.exam-days b { font-size: 20px; font-variant-numeric: tabular-nums; }
.exam-days span { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 420px) { .streak-week { gap: 4px; } }

/* ---- Quote of the day ------------------------------------------------------------------ */
.quote-body { margin: 0; padding: 4px 22px 20px; animation: fadeUp .25s cubic-bezier(.23, 1, .32, 1) both; }
.quote-body p { margin: 0; font-family: var(--font-display); font-weight: 650; font-size: clamp(19px, 2.1vw, 23px); line-height: 1.38; letter-spacing: -.01em; color: var(--text); text-wrap: pretty; }
.quote-body p::before { content: "“"; color: var(--accent); margin-right: 2px; }
.quote-body p::after { content: "”"; color: var(--accent); margin-left: 1px; }
.quote-body footer { margin-top: 10px; font-size: 13px; color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .quote-body { animation: none; } }

/* ---- Customising ----------------------------------------------------------------------- */
.home-widgets { display: flex; flex-direction: column; gap: 4px; }
.hw-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.hw-row .q-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex-shrink: 0; }
.hw-row.off > .grow { color: var(--text-3); }
.hw-row.off .q-icon { opacity: .5; }

/* ---- Winter ---------------------------------------------------------------------------- */
.winter-card { background-image: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%); }
.hc-top { display: flex; align-items: center; padding: 16px 16px 6px; gap: 12px; }
.hc-count { flex: 1; display: flex; flex-direction: column; }
.hc-count b { font-weight: 700; font-size: 48px; line-height: 1; color: var(--accent); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hc-count span { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.hc-flake svg { width: 78px; height: 78px; display: block; opacity: .85; }
[data-tone="light"] .hc-flake svg g { stroke: #7aa7d9; }
.hc-asks { padding: 4px 8px 10px; }
.hc-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }

/* ---- Today's news ---------------------------------------------------------------------- */
.news-topics { display: flex; gap: 6px; padding: 12px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.news-topics::-webkit-scrollbar { display: none; }
.news-topics .chip { flex-shrink: 0; }
.news-lead { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; margin: 8px 16px 4px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.news-lead:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.news-lead img { width: 132px; height: 92px; border-radius: 8px; object-fit: cover; background: var(--surface-3); }
.news-lead-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-lead-text b { font-size: 15px; line-height: 1.35; letter-spacing: -.01em; }
.news-lead-text p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-list { display: flex; flex-direction: column; padding: 4px 8px 4px; }
.news-row { display: flex; align-items: center; gap: 6px; border-radius: 10px; }
.news-row:hover { background: var(--hover); }
.news-link { display: flex; flex-direction: column; gap: 2px; padding: 8px 8px; color: var(--text); min-width: 0; }
.news-link:hover { color: var(--text); }
.news-title { font-size: 13.5px; font-weight: 550; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { color: var(--text-3); }
.news-ask { opacity: 0; transition: opacity .15s ease; color: var(--accent); }
.news-row:hover .news-ask, .news-ask:focus-visible { opacity: 1; }
@media (hover: none) { .news-ask { opacity: 1; } }
@media (max-width: 520px) { .news-lead { grid-template-columns: 1fr; } .news-lead img { width: 100%; height: 150px; } }
.home-ask input::placeholder { color: var(--text-2); opacity: 1; }
html[data-bg="dark"] .home-ask { background: rgba(12, 15, 22, .52) !important; }
html[data-bg="light"] .home-ask { background: rgba(255, 255, 255, .72) !important; }
html[data-bg="dark"] .home-hero .chip { background: rgba(12, 15, 22, .38); }
