/* ===== Mandali app home: elite pass (Operate mode — calm, precise, one hero moment) =====
   Brand: navy + cream, gold accent, Fraunces display, IBM Plex body, JetBrains Mono numbers. */
:root {
  --hx-bg1: #0A1224; --hx-bg2: #101C36; --hx-glow: rgba(233,180,76,.22); --hx-glow2: rgba(46,196,160,.13); --hx-glow3: rgba(96,120,220,.16);
  --hx-ink: #F3EEE2; --hx-soft: #A9B2C6; --hx-line: rgba(233,180,76,.22); --hx-up: #2EC4A0; --hx-dn: #F2665E; --hx-gold: #E9B44C;
  --hq-bg: color-mix(in srgb, var(--panel) 92%, var(--gold));
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}
html[data-theme="light"] {
  --hx-bg1: #FFFBF2; --hx-bg2: #F6ECD8; --hx-glow: rgba(185,129,20,.20); --hx-glow2: rgba(18,128,77,.08); --hx-glow3: rgba(151,103,18,.10);
  --hx-ink: #1C1710; --hx-soft: #6B5E4C; --hx-line: rgba(151,103,18,.28); --hx-up: #178A5E; --hx-dn: #C2483A; --hx-gold: #976712;
}

/* page wash behind home only */
body:has(.wrap.home) { background:
  radial-gradient(120% 60% at 100% -10%, color-mix(in srgb, var(--gold) 9%, transparent), transparent 60%),
  radial-gradient(90% 50% at -10% 0%, color-mix(in srgb, #5B79D6 7%, transparent), transparent 60%),
  var(--ink); background-attachment: fixed; }

/* ---------- Hero ---------- */
.hx { position: relative; isolation: isolate; overflow: hidden; border-radius: 22px; padding: 18px 18px 16px; margin: 2px 0 14px; color: var(--hx-ink);
  background: linear-gradient(155deg, var(--hx-bg2), var(--hx-bg1) 62%);
  box-shadow: 0 0 0 1px var(--hx-line) inset, 0 24px 60px -34px rgba(0,0,0,.7); display: flex; flex-direction: column; gap: 12px; }
html[data-theme="light"] .hx { box-shadow: 0 0 0 1px var(--hx-line) inset, 0 22px 50px -32px rgba(110,80,30,.45); }
.hx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hx-orb { position: absolute; border-radius: 50%; filter: blur(30px); will-change: transform; }
.hx-orb.o1 { width: 260px; height: 260px; right: -90px; top: -120px; background: radial-gradient(circle, var(--hx-glow), transparent 68%); animation: hxDrift 16s var(--ease-out) infinite alternate; }
.hx-orb.o2 { width: 240px; height: 240px; left: -110px; bottom: -130px; background: radial-gradient(circle, var(--hx-glow2), transparent 68%); animation: hxDrift 20s var(--ease-out) infinite alternate-reverse; }
.hx.is-dn .hx-orb.o2 { background: radial-gradient(circle, color-mix(in srgb, var(--hx-dn) 16%, transparent), transparent 68%); }
.hx-grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--hx-line) 1px, transparent 1px), linear-gradient(90deg, var(--hx-line) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: radial-gradient(80% 70% at 85% 0%, #000, transparent 70%); mask-image: radial-gradient(80% 70% at 85% 0%, #000, transparent 70%); opacity: .28; }
@keyframes hxDrift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-24px, 18px, 0) scale(1.12); } }

.hx-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hx-st { display: inline-flex; align-items: center; gap: 7px; font: 600 11px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--hx-soft) 14%, transparent); color: var(--hx-soft); }
.hx-st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hx-st.open { color: var(--hx-up); background: color-mix(in srgb, var(--hx-up) 14%, transparent); }
.hx-st.open i { box-shadow: 0 0 0 0 currentColor; animation: hxPing 2.2s var(--ease-out) infinite; }
.hx-st.pre { color: var(--hx-gold); background: color-mix(in srgb, var(--hx-gold) 14%, transparent); }
@keyframes hxPing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hx-up) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.hx-clock { font: 500 12px "JetBrains Mono", ui-monospace, monospace; color: var(--hx-soft); font-variant-numeric: tabular-nums; }
.hx-clock b { color: var(--hx-ink); font-weight: 600; }

