:root {
  /* navy neutrals */
  --bg: #101927;
  --bg-deep: #0b1420;
  --panel: #141d2b;
  --panel-2: #1a2332;
  --panel-3: #212c3d;
  --line: #2c384a;
  --line-2: #3a475c;
  --text: #f4f4f4;
  --soft: #a4b1cd;
  --muted: #8799b5;
  /* reddish-pink accent */
  --accent: #ff3e6c;
  --accent-hi: #ff6b8e;
  --accent-text: #ff7a9a;
  --accent-ink: #1a0810;
  --accent-tint: rgba(255, 62, 108, .12);
  --accent-line: rgba(255, 62, 108, .45);
  /* status colours (kept apart from the accent so verdicts stay readable) */
  --ok: #5fd39a;
  --bad: #ff5c5c;
  --warn: #ffc857;
  --mono: "Roboto Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Neue Haas Grotesk Display Pro", "Helvetica Neue", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  --r-sm: 4px; --r: 8px; --r-lg: 14px;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14.5px; line-height: 1.6; display: flex; flex-direction: column; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-hi); }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 6px 12px; border-radius: var(--r-sm); z-index: 99; }
.skip:focus { left: 8px; }
* { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- top navigation ---------- */
.nav { flex: none; height: var(--nav-h); display: flex; align-items: center; gap: 28px; padding: 0 24px; background: rgba(11, 20, 32, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; letter-spacing: .16em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand img { image-rendering: pixelated; }
.brand b { font-weight: 800; }
.nav-links { display: flex; gap: 4px; flex: 1; justify-content: center; min-width: 0; }
.nav-links a { color: var(--soft); padding: 8px 12px; border-radius: var(--r-sm); font-size: 14px; white-space: nowrap; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-links a.on { color: var(--accent-text); }
.nav-user { display: flex; align-items: center; gap: 14px; }
.icon-link { color: var(--soft); display: flex; } .icon-link svg { width: 20px; height: 20px; } .icon-link:hover { color: var(--text); }
.user-link { color: var(--soft); display: flex; align-items: center; gap: 6px; font-size: 14px; max-width: 170px; }
.user-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-link svg { width: 16px; height: 16px; flex: none; } .user-link:hover, .user-link.on { color: var(--text); }

/* ---------- page frame ---------- */
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; outline: none; }
.loading { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.loading img { image-rendering: pixelated; }
.pulse { animation: pulse .9s ease-out infinite alternate; } @keyframes pulse { from { opacity: .25; } to { opacity: 1; } }
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.page-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 24px; height: 46px; border-bottom: 1px solid var(--line); background: var(--bg-deep); }
.page-head .slash { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.win-title { margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-scroll { flex: 1; min-height: 0; overflow: auto; }
.page-scroll > .win-body { margin: 0 auto; width: 100%; padding: 12px 0 48px; }
.page-scroll.full { overflow: hidden; }
.page-scroll.full > .win-body { height: 100%; padding: 0; overflow: auto; }

.pad { padding: 20px 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }

/* ---------- buttons + inputs ---------- */
.btn { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); padding: 8px 16px; border-radius: var(--r-sm); cursor: pointer; font-size: 13.5px; font-weight: 600; line-height: 1.3; transition: border-color .2s, color .2s, background-color .2s, transform .1s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.btn:hover { border-color: var(--text); color: var(--text); background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--accent-ink); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.small { padding: 4px 11px; font-size: 12.5px; }
.btn.big { padding: 12px 22px; font-size: 15px; }
input[type=text], input[type=number], input[type=search], select, textarea { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 11px; outline: none; width: 100%; transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: #5d6d88; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
select { width: auto; cursor: pointer; }
textarea { resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.55; tab-size: 4; white-space: pre; overflow: auto; }
textarea.prose { font-family: var(--sans); white-space: pre-wrap; font-size: 14px; }
label.field { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
label.field > * { margin-top: 6px; font-family: var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); font-size: 14px; }
label.field > textarea { font-family: var(--mono); } label.field > textarea.prose { font-family: var(--sans); }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; color: var(--soft); }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; border: 1px solid currentColor; text-transform: capitalize; white-space: nowrap; }
.badge.easy { color: var(--ok); } .badge.medium { color: var(--warn); } .badge.hard { color: var(--accent-text); }
.tag { display: inline-block; padding: 1px 8px; border-radius: var(--r-sm); font-family: var(--mono); font-size: 11px; background: var(--panel-3); color: var(--soft); margin: 1px 4px 1px 0; white-space: nowrap; }
.verdict { font-weight: 700; font-family: var(--mono); }
.verdict.AC, .verdict.OK { color: var(--ok); } .verdict.WA, .verdict.RE, .verdict.CE, .verdict.TLE, .verdict.OLE, .verdict.IE { color: var(--bad); }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--bg); }
tr.click { cursor: pointer; transition: background-color .15s; } tr.click:hover td { background: var(--accent-tint); }
tr.me td { background: var(--accent-tint); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.table-wrap th { background: var(--panel-2); }
.table-wrap tr:last-child td { border-bottom: 0; }

/* ---------- documents (cheat sheet / theory) ---------- */
.doc { display: grid; grid-template-columns: 270px 1fr; height: 100%; }
.doc-nav { border-right: 1px solid var(--line); overflow: auto; padding: 16px 12px; background: var(--bg-deep); }
.doc-nav input { margin-bottom: 10px; font-size: 13px; }
.doc-nav button { display: flex; gap: 9px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid transparent; padding: 7px 10px; cursor: pointer; color: var(--muted); font-size: 13.5px; line-height: 1.35; transition: color .15s, background-color .15s; }
.doc-nav button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.doc-nav button.on { color: var(--accent-text); background: var(--accent-tint); border-left-color: var(--accent); }
.doc-nav .dot { flex: none; width: 13px; height: 13px; margin-top: 3px; border: 1px solid var(--muted); border-radius: 3px; font-size: 10px; line-height: 11px; text-align: center; color: var(--accent-ink); }
.doc-nav .dot.done { background: var(--accent); border-color: var(--accent); }
.doc-nav .back { color: var(--text); font-weight: 600; margin-bottom: 8px; }
.doc-main { overflow: auto; padding: 28px 40px 60px; }
.prose-doc { max-width: 880px; }
.prose-doc h2 { font-size: 30px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 18px; line-height: 1.2; color: var(--text); }
.prose-doc h3 { font-size: 17px; font-weight: 600; margin: 26px 0 8px; }
.prose-doc h4, .prose-doc h5 { font-family: var(--mono); font-size: 11.5px; font-weight: 500; margin: 22px 0 8px; color: var(--accent-text); text-transform: uppercase; letter-spacing: .12em; }
.prose-doc p { margin: 0 0 12px; color: #dde3ee; }
.prose-doc ul, .prose-doc ol { margin: 0 0 14px; padding-left: 22px; color: #dde3ee; }
.prose-doc li { margin: 4px 0; } .prose-doc li::marker { color: var(--accent); }
.prose-doc li.task { list-style: none; margin-left: -20px; display: flex; gap: 9px; }
.prose-doc li.task .box { flex: none; width: 14px; height: 14px; margin-top: 5px; border: 1px solid var(--muted); border-radius: 3px; font-size: 10px; line-height: 12px; text-align: center; }
.prose-doc code { font-family: var(--mono); font-size: 12.5px; background: var(--panel-3); color: #ffd0db; padding: 1px 6px; border-radius: var(--r-sm); }
.prose-doc strong { color: #fff; font-weight: 600; }
.prose-doc blockquote { margin: 0 0 14px; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--panel); color: var(--soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
pre.code { margin: 10px 0 16px; padding: 14px 16px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; tab-size: 4; color: #dbe4f3; }
pre.code code { background: none; padding: 0; font-size: inherit; color: inherit; }
.done-bar { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 20px; cursor: pointer; transition: border-color .2s, transform .2s, background-color .2s; }
.card:hover { border-color: var(--accent-line); transform: translateY(-2px); background: var(--panel-2); }
.card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.bar { height: 5px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); transition: width .4s ease; }
.bar.yellow > i { background: var(--warn); } .bar.red > i { background: var(--accent-hi); } .bar.ok > i { background: var(--ok); }

/* ---------- roadmap ---------- */
.phase { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; background: var(--panel); transition: border-color .2s; }
.phase[open] { border-color: var(--line-2); }
.phase > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; }
.phase > summary::-webkit-details-marker { display: none; }
.phase > summary h3 { margin: 0; font-size: 16px; font-weight: 500; }
.phase > summary .when { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.phase > summary .bar { grid-column: 1 / -1; }
.phase[open] > summary { border-bottom: 1px solid var(--line); }
.phase-body { padding: 14px 18px 18px; }
.todo { display: flex; gap: 11px; padding: 6px 0; cursor: pointer; align-items: flex-start; }
.todo input { margin-top: 4px; flex: none; }
.todo.done span { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .22); }
.links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.links a { font-size: 12.5px; padding: 3px 11px; border: 1px solid var(--line-2); border-radius: 20px; color: var(--soft); }
.links a:hover { color: var(--accent-text); border-color: var(--accent-line); }

/* ---------- problems ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 2; }
.toolbar input[type=search] { max-width: 240px; }
.solved-mark { color: var(--ok); font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); height: 100%; }
.split > div { overflow: auto; min-height: 0; }
.split > .left { border-right: 1px solid var(--line); padding: 24px 28px 40px; }
.split > .right { display: flex; flex-direction: column; background: var(--bg-deep); }
.editor-bar { display: flex; gap: 9px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.editor { flex: 1; min-height: 180px; border: 0 !important; border-radius: 0 !important; background: var(--bg-deep) !important; padding: 16px !important; resize: none !important; box-shadow: none !important; color: #dbe4f3; }
.result { flex: none; max-height: 46%; overflow: auto; border-top: 1px solid var(--line); padding: 12px 16px; background: var(--panel); font-size: 13.5px; }
.result:empty { display: none; }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.io.three { grid-template-columns: 1fr 1fr 1fr; }
.io > div > b { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.io pre, pre.out { margin: 0; padding: 9px 11px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--mono); font-size: 12.5px; overflow: auto; max-height: 200px; white-space: pre; color: #dbe4f3; }
.testbox { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; background: var(--panel); }
.testbox .row { margin-bottom: 8px; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--warn); background: var(--panel); padding: 11px 14px; border-radius: var(--r-sm); margin-bottom: 16px; font-size: 13.5px; color: #dde3ee; }
.note.err { border-left-color: var(--bad); white-space: pre-wrap; } .note.ok { border-left-color: var(--ok); }

/* ---------- profile ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px; margin: 18px 0 22px; }
.stat { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--panel); }
.stat b { display: block; font-size: 26px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.diffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.diffs .lbl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.heat-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 12px; background: var(--panel); margin-bottom: 24px; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: 15px repeat(7, 12px); grid-auto-columns: 12px; gap: 3px; width: max-content; margin: 0 auto; }
.heat .m { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: visible; }
.heat .d, .heat-legend .d { width: 12px; height: 12px; border-radius: 3px; background: #1c2738; }
.heat .d.l1, .heat-legend .l1 { background: #5a1a2e; } .heat .d.l2, .heat-legend .l2 { background: #9c2148; } .heat .d.l3, .heat-legend .l3 { background: #e0245e; } .heat .d.l4, .heat-legend .l4 { background: #ff7a9a; }
.heat .d.blank { visibility: hidden; }
.heat-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.heat-legend .d { display: inline-block; }
h2.sec { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 10px; }
.rank { font-family: var(--mono); font-weight: 700; color: var(--soft); } .rank.r1 { color: #ffd54a; } .rank.r2 { color: #dfe6ee; } .rank.r3 { color: #e39a62; }
.linkish { background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; text-align: left; font-weight: 500; }
.linkish:hover { color: var(--accent-text); }

/* ---------- home ---------- */
.view.home { display: block; }
.home-scroll { height: 100%; overflow: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 14px; }
.hero { position: relative; padding: 92px 0 72px; overflow: hidden; background:
  radial-gradient(700px 380px at 82% 18%, rgba(255, 62, 108, .16), transparent 70%),
  radial-gradient(520px 320px at 8% 96%, rgba(255, 62, 108, .07), transparent 70%), var(--bg-deep); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='146' viewBox='0 0 84 146'%3E%3Cpath d='M42 1 83 24.5v47L42 95 1 71.5v-47zM42 95v50M1 71.5-40 95M83 71.5 124 95' fill='none' stroke='%232c384a' stroke-width='1'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(100deg, transparent 38%, #000 100%); mask-image: linear-gradient(100deg, transparent 38%, #000 100%); }
.hero .wrap { position: relative; }
.hero h1 { font-size: clamp(34px, 5.2vw, 62px); font-weight: 500; letter-spacing: -.02em; line-height: 1.08; margin: 0 0 22px; }
.hero .lead { font-size: 18px; color: var(--soft); max-width: 660px; margin: 0 0 30px; line-height: 1.6; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 56px 0 0; max-width: 820px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(20, 29, 43, .7); }
.hero-stats > div { padding: 16px 20px; border-right: 1px solid var(--line); } .hero-stats > div:last-child { border-right: 0; }
.hero-stats dt { font-size: 30px; font-weight: 500; line-height: 1.1; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.hero-stats dd { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.band { padding: 72px 0; } .band.alt { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; margin: 0 0 10px; }
.band .sub { color: var(--muted); max-width: 560px; margin: 0 0 32px; font-size: 15.5px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; background: var(--panel); color: var(--text); transition: border-color .2s, transform .2s, background-color .2s; }
.tile:hover { border-color: var(--accent-line); background: var(--panel-2); transform: translateY(-3px); color: var(--text); }
.tile i { width: 44px; height: 44px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; background: var(--accent-tint); color: var(--accent-text); margin-bottom: 18px; }
.tile i svg { width: 22px; height: 22px; }
.tile h3 { margin: 0 0 8px; font-size: 21px; font-weight: 500; }
.tile p { margin: 0 0 20px; color: var(--muted); font-size: 14px; flex: 1; }
.wrap.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 8px 10px; overflow-x: auto; }
.panel table th { background: none; } .panel tr:last-child td { border-bottom: 0; }
.foot { padding: 26px 0; font-size: 13.5px; } .foot img { image-rendering: pixelated; } .foot a { color: var(--soft); } .foot a:hover { color: var(--accent-text); } .foot b { letter-spacing: .08em; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--panel-3); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); padding: 10px 16px; border-radius: var(--r-sm); font-size: 13.5px; max-width: 86vw; animation: pop .25s ease; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.toast.err { border-left-color: var(--bad); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- small screens ---------- */
@media (max-width: 1020px) {
  .nav { height: auto; flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px 0; }
  .nav-links { order: 3; flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; }
  .nav-user { margin-left: auto; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap.two { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  body { overflow: auto; height: auto; min-height: 100%; }
  .view, .page, .page-scroll, .page-scroll.full, .page-scroll.full > .win-body, .home-scroll { overflow: visible; height: auto; min-height: 0; flex: none; }
  .nav { position: sticky; top: 0; }
  .nav-user .btn { display: none; }
  .page-head, .toolbar, .pad { padding-left: 16px; padding-right: 16px; }
  .toolbar { position: static; }
  .doc { grid-template-columns: 1fr; height: auto; }
  .doc-nav { border-right: 0; border-bottom: 1px solid var(--line); max-height: 240px; }
  .doc-main { padding: 20px 16px 40px; overflow: visible; }
  .prose-doc h2 { font-size: 25px; }
  .split { grid-template-columns: 1fr; height: auto; }
  .split > div { overflow: visible; }
  .split > .left { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px 28px; }
  .editor { min-height: 320px; flex: none; }
  .result { max-height: none; }
  .io, .io.three, .diffs, .tiles { grid-template-columns: 1fr; }
  .hero { padding: 54px 0 44px; } .hero .lead { font-size: 16px; } .hero h1 br { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; } .hero-stats > div:nth-child(2) { border-right: 0; } .hero-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .band { padding: 48px 0; } .wrap { padding: 0 16px; }
  th, td { padding: 9px 10px; }
  .win-body { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- figures, extra links, CSES sheet ---------- */
.fig { margin: 4px 0 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-deep); padding: 16px 16px 10px; }
.fig img { display: block; width: 100%; height: auto; max-width: 720px; margin: 0 auto; }
.fig figcaption { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--muted); }
.links a.vid { border-color: var(--accent-line); color: var(--accent-text); }
.small-note { font-size: 12px; margin-top: 8px !important; }
.steps { margin: 0 0 16px; padding-left: 22px; color: #dde3ee; } .steps li { margin: 4px 0; } .steps li::marker { color: var(--accent); font-weight: 700; }
.cs-table td { padding: 7px 10px; vertical-align: middle; } .cs-table td.tick { width: 30px; } .cs-table td.num { width: 34px; font-family: var(--mono); font-size: 12px; }
.cs-table a { color: var(--text); font-weight: 500; } .cs-table a:hover { color: var(--accent-text); }
.cs-table tr.done a { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .2); }
.cs-table td.hint { font-family: var(--mono); font-size: 12px; } .no-hints .cs-table td.hint { visibility: hidden; }
.cs-table td.sol { width: 90px; text-align: right; font-size: 12.5px; } .cs-table td.sol a { color: var(--accent-text); font-weight: 400; }
.cs-table tr:last-child td { border-bottom: 0; }
@media (max-width: 760px) { .cs-table td.hint { display: none; } }

/* ---------- fonts: GitLab Sans for the site, GitLab Mono for code (both SIL OFL, self-hosted) ---------- */
@font-face { font-family: "GitLab Sans"; font-weight: 100 900; font-style: normal; font-display: swap; src: url(fonts/GitLabSans.woff2) format("woff2"); }
@font-face { font-family: "GitLab Mono"; font-weight: 100 900; font-style: normal; font-display: swap; src: url(fonts/GitLabMono.woff2) format("woff2"); }
:root { --sans: "GitLab Sans", "Noto Sans Tamil", Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --mono: "GitLab Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; --code: "GitLab Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
body { font-size: 14px; line-height: 1.6; font-feature-settings: 'cv11', 'ss03'; -webkit-font-smoothing: antialiased; }
b, strong, .btn, .linkish, .prose-doc h3, .prose-doc strong, .cs-table a { font-weight: 700; }
.hero h1 { font-weight: 700; letter-spacing: -.028em; font-size: clamp(30px, 4.6vw, 54px); line-height: 1.12; }
.band h2 { font-weight: 700; letter-spacing: -.02em; font-size: clamp(24px, 3vw, 34px); }
.prose-doc h2 { font-weight: 700; letter-spacing: -.02em; font-size: 26px; }
.tile h3, .card h3, .phase > summary h3 { font-weight: 700; letter-spacing: -.02em; }
.tile h3 { font-size: 18px; } .card h3 { font-size: 16px; }
.hero .lead { font-size: 15.5px; } .band .sub { font-size: 14px; }
.hero-stats dt, .stat b { font-weight: 700; letter-spacing: -.02em; }
.nav-links a, .user-link { font-size: 13px; } .nav-links a { padding: 8px 9px; }
.btn { font-size: 12.5px; } .btn.big { font-size: 14px; } .btn.small { font-size: 11.5px; }
textarea, pre.code, .prose-doc code, .io pre, pre.out, .tag, .cs-table td.hint, .verdict { font-family: var(--code); }
textarea.prose, label.field > textarea.prose { font-family: var(--sans); font-size: 13px; }
pre.code, .io pre, pre.out, textarea { font-size: 13px; font-variant-ligatures: contextual; }
.prose-doc code { font-size: 12.5px; }

/* ---------- code editor ---------- */
.code-host { height: 360px; border: 1px solid var(--line); border-radius: var(--r-sm) var(--r-sm) 0 0; overflow: hidden; background: var(--bg-deep); }
.code-host.fill { flex: 1; min-height: 200px; height: auto; border: 0; border-radius: 0; }
.code-status { flex: none; display: flex; gap: 16px; align-items: center; padding: 5px 14px; border-top: 1px solid var(--line); background: var(--panel); font-size: 11.5px; color: var(--muted); min-height: 28px; overflow: hidden; }
.code-host:not(.fill) + .code-status { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); }
.code-status .pos { flex: none; font-family: var(--code); color: var(--soft); }
.code-status .tip { opacity: 0; transform: translateY(4px); transition: opacity .35s ease, transform .35s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-status .tip.show { opacity: 1; transform: none; }
.monaco-editor, .monaco-editor .overflow-guard { border-radius: inherit; }
.monaco-editor .cursor { border-radius: 2px; box-shadow: 0 0 8px rgba(255, 62, 108, .55); }
.monaco-editor .suggest-widget, .monaco-editor .monaco-hover { border-radius: 6px !important; box-shadow: 0 12px 34px rgba(0, 0, 0, .55) !important; }
.monaco-editor .suggest-widget .monaco-list .monaco-list-row { transition: background-color .12s ease; }
@media (max-width: 760px) { .code-host.fill { min-height: 340px; flex: none; height: 340px; } }

/* ---------- local runner ---------- */
.runner-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: none; border-radius: 20px; padding: 3px 11px; font-size: 11.5px; color: var(--muted); cursor: pointer; transition: border-color .2s, color .2s; }
.runner-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px rgba(255, 92, 92, .15); }
.runner-pill.up { color: var(--soft); } .runner-pill.up i { background: var(--ok); box-shadow: 0 0 0 3px rgba(95, 211, 154, .15); }
.runner-pill:hover { border-color: var(--accent-line); color: var(--text); }
.runner-help { border: 1px solid var(--accent-line); background: var(--accent-tint); border-radius: var(--r); padding: 14px 16px; font-size: 13px; }
.runner-help p { margin: 6px 0 8px; } .runner-help ol { margin: 0 0 8px; padding-left: 20px; } .runner-help li { margin: 7px 0; } .runner-help pre.out { margin-top: 6px; user-select: all; }
.runner-help code { font-family: var(--code); background: var(--panel-3); padding: 1px 5px; border-radius: 3px; }
.cs-table td.sol { width: 110px; white-space: nowrap; }

/* ---------- HariBeri ---------- */
#hari { position: fixed; z-index: 60; width: 84px; height: 84px; transition: left .9s cubic-bezier(.3, 1.3, .5, 1), top .9s cubic-bezier(.3, 1.3, .5, 1); pointer-events: none; }
#hari.dragging { transition: none; }
.hari-face { pointer-events: auto; width: 84px; height: 84px; padding: 0; border: 0; background: none; cursor: grab; display: block; animation: hari-bob 3.4s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); touch-action: none; }
.hari-face:active { cursor: grabbing; } .hari-face svg { width: 100%; height: 100%; display: block; }
#hari[data-mood=yay] .hari-face { animation: hari-jump .55s ease-in-out 3; } #hari[data-mood=angry] .hari-face { animation: hari-shake .3s linear 4; } #hari[data-mood=cry] .hari-face, #hari[data-mood=sad] .hari-face { animation: hari-droop 2.4s ease-in-out infinite; }
@keyframes hari-bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-7px) rotate(1.5deg); } }
@keyframes hari-jump { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-18px) scale(1.06, .96); } 70% { transform: translateY(0) scale(.96, 1.05); } }
@keyframes hari-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px) rotate(-3deg); } 75% { transform: translateX(4px) rotate(3deg); } }
@keyframes hari-droop { 0%, 100% { transform: translateY(2px) rotate(-2deg); } 50% { transform: translateY(5px) rotate(2deg); } }
.hari-bubble { pointer-events: auto; position: absolute; bottom: 88px; right: 6px; width: max-content; max-width: min(300px, 76vw); background: #fff; color: #1a0810; border-radius: 14px 14px 4px 14px; padding: 9px 13px; font-size: 12.5px; line-height: 1.5; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(8px) scale(.94); transform-origin: bottom right; transition: opacity .22s ease, transform .22s ease; visibility: hidden; }
.hari-bubble.show { opacity: 1; transform: none; visibility: visible; }
.hari-bubble b { color: #c2174a; margin-right: 4px; }
#hari.left-side .hari-bubble { right: auto; left: 6px; border-radius: 14px 14px 14px 4px; transform-origin: bottom left; }
.hari-panel { position: fixed; z-index: 61; display: none; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); overflow: hidden; }
.hari-panel.open { display: flex; animation: pop .2s ease; }
.hari-panel header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-deep); border-bottom: 1px solid var(--line); }
.hari-panel header div { flex: 1; min-width: 0; line-height: 1.25; } .hari-panel header b { display: block; font-size: 14px; } .hari-panel header span { font-size: 10.5px; color: var(--muted); }
.hari-mini { width: 38px; height: 38px; flex: none; } .hari-mini svg { width: 100%; height: 100%; }
.hari-tgl { background: none; border: 0; cursor: pointer; font-size: 14px; padding: 5px 7px; border-radius: var(--r-sm); color: var(--soft); } .hari-tgl:hover { background: var(--panel-3); color: var(--text); }
.hari-log { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.hari-msg { max-width: 92%; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.55; overflow-wrap: anywhere; }
.hari-msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 3px; font-weight: 700; }
.hari-msg.hari { align-self: flex-start; background: var(--panel-3); border-bottom-left-radius: 3px; }
.hari-msg p { margin: 0 0 7px; } .hari-msg p:last-child, .hari-msg ul:last-child { margin-bottom: 0; } .hari-msg ul, .hari-msg ol { margin: 4px 0 7px; padding-left: 18px; } .hari-msg li { margin: 3px 0; }
.hari-msg h3, .hari-msg h4, .hari-msg h5 { font-size: 12.5px; margin: 8px 0 4px; color: var(--accent-text); }
.hari-msg code { font-family: var(--code); font-size: 11.5px; background: var(--bg-deep); padding: 1px 4px; border-radius: 3px; }
.hari-msg pre.code { font-size: 11px; padding: 8px 10px; margin: 6px 0; max-height: 220px; } .hari-msg .table-wrap { font-size: 11.5px; } .hari-msg th, .hari-msg td { padding: 4px 7px; }
.hari-dim { color: var(--muted); font-size: 11px; }
.hari-goto { background: var(--accent-tint); border: 1px solid var(--accent-line); color: var(--accent-text); border-radius: 10px; padding: 0 7px; font-size: 11px; cursor: pointer; font-family: var(--code); }
.hari-goto:hover { background: var(--accent); color: var(--accent-ink); }
.hari-dots i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--soft); animation: pulse .7s ease-in-out infinite alternate; } .hari-dots i:nth-child(2) { animation-delay: .2s; } .hari-dots i:nth-child(3) { animation-delay: .4s; }
.hari-chips { display: flex; gap: 6px; padding: 0 12px 8px; flex-wrap: wrap; }
.hari-chips button { background: none; border: 1px solid var(--line-2); color: var(--soft); border-radius: 14px; padding: 3px 10px; font-size: 11px; cursor: pointer; } .hari-chips button:hover { border-color: var(--accent-line); color: var(--accent-text); }
.hari-panel form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg-deep); } .hari-panel form input { font-size: 12.5px; }
.hari-rate { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; } .hari-rate i { width: 54px; height: 54px; flex: none; } .hari-rate i svg { width: 100%; height: 100%; }
.hari-rate b { display: block; font-size: 13px; } .hari-rate span { font-size: 12px; color: var(--soft); } .hari-rate em { color: var(--muted); font-style: normal; font-size: 11px; }
.hari-rate.card-like { margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-deep); } .hari-rate.card-like i { width: 64px; height: 64px; }
.monaco-editor .hari-line { background: rgba(255, 62, 108, .13); } .monaco-editor .hari-line-mark { border-left: 3px solid var(--accent); margin-left: 3px; }

