:root {
  --ink: #172033;
  --muted: #667085;
  --paper: #ffffff;
  --canvas: #f3f6fb;
  --line: #dfe6f0;
  --blue: #245bdb;
  --blue-dark: #173d9e;
  --blue-soft: #eaf0ff;
  --orange: #e66f1f;
  --orange-soft: #fff0e5;
  --green: #138a5b;
  --green-soft: #e8f7ef;
  --red: #c43b45;
  --red-soft: #fff0f1;
  --violet: #7147c8;
  --violet-soft: #f1eaff;
  --shadow: 0 16px 44px rgba(29, 50, 83, 0.09);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(36, 91, 219, 0.11), transparent 29rem),
    radial-gradient(circle at 100% 20%, rgba(230, 111, 31, 0.09), transparent 27rem),
    var(--canvas);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  padding: 30px 0 18px;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), #15357e);
  box-shadow: 0 8px 20px rgba(36, 91, 219, 0.24);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 32px;
  align-items: end;
  padding: 38px 0 34px;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(36, 91, 219, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.hero-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.hero-panel span {
  color: var(--muted);
  font-size: 14px;
}

.level-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tier-foundation {
  color: var(--green);
  background: var(--green-soft);
}

.tier-advanced {
  color: var(--blue);
  background: var(--blue-soft);
}

.tier-sprint {
  color: var(--orange);
  background: var(--orange-soft);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 20px;
}

.toolbar-note {
  color: var(--muted);
  font-size: 14px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--blue-dark));
  box-shadow: 0 9px 22px rgba(36, 91, 219, 0.21);
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(36, 91, 219, 0.26);
  text-decoration: none;
}

.button:active {
  transform: translateY(0);
}

.button-secondary {
  color: var(--blue-dark);
  background: var(--blue-soft);
  box-shadow: none;
}

.button-ghost {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.button-small {
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 11px;
  font-size: 14px;
}

.button:focus-visible,
.choice-option:focus-within,
.fill-input:focus,
select:focus {
  outline: 3px solid rgba(36, 91, 219, 0.24);
  outline-offset: 2px;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 60px;
}

.day-card {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(219, 227, 239, 0.9);
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 8px 28px rgba(29, 50, 83, 0.055);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.day-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(36, 91, 219, 0.08), rgba(230, 111, 31, 0.09));
}

.day-card:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 91, 219, 0.34);
  box-shadow: 0 14px 34px rgba(29, 50, 83, 0.11);
  text-decoration: none;
}

.day-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-label {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.day-card h2 {
  margin: 16px 0 7px;
  font-size: 21px;
  line-height: 1.35;
}

.day-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.day-card .level-legend {
  margin-top: auto;
  padding-top: 16px;
}

.page-header {
  padding: 28px 0 20px;
}

.page-banner {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(20, 49, 116, 0.96), rgba(36, 91, 219, 0.88)),
    var(--blue-dark);
  box-shadow: 0 20px 48px rgba(24, 60, 145, 0.24);
}

.page-banner::before,
.page-banner::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.page-banner::before {
  top: -90px;
  right: -50px;
  width: 260px;
  height: 260px;
}

.page-banner::after {
  right: 120px;
  bottom: -150px;
  width: 290px;
  height: 290px;
}

.banner-content {
  position: relative;
  z-index: 1;
}

.banner-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #dfe9ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.page-banner h1 {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.page-banner .date-line {
  margin: 10px 0 18px;
  color: #f3f7ff;
  font-size: 18px;
  font-weight: 700;
}

.banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.banner-meta .tier-chip {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
  padding-bottom: 26px;
}

.quiz-list {
  display: grid;
  gap: 16px;
}

.question-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(219, 227, 239, 0.95);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 32px rgba(29, 50, 83, 0.06);
}

.question-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--green);
}

.question-card[data-tier="进阶突破"]::before {
  background: var(--blue);
}

.question-card[data-tier="满分冲刺"]::before {
  background: var(--orange);
}

.question-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.question-number {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.question-head-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.grammar-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9px;
  color: #475467;
  background: #f3f5f9;
  font-size: 12px;
  font-weight: 700;
}

.sentence-prompt {
  margin: 0 0 8px;
  color: #111827;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.65;
}

.question-hint {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 13px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-option {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfe;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.choice-option:hover {
  transform: translateY(-1px);
  border-color: rgba(36, 91, 219, 0.35);
  background: #f8faff;
}

.choice-option:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.choice-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  accent-color: var(--blue);
}

.option-key {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue-dark);
  background: #e9eef9;
  font-size: 12px;
  font-weight: 900;
}

.option-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.fill-row {
  display: flex;
  align-items: stretch;
}

.fill-input {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fbfcfe;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.fill-input::placeholder {
  color: #9aa4b2;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 15px;
}

.sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
}

.side-card {
  padding: 20px;
  border: 1px solid rgba(219, 227, 239, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 26px rgba(29, 50, 83, 0.045);
}

.side-card h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.side-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.side-list strong {
  color: var(--ink);
}

.submit-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 8px 0 28px;
}

.submit-note {
  color: var(--muted);
  font-size: 13px;
}

.result-panel {
  margin-bottom: 28px;
  padding: 8px;
  border: 1px solid rgba(36, 91, 219, 0.2);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.result-panel[hidden] {
  display: none;
}

.result-frame {
  display: block;
  width: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 18px;
  background: #f8faff;
}

.page-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px 0 50px;
}

.page-nav .next {
  justify-self: end;
}

