:root {
  --ink: #122334;
  --ink-soft: #4d5e6b;
  --muted: #7b8790;
  --line: #e0e5e5;
  --canvas: #f5f7f5;
  --white: #fff;
  --night: #0c2230;
  --night-2: #173447;
  --mint: #a7ebd6;
  --mint-dark: #126f60;
  --orange: #f5b78b;
  --shadow: 0 18px 45px rgba(16, 37, 48, .06);
  --radius: 19px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .52; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .flashcard:focus-visible { outline: 3px solid #43a995; outline-offset: 3px; }
a { color: inherit; }
.is-hidden { display: none !important; }
.site-shell { max-width: 1450px; margin: auto; padding: 0 56px; }
.site-header { height: 102px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 28px; letter-spacing: -1.75px; font-weight: 800; text-decoration: none; color: var(--ink); }
.brand-accent { font-weight: 400; }
.brand-dot { color: #28aa8e; }
.brand-icon { width: 34px; height: 34px; padding: 7px; border-radius: 11px; background: var(--night); display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; }
.brand-icon span { width: 5px; height: 12px; background: var(--mint); border-radius: 2px; }
.brand-icon span:nth-child(2) { height: 19px; }
.brand-icon span:nth-child(3) { height: 15px; }
.header-actions { display: flex; align-items: center; gap: 30px; }
.header-tag { display: inline-flex; align-items: center; gap: 9px; color: #4b5d63; font-size: 12px; font-weight: 650; letter-spacing: .03em; }
.tag-dot { width: 7px; height: 7px; background: #38a389; border-radius: 50%; }
.logout-button { border: 0; background: transparent; color: var(--ink); font-size: 12px; font-weight: 750; }
.logout-button span { margin-left: 6px; }
.hero { min-height: 410px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, .86fr); align-items: center; border-radius: 27px; background: var(--night); overflow: hidden; padding: 53px 65px; position: relative; }
.hero::before { content: ""; width: 750px; height: 650px; position: absolute; right: -450px; top: -290px; background: radial-gradient(circle, rgba(113,201,174,.15) 0%,transparent 68%); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 11px; font-size: 10px; font-weight: 800; letter-spacing: .19em; color: var(--mint); }
.eyebrow-line { display: inline-block; width: 23px; height: 1px; background: currentColor; }
.hero h1, .login-art h1 { margin: 23px 0 17px; color: #fff; font-size: clamp(43px,4.35vw,69px); line-height: 1.07; letter-spacing: -.058em; font-weight: 730; }
.hero h1 em, .login-art h1 em { font-style: normal; color: var(--mint); }
.hero-copy > p, .login-art-content > p { font-size: 14px; color: #a9bfc8; line-height: 1.75; max-width: 450px; margin: 0 0 28px; }
.hero-cta { border: 1px solid rgba(189,239,223,.5); background: rgba(255,255,255,.06); color: #f4fbf7; border-radius: 999px; padding: 13px 19px; display: inline-flex; justify-content: space-between; gap: 34px; align-items: center; font-size: 12px; font-weight: 750; transition: background .2s; }
.hero-cta:hover { background: rgba(255,255,255,.13); }
.hero-cta span { color: var(--mint); font-size: 19px; }
.hero-visual { position: relative; height: 300px; z-index: 1; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid rgba(150,222,202,.16); border-radius: 50%; width: 380px; height: 380px; }
.orbit-two { width: 465px; height: 465px; opacity: .7; }
.hero-stack-card, .hero-flashcard { position: absolute; width: min(100%,350px); height: 250px; border-radius: 13px; }
.hero-stack-card { background: #426171; border: 1px solid rgba(255,255,255,.2); transform: rotate(-9deg) translate(-15px,12px); }
.middle-card { background: #2e5263; transform: rotate(8deg) translate(14px,9px); }
.hero-flashcard { background: #ecf6ef; padding: 24px 25px 21px; transform: rotate(-2deg); box-shadow: 0 23px 70px rgba(0,0,0,.26); display: flex; flex-direction: column; justify-content: space-between; }
.mini-top, .mini-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 9px; font-weight: 750; color: #526b67; letter-spacing: .08em; }
.mini-top { justify-content: flex-start; gap: 9px; }
.mini-top span:last-child { margin-left: auto; }
.mini-dot { width: 7px; height: 7px; border-radius: 50%; background: #2bb291; }
.mini-question { color: #163343; font-size: 30px; font-weight: 760; letter-spacing: -.065em; line-height: 1.08; }
.mini-question i { color: #2a9f82; font-style: normal; }
.mini-bottom { letter-spacing: 0; font-size: 10px; }
.mini-arrow { font-size: 25px; line-height: .7; color: #2d9079; }
.hero-spark { position: absolute; color: var(--mint); font-size: 24px; }
.spark-a { top: 14px; left: 22px; }.spark-b { right: 12px; bottom: 20px; font-size: 32px; opacity: .7; }
.overview { margin: 22px 0 60px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.overview-card { padding: 22px 23px 21px; background: var(--white); border: 1px solid #e5eae6; border-radius: 16px; min-height: 137px; }
.metric-label { display: block; font-size: 10px; color: #70818a; font-weight: 800; letter-spacing: .13em; }
.metric-value { color: var(--ink); font-size: 40px; line-height: 1.2; font-weight: 740; letter-spacing: -.06em; margin: 9px 0 3px; font-variant-numeric: tabular-nums; }
.metric-note { color: #86949a; font-size: 11px; }
.work-area { display: grid; grid-template-columns: minmax(0, 1.66fr) minmax(280px,1fr); gap: 27px; align-items: start; padding-bottom: 70px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 0 0 21px; }
.dark-eyebrow { color: #2a9e80; }
.section-heading h2 { margin: 8px 0 0; font-size: 31px; letter-spacing: -.045em; font-weight: 730; }
.section-caption, .sidebar-eyebrow > span:last-child { font-size: 11px; color: #8c999d; }
.study-panel { background: var(--white); border: 1px solid #e3e8e5; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.panel-intro { display: flex; gap: 18px; align-items: center; padding-bottom: 25px; margin-bottom: 27px; border-bottom: 1px solid #edf0ed; }
.panel-number { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: #e3f8ef; color: #127866; font-size: 21px; font-weight: 730; }
h3 { margin: 0; }
.panel-intro h3 { font-size: 21px; letter-spacing: -.025em; }
.panel-intro p { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.field-group { margin: 0 0 24px; padding: 0; border: 0; }
.field-group legend, .select-wrap > span { font-size: 10px; letter-spacing: .14em; font-weight: 780; color: #6b7c82; margin-bottom: 13px; }
.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-inner { display: flex; flex-direction: column; min-height: 95px; justify-content: center; border: 1.5px solid #e1e8e4; border-radius: 11px; padding: 14px 11px; transition: border-color .2s, background .2s; }
.choice-inner strong { font-size: 13px; }
.choice-inner small { font-size: 10px; color: #809099; line-height: 1.5; margin-top: 4px; }
.choice input:checked + .choice-inner { border-color: #3a9b7e; background: #ebf9f2; box-shadow: 0 0 0 1px #3a9b7e inset; }
.choice input:focus-visible + .choice-inner { outline: 3px solid #43a995; outline-offset: 2px; }
.setup-bottom { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.select-wrap { display: grid; flex: 1; min-width: 0; }
.select-wrap select { width: 100%; min-height: 45px; border: 1px solid #dce5e1; border-radius: 9px; background: white; padding: 0 12px; color: var(--ink); font-size: 12px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 35px; padding: 14px 18px; min-height: 46px; white-space: nowrap; color: #fff; background: var(--night); border: 1px solid var(--night); border-radius: 9px; font-size: 12px; font-weight: 760; transition: background .18s, transform .18s; }
.primary-button:hover:not(:disabled) { background: #204153; transform: translateY(-1px); }
.primary-button span { font-size: 19px; line-height: .5; }
.setup-footnote { margin: 26px 0 0; color: #748487; font-size: 11px; }
.footnote-symbol { color: #159b76; font-size: 18px; vertical-align: -2px; margin-right: 7px; }
.library-card { background: #e5f0e8; border: 1px solid #d7e6da; border-radius: var(--radius); padding: 27px; }
.sidebar-eyebrow { display: flex; justify-content: space-between; align-items: center; }
.small-pill { color: #0d7762; background: #d3e8db; font-size: 9px; font-weight: 850; letter-spacing: .16em; border-radius: 6px; padding: 7px 9px; }
.library-card h3 { margin: 24px 0 10px; font-size: 28px; line-height: 1.18; letter-spacing: -.048em; }
.library-card > p { color: #607a73; font-size: 12px; line-height: 1.65; max-width: 270px; margin: 0; }
.library-divider { border-top: 1px solid #cbded1; margin: 22px 0 9px; }
.week-summary { display: flex; align-items: center; gap: 12px; padding: 13px 0; }
.week-bubble { flex-shrink: 0; display: grid; place-items: center; width: 39px; height: 39px; border-radius: 10px; background: #cfecdb; color: #167c61; font-size: 15px; font-weight: 820; }
.week-bubble.alt { background: #f3e4d7; color: #a16a46; }
.week-summary > div { flex: 1; min-width: 0; }
.week-summary strong { display: block; font-size: 12px; }
.week-summary small { color: #768d83; font-size: 10px; }
.week-count { color: #45675a; font-size: 12px; font-weight: 800; }
.history-card { margin-top: 18px; background: #fff; border: 1px solid #e3e8e5; border-radius: var(--radius); padding: 25px 27px; }
.history-heading { display: flex; justify-content: space-between; align-items: center; }
.history-heading h3 { font-size: 17px; letter-spacing: -.025em; }
.history-badge { font-size: 9px; font-weight: 800; letter-spacing: .1em; color: #94a0a3; }
.recent-sessions { margin-top: 16px; }
.recent-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #edf1ee; }
.recent-item:first-child { border-top: 0; }
.recent-dot { width: 32px; height: 32px; border: 1px solid #dbe9e0; border-radius: 9px; display: grid; place-items: center; color: #2f927b; font-size: 14px; }
.recent-text { flex: 1; }
.recent-text strong { display: block; font-size: 12px; }
.recent-text small { display: block; font-size: 10px; color: #809098; margin-top: 3px; }
.recent-duration { font-weight: 750; font-size: 11px; color: #375265; }
.muted { color: #809099; font-size: 12px; line-height: 1.5; }
.tip-card { display: flex; gap: 12px; margin-top: 18px; padding: 20px 8px 0; }
.tip-star { font-size: 23px; color: #1f9e81; line-height: 1; }
.tip-card strong { font-size: 12px; }
.tip-card p { color: #7e8b8d; line-height: 1.65; font-size: 11px; margin: 7px 0 0; }
.site-footer { border-top: 1px solid #e3e8e5; padding: 24px 0 32px; display: flex; justify-content: space-between; gap: 16px; color: #7e8b90; font-size: 10px; letter-spacing: .05em; }
.site-footer span:first-child { font-weight: 800; letter-spacing: .14em; }

/* Active practice view */
.session-panel { padding: 27px; }
.session-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.live-indicator { display: flex; align-items: center; gap: 8px; color: #188669; font-size: 10px; font-weight: 820; letter-spacing: .1em; }
.live-indicator span { background: #36b48f; border-radius: 50%; height: 7px; width: 7px; box-shadow: 0 0 0 4px #dff4e9; }
.session-header h3 { margin-top: 9px; font-size: 22px; letter-spacing: -.035em; }
.end-button { background: #fff; color: #3d5360; border: 1px solid #d8e1e1; border-radius: 8px; padding: 11px 12px; white-space: nowrap; font-size: 12px; font-weight: 740; }
.end-button:hover { background: #f5f7f7; }
.session-meta { display: flex; justify-content: space-between; color: #647780; font-size: 12px; font-weight: 760; margin: 25px 0 10px; }
.clock { font-variant-numeric: tabular-nums; }
.progress-track { width: 100%; height: 6px; border-radius: 10px; background: #e8efeb; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0%; background: #37b58f; border-radius: 10px; transition: width .2s ease; }
.flashcard { position: relative; width: 100%; height: 302px; margin-top: 25px; perspective: 1200px; cursor: pointer; border-radius: 15px; }
.flashcard-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .52s ease; }
.flashcard-inner.is-flipped { transform: rotateY(180deg); }
.flashcard-face { display: flex; flex-direction: column; justify-content: space-between; position: absolute; inset: 0; border-radius: 15px; padding: 28px 29px; backface-visibility: hidden; overflow: hidden; }
.card-front { background: #153346; color: #fff; }
.card-front::after { content: ""; position: absolute; width: 245px; height: 245px; border-radius: 50%; right: -100px; bottom: -130px; border: 1px solid rgba(177,236,219,.18); pointer-events: none; }
.card-back { background: #dff5e8; color: #143a36; transform: rotateY(180deg); }
.card-kicker, .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #8bc8ba; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.card-back .card-kicker, .card-back .card-footer { color: #557f71; }
.card-body { font-size: clamp(22px,2.5vw,34px); letter-spacing: -.045em; font-weight: 760; line-height: 1.23; max-width: 510px; }
.answer-body { font-size: clamp(20px,2vw,27px); }
.card-footer { font-size: 9px; line-height: 1.5; }
.card-footer > span:first-child { max-width: 68%; }
.flip-hint { white-space: nowrap; }
.flip-hint span { font-size: 17px; vertical-align: -1px; }
.answer-symbol { color: #117b62; font-size: 20px; }
.flip-note { text-align: center; font-size: 11px; color: #8a9898; margin: 15px 0 16px; }
.study-controls { min-height: 49px; }
.flip-button { width: 100%; display: flex; gap: 13px; justify-content: center; align-items: center; background: var(--night); color: #fff; border: 1px solid var(--night); padding: 14px; border-radius: 9px; font-size: 12px; font-weight: 760; }
.flip-button span { font-size: 18px; }
.rating-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rating-buttons button { padding: 14px 12px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 12px; font-weight: 800; }
.rating-again { border: 1px solid #e2cdb9; color: #9a5d30; background: #fcf3eb; }
.rating-known { border: 1px solid #1f987b; color: #fff; background: #16866d; }
.rating-buttons small { margin-left: auto; opacity: .65; font-size: 10px; }
.rating-buttons button > span { font-size: 17px; }
.session-support { margin-top: 19px; color: #acb4b4; text-align: center; font-size: 9px; letter-spacing: .04em; font-weight: 730; }
.session-support span { margin: 0 7px; }
.done-panel { text-align: center; padding: 40px 32px; }
.done-mark { display: grid; place-items: center; width: 55px; height: 55px; margin: auto auto 24px; background: #d9f5e9; color: #117c65; border-radius: 50%; font-size: 24px; }
.done-panel h3 { font-size: 30px; letter-spacing: -.04em; margin: 9px 0 11px; }
.done-lead { color: #71818a; max-width: 370px; margin: 0 auto 25px; font-size: 13px; line-height: 1.75; }
.done-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.done-metrics > div { background: #f4f8f5; border: 1px solid #e5ede8; padding: 16px 7px; border-radius: 10px; }
.done-metrics span { font-size: 10px; color: #788d89; display: block; margin-bottom: 7px; }
.done-metrics strong { font-size: 22px; letter-spacing: -.05em; }
.alert { padding: 15px 18px; border-radius: 9px; color: #8a331f; background: #ffede5; border: 1px solid #efc0ae; margin-top: 14px; font-size: 12px; }

/* Password screen */
.login-body { min-height: 100vh; background: #f5f7f5; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login-art { background: var(--night); padding: 55px clamp(40px,7vw,105px); display: flex; flex-direction: column; justify-content: space-between; }
.login-brand { color: #f7fbf8; }
.login-brand .brand-icon { background: #24485a; }
.login-art h1 { font-size: clamp(46px,5vw,73px); margin-top: 25px; }
.login-art-content p { font-size: 15px; }
.login-art-footer { font-size: 10px; font-weight: 760; color: #638e95; letter-spacing: .18em; }
.login-form-area { display: grid; place-items: center; padding: 30px; }
.login-form-container { width: min(100%,390px); }
.login-label { color: #2c977a; font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.login-form-container h2 { font-size: 38px; letter-spacing: -.05em; margin: 13px 0 12px; }
.login-form-container > p { color: #71828b; font-size: 13px; line-height: 1.7; margin: 0 0 34px; }
.login-form-container form { display: grid; }
.login-form-container label { font-size: 10px; color: #667983; font-weight: 800; letter-spacing: .12em; margin-bottom: 11px; }
.login-form-container input[type=password] { background: #fff; border: 1px solid #d9e3df; border-radius: 10px; padding: 14px 15px; font-size: 15px; outline-color: #3baf8c; }
.login-submit { margin-top: 17px; width: 100%; justify-content: space-between; padding-left: 20px; padding-right: 20px; }
.login-error { color: #b34f3d; font-size: 12px; }
.login-help { color: #7b8a8d; font-size: 11px; line-height: 1.7; margin-top: 30px; }
.login-help code { color: #3c5d65; }

@media (max-width: 1100px) {
  .site-shell { padding: 0 28px; }
  .hero { padding: 45px 40px; grid-template-columns: 1fr .75fr; }
  .hero-flashcard, .hero-stack-card { width: 285px; height: 223px; }
  .mini-question { font-size: 26px; }
  .work-area { grid-template-columns: minmax(0,1.45fr) minmax(260px,1fr); gap: 17px; }
  .study-panel { padding: 25px; }
  .choice-inner { padding: 12px 9px; }
}
@media (max-width: 840px) {
  .hero { grid-template-columns: 1fr; padding: 46px 35px 35px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: clamp(44px,6vw,66px); }
  .overview { grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom: 44px; }
  .work-area { grid-template-columns: 1fr; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .history-card { margin-top: 0; }
  .tip-card { grid-column: 1 / -1; padding: 4px 8px; }
}
@media (max-width: 600px) {
  .site-shell { padding: 0 17px; }
  .site-header { height: 78px; }
  .brand { font-size: 24px; gap: 8px; }
  .brand-icon { width: 29px; height: 29px; }
  .header-actions { gap: 12px; }
  .header-tag { display: none; }
  .hero { min-height: 0; padding: 39px 26px 40px; border-radius: 18px; }
  .hero h1 { font-size: 42px; margin-top: 21px; }
  .hero-copy > p { font-size: 13px; }
  .overview { gap: 10px; margin-top: 12px; }
  .overview-card { padding: 17px 16px; min-height: 125px; }
  .metric-value { font-size: 34px; }
  .metric-label { font-size: 9px; }
  .metric-note { font-size: 10px; }
  .section-heading h2 { font-size: 27px; }
  .section-caption { display: none; }
  .study-panel { padding: 22px 18px; }
  .panel-intro { gap: 12px; }
  .panel-intro h3 { font-size: 19px; }
  .choice-grid { grid-template-columns: 1fr; gap: 8px; }
  .choice-inner { min-height: 59px; padding: 9px 15px; }
  .choice-inner strong { font-size: 12px; }
  .choice-inner small { font-size: 10px; }
  .setup-bottom { flex-direction: column; align-items: stretch; }
  .select-wrap { width: 100%; }
  .primary-button { justify-content: space-between; }
  .side-column { grid-template-columns: 1fr; }
  .tip-card { grid-column: auto; }
  .library-card { padding: 25px; }
  .site-footer { flex-direction: column; line-height: 1.7; }
  .session-panel { padding: 20px 15px; }
  .session-header h3 { font-size: 19px; }
  .end-button { padding: 9px 8px; font-size: 11px; }
  .flashcard { height: 320px; }
  .flashcard-face { padding: 23px 21px; }
  .card-body { font-size: 25px; }
  .answer-body { font-size: 22px; }
  .card-kicker { font-size: 9px; }
  .session-support { font-size: 8px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-art { min-height: 350px; padding: 30px 30px 42px; }
  .login-art h1 { font-size: 49px; margin: 14px 0; }
  .login-art-content p { margin-bottom: 10px; }
  .login-form-area { padding: 55px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