/* ---------- avatars, ticks, tabs, posts, projects, review ---------- */
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel-3); vertical-align: middle; border: 1px solid var(--line-2); }
.avatar.big { width: 84px; height: 84px; border-width: 2px; } .avatar.mid { width: 36px; height: 36px; }
.tick { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: #3b9dff; color: #fff; font-size: 10px; font-weight: 700; margin-left: 5px; vertical-align: 1px; line-height: 1; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: -1px; } .tabs button:hover { color: var(--text); } .tabs button.on { color: var(--accent-text); border-bottom-color: var(--accent); }
.post { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 12px 14px; margin-bottom: 10px; }
.post-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 12.5px; } .post-head .muted { font-size: 11.5px; }
.post .prose-doc p:last-child { margin-bottom: 0; } .post details { margin-top: 8px; } .post summary { cursor: pointer; color: var(--accent-text); font-size: 12.5px; }
.composer { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 12px; margin-bottom: 16px; } .composer textarea { margin-bottom: 8px; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); } .empty i { display: block; width: 86px; height: 86px; margin: 0 auto 8px; } .empty i svg { width: 100%; height: 100%; }
.status-pill { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; } .status-pill.pending { background: rgba(255, 200, 87, .15); color: var(--warn); } .status-pill.rejected { background: rgba(255, 92, 92, .15); color: var(--bad); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.proj { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 18px; display: flex; flex-direction: column; gap: 9px; transition: border-color .2s, transform .2s; } .proj:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.proj h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; } .proj p { margin: 0; color: var(--soft); font-size: 13px; flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; } .profile-head h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.acct { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; } .acct a, .acct span { font-size: 12px; padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 20px; color: var(--soft); } .acct a:hover { color: var(--accent-text); border-color: var(--accent-line); }
.edit-box { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 16px; margin: 16px 0; }
.runner-pill.up { display: none; }

