/* Teacher Hazel website + admin. Tokens: DESIGN.md §2 and §11. */
:root {
  --canvas: #050605; --surface1: #0C100E; --surface2: #131916; --surface3: #1B2320;
  --border-subtle: #222C27; --border-strong: #3A4842; --border-interactive: #64746C;
  --text: #EDF1EC; --text2: #B7C2BB; --muted: #8C9891;
  --emerald: #00664E; --emerald-pressed: #00543F; --emerald-text: #4FCB9F;
  --mint: #CFF8DB; --gold: #D6A85E; --danger: #F0907E;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Noto Sans Myanmar", system-ui, sans-serif;
  --mm: "Noto Sans Myanmar", var(--sans);
  --r-sm: 8px; --r-md: 16px; --max: 1160px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 400 17px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--emerald-text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.mm { font-family: var(--mm); line-height: 1.8; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.01em; }
h1 { font-size: clamp(38px, 6vw, 60px); }
h2 { font-size: clamp(30px, 4vw, 40px); }
h3 { font-size: 22px; }
p { margin: 0 0 16px; }
.lead { font-size: 20px; color: var(--text2); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(5, 6, 5, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font: 600 22px var(--serif); }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--emerald); display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--text2); text-decoration: none; padding: 10px 14px; border-radius: 999px; font-size: 15px; }
.nav a:hover { color: var(--text); background: var(--surface2); }
.menu-btn { display: none; margin-left: auto; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface1); padding: 12px 20px 20px; border-bottom: 1px solid var(--border-strong); }
  .nav.open { display: flex; }
  .nav a { padding: 14px; }
}

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent; font: 700 16px var(--sans); cursor: pointer; text-decoration: none;
  white-space: nowrap; }
.btn-primary { background: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-pressed); }
.btn-mint { background: var(--mint); color: var(--canvas); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-interactive); }
.btn-ghost:hover { background: var(--surface2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: progress; }
label { display: block; font-size: 14px; color: var(--text2); margin-bottom: 6px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border-interactive); background: var(--surface3); color: var(--text); font: 16px var(--sans); }
textarea { min-height: 80px; resize: vertical; }
input[type=file] { padding: 10px; }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Sections */
section { padding: 88px 0; }
.band-mint { background: var(--mint); color: var(--canvas); }
.band-mint .lead, .band-mint .muted { color: #1F3A2E; }
.band-mint a { color: var(--emerald); }
.band-surface { background: var(--surface1); }
.eyebrow { font-size: 14px; font-weight: 700; color: var(--emerald-text); margin-bottom: 12px; letter-spacing: .02em; }
.band-mint .eyebrow { color: var(--emerald); }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--mint); }
.hero .cta { margin-top: 32px; }
.hero-card { background: var(--surface2); border: 1px solid var(--border-strong); border-radius: 24px; padding: 28px; }
.bubble-hazel { font: 20px/1.5 var(--serif); margin-bottom: 18px; }
.bubble-learner { background: var(--surface3); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px; }
.fix { color: var(--gold); }
.wave { display: flex; gap: 4px; align-items: center; height: 40px; }
.wave span { flex: 1; background: var(--emerald-text); border-radius: 2px; opacity: .85; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Levels */
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 40px; }
.level { background: var(--surface2); border-radius: var(--r-md); padding: 24px 20px; border-top: 4px solid var(--emerald); }
.level b { font: 600 34px var(--serif); display: block; color: var(--mint); }
.level .hours { font-size: 14px; color: var(--muted); }
@media (max-width: 960px) { .levels { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .levels { grid-template-columns: 1fr; } }

/* Features: two-column list, not identical card grid */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 64px; margin-top: 40px; }
.feature { border-left: 2px solid var(--emerald); padding-left: 20px; }
.band-mint .feature { border-left-color: var(--emerald); }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

/* Steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; padding: 0; list-style: none; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--emerald); color: #fff; font-weight: 700; margin-bottom: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Price */
.price-card { background: var(--mint); color: var(--canvas); border-radius: 24px; padding: 40px; display: grid;
  grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.price { font: 600 56px var(--serif); line-height: 1; }
.price small { font: 400 18px var(--sans); }
.price-card ul { margin: 16px 0 0; padding-left: 20px; }
@media (max-width: 760px) { .price-card { grid-template-columns: 1fr; padding: 28px; } .price { font-size: 44px; } }

/* FAQ */
details { border-bottom: 1px solid var(--border-strong); padding: 18px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 18px; min-height: 44px; display: flex; align-items: center; }
details p { margin: 12px 0 0; color: var(--text2); }

footer { border-top: 1px solid var(--border-subtle); padding: 40px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }

/* App pages (account + admin) */
.page { padding: 40px 0 80px; }
.card { background: var(--surface1); border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: 24px; }
.card + .card { margin-top: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.auth-box { max-width: 440px; margin: 40px auto; }
.tabs { display: flex; gap: 4px; background: var(--surface2); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--text2);
  font: 700 15px var(--sans); cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--emerald); color: #fff; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.msg { padding: 12px 16px; border-radius: var(--r-sm); margin: 12px 0; font-size: 15px; }
.msg-error { background: rgba(240, 144, 126, .12); color: #F3B2A9; border: 1px solid rgba(240, 144, 126, .4); }
.msg-ok { background: rgba(79, 203, 159, .12); color: var(--emerald-text); border: 1px solid rgba(79, 203, 159, .4); }
.days { font: 600 64px/1 var(--serif); color: var(--mint); }
.chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px;
  font-weight: 700; white-space: nowrap; }
.chip-pro, .chip-approved { background: var(--emerald); color: #fff; }
.chip-trial { background: var(--mint); color: var(--canvas); }
.chip-expired, .chip-pending { background: rgba(214, 168, 94, .16); color: var(--gold); border: 1px solid rgba(214, 168, 94, .5); }
.chip-disabled, .chip-rejected { color: var(--danger); border: 1px solid var(--danger); }
.banner { background: var(--mint); color: var(--canvas); border-radius: var(--r-md); padding: 20px 24px; margin-bottom: 20px; }
.pay-box { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.qr { background: #fff; border-radius: var(--r-md); padding: 10px; width: 200px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; word-break: break-word; }
@media (max-width: 600px) { .pay-box { grid-template-columns: 1fr; } .qr { width: 180px; } }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 16px; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 69px); }
.admin-side { border-right: 1px solid var(--border-subtle); padding: 24px 12px; }
.admin-side button { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; padding: 0 14px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text2); font: 700 15px var(--sans); cursor: pointer; }
.admin-side button[aria-current=true] { background: var(--surface2); color: var(--text); box-shadow: inset 3px 0 var(--emerald); }
.admin-main { padding: 28px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--surface1); border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: 18px; }
.stat b { display: block; font: 600 32px var(--serif); }
.stat span { color: var(--muted); font-size: 14px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input { max-width: 320px; } .toolbar select { max-width: 180px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { position: sticky; top: 0; background: var(--surface2); text-align: left; color: var(--text2); font-size: 13px; padding: 12px 14px; }
td { padding: 12px 14px; border-top: 1px solid var(--border-subtle); vertical-align: middle; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--surface1); }
.pay-item { display: grid; grid-template-columns: 160px 1fr auto; gap: 20px; align-items: start; }
.pay-item img { width: 160px; max-height: 240px; object-fit: cover; border-radius: var(--r-sm); cursor: zoom-in; background: var(--surface2); }
dialog { background: var(--surface2); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  padding: 24px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
dialog.img-view { width: auto; max-width: calc(100vw - 32px); padding: 8px; }
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { display: flex; overflow-x: auto; gap: 4px; border-right: 0; border-bottom: 1px solid var(--border-subtle); padding: 8px 12px; }
  .admin-side button { width: auto; white-space: nowrap; gap: 8px; }
  .admin-main { padding: 20px 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pay-item { grid-template-columns: 1fr; }
  /* users table becomes stacked cards */
  .cards-sm thead { display: none; }
  .cards-sm tr { display: block; border-top: 1px solid var(--border-subtle); padding: 8px 0; }
  .cards-sm td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 14px; }
  .cards-sm td::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
  .table-wrap { overflow-x: visible; }
}

/* QA fixes */
.site-header .menu-btn { display: none; }
@media (max-width: 760px) { .site-header .menu-btn { display: inline-flex; } }
.band-mint .btn-primary, .nav .btn-primary { color: #fff; }
.price-card .eyebrow { color: var(--emerald); }
.grid-2 > .card + .card { margin-top: 0; }
.grid-2 + .card, .card + .grid-2 { margin-top: 20px; }
@media (max-width: 860px) {
  .cards-sm td:nth-child(n+6) { display: none; }
  .cards-sm td { padding: 4px 14px; }
  #who { display: none; } #signOut { margin-left: auto; }
  .admin-side button { padding: 0 12px; }
}