.page-nav .home {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.page-nav .disabled {
  visibility: hidden;
}

.answer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.answer-tools label {
  font-weight: 800;
}

select {
  min-height: 44px;
  padding: 8px 38px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}

.answer-day-title {
  margin: 24px 0 14px;
}

.answer-day-title h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.answer-day-title p {
  margin: 0;
  color: var(--muted);
}

.answer-list {
  display: grid;
  gap: 14px;
  padding-bottom: 60px;
}

.answer-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(29, 50, 83, 0.045);
}

.answer-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.answer-card-head strong {
  color: var(--blue);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.answer-card h3 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 19px;
  line-height: 1.65;
}

.answer-key {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 15px;
  font-weight: 900;
}

.analysis-block {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  color: #475467;
  background: #f7f9fc;
  font-size: 14px;
}

.analysis-block strong {
  color: var(--ink);
}

.embedded-shell {
  padding: 6px;
  background: #f8faff;
}

.embedded-shell[hidden],
#answerBook[hidden] {
  display: none;
}

body.embed-mode {
  background: #f8faff;
}

body.embed-mode .site-shell {
  width: 100%;
  margin: 0;
}

body.embed-mode .topbar,
body.embed-mode .page-header {
  display: none;
}

body.embed-mode main {
  padding: 0;
}

.embedded-shell .grade-header {
  padding: 18px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, #1b4cb7, #17386f);
}

.grade-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.grade-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.grade-score strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1;
}

.grade-score span {
  color: #dbe7ff;
}

.score-track {
  width: min(100%, 340px);
  height: 9px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.score-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #75e8ba, #f8ca66);
  transition: width 500ms ease;
}

.grade-summary {
  margin: 8px 0 0;
  color: #dbe7ff;
  font-size: 14px;
}

.result-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.result-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 15px;
  background: #fff;
}

.result-item.wrong {
  border-left-color: var(--red);
}

.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.result-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-badge {
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.wrong .status-badge {
  color: var(--red);
  background: var(--red-soft);
}

.result-item h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 18px;
  line-height: 1.6;
}

.answer-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: #475467;
  font-size: 14px;
}

.answer-compare strong {
  color: var(--ink);
}

.result-item .analysis-block {
  margin-bottom: 0;
}

.error-note {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 14px;
}

@media (max-width: 980px) {
  .days-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 24px, 720px);
  }

  .topbar {
    padding: 18px 0 10px;
  }

  .topbar-row {
    gap: 12px;
  }

  .brand {
    font-size: 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px 0;
  }

  .hero h1 {
    font-size: clamp(31px, 10vw, 44px);
  }

  .hero p {
    font-size: 15px;
  }

  .hero-panel {
    padding: 18px;
  }

  .days-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    padding-bottom: 28px;
  }

  .day-card {
    min-height: 190px;
    padding: 16px;
    border-radius: 17px;
  }

  .day-card h2 {
    margin-top: 13px;
    font-size: 17px;
  }

  .day-card p {
    font-size: 12px;
  }

  .day-card .tier-chip {
    min-height: 25px;
    padding: 2px 7px;
    font-size: 10px;
  }

  .page-header {
    padding: 18px 0 14px;
  }

  .page-banner {
    padding: 22px 20px;
    border-radius: 21px;
  }

  .page-banner h1 {
    font-size: clamp(26px, 8vw, 35px);
  }

  .page-banner .date-line {
    font-size: 16px;
  }

  .main-grid {
    display: block;
  }

  .sidebar {
    position: static;
    margin-bottom: 18px;
  }

  .sidebar .side-card:first-child {
    display: none;
  }

  .question-card {
    padding: 19px 17px 18px 20px;
    border-radius: 18px;
  }

  .question-head {
    align-items: flex-start;
  }

  .sentence-prompt {
    font-size: 19px;
    line-height: 1.58;
  }

  .choices {
    grid-template-columns: 1fr;
  }

  .choice-option {
    min-height: 52px;
  }

  .fill-input {
    min-height: 52px;
    font-size: 17px;
  }

  .submit-section {
    display: grid;
    grid-template-columns: 1fr;
  }

  .submit-section .button {
    width: 100%;
  }

  .submit-note {
    text-align: center;
  }

  .result-panel {
    padding: 4px;
    border-radius: 18px;
  }

  .result-frame {
    border-radius: 14px;
  }

  .page-nav {
    grid-template-columns: 1fr auto;
  }

  .page-nav .home {
    display: none;
  }

  .page-nav .button {
    min-height: 44px;
    padding: 8px 13px;
  }

  .page-nav .next {
    grid-column: 2;
  }

  .answer-tools {
    display: grid;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .answer-tools select {
    width: 100%;
  }

  .answer-card {
    padding: 18px 16px;
  }

  .answer-card h3,
  .result-item h3 {
    font-size: 17px;
  }

  .embedded-shell {
    padding: 0;
  }

  .embedded-shell .grade-header {
    padding: 16px;
  }

  .grade-score strong {
    font-size: 36px;
  }

  .result-item {
    padding: 16px 14px;
  }
}

@media (max-width: 390px) {
  .days-grid {
    grid-template-columns: 1fr;
  }

  .day-card {
    min-height: 170px;
  }

  .question-head-right {
    width: 100%;
  }

  .grammar-chip {
    max-width: 100%;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .sidebar,
  .submit-section,
  .page-nav,
  .result-panel,
  .answer-tools {
    display: none !important;
  }

  .site-shell {
    width: 100%;
  }

  .page-banner,
  .question-card,
  .answer-card {
    box-shadow: none;
  }
}
