/* Learning surfaces: editorial Slush-inspired color and outlines, scoped away from article copy. */
:root { --study-ink:#18242a; --study-blue:#2459ef; --study-line:#1f3035; --study-sky:#e3f2ff; --study-lime:#e6f77d; --study-violet:#eee5ff; }

/* Daily learning and review */
.daily-feature {
  background:var(--study-sky); border:1px solid var(--study-line); border-radius:24px;
  box-shadow:0 5px 0 rgba(22,42,48,.08); padding:clamp(20px,3vw,32px);
}
.daily-feature::after { display:none; }
.daily-emblem {
  background:var(--study-lime); color:var(--study-ink); border:1.5px solid var(--study-line);
  border-radius:18px; box-shadow:3px 3px 0 var(--study-line);
}
.daily-feature .page-eyebrow { color:#1946b1; }
.daily-feature h2 { color:#273b43; font-size:16px; font-weight:650; line-height:1.5; }
.daily-feature h3 { color:var(--study-ink); font-size:clamp(21px,2.2vw,28px); font-weight:800; line-height:1.35; }
.daily-feature p,.daily-meta { color:#344c56; font-size:15px; line-height:1.65; }
.daily-feature-actions .text-button { color:#1946a6; font-size:14px; }
.daily-summary { gap:clamp(14px,3vw,28px); color:#344d55; font-size:14px; }
.daily-summary b { color:var(--study-ink); font-size:24px; font-weight:800; }
.daily-how { background:#fff; border:1px solid #a9bec5; border-radius:18px; color:#344d55; }
.daily-how summary { color:var(--study-ink); min-height:44px; display:flex; align-items:center; font-weight:700; }
.daily-how summary::-webkit-details-marker { display:none; }
.daily-how summary::before { content:'+'; display:inline-grid; place-items:center; width:27px; height:27px; margin-right:10px; background:var(--study-lime); border:1px solid var(--study-line); border-radius:50%; font-weight:700; }
.daily-how[open] summary::before { content:'−'; }
.daily-library article { background:#fff; border:1px solid #a9bec5; border-radius:20px; box-shadow:0 4px 0 rgba(24,44,47,.07); }
.daily-index { color:#2055cf; font-weight:800; }
.daily-library h3 { color:var(--study-ink); font-weight:750; }
.daily-library p,.daily-history time { color:#415962; }
.daily-history button { min-height:48px; border:1px solid #a9bec5; border-radius:14px; color:var(--study-ink); }
.review-card { background:#fff; border:1px solid #a9bec5; border-radius:22px; }
.review-card h2 { color:var(--study-ink); }
.review-card summary { color:#183d9b; min-height:44px; }

/* Learning route */
.career-select { min-height:44px; max-width:100%; background-color:#fff; border:1px solid var(--study-line); border-radius:999px; color:var(--study-ink); font-size:14px; }
.stage-card,.roadmap-summary,.project-card {
  background:#fff; border:1px solid #a9bec5; border-radius:22px; overflow:hidden;
  box-shadow:0 4px 0 rgba(24,44,47,.07);
}
.stage-header { background:var(--study-sky); border-bottom:1px solid #c0d0d6; }
.stage-header h2 { color:var(--study-ink); font-weight:800; }
.stage-header p,.stage-status { color:#435b63; }
.stage-number,.lesson-status { background:var(--study-lime); border:1px solid var(--study-line); color:var(--study-ink); font-weight:750; }
.lesson-status.done { background:#d9edff; color:#1949b5; border-color:#4474ca; }
.stage-lesson { min-height:64px; color:var(--study-ink); }
.stage-lesson h3,.roadmap-summary h3 { color:var(--study-ink); }
.stage-lesson p,.roadmap-summary p,.roadmap-summary .en,.progress-caption { color:#40585f; }
.roadmap-summary > p:last-child { font-size:13px !important; line-height:1.6; color:#40585f !important; }
.linear-progress { background:#e1eaf0; }
.linear-progress span { background:var(--study-blue); }
.project-card { padding:clamp(22px,2.5vw,30px); }
.project-card h3 { color:var(--study-ink); }
.project-card p { color:#40585f; }

/* Collections, personal space and profile */
.save-empty,.empty-state { background:#fff; border:1px solid #a9bec5; border-radius:24px; box-shadow:0 4px 0 rgba(24,44,47,.07); }
.save-empty > svg,.empty-state > svg { color:#2056d7; }
.save-empty h2,.empty-state h2 { color:var(--study-ink); font-weight:800; }
.save-empty p,.empty-state p { color:#40585f; }
.mine-layout { gap:18px; }
.mine-card:not(.mine-hero),.profile-panel { background:#fff; border:1px solid #a9bec5; border-radius:22px; box-shadow:0 4px 0 rgba(24,44,47,.07); }
.mine-card h2,.profile-panel h2 { color:var(--study-ink); font-weight:800; line-height:1.4; }
.mine-card > p,.profile-panel p,.profile-panel li { color:#3a5059; }
.mine-card > p { font-size:15px; line-height:1.7; }
.mine-note { color:#40585f !important; font-size:13px !important; }
.mine-hero { background:#18242a; color:#fff; border:1px solid #18242a; border-radius:22px; }
.mine-hero::after { border-color:rgba(218,237,255,.16); box-shadow:0 0 0 28px rgba(103,163,255,.06),0 0 0 58px rgba(103,163,255,.04); }
.mine-hero h2,.mine-hero > p { color:#fff; }
.mine-hero .page-eyebrow { color:#d8ecff; }
.mine-stats b,.mine-stats b span { color:var(--study-lime) !important; }
.mine-stats small { color:#e4ebea; }
.mine-hero .button.lime { background:var(--study-lime); color:var(--study-ink); border:1px solid var(--study-lime); }
.mine-hero .button.ghost { color:#fff; border:1px solid #e5f1f1; background:transparent; }
.mine-card .mine-actions .button { min-height:44px; }
.mine-status { color:#255840 !important; }
.backup-summary { background:#e3f2ff; color:#1e3e4a; border:1px solid #b3cbd6; border-radius:16px; }
.profile-beta { background:var(--study-lime); color:var(--study-ink); border:1px solid var(--study-line); border-radius:999px; font-weight:700; padding:5px 10px; }
.profile-entry { background:#f0e9ff; border-color:#aa9cbf; }
.profile-entry::after { display:none; }
.profile-entry h2 { color:var(--study-ink); }
.profile-entry > p { color:#3a5059; }
.profile-maturity { background:var(--study-sky); }
.profile-maturity progress,.profile-check input,.profile-experiment-days input { accent-color:var(--study-blue); }
.profile-tabs button { min-height:44px; border:1px solid #9bb0b8; border-radius:999px; color:#233b42; background:#fff; font-weight:700; }
.profile-tabs button[aria-pressed=true] { background:var(--study-ink); color:#fff; border-color:var(--study-ink); }
.profile-task-grid article,.profile-direction,.profile-quadrants > div { background:#f8fbfc; border:1px solid #c5d4d8; border-radius:17px; }
.profile-interest-bar { background:linear-gradient(90deg,#e4e9ef 0%,#dbeafb 50%,#b7d2ff 100%); }
.profile-interest-bar i { background:var(--study-blue); }
.profile-panel small,.profile-muted { color:#435961 !important; }
.profile-panel select,.profile-feedback select,.profile-feedback textarea { color:var(--study-ink); border:1px solid #829ba4; border-radius:12px; background:#fff; min-height:44px; }
.profile-feedback { border:1px solid var(--study-line); border-radius:22px; box-shadow:0 12px 34px rgba(20,39,45,.22); }
.profile-radio-options label { min-height:44px; border:1px solid #a9bdc4; border-radius:12px; color:var(--study-ink); }
.profile-feedback p,.profile-feedback small { color:#40585f; }
.profile-radio-options input { accent-color:var(--study-blue); }

/* Dialog controls and quiz feedback. Long-form text keeps reading-comfort.css rules. */
.detail-dialog { border:1px solid var(--study-line); background:#fff; }
#dialog-content { position:relative; }
.dialog-header { padding-inline-end:76px; overflow-wrap:anywhere; background:#eaf4ff; border-bottom:1px solid #c3d5dc; }
.dialog-header h2,.dialog-header .desc,.dialog-career-heading { color:var(--study-ink); }
.dialog-close { min-width:44px; min-height:44px; border:1px solid var(--study-line); border-radius:50%; background:#fff; color:var(--study-ink); }
.dialog-tab { min-height:48px; color:#405960; }
.dialog-tab.active { color:#1949b5; border-color:#2459ef; }
.quiz-card { background:#f5f9ff; border:1px solid #b2c7d3; border-radius:20px; }
.quiz-card h3,.quiz-kicker { color:var(--study-ink); }
.quiz-option { min-height:48px; background:#fff; border:1px solid #a7bcc5; border-radius:14px; color:var(--study-ink); }
.quiz-option.correct { background:#e4f7de; border-color:#376c42; color:#203c27; }
.quiz-option.wrong { background:#fff0ed; border-color:#a24b3d; color:#6d2b22; }
.quiz-option .option-letter { color:#29424b; }
:is(.profile-tabs button,.career-select,.stage-lesson,.daily-history button,.dialog-close,.dialog-tab,.quiz-option, .profile-panel select,.profile-feedback textarea):focus-visible {
  outline:3px solid #2459ef; outline-offset:3px;
}
@media (hover:hover) and (pointer:fine) {
 .stage-lesson:hover,.daily-history button:hover,.profile-tabs button:not([aria-pressed=true]):hover { background:#f0f6ff; }
}
@media (max-width:760px) {
 .daily-feature { padding:22px; }
 .daily-feature h3 { font-size:22px; }
 .profile-panel,.mine-card:not(.mine-hero),.mine-hero,.stage-card,.roadmap-summary,.project-card { border-radius:18px; }
 .mine-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .mine-stats b { font-size:clamp(24px,7vw,31px); }
 .profile-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .profile-tabs button { padding-inline:8px; }
 .profile-feedback { bottom:calc(74px + env(safe-area-inset-bottom,0px)); }
 .detail-dialog {
   --dialog-toolbar-height:calc(60px + var(--safe-top));
   border-radius:0;
   border:0;
 }
 /* Reserve a solid row for the close control instead of floating it over the article. */
 .dialog-close-bar {
   position:sticky;
   inset-block-start:0;
   z-index:5;
   display:flex;
   justify-content:flex-end;
   align-items:center;
   block-size:var(--dialog-toolbar-height);
   padding:var(--safe-top) max(16px, env(safe-area-inset-right, 0px)) 0 16px;
   background:#eaf4ff;
 }
 .dialog-close-bar .dialog-close { position:static; margin:0; }
 .dialog-header { padding-block-start:0; padding-inline-end:23px; }
 .dialog-tabs { top:var(--dialog-toolbar-height); }
}
@media (max-width:360px) {
 .stage-header,.stage-lesson { padding-inline:16px; }
 .mine-stats { gap:5px; }
 .mine-stats small { font-size:11px; }
}

/* Preserve the requested 16px / 1.6 long-form reading baseline. */
#dialog-content > article.dialog-body:has(.reading-section) :is(.reading-section p,.worked-example p,.practice-box p,.detail-note,.learning-muted),
#dialog-content > article.lab-body :is(p,li,label,.detail-note),
.paper-unit :is(.paper-abstract p,.paper-abstract li,.paper-column-body p,.paper-column-body li,.paper-constraints>p,.paper-sources p) {
  color:#303a36;
  font-size:16px;
  line-height:1.6;
}
