/* Ahabito's editorial interface, inspired by the supplied Preply reference. */
:root, body.is-today {
  --ink: #121117;
  --ink-rgb: 18 17 23;
  --ink-soft: #34313c;
  --muted: #625f68;
  --paper: #fff;
  --white: #fff;
  --cream: #f8f7fa;
  --surface-soft: #f5f4f6;
  --line: #dedde1;
  --line-strong: #a8a5ae;
  --accent-soft: #fce7f0;
  --accent: #ed80ae;
  --accent-hover: #e7659a;
  --focus: #121117;
  --success: #246042;
  --success-soft: #edf7f0;
  --error: #a13335;
  --error-soft: #fff0f0;
  --play-edge: #dedde1;
  --play-indigo-tint: #fce7f0;
  --play-indigo-border: #d95d93;
}
body { background: var(--paper); font-size: 15px; line-height: 1.65; }
html { scroll-padding-top: 24px; }
::selection { background: #f6bcd6; color: #121117; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.workspace.editorial-workspace { margin-left: 0; }
.workspace.editorial-workspace main { max-width: 1280px; padding: 48px 40px 64px; }
.site-header { background: #fff; border-bottom: 1px solid #efedf1; }
.site-header-inner { display: flex; align-items: center; gap: 30px; max-width: 1440px; min-height: 88px; padding: 14px 32px; margin: 0 auto; }
.site-brand { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; font-size: 28px; font-weight: 800; letter-spacing: -1.4px; line-height: 1; }
.site-brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; }
.brand-dot { color: var(--ink); }
.site-navigation { display: flex; align-items: center; gap: 8px; }
.site-navigation .nav-item { min-height: 44px; padding: 10px 11px; color: var(--ink); font-size: 13px; font-weight: 650; border-radius: 6px; gap: 7px; white-space: nowrap; }
.site-navigation .nav-item > .icon { display: none; }
.site-navigation .nav-item:hover { background: var(--surface-soft); }
.site-navigation .nav-item.active { background: transparent; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.site-navigation .nav-count { background: var(--accent-soft); color: var(--ink); border-radius: 4px; }
.site-header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-grade, .site-streak, .site-profile { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; white-space: nowrap; }
.site-grade .icon { width: 14px; height: 14px; }
.site-streak .icon { width: 21px; height: 21px; }
.site-profile { border: 2px solid var(--ink); border-radius: 8px; padding: 8px 12px; font-weight: 650; }
.site-profile span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.site-profile:hover { background: var(--surface-soft); }
.workspace .page-footer, .is-today .page-footer { display: flex; align-items: center; max-width: 1200px; padding: 28px 0 34px; margin: 0 auto; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.page-footer .footer-wordmark { font-size: 24px; font-weight: 800; letter-spacing: -1px; color: var(--ink); }
.page-footer > a:last-child { display: inline-flex; align-items: center; gap: 10px; }
.page-footer .icon { width: 16px; height: 16px; }
.page-heading { margin-bottom: 36px; }
.page-heading h1 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -2px; line-height: 1.1; font-weight: 800; }
.page-heading p { font-size: 16px; color: var(--muted); max-width: 760px; line-height: 1.6; }
.eyebrow { font-size: 11px; letter-spacing: 1.1px; color: var(--muted); }
.section-heading h2 { font-size: 26px; letter-spacing: -.7px; }
.text-link { font-weight: 700; color: var(--ink); }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.button, .button.button-primary, .button.button-cream, .button.button-ghost {
  min-height: 50px; border: 2px solid var(--ink); border-radius: 8px; box-shadow: none; font-size: 15px; font-weight: 700; letter-spacing: -.1px; line-height: 1.5;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.button.button-primary { color: var(--ink); background: var(--accent); }
.button.button-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--ink); color: var(--ink); box-shadow: none; transform: none; }
.button.button-primary:active:not(:disabled) { box-shadow: none; transform: translateY(1px); }
.button.button-ghost, .button.button-cream { background: #fff; color: var(--ink); }
.button.button-ghost:hover:not(:disabled), .button.button-cream:hover:not(:disabled) { background: var(--surface-soft); box-shadow: none; transform: none; }
.button.button-ghost:active:not(:disabled), .button.button-cream:active:not(:disabled) { box-shadow: none; transform: translateY(1px); }
.button.button-primary:disabled { border-color: #dedde1; background: #eeeef0; color: #797580; box-shadow: none; transform: none; }
.icon-button { border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: none; }
.icon-button:hover { background: var(--surface-soft); }
.icon-button:active { transform: none; box-shadow: none; }
.breadcrumbs { color: var(--muted); font-size: 12px; }
.breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs .icon { width: 12px; height: 12px; }
.editorial-home .home-breadcrumbs { margin: 0 0 30px; }
.editorial-home .study-welcome { display: block; margin: 0 0 48px; }
.editorial-home .study-welcome h1 { margin: 0; font-size: clamp(48px, 6.1vw, 82px); font-weight: 800; line-height: 1.08; letter-spacing: -3.8px; text-wrap: balance; }
.editorial-home .study-welcome p { max-width: 790px; margin-top: 22px; font-size: 19px; line-height: 1.65; color: var(--ink-soft); }
.editorial-home .study-choice-heading { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.study-subject-choice { margin: 0 0 30px; }
.study-choice-heading { margin-bottom: 17px; }
.study-choice-heading h2 { font-size: 20px; font-weight: 750; letter-spacing: -.5px; }
.study-choice-heading > span { font-size: 12px; }
.study-subject-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.study-subject-card { display: flex; flex-direction: column; min-width: 0; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .18s; }
.study-subject-card.is-selected { border-color: var(--ink); }
.subject-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.subject-card-heading h3 { font-size: 27px; letter-spacing: -.8px; font-weight: 800; }
.subject-card-symbol { font-size: 29px; font-weight: 650; line-height: 1; color: var(--ink); }
.subject-card-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }
.subject-card-description { margin-top: 27px; font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.subject-card-next { margin: 16px 0 24px; font-size: 12px; color: var(--muted); }
.subject-card-next strong { color: var(--ink-soft); font-weight: 600; }
.study-subject-card .study-subject-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding: 12px 17px; min-height: 50px; text-align: center; border-radius: 8px; }
.study-subject-card .study-subject-button > span { flex: 1; }
.study-subject-choice > .subject-choice-note { margin-top: 18px; font-size: 12px; color: var(--muted); }
.editorial-features { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 38px; padding: 34px 0 48px; }
.editorial-features > div > .icon { width: 27px; height: 27px; margin-bottom: 16px; stroke-width: 1.7; }
.editorial-features h2 { font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.editorial-features p { margin-top: 9px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.editorial-search-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; padding: 32px 0; margin-bottom: 42px; border-block: 1px solid var(--line); }
.editorial-search-row h2 { font-size: 25px; font-weight: 800; letter-spacing: -.8px; }
.editorial-search-row p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.editorial-search-row .study-search.home-search { margin: 0; padding: 5px 7px 5px 18px; min-height: 56px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.editorial-search-row .study-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.editorial-search-row .study-search input { font-size: 14px; }
.home-search-submit { border-radius: 5px; color: var(--ink); }
.home-search-submit:hover { background: var(--accent-soft); }
.study-dashboard { grid-template-columns: minmax(0,1fr) 300px; gap: 38px; }
.study-session { scroll-margin-top: 24px; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: #faf9fc; }
.study-session-label { font-size: 13px; font-weight: 700; }
.study-subject { font-size: 12px; }
.study-session h2 { margin-top: 26px; font-size: 36px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.18; text-wrap: initial; }
.study-session-description { font-size: 15px; margin-top: 16px; line-height: 1.7; }
.study-session-format { color: var(--muted); font-size: 12px; }
.study-session .home-lesson-continue { min-height: 52px; padding: 12px 18px; border: 2px solid var(--ink); border-radius: 8px; background: var(--accent); color: var(--ink); font-size: 15px; box-shadow: none; }
.study-session .home-lesson-continue:hover { background: var(--accent-hover); }
.study-reference { color: var(--ink); font-size: 12px; }
.study-side-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.study-card-heading h2 { font-size: 16px; }
.study-daily-number { font-size: 44px; letter-spacing: -1.5px; }
.study-week-day.is-active .study-day-mark { background: var(--accent-soft); color: var(--ink); }
.study-week-day.is-today .study-day-mark { outline-color: var(--ink); }
.study-daily-state { font-size: 12px; }
.study-daily-state small { font-size: 11px; }
.study-side-action { border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; }
.study-side-action:hover { background: var(--accent-soft); }
.study-section-heading h2 { font-size: 29px; letter-spacing: -.9px; }
.study-syllabus { margin-top: 40px; }
.study-topic-row { padding-block: 22px; }
.study-topic-copy strong { font-size: 17px; }
.study-topic-copy small { font-size: 12px; }
.study-topic-status { font-size: 11px; }
.study-topic-open { border-radius: 8px; }
.study-topic-open:hover { background: var(--accent-soft); }
.study-chapter-progress > div > span { background: var(--ink); }
.study-empty { border-radius: 16px; padding: 30px; background: #faf9fc; }
.study-empty h2 { font-size: 28px; letter-spacing: -.7px; }
.study-draft-link.home-draft-link { border-radius: 10px; }
dialog { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 16px 60px rgb(18 17 23 / .15); }
.dialog-icon { border-radius: 10px; background: var(--accent-soft); color: var(--ink); }
.toast { left: 50%; border-radius: 8px; background: var(--ink); color: #fff; }
@media (min-width: 981px) and (max-width: 1150px) {
  .site-header-inner { padding-inline: 24px; gap: 18px; }
  .site-navigation { gap: 0; }
  .site-navigation .nav-item { font-size: 12px; padding-inline: 8px; }
  .site-header-actions { gap: 12px; }
  .site-streak { display: none; }
}
@media (max-width: 980px) {
  .site-header-inner { min-height: 76px; padding: 14px 28px; }
  .site-navigation { display: none; }
  .site-header-actions { gap: 20px; }
  .workspace.editorial-workspace main { padding: 36px 28px 48px; }
  .workspace .page-footer, .is-today .page-footer { margin-inline: 28px; padding-block: 24px; }
  .editorial-home .study-welcome h1 { font-size: 64px; letter-spacing: -2.8px; }
  .editorial-home .study-welcome p { font-size: 17px; }
  .study-subject-card { padding: 24px; }
  .study-dashboard { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .study-side-column { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
  .study-daily-card { grid-row: auto; }
  .study-side-card { padding: 18px; }
  .study-week { gap: 2px; }
  .study-day-mark { width: 22px; }
  .editorial-features { gap: 24px; }
  .gooey-nav__stage { background: rgb(255 255 255 / .98); border-color: var(--line); border-radius: 16px; box-shadow: 0 2px 14px rgb(18 17 23 / .06); }
  .gooey-nav__fallback { border-radius: 10px; background: var(--accent-soft); }
  .gooey-nav .nav-item { border-radius: 10px; font-weight: 600; }
  .gooey-nav .nav-item.active, .gooey-nav .nav-item[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
  .gooey-nav.has-gooey-fallback .nav-item.active, .gooey-nav.has-gooey-fallback .nav-item[aria-current="page"] { background: transparent; }
}
@media (max-width: 700px) {
  .site-brand { font-size: 25px; }
  .site-header-inner { min-height: 72px; padding-inline: 20px; gap: 12px; }
  .site-brand img { width: 32px; height: 32px; }
  .site-profile { display: none; }
  .site-header-actions { gap: 16px; }
  .site-grade { font-size: 12px; }
  .workspace.editorial-workspace main { padding: 28px 20px 40px; }
  .editorial-home .home-breadcrumbs { margin-bottom: 24px; }
  .editorial-home .study-welcome { margin-bottom: 30px; }
  .editorial-home .study-welcome h1 { font-size: clamp(38px,9vw,58px); line-height: 1.12; letter-spacing: -2px; }
  .editorial-home .study-welcome p { margin-top: 18px; font-size: 16px; }
  .study-subject-buttons { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .study-choice-heading h2 { font-size: 17px; }
  .study-choice-heading > span { font-size: 10px; }
  .study-subject-card { padding: 23px; }
  .subject-card-heading h3 { font-size: 25px; }
  .subject-card-meta { font-size: 11px; }
  .subject-card-description { margin-top: 22px; font-size: 14px; }
  .subject-card-next { margin-bottom: 20px; }
  .study-subject-choice > .subject-choice-note { font-size: 11px; }
  .editorial-features { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 20px; padding: 12px 0 32px; }
  .editorial-features h2 { font-size: 15px; }
  .editorial-features p { font-size: 12px; }
  .editorial-search-row { grid-template-columns: minmax(0,1fr); gap: 20px; padding-block: 28px; margin-bottom: 30px; }
  .editorial-search-row h2 { font-size: 25px; }
  .editorial-search-row .study-search input { font-size: 13px; }
  .study-session { padding: 24px; }
  .study-session h2 { font-size: 29px; letter-spacing: -.8px; }
  .study-session-description { font-size: 14px; }
  .study-session-actions { display: grid; gap: 10px; }
  .study-session .home-lesson-continue { width: 100%; font-size: 14px; }
  .study-side-column { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .study-side-card { padding: 24px; }
  .study-day-mark { width: 30px; }
  .study-section-heading h2 { font-size: 26px; }
  .study-topic-copy strong { font-size: 15px; }
  .study-topic-copy small { font-size: 11px; }
  .study-empty { padding: 24px; }
  .study-empty h2 { font-size: 24px; }
  .workspace .page-footer, .is-today .page-footer { margin-inline: 20px; flex-wrap: wrap; justify-content: flex-start; gap: 12px 20px; }
  .page-footer > a:last-child { width: 100%; }
  .page-heading { flex-wrap: wrap; gap: 16px; }
  .page-heading h1 { letter-spacing: -1.4px; }
  .page-heading p { font-size: 14px; }
}
@media (max-width: 360px) {
  .site-header-inner, .workspace.editorial-workspace main { padding-inline: 16px; }
  .site-header-actions { gap: 9px; }
  .site-brand { font-size: 23px; gap: 5px; }
  .site-brand img { width: 29px; height: 29px; }
  .study-subject-card { padding: 20px; }
  .subject-card-meta { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .study-subject-card, .site-navigation .nav-item { transition: none; }
  .button:active:not(:disabled) { transform: none; }
}
