/* ============================================================
   30-Day English Listening — styles
   ============================================================ */
:root {
  --bg: #f6f7fb;
  --bg-soft: #eef0f7;
  --card: #ffffff;
  --text: #1a2233;
  --muted: #6b7694;
  --border: #e4e8f2;
  --accent: #4f7cff;
  --accent-soft: rgba(79, 124, 255, 0.12);
  --shadow: 0 1px 2px rgba(20, 30, 60, 0.04), 0 8px 24px rgba(20, 30, 60, 0.06);
  --radius: 16px;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #0e1220;
  --bg-soft: #141a2e;
  --card: #171d31;
  --text: #e8ecf6;
  --muted: #98a2c0;
  --border: #252e4a;
  --accent: #6f96ff;
  --accent-soft: rgba(111, 150, 255, 0.16);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background .25s ease, color .25s ease;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% -5%, var(--accent-soft), transparent 70%),
    radial-gradient(500px 260px at 90% 0%, rgba(155,109,255,.12), transparent 70%);
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-badge { font-size: 22px; }
.brand-text { font-weight: 800; font-size: 15px; letter-spacing: .2px; display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-weight: 500; font-size: 11px; color: var(--muted); }
.head-nav { display: flex; align-items: center; gap: 18px; }
.head-nav a { color: var(--muted); font-size: 14px; }
.head-nav a:hover { color: var(--text); text-decoration: none; }
.theme-toggle { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 16px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; padding: 56px 0 28px; }
.hero-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 900; letter-spacing: -.5px; }
.hero .accent { color: var(--accent); }
.hero-sub { font-size: 16px; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 12px; font-weight: 700; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px var(--accent-soft); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.05); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.hero-progress { display: flex; align-items: center; gap: 20px; }
.progress-ring { width: 118px; height: 118px; border-radius: 50%; background: conic-gradient(var(--accent) 0%, var(--bg-soft) 0); display: grid; place-items: center; position: relative; }
.progress-ring .ring-center { width: 86px; height: 86px; border-radius: 50%; background: var(--card); display: grid; place-items: center; align-content: center; }
.ring-center strong { font-size: 22px; }
.ring-center small { color: var(--muted); font-size: 12px; }
.hero-principles p { margin: 2px 0; }