.hx-h { margin: 2px 0 0; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(1.7rem, 7vw, 2.2rem); line-height: 1.08; letter-spacing: -.015em; color: var(--hx-ink); text-wrap: balance; }
.hx-h em { font-style: italic; font-weight: 500; color: var(--hx-gold); }

.hx-q { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 14px; padding-top: 12px; border-top: 1px solid var(--hx-line); }
.hx-qt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-k { font: 600 11px "JetBrains Mono", ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--hx-soft); }
.hx-px { font: 600 1.65rem/1.1 "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--hx-ink); }
.hx-ch { font: 600 .82rem "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; color: var(--hx-soft); }
.hx-ch.up { color: var(--hx-up); } .hx-ch.dn { color: var(--hx-dn); }
.hx-sw { position: relative; min-width: 0; }
.hx-spark { display: block; width: 100%; height: 56px; overflow: visible; }
.hx-dot { position: absolute; right: -4px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 0%, transparent), 0 0 12px 2px color-mix(in srgb, var(--hx-up) 45%, transparent); }
.hx.is-dn .hx-dot { box-shadow: 0 0 12px 2px color-mix(in srgb, var(--hx-dn) 45%, transparent); }
.hx-prev { stroke: var(--hx-soft); stroke-width: 1; stroke-dasharray: 3 4; opacity: .55; vector-effect: non-scaling-stroke; }
.hx-line { vector-effect: non-scaling-stroke; }
.hx-spark.draw .hx-line { clip-path: inset(0 100% 0 0); animation: hxDraw 1.1s var(--ease-out) .25s forwards; }
.hx-spark.draw .hx-area, .hx-spark.draw ~ .hx-dot { opacity: 0; animation: hxFade .5s var(--ease-out) 1s forwards; }
@keyframes hxDraw { to { clip-path: inset(0 0 0 0); } }
@keyframes hxFade { to { opacity: 1; } }
.hx-sa { margin: 0; font-family: "Tiro Devanagari Sanskrit", "Noto Sans Devanagari", serif; font-size: .9rem; color: var(--hx-gold); opacity: .85; }

/* ---------- Quick actions ---------- */
.hq { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.hq-b { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 16px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: .74rem; font-weight: 600; color: var(--text); text-align: center; line-height: 1.2;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform .14s var(--ease-out), box-shadow .2s var(--ease-out); }
.hq-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--gold);
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--gold) 22%, transparent), color-mix(in srgb, var(--gold) 6%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 25%, transparent); }
.hq-b:active { transform: scale(.96); }
.hq-b:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .hq-b:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, var(--line)); } }
@media (max-width: 560px) { .hq { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hq-b { padding: 11px 4px 10px; font-size: .78rem; } }


/* ---------- Section labels ---------- */
.hg { margin: 20px 2px 10px; display: flex; align-items: center; gap: 10px; font: 600 11px "JetBrains Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hg::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.hx + .hq + .hg, .hq + .hg { margin-top: 4px; }

/* ---------- Section cards: gradient hairline, tinted icon, smoother open ---------- */
.home .hf { border: 1px solid transparent; border-radius: 16px;
  background: linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(150deg, color-mix(in srgb, var(--tint) 34%, var(--line)), var(--line) 38%, var(--line) 70%, color-mix(in srgb, var(--tint) 14%, var(--line))) border-box;
  transition: box-shadow .25s var(--ease-out), transform .14s var(--ease-out); }
.home .hf-ic { width: 38px; height: 38px; border-radius: 12px;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--tint) 24%, transparent), color-mix(in srgb, var(--tint) 7%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 26%, transparent); }
.home .hf-t > b { font-size: 1rem; }
.home .hf-sum { font-size: .8rem; }
.home .hf-chev { transition: transform .3s var(--ease-out), opacity .2s; }
.home .hf[open] { box-shadow: 0 20px 44px -30px color-mix(in srgb, var(--tint) 45%, rgba(0,0,0,.6)); }
.home .hf-b { animation: hfRise .32s var(--ease-out) both; }
@keyframes hfRise { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (pointer: fine) { .home .hf:hover { box-shadow: 0 12px 30px -26px color-mix(in srgb, var(--tint) 60%, transparent); } }

/* ---------- Upgrade banner: premium, not loud ---------- */
.home .lk-banner { position: relative; overflow: hidden; border: 1px solid transparent; border-radius: 18px; padding: 16px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 55%) padding-box,
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, var(--gold), color-mix(in srgb, var(--gold) 20%, var(--line)) 55%, var(--gold)) border-box; }
.home .lk-banner .lk-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, transparent); }
.home .lk-banner strong { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.1rem; }
.home .lk-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--gold) 14%, transparent) 50%, transparent 60%);
  transform: translateX(-100%); animation: lkSheen 5.5s var(--ease-out) 1.2s infinite; pointer-events: none; }
