:root {
  --bg: #f5f6f8; --card: #ffffff; --side: #fbfbfc; --ink: #16202a; --muted: #6b7684; --faint: #9aa3ae; --line: #e6e8ec;
  --accent: #0f6b5a; --accent-ink: #0b5547; --accent-soft: #e5f2ee; --warn: #b26b00; --warn-soft: #fdf1dc; --hi: #c0352b; --hi-soft: #fdeceb;
  --blue-soft: #eaf1fb; --blue-ink: #1f5a9e;
  --r: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
.hidden { display: none !important; }
a { color: var(--accent); }

/* layout */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--side); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 18px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.brand-name { font-weight: 600; font-size: 15px; } .brand-sub { font-size: 12px; color: var(--muted); }
nav { display: flex; flex-direction: column; gap: 2px; }
.tab { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.tab:hover { background: #f0f2f4; color: var(--ink); }
.tab.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.tab .ic { width: 20px; text-align: center; font-size: 15px; }
.tab .pill { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 6px; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); line-height: 1.45; }
.side-foot b { color: var(--accent-ink); }
.side-foot.bad b { color: var(--hi); }
.pill { background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
main { padding: 22px 28px 60px; max-width: 1180px; width: 100%; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
h1 { margin: 0; font-size: 22px; font-weight: 650; }
.sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

/* views */
.view { display: none; } .view.active { display: block; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--muted); } .stat .v { font-size: 22px; font-weight: 650; margin-top: 2px; }
.stat .s { font-size: 12px; color: var(--faint); margin-top: 1px; }

/* controls */
button { font: inherit; font-size: 14px; padding: 8px 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
button:hover { border-color: #cfd4da; background: #fafbfc; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: var(--accent-ink); }
button:disabled { opacity: .5; cursor: default; }
select, input[type=search], input[type=password], input:not([type]), textarea { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
input[type=search] { flex: 1; min-width: 180px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.status { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; white-space: pre-line; }
.status .err, .err { color: var(--hi); }
.row { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.msg { font-size: 13px; color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
code { background: #f1f3f5; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* feed cards */
.list { display: grid; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 14px; align-items: start; box-shadow: var(--shadow); }
.card:hover { border-color: #d5dae0; }
.card.read { opacity: .62; }
.score { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 15px; border: 3px solid var(--line); color: var(--muted); }
.score.s-hi { border-color: var(--accent); color: var(--accent-ink); }
.score.s-mid { border-color: #e0a63a; color: var(--warn); }
.card h3 { margin: 0 0 3px; font-size: 15.5px; line-height: 1.38; font-weight: 600; }
.card h3 a { color: inherit; text-decoration: none; } .card h3 a:hover { text-decoration: underline; }
.meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.desc { font-size: 13.5px; color: #47505b; margin: 0 0 8px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 11.5px; background: var(--accent-soft); color: var(--accent-ink); padding: 2px 8px; border-radius: 6px; }
.tag b { font-weight: 600; }
.tag.dom { background: var(--blue-soft); color: var(--blue-ink); }
.tag.ed { background: #fdf1dc; color: #8a5300; font-weight: 600; }
.tag.custom { background: var(--hi-soft); color: var(--hi); }
.actions { display: flex; flex-direction: column; gap: 6px; min-width: 104px; }
.actions button { font-size: 13px; padding: 7px 10px; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; background: var(--card); border: 1px dashed var(--line); border-radius: 12px; }

/* domains */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; text-align: left; box-shadow: var(--shadow); display: block; width: 100%; }
.tile:hover { border-color: #cdd3d9; }
.tile.sel { border: 2px solid var(--accent); padding: 11px 13px; }
.tile .ti { font-size: 22px; }
.tile .tl { font-size: 13.5px; font-weight: 600; margin: 6px 0 2px; line-height: 1.3; }
.tile .tc { font-size: 12px; color: var(--muted); }
.bar { height: 5px; border-radius: 3px; background: #edf0f2; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar i.low { background: #e0a63a; }
.detail { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.detail-head h2 { margin: 0; font-size: 17px; }
.dnote { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.dnote:hover .dt { text-decoration: underline; }
.dt { font-size: 14px; font-weight: 600; } .dd { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dom-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.dom-chip { font-size: 12px; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.dom-chip.on { background: var(--blue-soft); color: var(--blue-ink); border-color: #b9d0ee; }

/* backup */
.backup-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.backup-strip .ok { color: var(--accent-ink); font-weight: 600; }
.backup-strip .bad { color: var(--hi); font-weight: 600; }
.backup-strip .sp { flex: 1; }
.backup-strip button { font-size: 13px; padding: 6px 11px; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.panel h2 { font-size: 15px; margin: 0 0 8px; }
.checks { margin: 0 0 12px; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: #47505b; } .checks li { margin-bottom: 6px; }
.snap { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }

/* syllabus */
.paper { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin-bottom: 10px; }
.paper summary { cursor: pointer; font-size: 15px; padding: 4px 0; }
.syl-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.syl-main { font-size: 14px; } .syl-main .hint { margin: 2px 0 0; font-size: 12px; }
.syl-counts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.syl-counts button { font-size: 12px; padding: 5px 9px; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: #cfd4da; }
.dot.s-some { background: #e0a63a; } .dot.s-done { background: var(--accent); }
ul.syl li .hint { font-size: 12px; margin: 2px 0 4px; }

/* settings */
.settings h2 { font-size: 15px; margin: 18px 0 4px; } .settings h2:first-child { margin-top: 0; }
.settings label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin: 8px 0; max-width: 520px; }
.settings textarea { width: 100%; font-family: Consolas, monospace; font-size: 13px; }

/* revise */
.revise { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 26px 30px; max-width: 760px; }
.revise .q { font-size: 20px; font-weight: 600; margin: 6px 0 14px; line-height: 1.4; }

/* drawer */
.drawer { position: fixed; inset: 0; background: rgba(16, 24, 32, .42); display: flex; justify-content: flex-end; z-index: 20; }
.drawer-inner { width: min(780px, 100%); background: var(--card); height: 100%; overflow: auto; padding: 26px 30px 60px; position: relative; }
.close { position: absolute; right: 16px; top: 16px; }
.drawer h2 { margin: 0 36px 6px 0; font-size: 20px; line-height: 1.35; }
.drawer h4 { margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.drawer ul, .drawer ol { margin: 0; padding-left: 20px; } .drawer li { margin: 4px 0; line-height: 1.5; font-size: 14px; }
.drawer p { line-height: 1.6; font-size: 14px; margin: 0 0 6px; }
.mode { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #f1ece2; color: #6b5223; }
.qa summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.qa div { padding: 4px 0 8px 16px; color: #47505b; font-size: 14px; }
textarea.mynote { width: 100%; min-height: 70px; }
.gpt-box { background: #f5f8f7; border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 12px; margin-top: 18px; }
.gpt-box h4 { margin-top: 12px; }
.gpt-box textarea { margin-top: 6px; }
.gpt-out { white-space: pre-wrap; font-size: 14px; line-height: 1.5; background: #f7f7f5; border-radius: 8px; padding: 10px 12px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); max-width: 640px; background: #1d232b; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; line-height: 1.45; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; }
  nav { flex-direction: row; flex-wrap: wrap; } .tab { width: auto; } .nav-sep, .side-foot { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); } .panel-grid { grid-template-columns: 1fr; }
  .card { grid-template-columns: 46px 1fr; } .actions { grid-column: 1 / -1; flex-direction: row; }
  main { padding: 16px; }
}
.gpt-out.md { white-space: normal; }
.md h2, .md h3, .md h4 { text-transform: none; letter-spacing: 0; color: var(--ink); margin: 12px 0 4px; font-size: 15px; }
.md h2 { font-size: 16px; } .md p { margin: 0 0 6px; } .md ul, .md ol { margin: 0 0 8px; padding-left: 20px; }
.md li.sub { margin-left: 18px; list-style: circle; }
.md table { border-collapse: collapse; margin: 6px 0 10px; font-size: 13px; } .md th, .md td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.md blockquote { border-left: 3px solid var(--line); margin: 6px 0; padding-left: 10px; color: var(--muted); }
#gptPreview { max-height: 360px; overflow: auto; border: 1px solid var(--line); background: #fff; }

/* ---- Headlines ---- */
.pill.new { background: #fde8e7; color: #c0352b; }
.seg { display: inline-flex; gap: 4px; background: #eef0f2; padding: 3px; border-radius: 9px; }
.seg button { border: 0; background: none; padding: 6px 12px; font-size: 13px; border-radius: 7px; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: -2px 0 10px; flex-wrap: wrap; }
.legend .hl-dot { margin-left: 8px; } .legend .hl-dot:first-child { margin-left: 0; }
.hl-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 2px 16px; box-shadow: var(--shadow); }
.hl-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.hl-row:first-child { border-top: 0; }
.hl-row.is-new .hl-title::after { content: "NEW"; font-size: 10px; font-weight: 700; color: #c0352b; background: #fde8e7; border-radius: 4px; padding: 1px 5px; margin-left: 8px; vertical-align: 2px; }
.hl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #cfd4da; }
.hl-dot.l2 { background: var(--accent); } .hl-dot.l1 { background: #e0a63a; }
.hl-title { font-size: 14.5px; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.38; }
.hl-title:hover { text-decoration: underline; }
.hl-meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.hl-meta b { color: var(--accent-ink); font-weight: 600; }
.hl-act { display: flex; gap: 6px; } .hl-act button { font-size: 12.5px; padding: 6px 10px; }
.hl-edit textarea { width: 100%; font: inherit; font-size: 14px; }
/* ---- Current affairs log ---- */
.log-day { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.log-date { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.log-row { padding: 7px 0; border-top: 1px solid var(--line); } .log-row:first-of-type { border-top: 0; }
.log-text { font-size: 14px; line-height: 1.45; outline: none; border-radius: 6px; padding: 2px 4px; margin: 0 -4px; }
.log-text:focus { background: #f6f8f9; box-shadow: 0 0 0 1px var(--line); }
.log-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.log-meta .hint { margin: 0; font-size: 12px; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 0 4px; margin-left: auto; cursor: pointer; }
.link-btn:hover { color: var(--hi); background: none; }

/* ---- Reading controls for the analysis panel ---- */
.drawer-tools { position: sticky; top: -26px; z-index: 2; display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin: -26px -30px 10px; padding: 10px 16px; background: rgba(255,255,255,.94); backdrop-filter: blur(4px); border-bottom: 1px solid var(--line); }
.drawer-tools button { font-size: 13px; padding: 6px 11px; }
.drawer-tools .hint { margin: 0; min-width: 40px; text-align: center; font-size: 12px; }
.drawer .close { display: none; }
#drawerBody { zoom: var(--read-zoom, 1); }
.drawer.wide .drawer-inner { width: 100%; padding-left: 30px; padding-right: 30px; }
.drawer.wide #drawerBody { max-width: 920px; margin: 0 auto; }
.drawer.wide #drawerBody p, .drawer.wide #drawerBody li { line-height: 1.7; }

.ver { font-size: 11px; color: var(--faint); text-align: center; margin-top: 8px; }
.drawer.wide { background: var(--card); }
.drawer.wide .drawer-inner { box-shadow: none; }

.hl-row { transition: opacity .3s, transform .3s; }
.hl-row.leaving { opacity: 0; transform: translateX(24px); }
.hl-row.is-read { opacity: .55; }
.icon-btn { width: 32px; padding: 6px 0 !important; text-align: center; color: var(--accent-ink); }

/* =====================================================================
   PRO THEME: Pakistan green & white, with 2D motion
   ===================================================================== */
:root {
  --pk: #01411C; --pk-2: #0B6E3A; --pk-3: #1F8A4C; --pk-soft: #E3F1E7; --pk-line: #c9e3d1;
  --accent: #0B6E3A; --accent-ink: #01411C; --accent-soft: #E3F1E7;
  --bg: #f4f6f4; --ease: cubic-bezier(.2,.8,.2,1);
}
/* sidebar */
.sidebar { background: var(--pk); border-right: 0; color: #d6eadc; padding-left: 18px; position: sticky; }
.sidebar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: #fff; }
.brand { padding: 2px 6px 20px; }
.logo { background: #fff; color: var(--pk); width: 36px; height: 36px; border-radius: 10px; }
.brand-name { color: #fff; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.brand-sub { color: #9fd0ae; }
.pro { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; background: #fff; color: var(--pk); border-radius: 4px; padding: 1px 5px; }
.tab { color: #cfe5d6; position: relative; transition: color .2s, background .2s; }
.tab:hover { background: rgba(255,255,255,.07); color: #fff; }
.tab.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.tab.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: #fff; }
.tab .pill { background: #fff; color: var(--pk); }
.tab .pill.new { background: #fff; color: #c0352b; }
.nav-sep { background: rgba(255,255,255,.15); }
.side-foot { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #cfe5d6; }
.side-foot b { color: #fff; }
.side-foot.bad { background: rgba(192,53,43,.25); }
.ver { color: #8fbf9d; }

/* buttons & cards */
button.primary { background: var(--pk); border-color: var(--pk); }
button.primary:hover { background: var(--pk-2); }
.stat { border-top: 3px solid var(--pk-2); }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.score { border-radius: 10px; border-width: 0; background: #eef0ef; }
.score.s-hi { background: var(--pk-soft); color: var(--pk); }
.score.s-mid { background: #fdf1dc; color: #8a5300; }
.tag { background: var(--pk-soft); color: var(--pk); }
.tile.sel { border-color: var(--pk-2); }
.bar i { background: var(--pk-2); }
.drawer h4 { color: var(--pk-2); }
.hl-dot.l2 { background: var(--pk-2); }
.dot.s-done { background: var(--pk-2); }

/* Today */
.hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: var(--pk); color: #fff; border-radius: 16px; padding: 22px 26px; margin-bottom: 16px; }
.hero-moon { position: absolute; right: -30px; top: -40px; width: 230px; height: 230px; color: #fff; opacity: .09; }
.hero > div { position: relative; padding-left: 6px; }
.hero-date { margin: 0; font-size: 13px; opacity: .8; }
.hero-hi { margin: 2px 0 2px; font-size: 26px; font-weight: 650; color: #fff; }
.hero-sub { margin: 0; font-size: 14px; opacity: .9; }
.hero-btn { position: relative; background: #fff; color: var(--pk); border-color: #fff; font-weight: 600; }
.hero-btn:hover { background: #f1f7f3; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.today-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.panel-head h2 { margin: 0; }
.panel-head .link-btn { margin: 0; color: var(--pk-2); font-weight: 600; }
.t-row { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.t-row:first-child { border-top: 0; }
.t-row:hover .t-title { color: var(--pk-2); }
.t-score { min-width: 36px; height: 36px; border-radius: 9px; background: var(--pk-soft); color: var(--pk); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.t-score.mid { background: #fdf1dc; color: #8a5300; }
.t-main { min-width: 0; flex: 1; }
.t-title { font-size: 14px; font-weight: 600; line-height: 1.35; transition: color .2s; }
.t-title.light { font-weight: 500; }
.t-meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.big-num { font-size: 30px; font-weight: 700; color: var(--pk); line-height: 1.1; margin-bottom: 4px; }
.big-num small { font-size: 13px; font-weight: 500; color: var(--muted); }
.gap { padding: 6px 0; cursor: pointer; } .gap:hover .gap-l { color: var(--pk-2); }
.gap-l { font-size: 13px; font-weight: 500; } .gap-l .hint { font-weight: 400; font-size: 12px; }
.bar i.low { background: #e0a63a; }

/* ---------- 2D motion ---------- */
@keyframes pkRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pkSlide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes pkGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pkPing { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }
.view.anim { animation: pkSlide .4s var(--ease); }
.stagger > * { animation: pkRise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.bar i { transform-origin: left; animation: pkGrow 1s var(--ease) both; }
.stat, .card, .tile, .panel, .log-day { transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.stat:hover, .card:hover, .tile:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(1, 65, 28, .08); }
.hl-dot { position: relative; }
.hl-row.is-new .hl-dot::after, .hl-dot.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--pk-2); animation: pkPing 1.6s ease-out infinite; }
.drawer:not(.hidden) .drawer-inner { animation: pkSlide .35s var(--ease); }
.tab .ic { transition: transform .25s var(--ease); } .tab:hover .ic { transform: scale(1.15); }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 900px) { .today-grid, .today-grid.three { grid-template-columns: 1fr; } .sidebar::before { display: none; } }

/* ---------- syllabus coverage (themes) ---------- */
.cov-hero { justify-content: flex-start; gap: 22px; }
.cov-hero-main { flex: 1; }
.cov-ring { position: relative; width: 104px; height: 104px; flex: none; }
.cov-ring svg { width: 104px; height: 104px; transform: rotate(-90deg); }
.cov-ring circle { fill: none; stroke-width: 8; }
.cov-ring .r-bg { stroke: rgba(255,255,255,.18); }
.cov-ring .r-fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.cov-ring > div { position: absolute; inset: 0; display: grid; place-items: center; grid-auto-flow: column; align-content: center; justify-content: center; color: #fff; }
.cov-ring b { font-size: 28px; font-weight: 700; } .cov-ring small { font-size: 13px; opacity: .85; margin-left: 1px; align-self: end; padding-bottom: 6px; }
.cov-seg { display: inline-flex; gap: 3px; background: rgba(255,255,255,.12); border-radius: 10px; padding: 3px; margin-top: 12px; }
.cov-seg button { background: transparent; border: 0; color: #d6eadc; padding: 5px 14px; border-radius: 8px; font-size: 13px; }
.cov-seg button.on { background: #fff; color: var(--pk); font-weight: 600; }
.cov-focus { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.cov-focus-h { font-size: 13px; font-weight: 600; color: var(--pk); margin-right: 2px; }
.cov-focus button { background: #fff; border: 1px dashed #e0a63a; color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.cov-focus button span { color: #8a5300; background: #fdf1dc; border-radius: 999px; padding: 1px 7px; margin-left: 4px; font-size: 11.5px; font-weight: 600; }
.cov-focus button:hover { border-style: solid; }
.cov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cov-tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: transform .2s var(--ease), border-color .2s; position: relative; }
.cov-tile:hover { transform: translateY(-3px); border-color: var(--pk-line); }
.cov-tile.sel { border: 2px solid var(--pk-2); padding: 13px 15px; }
.cov-tile.sel::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; background: var(--card); border-right: 2px solid var(--pk-2); border-bottom: 2px solid var(--pk-2); transform: translateX(-50%) rotate(45deg); }
.cov-top { display: flex; justify-content: space-between; align-items: center; }
.cov-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--pk-soft); display: grid; place-items: center; font-size: 19px; }
.cov-ico.big { width: 46px; height: 46px; font-size: 23px; border-radius: 13px; }
.cov-pct { font-size: 24px; font-weight: 700; color: var(--pk); } .cov-pct small { font-size: 13px; font-weight: 600; }
.cov-name { font-size: 14.5px; font-weight: 650; line-height: 1.3; min-height: 38px; }
.cov-mini { display: grid; grid-template-columns: 30px 1fr 34px; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.cov-mini b { font-weight: 600; text-align: right; color: var(--muted); } .cov-mini .bar, .cov-one { margin: 0; height: 6px; }
.cov-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; }
.cov-todo { background: #fdf1dc; color: #8a5300; border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.cov-ok { background: var(--pk-soft); color: var(--pk); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.cov-detail { padding: 18px 20px; }
.cov-detail.anim-in { animation: pkRise .35s var(--ease); }
.cov-dh { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; } .cov-dh h2 { margin: 0; font-size: 18px; }
.cov-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 6px 26px; }
.cov-colh { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--pk-2); text-transform: uppercase; padding: 8px 0 4px; border-bottom: 2px solid var(--pk-soft); }
.cov-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cov-row:last-child { border-bottom: 0; }
.cov-row .dot { flex: none; margin-top: 0; }
.cov-rl { flex: 1; min-width: 0; } .cov-rt { font-size: 13.5px; font-weight: 600; line-height: 1.3; } .cov-rl .hint { font-size: 11.5px; }
.cov-pill { font-size: 11.5px; background: var(--pk-soft); color: var(--pk); border-radius: 999px; padding: 2px 8px; font-weight: 600; white-space: nowrap; }
.cov-pill.zero { background: #eef0ee; color: #8a939c; }
.cov-arts { font-size: 12px; padding: 4px 9px; white-space: nowrap; }
.cov-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); } .cov-legend i { display: inline-block; vertical-align: -1px; margin-right: 4px; }
@media (max-width: 760px) { .cov-hero { flex-wrap: wrap; } .cov-cols { grid-template-columns: 1fr; } }

/* ---------- editorials feed: hero + rings ---------- */
.fd-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.fd-bar #search { flex: 1; min-width: 200px; border-radius: 999px; padding-left: 16px; }
.fd-chips { display: inline-flex; gap: 4px; background: #e9eceb; border-radius: 999px; padding: 4px; }
.fd-chips button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--muted); }
.fd-chips button.on { background: #fff; color: var(--pk); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.fd-more { border-radius: 999px; }
.fd-adv { margin-bottom: 10px; }
.fd-status { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.fd-status summary { cursor: pointer; width: max-content; }
.fd-status .status { margin-top: 6px; }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; }
.ring .ring-bg { stroke: var(--pk-soft); }
.ring .ring-fg { stroke: var(--pk-2); stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.ring.mid .ring-fg { stroke: #e0a63a; } .ring.mid .ring-bg { stroke: #fdf1dc; }
.ring.low .ring-fg { stroke: #b9c2bc; } .ring.low .ring-bg { stroke: #eef0ee; }
.ring b { position: relative; font-weight: 700; color: var(--ink); }
.fd-hero { display: flex; gap: 24px; align-items: center; background: var(--card); border: 2px solid var(--pk-2); border-radius: 18px; padding: 22px 24px; box-shadow: 0 10px 30px rgba(1,65,28,.08); margin-bottom: 18px; animation: pkRise .5s var(--ease) both; }
.fd-hero-main { flex: 1; min-width: 0; }
.fd-kick { font-size: 12.5px; font-weight: 600; color: var(--pk-2); }
.fd-hero h2 { margin: 6px 0 6px; font-size: 22px; line-height: 1.3; }
.fd-hero h2 a { color: var(--ink); text-decoration: none; } .fd-hero h2 a:hover { color: var(--pk-2); }
.fd-hero .desc { margin: 0 0 10px; color: #4b5560; line-height: 1.55; }
.fd-act { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.fd-row .fd-act { margin: 0; }
.fd-saved { width: 28px; height: 28px; border-radius: 50%; background: var(--pk-soft); color: var(--pk); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.fd-sub { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 4px 0 8px; }
.fd-sub .hint { font-weight: 600; margin-left: 4px; }
.fd-rows > * { animation: pkRise .45s var(--ease) both; }
.fd-rows > *:nth-child(1) { animation-delay: .05s } .fd-rows > *:nth-child(2) { animation-delay: .1s } .fd-rows > *:nth-child(3) { animation-delay: .15s } .fd-rows > *:nth-child(4) { animation-delay: .2s } .fd-rows > *:nth-child(5) { animation-delay: .25s } .fd-rows > *:nth-child(6) { animation-delay: .3s } .fd-rows > *:nth-child(n+7) { animation-delay: .35s }
.fd-row { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; transition: transform .2s var(--ease), border-color .2s; }
.fd-row:hover { transform: translateY(-2px); border-color: var(--pk-line); }
.fd-main { flex: 1; min-width: 0; }
.fd-title { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.35; display: block; }
.fd-title:hover { color: var(--pk-2); }
.fd-row .meta { font-size: 12.5px; margin-top: 3px; }
.fd-ed { color: #8a5300; font-weight: 600; }
.fd-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--pk-soft); display: grid; place-items: center; font-size: 18px; flex: none; }
.fd-row .fd-act button { padding: 6px 12px; font-size: 13px; }
.fd-hero.read, .fd-row.read { opacity: .55; }
@media (max-width: 760px) { .fd-hero { flex-direction: column; align-items: flex-start; } .fd-row { flex-wrap: wrap; } .fd-ico { display: none; } }

.fd-today { border-radius: 999px; padding: 7px 14px; font-size: 13px; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.fd-today.on { background: var(--pk); color: #fff; border-color: var(--pk); font-weight: 600; }

/* ---------- vocabulary ---------- */
.vc-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.vc-bar #vocabSearch { flex: 1; min-width: 200px; border-radius: 999px; padding-left: 16px; }
.vc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.vc-list > * { animation: pkRise .4s var(--ease) both; }
.vc-card { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--pk-soft); border-radius: 0 14px 14px 0; padding: 14px 16px; transition: transform .2s var(--ease), border-color .2s; }
.vc-card:hover { transform: translateY(-2px); }
.vc-card.starred { border-left-color: #e0a63a; }
.vc-main { flex: 1; min-width: 0; }
.vc-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.vc-word { font-size: 18px; font-weight: 700; color: var(--pk); }
.vc-pos { font-size: 12.5px; color: var(--muted); }
.vc-syn { font-size: 12px; background: var(--pk-soft); color: var(--pk); border-radius: 999px; padding: 1px 9px; }
.vc-mean { font-size: 14px; margin: 5px 0 4px; line-height: 1.45; }
.vc-ex { font-size: 13px; color: #56606a; font-style: italic; line-height: 1.45; }
.vc-src { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.vc-act { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.vc-star { border: 0; background: transparent; font-size: 22px; color: #b9c2bc; padding: 0 4px; cursor: pointer; transition: transform .2s; }
.vc-star.on { color: #e0a63a; transform: scale(1.1); }
.vc-del { border: 0; background: transparent; font-size: 12px; color: #b9c2bc; cursor: pointer; padding: 2px 4px; }
.vc-del:hover { color: #c0352b; }
.vc-empty { text-align: center; padding: 50px 20px; grid-column: 1 / -1; background: var(--card); border: 1px dashed var(--line); border-radius: 16px; }
.vb-list { display: flex; flex-direction: column; gap: 5px; } .vb-item { font-size: 14px; line-height: 1.45; } .vb-item b { color: var(--pk); }
.vb-syn { font-size: 12px; color: var(--pk-2); }
/* ---------- essay outline ---------- */
.eo-kick { font-size: 12.5px; font-weight: 700; color: var(--pk-2); letter-spacing: .03em; }
.eo h2 { margin: 4px 0 6px; }
.eo-lbl { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.eo-in { width: 100%; margin-bottom: 12px; }
.eo-card { margin-top: 16px; background: var(--card); border: 2px solid var(--pk-2); border-radius: 16px; padding: 18px 20px; animation: pkRise .45s var(--ease) both; }
.eo-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.eo-top h2 { margin: 0; font-size: 20px; flex: 1; min-width: 220px; }
.eo-card h4 { color: var(--pk-2); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; margin: 16px 0 6px; }
.eo-args li { margin-bottom: 8px; } .eo-ev { font-size: 13px; color: #56606a; margin-top: 2px; }
.eo-btn { background: var(--pk-soft); color: var(--pk); border-color: var(--pk-line); font-weight: 600; }
/* ---------- weekly booklet card ---------- */
.wk-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 0 0 16px; box-shadow: var(--shadow); animation: pkRise .45s var(--ease) both; flex-wrap: wrap; }
.wk-card.sunday { border: 2px solid var(--pk-2); background: linear-gradient(0deg, var(--card), var(--card)); }
.wk-ico { font-size: 30px; width: 52px; height: 52px; border-radius: 14px; background: var(--pk-soft); display: grid; place-items: center; flex: none; }
.wk-main { flex: 1; min-width: 220px; } .wk-main b { font-size: 15px; }

.vc-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.vc-add #vaWord { flex: 0 1 220px; } .vc-add #vaMeaning { flex: 1 1 280px; }
.vc-tip { margin: 0 0 14px; font-size: 12.5px; }
#selVocab { background: var(--pk); color: #fff; border: 0; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 6px 18px rgba(1,65,28,.3); cursor: pointer; animation: pkRise .2s var(--ease) both; }

/* =====================================================================
   CLEAN DESK THEME (v1.4): light sidebar, soft cards, score rings
   ===================================================================== */
:root { --bg: #f3f6f3; --line: #e3e9e4; --card: #fff; --shadow: 0 1px 2px rgba(1,65,28,.04), 0 4px 14px rgba(1,65,28,.04); }
.sidebar { background: #fff; color: var(--ink); border-right: 1px solid var(--line); padding-left: 14px; }
.sidebar::before { display: none; }
.logo { background: var(--pk); color: #fff; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--pk); }
.brand-name { color: var(--ink); } .brand-sub { color: var(--muted); }
.pro { background: var(--pk); color: #fff; }
.tab { color: #4d5a52; padding: 9px 10px; }
.tab .ic { display: grid; place-items: center; }
.tab .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { background: #f1f6f2; color: var(--pk); }
.tab.active { background: var(--pk-soft); color: var(--pk); }
.tab.active::before { left: -14px; background: var(--pk); }
.tab .pill { background: #eef3ef; color: var(--pk); border: 1px solid #dbe7de; font-size: 11.5px; }
.tab .pill.new { background: #fdeceb; color: #c0352b; border-color: #f6cfcc; }
.nav-sep { background: var(--line); }
.cd-goal { margin-top: auto; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 12.5px; }
.cd-goal b { display: block; margin-bottom: 8px; color: var(--ink); }
.side-foot { margin-top: 0; background: #f7faf8; border-color: var(--line); color: var(--muted); }
.side-foot b { color: var(--pk); }
.side-foot.bad { background: #fdeceb; }
.ver { color: var(--faint); }

/* bars + rings */
.cd-bar { display: block; height: 5px; border-radius: 3px; background: #e4ece6; overflow: hidden; }
.cd-bar i { display: block; height: 100%; border-radius: 3px; background: var(--pk-2); transform-origin: left; animation: pkGrow .9s var(--ease) both; }
.cd-ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.cd-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.cd-ring b { position: relative; font-size: 20px; color: var(--pk); }
.ring-bg { fill: none; stroke: #e4ece6; }
.ring-fg { fill: none; stroke: var(--pk-2); stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.cd-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--pk-soft); color: var(--pk-2); display: grid; place-items: center; flex: none; }
.cd-ico svg, .cd-an svg, .cd-star svg, .cd-rev button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cd-ico.sm { width: 30px; height: 30px; border-radius: 9px; }

/* header */
.cd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.cd-date { margin: 4px 0 4px; font-size: 13px; font-weight: 600; color: var(--pk-2); }
.cd-hi { margin: 0; font-size: 27px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.cd-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.cd-refresh { margin-top: 12px; font-size: 13px; padding: 6px 12px; border-radius: 999px; color: var(--pk); font-weight: 600; }
.cd-exams { display: flex; gap: 10px; flex: none; }
.cd-exam { width: 150px; padding: 14px 16px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.cd-exam .k { font-size: 12.5px; color: var(--muted); }
.cd-exam .v { font-size: 28px; font-weight: 700; margin: 2px 0 8px; color: var(--ink); }
.cd-exam .v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.cd-exam.dark { background: var(--pk); border-color: var(--pk); }
.cd-exam.dark .k, .cd-exam.dark .v small { color: #bfe0ca; } .cd-exam.dark .v { color: #fff; }
.cd-exam.dark .cd-bar { background: rgba(255,255,255,.2); } .cd-exam.dark .cd-bar i { background: #fff; }

/* KPI row */
.cd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cd-kpi { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; transition: transform .2s var(--ease), border-color .2s; }
.cd-kpi:hover { transform: translateY(-2px); border-color: var(--pk-line); }
.cd-kpi .k { font-size: 12.5px; color: var(--muted); }
.cd-kpi .v { font-size: 26px; font-weight: 700; margin: 2px 0; }
.cd-kpi .v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.cd-kpi .s { font-size: 12px; color: var(--faint); }
.cd-spark { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.cd-spark i { width: 6px; border-radius: 2px; background: #cfe3d5; transform-origin: bottom; animation: cdUp .7s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.cd-spark i.on { background: var(--pk-2); } .cd-spark i:last-child.on { background: var(--pk); }
.cd-streak { display: flex; gap: 4px; }
.cd-streak i { width: 9px; height: 26px; border-radius: 5px; background: #dfe9e2; animation: pkRise .5s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.cd-streak i.on { background: var(--pk-2); }
@keyframes cdUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* cards */
.cd-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.cd-col { display: grid; gap: 14px; }
.cd-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.cd-card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cd-card-h h2 { margin: 0; font-size: 15.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.cd-card-h .link-btn { margin: 0; color: var(--pk-2); font-weight: 600; font-size: 13px; }
.cd-live { width: 8px; height: 8px; border-radius: 50%; background: var(--pk-3); position: relative; }
.cd-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--pk-3); animation: pkPing 1.6s infinite; }
.cd-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.cd-row:first-child { border-top: 0; }
.cd-row .t-main { cursor: pointer; }
.cd-row:hover .t-title { color: var(--pk-2); }
.cd-row .tag { font-size: 11px; padding: 2px 7px; }
.cd-an { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 11px; border-radius: 9px; color: var(--ink); flex: none; }
.cd-an svg { width: 14px; height: 14px; }
.cd-an:hover { border-color: var(--pk-line); color: var(--pk); background: var(--pk-soft); }
.cd-hl { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.cd-hl:first-child { border-top: 0; }
.cd-hl:hover .t-title { color: var(--pk-2); }
.cd-time { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 1px; min-width: 38px; }
.cd-new { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #c0352b; margin-right: 6px; vertical-align: middle; }
.cd-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; font-size: 12.5px; color: var(--muted); }
.cd-foot b { color: var(--pk); } .cd-foot .link-btn { margin: 0; font-size: 12.5px; color: var(--pk-2); font-weight: 600; }

/* weekly booklet card: green */
#weeklyCard .wk-card { background: var(--pk); border: 0; color: #fff; border-radius: 16px; padding: 18px 20px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
#weeklyCard .wk-card::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255,255,255,.06); }
#weeklyCard .wk-main b { color: #fff; font-size: 15px; }
#weeklyCard .wk-main .hint { color: #bfe0ca; margin-top: 4px; }
#weeklyCard .wk-card button.primary { background: #fff; color: var(--pk); border-color: #fff; font-weight: 600; position: relative; z-index: 1; }
#weeklyCard .wk-ico { font-size: 34px; position: relative; z-index: 1; animation: cdFloat 3.5s ease-in-out infinite; }
@keyframes cdFloat { 50% { transform: translateY(-4px) rotate(-3deg); } }

/* syllabus by theme */
.cd-theme { display: grid; grid-template-columns: 190px minmax(0, 1fr) 42px; gap: 14px; align-items: center; padding: 7px 0; cursor: pointer; font-size: 13.5px; }
.cd-theme .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-theme b { text-align: right; color: var(--pk-2); font-size: 13px; }
.cd-theme:hover .l { color: var(--pk-2); }
.cd-track { height: 7px; border-radius: 4px; background: #e9efea; overflow: hidden; }
.cd-track i { display: block; height: 100%; border-radius: 4px; background: var(--pk-2); transform-origin: left; animation: pkGrow 1s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.cd-tip { display: flex; align-items: center; gap: 12px; margin-top: 12px; border: 1px dashed var(--pk-line); background: #f7fbf8; border-radius: 12px; padding: 12px 14px; }
.cd-tip > div { flex: 1; } .cd-tip b { font-size: 13.5px; } .cd-tip .hint { margin: 2px 0 0; font-size: 12.5px; }
.cd-tip button { font-size: 13px; padding: 6px 12px; color: var(--pk); }

/* revise today */
.cd-rev { display: flex; gap: 16px; align-items: center; margin-bottom: 4px; }
.cd-rev-t { font-size: 16px; } .cd-rev .hint { margin: 2px 0 8px; }
.cd-rev button { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.cd-rev .cd-ring b { font-size: 22px; }
.cd-sub-h { font-size: 12.5px; font-weight: 650; color: var(--pk-2); margin: 14px 0 2px; }
.cd-word { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.cd-word b { font-size: 14px; } .cd-word i { font-size: 12px; color: var(--faint); }
.cd-word .hint { margin: 2px 0 0; font-size: 12.5px; }
.cd-star { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; color: var(--faint); flex: none; }
.cd-star svg { width: 15px; height: 15px; }
.cd-star.on { color: #d79b16; } .cd-star.on svg { fill: currentColor; }
.cd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cd-chips span { background: var(--pk-soft); color: var(--pk); font-weight: 600; font-size: 12.5px; padding: 4px 10px; border-radius: 8px; }

@media (max-width: 1100px) {
  .cd-head { flex-direction: column; } .cd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-grid { grid-template-columns: minmax(0, 1fr); }
}
.reduce-motion .cd-bar i, .reduce-motion .cd-track i, .reduce-motion .cd-spark i, .reduce-motion .cd-streak i, .reduce-motion #weeklyCard .wk-ico { animation: none; }
.stat { border-top: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; }
.stat .v { font-size: 24px; font-weight: 700; }