/* ---------- hero art + footer ---------- */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: center; }
.hero-art { position: relative; min-height: 300px; }
.mock { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg-deep); box-shadow: 0 30px 70px rgba(0, 0, 0, .5); overflow: hidden; transform: rotate(-2deg); }
.mock-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel); } .mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); } .mock-bar i:first-child { background: var(--accent); }
.mock pre { margin: 0; padding: 14px 16px 18px; font-family: var(--code); font-size: 12px; line-height: 1.7; color: #dbe4f3; overflow: hidden; } .mock .k { color: #ff6b8e; } .mock .t { color: #7fd6ff; } .mock .n { color: #b4a7ff; } .mock .c { color: #5f7090; font-style: italic; } .mock .hl { display: block; margin: 0 -16px; padding: 0 16px; background: rgba(255, 62, 108, .13); border-left: 3px solid var(--accent); }
.hero-hari { position: absolute; right: -6px; bottom: -34px; width: 150px; height: 150px; animation: hari-bob 3.4s ease-in-out infinite; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5)); } .hero-hari svg { width: 100%; height: 100%; }
.hero-say { position: absolute; right: 132px; bottom: 60px; background: #fff; color: #1a0810; font-size: 12px; padding: 7px 12px; border-radius: 12px 12px 3px 12px; box-shadow: 0 8px 22px rgba(0, 0, 0, .45); max-width: 190px; }
.foot .made { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); } .foot .made i { width: 44px; height: 44px; } .foot .made i svg { width: 100%; height: 100%; } .foot .made b { color: var(--accent); letter-spacing: 0; }
.site-foot { flex: none; border-top: 1px solid var(--line); background: var(--bg-deep); padding: 4px 20px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.site-foot i { width: 30px; height: 30px; } .site-foot i svg { width: 100%; height: 100%; } .site-foot a { color: var(--soft); } .site-foot b { color: var(--accent); }
@media (max-width: 1020px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { display: none; } }
@media (max-width: 760px) { #hari, .hari-face { width: 66px; height: 66px; } .hari-bubble { bottom: 70px; } .site-foot { position: static; } }

.view.home ~ .site-foot { display: none; }
.user-link .avatar { width: 24px; height: 24px; }

/* ---------- coders directory + follow ---------- */
.search-link { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 20px; color: var(--soft); font-size: 12.5px; transition: border-color .2s, color .2s; }
.search-link svg { width: 14px; height: 14px; } .search-link:hover, .search-link.on { color: var(--accent-text); border-color: var(--accent-line); }
.coder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.coder { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 12px 14px; transition: border-color .2s; } .coder:hover { border-color: var(--accent-line); }
.coder .small { font-size: 11.5px; } .coder .bio { font-size: 12px; color: var(--soft); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.linkish.fl { font-weight: 400; color: var(--muted); } .linkish.fl b { color: var(--text); }
@media (max-width: 1180px) { .search-link span { display: none; } }

/* ---------- HariBeri live coach ---------- */
#hari.bubble-below .hari-bubble { bottom: auto; top: 82px; transform-origin: top right; }
#hari.left-side.bubble-below .hari-bubble { transform-origin: top left; }
.hari-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hari-btns button, .hari-act { background: #c2174a; color: #fff; border: 0; border-radius: 12px; padding: 3px 11px; font-size: 11.5px; font-weight: 700; cursor: pointer; margin: 2px 6px 2px 0; font-family: inherit; }
.hari-btns button:hover, .hari-act:hover { background: #8f0f35; }
.hari-btns button:last-child { background: #e8e6ee; color: #1a0810; } .hari-btns button:last-child:hover { background: #d3d0dd; }
.hari-msg .hari-act { background: var(--accent); color: var(--accent-ink); } .hari-msg .hari-act:hover { background: var(--accent-hi); }
.monaco-editor .hari-ghost { color: #ff9bb3; font-style: italic; opacity: .9; }

/* ---- HariBeri: language, voice, lessons, tour ---- */
.hari-slot { display: inline-flex; align-items: center; gap: 0; } .hari-panel header .hari-slot { font-size: inherit; color: inherit; }
.hari-langbtn { font-weight: 700; min-width: 30px; } .hari-tgl.on { background: var(--accent-soft, rgba(255, 77, 109, .18)); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); }
#hari.listening .hari-face { animation: hariListen 1.1s ease-in-out infinite; } @keyframes hariListen { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 77, 109, .0)); } 50% { filter: drop-shadow(0 0 14px rgba(255, 77, 109, .95)); } }
.hari-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .hari-grid .hari-act { display: flex; flex-direction: column; gap: 2px; text-align: left; margin: 0; } .hari-grid .hari-act span { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.hari-btnrow { display: flex; flex-wrap: wrap; gap: 6px; } .hari-q { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; font: inherit; text-align: left; } .hari-q:hover { text-decoration: underline; }
.hari-log pre.code { max-height: 260px; overflow: auto; font-size: 11.5px; }
.lv-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(5, 8, 16, .78); display: flex; align-items: center; justify-content: center; padding: 14px; backdrop-filter: blur(3px); }
.lv-card { width: min(940px, 100%); max-height: calc(100vh - 28px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0, 0, 0, .65); overflow: hidden; }
.lv-card header { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: var(--bg-deep); border-bottom: 1px solid var(--line); } .lv-card header .spacer, .lv-card footer .spacer { flex: 1; }
.lv-card header button { background: none; border: 1px solid var(--line-2); color: var(--soft); border-radius: var(--r-sm); padding: 4px 10px; cursor: pointer; } .lv-card header button:hover { color: var(--text); border-color: var(--accent-line); }
.lv-body { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 0; min-height: 300px; overflow: auto; } .lv-stage { padding: 18px; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; overflow: auto; }
.lv-side { border-left: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-deep); } .lv-hari svg { width: 92px; height: 92px; } .lv-cap { font-size: 13px; line-height: 1.6; }
.lv-card footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--bg-deep); } .lv-card footer button, .lv-card footer select { background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); border-radius: var(--r-sm); padding: 6px 12px; cursor: pointer; font: inherit; font-size: 12px; } .lv-card footer button.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .lv-card footer button:disabled { opacity: .4; cursor: default; } .lv-speed { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); } .lv-step { font-size: 12px; color: var(--muted); }
.lv-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; text-align: center; } .lv-arr { max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
.lv-cells { display: flex; gap: 4px; justify-content: center; } .lv-cell { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; font-weight: 700; transition: background .3s, border-color .3s, opacity .3s, transform .3s; }
.lv-cell.dim { opacity: .28; } .lv-cell.cur, .lv-cell.mid { border-color: #ffc857; background: rgba(255, 200, 87, .18); transform: translateY(-3px); } .lv-cell.win, .lv-cell.ok { border-color: #5fd39a; background: rgba(95, 211, 154, .2); } .lv-cell.hit { border-color: var(--accent); background: rgba(255, 77, 109, .22); } .lv-cell.wall { background: #0a0f1a; border-color: #0a0f1a; } .lv-cell.lvl0 { background: rgba(127, 214, 255, .16); } .lv-cell.lvl1 { background: rgba(127, 214, 255, .28); } .lv-cell.lvl2 { background: rgba(127, 214, 255, .4); } .lv-cell.lvl3 { background: rgba(127, 214, 255, .52); } .lv-cell.lvl4 { background: rgba(127, 214, 255, .64); }
.lv-idx, .lv-ptrs { display: flex; gap: 4px; justify-content: center; } .lv-idx span, .lv-ptr { min-width: 44px; text-align: center; font-size: 10.5px; color: var(--muted); } .lv-ptr { height: 22px; color: var(--accent-text); font-weight: 700; } .lv-ptr i { display: block; font-style: normal; line-height: 6px; }
.lv-empty { text-align: center; color: var(--muted); padding: 10px; } .lv-grid { display: grid; gap: 4px; justify-content: center; } .lv-table { border-collapse: separate; border-spacing: 4px; } .lv-table th { color: var(--muted); font-size: 12px; } .lv-table td.lv-cell { min-width: 40px; height: 38px; }
.lv-svg { width: 100%; max-width: 560px; height: auto; } .lv-edge { stroke: #3a475c; stroke-width: 2; } .lv-edge.hit { stroke: var(--accent); stroke-width: 3.5; } .lv-w { fill: #ffc857; font-size: 12px; font-weight: 700; } .lv-node { fill: var(--panel-2); stroke: #3a475c; stroke-width: 2; transition: fill .3s, stroke .3s; } .lv-node.cur { stroke: #ffc857; fill: rgba(255, 200, 87, .2); } .lv-node.ok { stroke: #5fd39a; fill: rgba(95, 211, 154, .2); } .lv-node.bad { stroke: var(--accent); fill: rgba(255, 77, 109, .25); } .lv-node.dim { opacity: .35; } .lv-nl { fill: var(--text); font-weight: 700; font-size: 13px; } .lv-nd { fill: var(--soft); font-size: 11px; }
.lv-bars { width: 100%; max-width: 560px; position: relative; padding-bottom: 20px; } .lv-bar-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: 11px; } .lv-bl { width: 54px; color: var(--muted); text-align: right; } .lv-track { position: relative; flex: 1; height: 18px; background: var(--panel-2); border-radius: 4px; } .lv-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; background: #3a475c; transition: background .3s; } .lv-bar.ok { background: #5fd39a; } .lv-bar.bad { background: var(--accent); opacity: .6; } .lv-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #ffc857; z-index: 1; } .lv-axis { position: relative; margin: 0 0 0 62px; height: 14px; } .lv-axis span { position: absolute; font-size: 10px; color: var(--muted); transform: translateX(-50%); }
.lv-lines { font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 14px; line-height: 1.9; align-self: stretch; padding: 4px 10px; } .lv-line.head { color: var(--accent-text); font-weight: 700; } .lv-line.ok { color: #5fd39a; } .lv-line.bad { color: var(--accent-text); } .lv-line.cur { background: rgba(255, 200, 87, .14); border-radius: 4px; }
.hari-ring { display: none; position: fixed; z-index: 94; pointer-events: none; border: 2px solid var(--accent); border-radius: 10px; box-shadow: 0 0 0 9999px rgba(5, 8, 16, .62), 0 0 22px var(--accent); transition: all .3s ease; }
.hari-tour { position: fixed; z-index: 95; display: flex; gap: 12px; background: #fff; color: #1a0810; border-radius: 14px; padding: 12px 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); font-size: 13px; line-height: 1.55; } .hari-tour-face svg { width: 56px; height: 56px; } .hari-tour p { margin: 0 0 8px; } .hari-tour-btns { display: flex; align-items: center; gap: 6px; } .hari-tour-btns span { flex: 1; font-size: 11px; color: #6b5560; } .hari-tour-btns button { border: 1px solid #d9c9d0; background: #fff; border-radius: 8px; padding: 4px 10px; cursor: pointer; } .hari-tour-btns button.primary { background: #ff4d6d; border-color: #ff4d6d; color: #fff; } .hari-tour-btns button:disabled { opacity: .4; }
@media (max-width: 760px) { .lv-body { grid-template-columns: 1fr; } .lv-side { border-left: 0; border-top: 1px solid var(--line); flex-direction: row; align-items: center; } .lv-hari svg { width: 64px; height: 64px; } .hari-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .lv-cell, .lv-node, .hari-ring, #hari.listening .hari-face { transition: none; animation: none; } }

/* lessons: full screen, code pane with HariBeri pointing at the running line */
body.lv-open #hari, body.lv-open .hari-panel { display: none !important; }
.lv-overlay { padding: 0; } .lv-card { width: 100vw; height: 100vh; max-height: none; border-radius: 0; border: 0; }
.lv-body { grid-template-columns: minmax(0, 1fr) minmax(380px, 38%); flex: 1; min-height: 0; } .lv-stage { padding: 28px; gap: 22px; } .lv-stage .lv-cell { min-width: 58px; height: 58px; font-size: 19px; } .lv-stage .lv-idx span, .lv-stage .lv-ptr { min-width: 58px; font-size: 12px; } .lv-stage .lv-ptr { height: 24px; } .lv-stage .lv-label { font-size: 13px; }
.lv-stage .lv-svg { max-width: 860px; } .lv-stage .lv-table td.lv-cell { min-width: 56px; height: 50px; } .lv-stage .lv-bars { max-width: 820px; } .lv-stage .lv-bar-row { font-size: 13px; margin: 5px 0; } .lv-stage .lv-track { height: 24px; } .lv-stage .lv-lines { font-size: 18px; }
.lv-side { overflow: auto; gap: 14px; padding: 18px; } .lv-hari svg { width: 110px; height: 110px; } .lv-cap { font-size: 17px; line-height: 1.65; }
.lv-src { margin: 0; background: #070b14; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 0; font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 13.5px; line-height: 1.7; white-space: pre; overflow-x: auto; }
.lv-ln { display: block; padding: 0 14px; color: #9fb0cc; border-left: 3px solid transparent; position: relative; } .lv-ln.on { background: rgba(255, 77, 109, .16); border-left-color: var(--accent); color: #fff; }
.lv-pt { position: absolute; right: 8px; top: -12px; display: inline-flex; align-items: center; gap: 2px; font-style: normal; animation: lvBob .8s ease-in-out infinite; } .lv-pt svg { width: 38px; height: 38px; } .lv-pt b { background: #fff; color: #c2174a; font: 700 11px var(--font, sans-serif); border-radius: 8px; padding: 1px 6px; }
@keyframes lvBob { 50% { transform: translateX(-5px); } }
@media (max-width: 900px) { .lv-body { grid-template-columns: 1fr; overflow: auto; } .lv-stage .lv-cell { min-width: 44px; height: 44px; font-size: 15px; } .lv-stage .lv-idx span, .lv-stage .lv-ptr { min-width: 44px; } }

.hari-msg.hari-typing::after { content: '▍'; color: var(--accent-text); animation: hariCaret .7s steps(1) infinite; margin-left: 1px; } @keyframes hariCaret { 50% { opacity: 0; } }

/* ---------- GitLab-style activity calendar + motion (colours stay ours) ---------- */
.heat-body { display: flex; gap: 8px; align-items: flex-start; overflow-x: auto; }
.heat-days { display: grid; grid-template-rows: 15px repeat(7, 12px); gap: 3px; font-size: 10px; color: var(--muted); text-align: right; padding-top: 0; } .heat-days span { line-height: 12px; }
.heat { margin: 0; } .heat .d { border-radius: 2px; transition: transform .12s ease, outline-color .12s ease; outline: 1px solid transparent; outline-offset: 1px; animation: heatIn .42s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--c, 0) * 9ms); cursor: pointer; }
.heat .d:hover, .heat .d.pin { transform: scale(1.35); outline-color: var(--accent-text); z-index: 1; position: relative; } .heat .d.pin { outline-width: 2px; }
@keyframes heatIn { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
.heat-detail { margin-top: 10px; font-size: 12.5px; min-height: 20px; } .heat-detail b { color: var(--text); }
.heat-tip { position: fixed; z-index: 120; pointer-events: none; background: #0b1220; color: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 10px; font-size: 12px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; white-space: nowrap; } .heat-tip.on { opacity: 1; transform: none; } .heat-tip b { display: block; } .heat-tip span { color: var(--muted); }
/* motion in the spirit of GitLab's UI: short, quiet transitions, skeleton shimmer, gentle page entrance */
a, button, .btn, input, select, textarea, summary, tr, .tile, .card, .tag, .badge, .nav-links a, .user-link { transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .2s ease, transform .15s ease, opacity .15s ease; }
.tile:hover, .card:hover, .coder:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); border-color: var(--accent-line); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent-tint); }
#view > * { animation: pageIn .28s cubic-bezier(.2, .7, .3, 1) both; } @keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
details > summary { cursor: pointer; } details[open] > .phase-body, details[open] > .pat-body { animation: slideIn .22s ease both; } @keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bar > i { transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.skeleton, .loading-line { background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel-3) 37%, var(--panel-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--r-sm); } @keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.toast, #toasts > * { animation: toastIn .22s cubic-bezier(.2, .8, .3, 1) both; } @keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
input[type=checkbox] { transition: transform .12s ease; } input[type=checkbox]:active { transform: scale(.85); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- DSA sheets + calendar ---------- */
.sheet-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; } .sheet-tabs button { background: var(--panel); border: 1px solid var(--line-2); color: var(--soft); border-radius: var(--r); padding: 8px 14px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; font: inherit; } .sheet-tabs button span { font-size: 12px; color: var(--muted); } .sheet-tabs button:hover { border-color: var(--accent-line); color: var(--text); } .sheet-tabs button.on { border-color: var(--accent); background: var(--accent-tint); color: var(--text); }
.diffbars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } .diffbars .lbl { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; } .bar.easy > i { background: var(--ok); } .bar.medium > i { background: var(--warn); } .bar.hard > i { background: var(--accent); }
.pat { margin: 0 0 18px; } .pat-head { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; } .pat-head h4 { margin: 0; font-size: 14px; color: var(--accent-text); } .pat-head .btn { margin-left: auto; }
.sheet-table td.sol { white-space: nowrap; font-size: 12.5px; } .sheet-table td.sol a, .sheet-table td.sol .linkish { margin-right: 10px; } .sheet-table td.co { text-align: right; } .sheet-table .ref { font-size: 11.5px; margin-left: 4px; } .sheet-table tr.done td a:first-child { text-decoration: line-through; opacity: .6; }
@media (max-width: 860px) { .sheet-table td.co { display: none; } .diffbars { grid-template-columns: 1fr; } }
.cal .stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; } @media (max-width: 700px) { .cal .stat-row { grid-template-columns: repeat(2, 1fr); } }
.plan-card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 12px 14px; margin-bottom: 16px; } .plan-line { margin-bottom: 10px; } .plan-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; } .plan-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.cal-nav { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; } .cal-nav h2 { flex: 0 0 auto; min-width: 130px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } .cal-h { text-align: center; font-size: 11.5px; color: var(--muted); padding: 2px 0; }
.cal-d { position: relative; min-height: 64px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 6px 8px; text-align: left; cursor: pointer; color: var(--text); font: inherit; animation: heatIn .35s ease both; animation-delay: calc(var(--i, 0) * 12ms); } .cal-d.blank { border: 0; background: none; cursor: default; animation: none; }
.cal-d:hover { border-color: var(--accent-line); transform: translateY(-1px); } .cal-d.sel { outline: 2px solid var(--accent-text); outline-offset: 1px; } .cal-d.today .num { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; }
.cal-d .num { font-size: 12px; font-weight: 600; } .cal-d .n { position: absolute; right: 8px; top: 6px; font-size: 12px; font-weight: 700; } .cal-d .pl { position: absolute; left: 8px; bottom: 5px; font-size: 11px; color: var(--accent-text); letter-spacing: 1px; }
.cal-d.l1 { background: #3a1523; } .cal-d.l2 { background: #67203a; } .cal-d.l3 { background: #a22a54; } .cal-d.l4 { background: #d63b73; } .cal-d.future { background: transparent; border-style: dashed; }
.cal-legend { display: flex; justify-content: space-between; margin: 8px 0 18px; font-size: 12px; } .cal-legend .d { display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: #1c2738; margin: 0 2px; vertical-align: -2px; } .cal-legend .l1 { background: #5a1a2e; } .cal-legend .l2 { background: #9c2148; } .cal-legend .l3 { background: #e0245e; } .cal-legend .l4 { background: #ff7a9a; }
.cal-day { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; } .day-list { list-style: none; margin: 0; padding: 0; } .day-list li { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); } .day-list li:last-child { border: 0; } .day-list .tick { color: var(--ok); font-weight: 700; } .day-list .muted { margin-left: auto; font-size: 12px; }
.log-form { display: flex; gap: 8px; margin-top: 12px; } .log-form input { flex: 1; }
@media (max-width: 700px) { .cal-d { min-height: 48px; padding: 4px 5px; } .cal-d .pl { display: none; } }
.sheet-table td.tick input[type=checkbox], .day-list input[type=checkbox], .cs-table td.tick input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.sheet-table td.tick { width: 30px; } .toolbar .q { flex: 1; min-width: 200px; }

/* concept lessons: cards that build up one idea at a time */
.lv-steps { width: min(760px, 100%); display: flex; flex-direction: column; gap: 10px; } .lv-steps-head { margin-bottom: 6px; } .lv-steps-head b { display: block; font-size: 26px; letter-spacing: -.02em; color: var(--accent-text); } .lv-steps-head span { display: block; margin-top: 8px; font-size: 16px; color: var(--soft); line-height: 1.6; }
.lv-step-card { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 10px; padding: 12px 16px; font-size: 16px; line-height: 1.55; animation: slideIn .35s ease both; } .lv-step-card i { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-3); font-style: normal; font-weight: 700; font-size: 14px; color: var(--soft); }
.lv-step-card.done { opacity: .55; } .lv-step-card.on { border-color: var(--accent); background: var(--accent-tint); } .lv-step-card.on i { background: var(--accent); color: #fff; } .lv-step-card.ok { border-color: #5fd39a; } .lv-step-card.bad { border-color: #ffc857; } .lv-step-card.ok i { background: #5fd39a; color: #06231a; } .lv-step-card.bad i { background: #ffc857; color: #2a1d00; }

/* hubs, practice page */
.hub-tabs { display: flex; gap: 4px; margin-left: 24px; } .hub-tabs a { padding: 5px 13px; border-radius: 20px; font-size: 12.5px; color: var(--soft); border: 1px solid transparent; } .hub-tabs a:hover { color: var(--text); border-color: var(--line-2); } .hub-tabs a.on { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-text); font-weight: 600; }
.page-head { align-items: center; } @media (max-width: 700px) { .hub-tabs { margin-left: 8px; overflow-x: auto; } }
.practice .left { padding: 18px 22px 40px; } .practice .case { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; } .practice .case-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .practice .case label { display: block; font-size: 11.5px; color: var(--muted); margin: 6px 0 0; } .practice .case textarea { width: 100%; margin-top: 3px; font-size: 12.5px; min-height: 0; }
.practice .cout { margin: 8px 0 0; padding: 8px 10px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; white-space: pre-wrap; max-height: 160px; overflow: auto; } .practice .hint-box { margin-top: 18px; border: 1px dashed var(--line-2); border-radius: var(--r); padding: 10px 14px; } .practice .hint-box summary { cursor: pointer; color: var(--accent-text); }
.sheet-table td.sol { display: flex; gap: 12px; align-items: center; justify-content: flex-end; } .btn.solve { padding: 3px 14px; }
.verdict.OK { color: var(--soft); }

/* ---------- visual polish ---------- */
::selection { background: var(--accent); color: #fff; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: #2a3850 transparent; } ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #2a3850; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background: #3b4d6b; background-clip: content-box; border: 2px solid transparent; }
a { text-underline-offset: 3px; }
.nav-links { justify-content: flex-start; margin-left: 6px; } .nav-links a { position: relative; } .nav-links a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); animation: slideIn .25s ease both; }
.nav { box-shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .25); }
.page-head { background: linear-gradient(90deg, rgba(255, 62, 108, .07), transparent 55%); }
.btn.primary { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 18px rgba(255, 62, 108, .22); } .btn.primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 8px 26px rgba(255, 62, 108, .4); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--soft); } .btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.hero { background-image: radial-gradient(900px 420px at 80% 10%, rgba(255, 62, 108, .16), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(80, 120, 255, .08), transparent 60%); }
.hero-stats dt { background: linear-gradient(180deg, #ff9db6, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tiles { gap: 16px; } .tile { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-radius: 12px; } .tile::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); opacity: 0; transition: opacity .2s ease; } .tile:hover::before { opacity: 1; } .tile > i { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-tint); color: var(--accent-text); margin-bottom: 10px; }
.tile > i svg { width: 22px; height: 22px; }
.hari-band { background: linear-gradient(180deg, transparent, rgba(255, 62, 108, .05), transparent); } .hb-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 260px; } .hb-glow { position: absolute; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 62, 108, .35), transparent 68%); animation: hbPulse 4s ease-in-out infinite; } .hb-face svg { position: relative; width: 210px; height: 210px; animation: hbFloat 5s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45)); }
@keyframes hbFloat { 50% { transform: translateY(-10px) rotate(-2deg); } } @keyframes hbPulse { 50% { transform: scale(1.12); opacity: .75; } }
.hb-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 20px; } .hb-chips li { border: 1px solid var(--accent-line); background: var(--accent-tint); color: var(--accent-text); border-radius: 20px; padding: 4px 13px; font-size: 12.5px; }
.phase, .panel, .plan-card, .cal-day, .heat-wrap { border-radius: 12px; } .phase { transition: border-color .2s ease, box-shadow .2s ease; } .phase:hover { border-color: var(--accent-line); } .phase[open] { box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.badge { letter-spacing: .01em; } .tag { border: 1px solid var(--line); }
.stat { border-radius: 12px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
@media (max-width: 760px) { .nav-links { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); } .hb-art { min-height: 200px; } .hb-face svg { width: 150px; height: 150px; } }
.hero h1, .band h2 { text-wrap: balance; } .hero h1 { font-size: clamp(32px, 4.6vw, 56px); }

/* bigger, tidier HariBeri window */
.hari-panel header { gap: 8px; padding: 10px 12px; } .hari-panel header .hari-title { display: block; flex: none; font-size: 16px; letter-spacing: -.01em; } .hari-panel header .hari-tools { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0; font-size: inherit; color: inherit; }
.hari-panel header .hari-slot { display: inline-flex; align-items: center; } .hari-panel .hari-tgl { white-space: nowrap; font-size: 15px; padding: 5px 7px; } .hari-panel .hari-tgl.hari-speed { font-size: 11.5px; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 14px; margin: 0 4px; } .hari-langbtn { font-size: 13px !important; border: 1px solid var(--line-2) !important; border-radius: 14px !important; margin-right: 4px; }
.hari-panel .hari-msg { font-size: 14px; line-height: 1.65; padding: 10px 14px; max-width: 94%; } .hari-panel .hari-msg code { font-size: 12.5px; } .hari-panel .hari-msg pre.code { font-size: 12.5px; max-height: 320px; } .hari-panel .hari-log { padding: 16px; gap: 12px; }
.hari-panel .hari-chips button { font-size: 12.5px; padding: 5px 12px; } .hari-panel form input { font-size: 14px; padding: 10px 12px; } .hari-panel form .btn { padding: 8px 18px; }
.hari-panel.big { border-color: var(--accent-line); box-shadow: 0 30px 90px rgba(0, 0, 0, .7); } .hari-panel.big .hari-msg { font-size: 15px; }
.hari-live-bar { position: fixed; z-index: 70; left: 50%; bottom: 74px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; background: #fff; color: #1a0810; border-radius: 24px; padding: 7px 8px 7px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); font-size: 13px; animation: toastIn .25s ease both; } .hari-live-bar b { color: #c2174a; } .hari-live-bar button { border: 0; border-radius: 16px; padding: 5px 14px; cursor: pointer; background: #c2174a; color: #fff; font-weight: 700; } .hari-live-bar button.alt { background: #eee; color: #333; }
.hari-fixbox { border-left: 3px solid var(--accent); padding-left: 10px; margin: 8px 0; } .hari-where { display: inline-block; background: var(--accent-tint); border: 1px solid var(--accent-line); color: var(--accent-text); border-radius: 14px; padding: 2px 11px; font-size: 12.5px; margin-bottom: 6px; }

/* checkboxes: one clean, consistent style everywhere (the browser default stretched into a pill next to some rules) */
input[type=checkbox] { -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: none; width: 18px !important; height: 18px !important; min-width: 18px !important; max-width: 18px !important; padding: 0 !important; margin: 0; border: 2px solid #4a5a75 !important; border-radius: 5px !important; background: transparent !important; display: inline-grid; place-content: center; cursor: pointer; vertical-align: middle; transition: background-color .12s ease, border-color .12s ease, transform .12s ease; }
input[type=checkbox]::after { content: ''; width: 9px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .12s ease; }
input[type=checkbox]:hover { border-color: var(--accent-text) !important; } input[type=checkbox]:checked { background: var(--accent) !important; border-color: var(--accent) !important; } input[type=checkbox]:checked::after { transform: rotate(-45deg) scale(1); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; } input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
/* the blue pill behind the tick boxes was the verified-badge style (.tick) leaking onto the table cell */
td.tick { display: table-cell !important; width: 34px !important; height: auto !important; border-radius: 0 !important; background: transparent !important; text-align: center; vertical-align: middle; margin: 0 !important; color: inherit; }
.day-list .tick { background: transparent; color: var(--ok); width: auto; height: auto; font-size: 14px; }
.sheet-table { width: 100%; table-layout: auto; } .sheet-table td.sol { display: table-cell !important; text-align: right; white-space: nowrap; width: 1%; } .sheet-table td.sol .btn.solve { margin-left: 12px; } .sheet-table td:nth-child(3) { width: 1%; white-space: nowrap; }

/* study room + online counts */
#room { position: fixed; z-index: 55; left: 16px; bottom: 56px; font-size: 13px; } .room-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 22px; padding: 7px 14px; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); } .room-pill:hover { border-color: var(--accent-line); } .room-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #55607a; } .room-pill .dot.on { background: #43d17f; box-shadow: 0 0 0 4px rgba(67, 209, 127, .2); animation: hbPulse 2s ease-in-out infinite; }
.room-panel { position: absolute; left: 0; bottom: 44px; width: 320px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); animation: toastIn .2s ease both; } .room-panel[hidden] { display: none; }
.room-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; } .room-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 220px; overflow: auto; } .room-list li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; transition: background-color .15s ease; } .room-list li.talk { background: rgba(67, 209, 127, .12); } .room-list li.talk .avatar { box-shadow: 0 0 0 2px #43d17f, 0 0 12px #43d17f; } .room-list .avatar { border-radius: 50%; flex: none; transition: box-shadow .15s ease; } .room-badge { margin-left: auto; font-size: 11.5px; color: var(--soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 1px 8px; white-space: nowrap; }
.room-actions { display: flex; gap: 8px; margin-bottom: 8px; } .room-note { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; } .room-note.err { color: var(--accent-text); } .room-opt { font-size: 12px; margin-top: 6px; }
.online { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; font-size: 11.5px; color: #43d17f; border: 1px solid rgba(67, 209, 127, .4); border-radius: 12px; padding: 0 8px; vertical-align: middle; } .online i { width: 7px; height: 7px; border-radius: 50%; background: #43d17f; animation: hbPulse 2s ease-in-out infinite; }
@media (max-width: 760px) { #room { bottom: 70px; } }