@keyframes lkSheen { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ---------- Refresh in the hero, level chip under it ---------- */
.hx-tr { display: inline-flex; align-items: center; gap: 10px; }
.hx .rf-btn { width: 32px; height: 32px; border: 0; background: color-mix(in srgb, var(--hx-soft) 14%, transparent); color: var(--hx-ink); }
.hx .rf-btn svg { color: var(--hx-gold); width: 16px; height: 16px; }
.home .lvl-row:has(#levelChip:empty) { display: none; }
.home .lvl-row { margin: -4px 0 12px; }

/* ---------- First-load entrance (once per session) ---------- */
.rise { animation: hxRise .55s var(--ease-out) var(--d, 0ms) both; }
@keyframes hxRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hx-orb, .hx-st.open i, .home .lk-banner::after { animation: none; }
  .rise, .home .hf-b, .hx-spark.draw .hx-line, .hx-spark.draw .hx-area, .hx-spark.draw ~ .hx-dot { animation: none; opacity: 1; clip-path: none; transform: none; }
}

/* the plain status line duplicates the hero; keep the strip only when it carries GIFT Nifty */
.home .mkt-strip:not(:has(.gift)) { display: none; }
.home .hx-ch.wait { color: var(--hx-soft); font-weight: 500; }
@media (max-width: 560px) {
  .home .lk-banner { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; column-gap: 12px; row-gap: 12px; }
  .home .lk-banner .btn { grid-column: 2; justify-self: start; }
}

/* update card: shows on the home screen when this phone runs an older version */
.upd-slot{margin:0 0 12px}.upd-slot:empty{display:none}
.upd-card{position:relative;overflow:hidden;display:flex;align-items:center;gap:12px;padding:12px 12px 12px 14px;border-radius:16px;border:1px solid rgba(233,180,76,.55);background:linear-gradient(135deg,rgba(233,180,76,.16),rgba(233,180,76,.05) 55%,rgba(18,26,43,.9));box-shadow:0 10px 28px -16px rgba(233,180,76,.55);animation:updIn .28s cubic-bezier(.23,1,.32,1) both}

.upd-ic{flex:none;width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:#0B1220;background:#E9B44C}
.upd-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.upd-tx b{font:600 15px/1.3 "IBM Plex Sans",system-ui,sans-serif;color:#F6D58A}.upd-tx span{font-size:12.5px;line-height:1.45;color:var(--muted,#A9B3C7)}
.upd-go{flex:none;position:relative;z-index:1;min-height:44px;user-select:none;-webkit-user-select:none;padding:0 16px;border-radius:999px;border:0;background:#E9B44C;color:#0B1220;font:700 13.5px/1 "IBM Plex Sans",system-ui,sans-serif;cursor:pointer;touch-action:manipulation;transition:transform .14s cubic-bezier(.23,1,.32,1)}
.upd-go:active{transform:scale(.97)}.upd-go:disabled{opacity:.7}
.upd-ok{display:flex;justify-content:space-between;align-items:center;gap:10px;font:500 11.5px "JetBrains Mono",monospace;color:var(--muted,#A9B3C7);padding:0 4px}
.upd-ok button{background:none;border:0;color:var(--gold,#E9B44C);font:600 11.5px "JetBrains Mono",monospace;cursor:pointer;padding:0 4px;min-height:44px;touch-action:manipulation;user-select:none;-webkit-user-select:none}
@keyframes updIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media (max-width:380px){.upd-card{flex-wrap:wrap}.upd-go{width:100%}}
@media (prefers-reduced-motion:reduce){.upd-card{animation-name:updFade}}@keyframes updFade{from{opacity:0}to{opacity:1}}
html[data-theme="light"] .upd-card{background:linear-gradient(135deg,rgba(233,180,76,.22),#FFF8E8 60%);border-color:rgba(185,129,20,.5)}
html[data-theme="light"] .upd-tx b{color:#8A5F0A}html[data-theme="light"] .upd-tx span{color:#4A5266}

/* "More on Home": the less-used sections, folded behind one row (3 Nov 2026) */
.home .home-more { margin: 6px 0 14px; border: 1px dashed rgba(224,168,46,.35); border-radius: 16px; background: transparent; }
.home .home-more-s { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.home .home-more-s::-webkit-details-marker { display: none; }
.home .home-more-s > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home .home-more-s b { color: var(--gold); font-size: .95rem; }
.home .home-more-s .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home .home-more[open] > .home-more-s .hf-chev { transform: rotate(225deg) translate(-2px, -2px); }
.home .home-more-b { padding: 0 8px 4px; }
.home .home-more:not([open]):active { transform: scale(.99); }

/* GIFT Nifty: two figures, tap for the full working (3 Nov 2026) */
.home .mkt-strip:has(.gx), .mkt-strip:has(.gx) { display: block; border-bottom: 0; padding: 2px 0 10px; margin: -6px 0 0; }
.gx { display: grid; grid-template-columns: 1fr 1px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .16s cubic-bezier(.2,.8,.2,1), border-color .2s ease; }
.gx:active { transform: scale(.985); }
.gx:hover { border-color: rgba(224,168,46,.45); }
.gx-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gx-k { display: inline-flex; align-items: center; gap: 5px; font: 600 10px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gx-v { font: 600 1.05rem/1.2 var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; color: var(--text); }
.gx-c { font: 500 11px/1.2 var(--mono, ui-monospace, monospace); color: var(--muted); white-space: nowrap; }
.gx-c.up { color: var(--ok); } .gx-c.down { color: var(--danger); }
.gx-sep { width: 1px; height: 34px; background: var(--line); }
.gx-m { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font: 700 10px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  padding: 0; color: var(--muted); }
.gx-m.up { color: var(--ok); } .gx-m.down { color: var(--danger); }
.gx-st { display: inline-flex; align-items: center; gap: 4px; font: 500 10px/1 var(--sans); letter-spacing: .02em; text-transform: none; color: var(--muted); }
.gx-st i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.gx-st.open i { background: var(--ok); } .gx-st.pre i { background: var(--gold); }

/* Ask Mandali AI, right under Markets */
.home .ha { margin: 0 0 14px; }
.ha-bar { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid rgba(224,168,46,.45); background: linear-gradient(120deg, rgba(224,168,46,.16), rgba(116,255,237,.06)); color: var(--text); font: inherit; text-align: left;
  -webkit-tap-highlight-color: transparent; transition: transform .16s cubic-bezier(.2,.8,.2,1), border-color .2s ease; }
.ha-bar:active { transform: scale(.985); }
.ha-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--gold); color: #0B1220; }
.ha-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ha-tx b { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: .98rem; color: var(--text); }
.ha-tx span { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ha-go { flex: none; color: var(--gold); font-size: 1.1rem; }
.ha-chips { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ha-chips::-webkit-scrollbar { display: none; }
.ha-chip { flex: none; min-height: 32px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font: inherit; font-size: .76rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ha-chip:active { transform: scale(.97); border-color: var(--gold); }

/* first screen: a calm, staggered entrance */
@media (prefers-reduced-motion: no-preference) {
  .home > .mkt-strip, .home > #homeBoard, .home > .ha, .home > #homeNew { animation: homeIn .5s cubic-bezier(.2,.8,.2,1) both; }
  .home > #homeBoard { animation-delay: .06s; } .home > .ha { animation-delay: .12s; } .home > #homeNew { animation-delay: .18s; }
}
@keyframes homeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Plan badge beside the brand (approved, paid students) */
.tier { display: inline-flex; align-items: center; gap: 5px; margin-left: 2px; padding: 4px 9px 4px 7px; border-radius: 999px;
  font: 600 .66rem/1 var(--sans); letter-spacing: .04em; color: #1A1305; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(135deg, #F6D77A 0%, #E0A82E 45%, #B8831A 100%); box-shadow: 0 0 0 1px rgba(255,226,150,.35) inset, 0 4px 14px rgba(224,168,46,.28);
  position: relative; overflow: hidden; vertical-align: middle; }
.tier b { font-weight: 800; }
.tier i { display: grid; place-items: center; }
.tier::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); }
@media (prefers-reduced-motion: no-preference) { .tier::after { animation: tierShine 5s ease-in-out 1.2s infinite; } }
@keyframes tierShine { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@media (max-width: 380px) { .tier { padding: 4px 7px; font-size: .6rem; } }

/* Greeting: one quiet line at the top of Home; the big hero greeting is retired here */
.home .hello { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin: 0 2px 10px; font-family: Fraunces, Georgia, serif; font-size: 1.02rem; line-height: 1.3; }
.home .hello-g { color: var(--muted); font-weight: 500; }
.home .hello-n { color: var(--text); font-weight: 600; }
.home .hello-t { align-self: center; margin-left: 2px; font: 600 .62rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(224,168,46,.45); border-radius: 999px; padding: 3px 7px; }
.home .hello-d { margin-left: auto; font: 500 .72rem/1 var(--sans); color: var(--muted); }
.home .hx-h { display: none; }
@media (prefers-reduced-motion: no-preference) { .home > .hello { animation: homeIn .5s cubic-bezier(.2,.8,.2,1) both; } }
@media (max-width: 440px) { .topbar .brand:has(.tier) { font-size: 0; gap: 8px; } .topbar .brand:has(.tier) .tier { font-size: .64rem; } }

/* ---------- Home v2: layered sections (Market now · Your day · Ask & tools · Today's read · Go deeper) ---------- */
.home.hm2 { --hl-gap: 22px; }
.hm2 .hello { margin-bottom: 6px; align-items: center; }
.hm2 .hello-d { margin-left: auto; }
.hm2 .hello-d:empty { display: none; }
.hm2 .upd-ok { display: none; }                       /* "Up to date" lives under Go deeper; the card shows only when an update is waiting */
.hm2 .upd-slot:empty, .hm2 #homeBreaking:empty { display: none; }
.hm2 .upd-card { margin: 4px 0 10px; }
.hl { position: relative; margin-top: var(--hl-gap); display: grid; gap: 10px; min-width: 0; }
.hl:first-of-type { margin-top: 8px; }
.hl > * { min-width: 0; }
.hl-h { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 .68rem/1 var(--mono, 'JetBrains Mono', monospace); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.hl-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.hm2 .hx { margin: 0; }
.hm2 .mkt-strip { margin: -2px 0 0; padding: 0 2px 2px; border-bottom: 0; }
.hm2 .mkt-strip:empty { display: none; }
.hm2 #homeBoard:empty, .hm2 #homeNew:empty, .hm2 #homeLive:empty, .hm2 #homeForYou:empty { display: none; }
.hm2 #homeNew > *, .hm2 #homeLive > *, .hm2 #homeBoard > *, .hm2 .ha, .hm2 .hq { margin-top: 0; margin-bottom: 0; }
/* next class: one compact line-card */
.hl-next { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: 0 10px 24px -18px rgba(0,0,0,.55); }
.hl-k { font: 600 .72rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hl-next #nextClass > .card { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
/* For you: 2-up chips instead of a list */
.fy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fy-grid .fy { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 74px; margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text); text-decoration: none; font-size: .86rem; line-height: 1.3; touch-action: manipulation; transition: transform .14s cubic-bezier(.23,1,.32,1), border-color .15s; }
.fy-grid .fy:active { transform: scale(.97); }
.fy-grid .fy strong { align-self: flex-end; font: 600 1rem/1 var(--mono, monospace); color: var(--gold); }
.fy-grid .fy svg { vertical-align: -3px; color: var(--gold); }
.fy-grid .fy:only-child { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; }
@media (hover: hover) and (pointer: fine) { .fy-grid .fy:hover { border-color: var(--gold); } }
/* Today's read: three reads behind one segmented control */
.hl-tabs { margin: 0; padding: 12px; display: grid; gap: 10px; }
.hl-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--card2, rgba(127,127,127,.08)); }
.hl-seg button { border: 0; background: none; color: var(--muted); font: 600 .84rem/1.15 var(--sans); padding: 9px 4px; border-radius: 10px; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color .16s, color .16s; }
.hl-seg button[aria-selected="true"] { background: var(--card); color: var(--gold); box-shadow: 0 4px 12px -6px rgba(0,0,0,.45), inset 0 0 0 1px var(--line); }
.hl-pane { min-width: 0; }
.hl-pane > div > .card, .hl-pane > .card, .hl-pane .home-view { margin: 0; border: 0; padding: 4px 2px; background: none; box-shadow: none; }
.hm2 .home-more { margin-top: var(--hl-gap); }
.hm2-ver { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 2px 4px; font: 500 .78rem/1.2 var(--mono, monospace); color: var(--muted); }
.hm2-ver button { border: 1px solid var(--line); background: var(--card); color: var(--gold); border-radius: 999px; padding: 7px 12px; font: 600 .78rem/1 var(--sans); cursor: pointer; touch-action: manipulation; }
@media (max-width: 359px) { .fy-grid { grid-template-columns: minmax(0, 1fr); } .hl-seg button { font-size: .78rem; } }
@media (prefers-reduced-motion: reduce) { .fy-grid .fy { transition: none; } }
.hl-next:has(#nextClass:empty), .hl-next:has(#nextClass > :only-child:empty) { display: none; }

/* GIFT Nifty under the greeting */
.home .hello-gift { all: unset; flex-basis: 100%; margin-top: 2px; font: 500 .74rem/1.4 var(--mono, ui-monospace, monospace); color: var(--muted); cursor: pointer; touch-action: manipulation; font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; width: fit-content; }
.home .hello-gift[hidden] { display: none; }
.home .hello-gift b { font-weight: 600; }
.home .hello-gift b.up { color: var(--green, #2EC4A0); } .home .hello-gift b.down { color: var(--red, #F2665E); }
.home .hello-gift:active { opacity: .7; }
.home .hello-gift:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.gs-r { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.gs-r b { font-variant-numeric: tabular-nums; text-align: right; }
.gs-r i { grid-column: 1 / -1; font-style: normal; font-size: 13px; color: var(--muted); }
.gs-r .up { color: var(--green, #2EC4A0); } .gs-r .down { color: var(--red, #F2665E); }
.gs-p { margin: 14px 0 6px; font-size: 15px; line-height: 1.55; }
.gs-n { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.home .hello > .hello-g, .home .hello > .hello-n { order: 1; }
.home .hello > .hello-gift { order: 2; }
.home .hello > .hello-d { order: 3; margin-left: 0; margin-top: 6px; }
