/* Flow product system. Loaded after legacy modules; no learning-state selectors overridden. */
:root {
  --flow-brand: #17634c;
  --flow-wash: #e6f0e9;
  --flow-hero: #143e32;
  --flow-lime: #d5ed9b;
  --flow-radius: 18px;
  --sidebar-w: 252px;
  --accent: #a6d9b8;
  --accent-2: #81bb99;
  --accent-3: #a6d9b8;
  --bg-primary: #141b18;
  --bg-secondary: #1c2821;
  --bg-card: #1e2923;
  --bg-card-hover: #27372d;
  --border: #34463b;
  --border-hover: #7dae8c;
  --text-primary: #eef3ed;
  --text-secondary: #c1cec3;
  --text-muted: #9ead9f;
  --ui-focus-ring: #66967b;
}
:root[data-theme="light"] {
  --bg-primary: #f6f7f2 !important;
  --bg-secondary: #eef2eb !important;
  --bg-card: #fff !important;
  --bg-card-hover: #f1f6ef !important;
  --text-primary: #20392d !important;
  --text-secondary: #516258 !important;
  --text-muted: #637269 !important;
  --accent: #17634c !important;
  --accent-2: #24785b !important;
  --accent-3: #17634c !important;
  --border: #dfe6dc !important;
  --border-hover: #8eaf98 !important;
}
body { font-family: 'Be Vietnam Pro', system-ui, sans-serif; }
body::before { display: none; }
button, input, textarea, select { font-family: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.material-icons { flex-shrink: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 5000; padding: 14px 20px; border-radius: 10px; background: var(--bg-card); color: var(--accent); }
.skip-link:focus { top: 12px; }
.main-wrapper { min-width: 0; }
.main-wrapper:focus { outline: none; }
html .sidebar { padding: 24px 16px 18px; background: var(--bg-card) !important; box-shadow: none; border-right: 1px solid var(--border); }
.sidebar-brand { display: block; text-decoration: none; padding: 0 4px 23px; margin-bottom: 18px; }
html .sidebar .sidebar-logo-icon { color: var(--flow-lime) !important; background: var(--flow-hero) !important; transform: none; border: 0; border-radius: 13px; box-shadow: none; width: 42px; height: 42px; }
.sidebar-logo-icon::after, .sidebar-logo-icon::before { display: none; }
html .sidebar .sidebar-logo-name { color: var(--text-primary) !important; font-size: .94rem; }
html .sidebar .sidebar-logo-sub { color: var(--text-muted) !important; font-family: inherit; font-size: .55rem; letter-spacing: .12em; margin-top: 5px; }
.sidebar-section-label { font-size: .58rem; padding: 0 12px; margin-top: 16px; margin-bottom: 9px; letter-spacing: .11em; }
.sidebar-nav { gap: 3px; }
html .sidebar .sidebar-link { min-height: 43px; padding: 8px 10px; gap: 9px; font-size: .73rem; border: 1px solid transparent; border-radius: 9px; color: var(--text-secondary) !important; }
html .sidebar .sidebar-link-icon { width: 26px; height: 26px; color: inherit !important; background: transparent !important; border: 0; }
.sidebar-link-icon .material-icons { font-size: 20px; }
html .sidebar .sidebar-link.active { color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 10%, var(--bg-card)) !important; border-color: transparent !important; font-weight: 700; }
.sidebar-link.active::before { display: none; }
html .sidebar .sidebar-link:hover { background: var(--bg-card-hover) !important; }
.sidebar-link-badge { background: var(--bg-secondary); color: var(--accent); box-shadow: none; }
.theme-toggle { margin: 0 0 3px; padding: 7px 9px; background: var(--bg-primary) !important; border-radius: 10px; }
.theme-toggle-copy b { font-size: .68rem; }.theme-toggle-copy small { font-size: .56rem; }
.sidebar-footer { margin-top: 20px; padding: 16px 2px 0; gap: 10px; }
.sidebar-stat-value { font-size: .9rem; }.sidebar-stat-label { font-size: .55rem; }
.file-sync-badge { font-size: .58rem; line-height: 1.5; white-space: normal; }
.account-badge { min-height: 42px; font-size: .66rem; }
.app-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding: 12px 36px; border-bottom: 1px solid var(--border); background: var(--bg-card); }
.app-breadcrumb { display: flex; align-items: center; gap: 13px; color: var(--text-muted); font-size: .72rem; min-width: 0; }
.app-breadcrumb strong { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar-actions { display: flex; align-items: center; gap: 14px; }
.app-search-button { display: flex; align-items: center; gap: 9px; width: 235px; padding: 9px 12px; min-height: 40px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-primary); color: var(--text-muted); font-size: .69rem; cursor: pointer; }
.app-search-button .material-icons { font-size: 19px; }.app-search-button kbd { margin-left: auto; font: .6rem inherit; padding: 3px 5px; border: 1px solid var(--border); border-radius: 4px; }
.app-profile-button { display: grid; place-items: center; height: 40px; width: 40px; border: 1px solid var(--border); border-radius: 50%; background: var(--bg-secondary); color: var(--accent); cursor: pointer; }
.learning-dashboard { padding: 34px 36px 48px; }
.learning-header { background: transparent !important; align-items: center; gap: 18px; margin-bottom: 26px; }
.learning-header h1 { font-size: clamp(1.65rem, 2.4vw, 2.2rem); line-height: 1.3; font-weight: 700; letter-spacing: -.045em; }
.learning-header p { margin-top: 9px; font-size: .76rem; }
.learning-eyebrow { font-size: .59rem; margin-bottom: 9px; letter-spacing: .14em; }
.learning-header-link { display: none; }
.dashboard-date { color: var(--text-secondary); font-size: .7rem; padding: 10px 13px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); white-space: nowrap; }
html .learning-focus { position: relative; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); min-height: 290px; border: 1px solid #315b46 !important; border-radius: 22px; background: var(--flow-hero) !important; box-shadow: none !important; }
html .learning-focus-copy { padding: 33px 36px; background: transparent; z-index: 1; }
html .learning-focus-label { color: var(--flow-lime) !important; font-size: .6rem; letter-spacing: .13em; }
html .learning-focus h2 { color: #f7faef !important; font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 600; line-height: 1.17; letter-spacing: -.045em; }
html .learning-focus-copy > p { color: #c7d8cb !important; font-size: .74rem; max-width: 440px; }
html .learning-focus .learning-primary-action { min-height: 44px; background: var(--flow-lime) !important; color: #1d3929 !important; border-color: var(--flow-lime) !important; font-size: .75rem; box-shadow: none; }
html .learning-focus .learning-secondary-action { min-height: 44px; background: transparent !important; color: #eef7e9 !important; border-color: #74947b !important; font-size: .75rem; }
.learning-focus-actions { margin-top: 22px; }
html .learning-focus-progress { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 28px; border: 0 !important; background: transparent !important; text-align: center; }
.learning-focus-progress::before { content: ''; position: absolute; width: 235px; height: 235px; border: 1px solid #52794e; border-radius: 50%; box-shadow: 0 0 0 25px #cce89c08, 0 0 0 50px #cce89c05; pointer-events: none; }
html .learning-focus .learning-level-icon { width: 62px; height: 62px; background: #d5ed9b !important; color: #264930 !important; border: 0 !important; border-radius: 18px; transform: rotate(-7deg); }
html .learning-focus-progress > div:nth-child(2) > strong { color: #f6faee !important; font-size: 1.25rem; }
html .learning-focus-progress small, html .learning-focus-progress p, html .learning-focus-progress p b, html .learning-mastered span { color: #ccdfc7 !important; }
html .learning-mastered { display: flex; gap: 7px; padding: 10px 0 0; border: 0 !important; }
html .learning-mastered strong { color: var(--flow-lime) !important; font-size: 1.6rem; }
.learning-stats { gap: 0; margin: 20px 0 30px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); overflow: hidden; }
html .learning-stat { border: 0; border-radius: 0; background: transparent !important; box-shadow: none !important; padding: 19px 16px; gap: 10px; }
.learning-stat + .learning-stat { border-left: 1px solid var(--border); }
html .learning-stat > .material-icons { background: transparent !important; width: 28px; font-size: 22px; color: var(--accent) !important; }
.learning-stat small { font-size: .59rem; }.learning-stat strong { font-size: 1.12rem; letter-spacing: -.035em; margin-top: 5px; }
.course-discovery { margin: 32px 0; }
.learning-section-head h2 { font-size: 1.14rem; font-weight: 700; line-height: 1.45; }
.learning-section-head > p { font-size: .67rem; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.course-card { position: relative; display: flex; align-items: flex-start; flex-direction: column; padding: 23px; border: 1px solid var(--border); border-radius: 16px; color: var(--text-primary); background: var(--bg-card); text-align: left; cursor: pointer; transition: border-color 130ms, transform 130ms; }
.course-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.course-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 13px; background: #e8f0df; color: #416732; margin-bottom: 21px; }
.course-toeic .course-icon { color: #426790; background: #e7eef8; }.course-ielts .course-icon { color: #966531; background: #f8ecd9; }
.course-tag { font-size: .56rem; font-weight: 700; letter-spacing: .12em; color: var(--text-muted); }
.course-card > strong { margin: 8px 0; font-size: 1rem; font-weight: 700; line-height: 1.5; letter-spacing: -.025em; }
.course-card > span:not([class]) { font-size: .71rem; color: var(--text-secondary); line-height: 1.75; }
.course-link { display: flex; width: 100%; align-items: center; justify-content: space-between; padding-top: 22px; margin-top: auto; color: var(--accent); font-size: .69rem; font-weight: 600; }
.course-link .material-icons { font-size: 18px; }
.learning-section { border-radius: 16px; padding: 25px; box-shadow: none; }
.learning-task-grid .departure-row { min-height: 112px; }
.learning-task-grid .departure-row > span:nth-child(2) b { font-size: .79rem !important; line-height: 1.6; }
.learning-task-grid .departure-row > span:nth-child(2) small { font-size: .64rem !important; }
.learning-level-grid .passport-gate { min-height: 185px; padding: 14px 12px; }
.learning-level-grid .passport-gate h3 { margin-top: 30px; font-size: .83rem; }
.learning-level-grid .passport-gate small { left: 12px; right: 12px; font-size: .5rem; }
.learning-level-grid .passport-gate-stamp { top: 34px; right: auto; left: 12px; }
.page > .container { padding-top: 30px; padding-bottom: 40px; }
.page-title, .section-title { font-family: 'Be Vietnam Pro', system-ui, sans-serif; }
.main-wrapper h1, .main-wrapper h2 { font-family: 'Be Vietnam Pro', system-ui, sans-serif; }
.page-title { font-size: clamp(1.6rem, 2.5vw, 2.25rem); line-height: 1.35; letter-spacing: -.035em; }
.page-sub { line-height: 1.8; }
.card, .toeic-card, .resource-card, .ielts-library-card, .study-studio-panel { border-radius: var(--flow-radius) !important; box-shadow: none; }
.btn { min-height: 42px; border-radius: 9px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select { min-height: 42px; }
textarea { line-height: 1.7; }
.pricing-page { max-width: 1120px; }
.pricing-page > .page-title { max-width: 700px; margin: 14px auto; text-align: center; }
.pricing-page > .page-sub { text-align: center; max-width: 670px; margin: 0 auto 32px; }
.pricing-card { padding: 30px; border-radius: 18px !important; box-shadow: none; }
.pricing-card.featured { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg-card)); }
.pricing-price { letter-spacing: -.045em; }
.pricing-note, .invoice-request { border-radius: 12px; line-height: 1.8; }
.pricing-faq { max-width: 780px; margin: 38px auto 10px; }
.pricing-faq h2 { font-size: 1.15rem; margin-bottom: 18px; }
.pricing-faq details { border-bottom: 1px solid var(--border); padding: 17px 0; }
.pricing-faq summary { cursor: pointer; font-size: .84rem; font-weight: 600; line-height: 1.6; }
.pricing-faq p { padding-top: 12px; color: var(--text-secondary); font-size: .77rem; line-height: 1.9; }
.public-footer { margin: 0 36px; padding: 24px 0 32px; border-top: 1px solid var(--border); line-height: 1.9; font-size: .63rem; }
.feature-search { position: fixed; inset: 0; width: min(580px, calc(100% - 28px)); max-height: min(680px, 85dvh); margin: auto; padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card); color: var(--text-primary); box-shadow: 0 30px 100px #08160d40; }
.feature-search::backdrop { background: #0b1a15a6; backdrop-filter: blur(4px); }
.feature-search-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.feature-search-head h2 { font-size: 1.1rem; }
.feature-search-close { width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--bg-secondary); color: var(--text-secondary); cursor: pointer; }
.feature-search-field { display: flex; align-items: center; gap: 12px; padding: 3px 12px; border: 1px solid var(--border-hover); border-radius: 10px; color: var(--accent); }
.feature-search-field input { width: 100%; border: 0; background: transparent; color: var(--text-primary); font-size: .84rem; outline-offset: 4px; }
.feature-search-count, .feature-search-hint { font-size: .65rem; color: var(--text-muted); margin: 14px 0; }
.feature-search-results { max-height: 44dvh; overflow-y: auto; overscroll-behavior: contain; }
.feature-search-results button { display: flex; align-items: center; gap: 15px; width: 100%; padding: 13px 10px; border: 0; border-radius: 9px; color: var(--text-primary); background: transparent; text-align: left; cursor: pointer; }
.feature-search-results button:hover, .feature-search-results button:focus-visible { background: var(--bg-secondary); }
.feature-search-results button > .material-icons { color: var(--accent); font-size: 21px; }.feature-search-results button > .material-icons:last-child { margin-left: auto; font-size: 17px; }
.feature-search-results strong, .feature-search-results small { display: block; }.feature-search-results strong { font-size: .78rem; }.feature-search-results small { margin-top: 4px; font-size: .65rem; color: var(--text-muted); }
.feature-search-empty { padding: 30px 12px; color: var(--text-secondary); font-size: .8rem; line-height: 1.8; }
.navigation-backdrop { position: fixed; inset: 0; z-index: 990; border: 0; background: #10231ca6; }
@media (min-width: 901px) { .sidebar-toggle { display: none !important; } }
@media (max-width: 1180px) and (min-width: 901px) {
  :root { --sidebar-w: 228px; }
  .app-topbar { padding-inline: 24px; }.learning-dashboard { padding-inline: 24px; }
  .learning-stat { flex-direction: column; align-items: flex-start; }
  .course-card { padding: 19px; }.course-card > strong { font-size: .88rem; }
  html .learning-focus-copy { padding: 30px; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  html .sidebar { width: 270px; height: 100dvh; padding-top: 70px; }
  html .sidebar-toggle { display: grid; place-items: center; position: fixed; top: 15px; left: 16px; width: 42px; height: 42px; border-radius: 10px; background: var(--bg-card) !important; border: 1px solid var(--border); color: var(--accent) !important; z-index: 1100; }
  .navigation-open { overflow: hidden; }
  .app-topbar { min-height: 72px; padding: 12px 20px 12px 76px; }
  .app-breadcrumb > span { display: none; }
  .app-search-button { width: auto; }.app-search-button kbd { display: none; }
  .learning-dashboard { padding: 28px 22px 36px; }
  .page > .container { padding-top: 24px; }
  .page:not(.learning-dashboard) { padding-top: 8px; }
  .learning-focus { grid-template-columns: minmax(0, 1fr) 240px !important; }
  html .learning-focus-copy { padding: 28px; }
  .learning-task-grid { grid-template-columns: 1fr 1fr; }
  .learning-level-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .app-topbar { gap: 8px; padding-right: 16px; }
  .app-breadcrumb { font-size: .69rem; }.app-topbar-actions { gap: 8px; }
  .app-search-button { width: 40px; height: 40px; padding: 9px; justify-content: center; }.app-search-button > span:not(.material-icons) { display: none; }
  .learning-dashboard { padding: 25px 16px 32px; }
  .learning-header { flex-direction: row; align-items: flex-start; gap: 8px; }.learning-header h1 { font-size: 1.65rem; }.learning-header p { font-size: .7rem; line-height: 1.8; }
  .dashboard-date { display: none; }
  html .learning-focus { grid-template-columns: 1fr !important; }
  html .learning-focus-copy { padding: 26px 24px; }
  html .learning-focus h2 { font-size: 2rem; }
  .learning-focus-actions { flex-direction: row; flex-wrap: wrap; }.learning-focus-actions button { flex: 1; white-space: nowrap; }
  html .learning-focus-progress { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 20px 24px; background: #ffffff08 !important; }
  .learning-focus-progress::before { display: none; }
  html .learning-focus .learning-level-icon { width: 42px; height: 42px; border-radius: 11px; }.learning-level-icon .material-icons { font-size: 24px; }
  html .learning-focus-progress > div:nth-child(2) > strong { font-size: .97rem; }.learning-focus-progress p { font-size: .58rem; }
  html .learning-mastered { display: none; }
  .learning-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 16px 0 26px; }
  html .learning-stat { padding: 15px; min-height: 79px; }.learning-stat:nth-child(3), .learning-stat:nth-child(5) { border-left: 0; }.learning-stat:nth-child(n+3) { border-top: 1px solid var(--border); }.learning-stat:last-child { grid-column: 1 / -1; }
  .learning-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }.learning-section-head > p { text-align: left; }
  .course-grid { grid-template-columns: 1fr; gap: 11px; }
  .course-card { padding: 19px 19px 19px 82px; min-height: 170px; }.course-icon { position: absolute; top: 21px; left: 18px; }.course-card > strong { font-size: 1rem; }.course-link { padding-top: 16px; }
  .learning-section { padding: 19px; }.learning-task-grid { grid-template-columns: 1fr; }
  .learning-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-level-grid .passport-gate { min-height: 175px; }
  .learning-tool-grid { grid-template-columns: 1fr; }
  .public-footer { margin-inline: 20px; }
  .feature-search { padding: 18px; }.feature-search-results button { gap: 10px; }
  .pricing-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .course-card { transition: none; }.course-card:hover { transform: none; }
}