/* ---------- principle banner ---------- */
.principle-banner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 8px 0 30px; }
.pr-cell { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.pr-icon { font-size: 22px; }
.pr-cell b { display: block; }
.pr-cell small { color: var(--muted); }

/* ---------- progress strip ---------- */
.progress-strip { padding: 6px 0 30px; }
.progress-bar { height: 12px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #9b6dff); border-radius: 999px; transition: width .4s ease; }
.progress-note { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* ---------- sections ---------- */
.section { padding: 14px 0 34px; }
.section-title { font-size: 24px; font-weight: 800; }
.phase-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.phase-row { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--pc); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.phase-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); margin-top: 7px; flex: none; }
.phase-info h3 { font-size: 17px; }
.phase-goal { color: var(--pc); font-size: 13px; font-weight: 700; margin-left: 8px; }
.phase-info p { margin: 4px 0; }

/* ---------- day grid ---------- */
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.day-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 14px 12px; box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .2s ease; display: flex; flex-direction: column; gap: 2px; }
.day-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20,30,60,.12); }
.day-card.test { border-width: 2px; border-color: var(--pc); }
.day-card.stream .day-num::after { content: " ›"; color: var(--muted); }
.day-num { font-weight: 900; font-size: 13px; color: var(--pc); letter-spacing: .5px; }
.day-t { font-weight: 700; font-size: 14px; line-height: 1.35; min-height: 2.7em; }
.day-meta { font-size: 12px; color: var(--muted); }
.day-check { position: absolute; top: 12px; right: 12px; color: var(--muted); font-size: 15px; }
.day-card.done { border-color: var(--pc); }
.day-card.done .day-check { color: #23b887; }

/* ---------- method grid ---------- */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.method-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); position: relative; }
.method-n { position: absolute; top: 12px; right: 14px; font-size: 30px; font-weight: 900; color: var(--accent-soft); }
.method-card h3 { font-size: 16px; }
.method-card p { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- day page ---------- */
.day-nav { display: flex; justify-content: space-between; gap: 10px; padding: 20px 0 12px; }
.nav-arrow { padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-size: 13px; font-weight: 600; }
.nav-arrow:hover { border-color: var(--accent); text-decoration: none; }
.day-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 26px 0 14px; border-bottom: 3px solid var(--pc); margin-bottom: 18px; flex-wrap: wrap; }
.day-chap { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pc); }
.day-header h1 { font-size: clamp(22px, 3.4vw, 32px); font-weight: 900; }
.day-skill { color: var(--muted); }
.day-header-done { text-align: right; }
.test-banner { background: var(--accent-soft); color: var(--accent); border: 1px dashed var(--accent); border-radius: 12px; padding: 12px 16px; font-weight: 700; margin-bottom: 18px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card h3 { font-size: 17px; }
.card h2 { font-size: 20px; margin-top: 1.2em; }

/* audio card */
.audio-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.audio-icon { font-size: 30px; }
.audio-head h3 { margin: 0; }
.audio-head p { margin: 2px 0 0; font-size: 13px; }
.audio-card audio { margin-top: 6px; }
.stream-card { border-left: 4px solid #ff8c42; }
.stream-body h2 { font-size: 17px; }
.stream-body h3 { font-size: 15px; }
.stream-body ul, .stream-body ol { padding-left: 22px; }
.stream-body blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 14px; color: var(--muted); }

/* info grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.info-cell small { display: block; color: var(--muted); font-size: 12px; }
.info-cell b { font-size: 14px; word-break: break-all; }
.info-cell b a { word-break: break-all; }
.info-full { grid-column: 1 / -1; }

/* steps */
.steps-head { display: flex; justify-content: space-between; align-items: center; }
.steps-card h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.steps-card h3 { color: var(--accent); }
.steps-card ul, .steps-card ol { padding-left: 22px; }
.steps-card blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 14px; color: var(--muted); }
.steps-card hr { border: none; border-top: 1px dashed var(--border); margin: 20px 0; }

/* transcript */
.trans-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: 10px; }
.tab { border: none; background: transparent; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; }
.tab.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.trans-body { max-height: 520px; overflow-y: auto; margin-top: 12px; padding: 14px 16px; background: var(--bg-soft); border-radius: 12px; font-size: 15px; }
.t-line { margin: 0 0 8px; }
.t-speaker { display: inline-block; min-width: 96px; font-weight: 800; color: var(--accent); }
.t-narr { color: var(--muted); }

/* vocabulary */
.vocab-card h3 { color: var(--accent); }
.vocab-card h4 { margin-bottom: 2px; }
.vocab-card strong { font-weight: 700; }
.vocab-card hr { border: none; border-top: 1px dashed var(--border); margin: 18px 0; }
.vocab-card p { margin: 4px 0; }
.vocab-card em { color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 0 40px; text-align: center; }
.site-footer p { margin: 4px 0; }

/* responsive */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 34px; }
  .hero-progress { justify-content: center; }
  .day-header { flex-direction: column; }
  .day-header-done { text-align: left; }
  .audio-head { flex-wrap: wrap; }
}

/* ---------- step checkboxes ---------- */
.step-row { display: flex; align-items: center; gap: 10px; margin-top: 1.4em; }
.step-check { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border); background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer; line-height: 1; }
.step-check:hover { border-color: var(--accent); }
.step-check.on { background: #23b887; border-color: #23b887; color: #fff; }

/* ---------- score card ---------- */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.score-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.score-grid input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-size: 15px; }
.score-grid input:focus { outline: none; border-color: var(--accent); }
#toggleDone.is-done { color: #fff; }
