:root {
  color: #35271f;
  background: #faf5ea;
  --ink: #35271f;
  --muted: #6b5849;
  --line: #e9dccb;
  --paper: #fffcf6;
  --accent: #84451e;
  --soft: #f8ead6;
  --edge: #e9cda7;
  --oat: #f1ddbd;
  --hero-ink: #99562e;
  --hero-wash: #efd9b599;
  --hero-base: #fff1db;
}
:root[data-site="cet6"] { --hero-ink: #496147; --hero-wash: #ced8b999; --hero-base: #f4efdd; }
:root[data-site="kaoyan"] { --hero-ink: #7a5044; --hero-wash: #e9c7b599; --hero-base: #fff0e3; }
body {
  min-height: 100vh;
  background: radial-gradient(ellipse at 85% 0%, #ffe8cba6, transparent 50%),
    radial-gradient(ellipse at 0% 68%, #eceddd80, transparent 42%);
}
.paper-status.is-sample {
  padding: 4px 9px;
  border: 1px solid #dfbf88;
  border-radius: 999px;
  background: #fff2d5;
  color: #74451f;
  font-size: 12px;
}
.bread-cursor-active,
.bread-cursor-active * { cursor: none !important; }
.bread-loaf {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  width: var(--loaf-width, 34px);
  height: calc(var(--loaf-width, 34px) * .56);
  pointer-events: none;
  border-bottom: 2px solid #9d5629;
  border-radius: 29%;
}
.bread-loaf[hidden] { display: none; }
.bread-loaf i {
  height: 72%;
  min-width: 0;
  border: 1px solid #a45d2e;
  border-left-width: .5px;
  border-radius: 55% 58% 29% 33%;
  background: linear-gradient(145deg, #ffe0a0 5%, #efad5a 47%, #c87b34 83%);
}
.bread-loaf i:first-child { height: 92%; position: relative; transform: scale(1.13); }
.bread-loaf i:first-child::before {
  content: "";
  position: absolute;
  top: 42%;
  left: 18%;
  width: 1.5px;
  height: 1.5px;
  background: #683923;
  border-radius: 50%;
  box-shadow: 2.8px 0 #683923;
}
.bread-loaf i:last-child { height: 61%; }
.bread-loaf::after {
  content: "";
  position: absolute;
  inset: auto 7% 10%;
  height: 16%;
  border-radius: 80% 35% 70% 45%;
  background: #fff4cf;
  box-shadow: 0 1px 1px #86462866;
}
.bread-cursor {
  position: fixed;
  z-index: 70;
  filter: drop-shadow(0 3px 5px #63441d53);
  transform-origin: 0 0;
  transform: translate(-2px, -4px) rotate(-16deg);
  transition: transform .14s ease-out;
}
.bread-cursor.is-pointing { transform: translate(-2px, -4px) rotate(-7deg) scale(1.13); }
.side-loaf { display: none; }
.bread-flash {
  position: fixed;
  z-index: 69;
  width: 88px;
  height: 88px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8dc 0 7%, #ffd784a8 21%, #ed9d455e 44%, transparent 68%);
  box-shadow: inset 0 0 0 2px #ffc46b70;
  animation: bread-flash-out .52s ease-out both;
}
@keyframes bread-flash-out {
  from { opacity: .96; transform: translate(-50%, -50%) scale(.23); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}
@media (min-width: 1280px) {
  body::before, body::after {
    content: "";
    position: fixed;
    top: 23vh;
    width: min(calc((100vw - 1184px) / 2 - 9px), 160px);
    height: 48vh;
    pointer-events: none;
    opacity: .53;
    background:
      radial-gradient(ellipse at 40% 45%, transparent 55%, #ce9b5b48 56% 57%, transparent 58%),
      radial-gradient(ellipse at 62% 38%, transparent 56%, #ce9b5b48 57% 58%, transparent 59%),
      radial-gradient(circle at 8% 62%, #cc98546e 0 2px, transparent 3px),
      radial-gradient(circle at 89% 24%, #cc985470 0 3px, transparent 4px);
  }
  body::before { left: 0; transform: rotate(-9deg); }
  body::after { right: 0; top: 33vh; transform: scaleX(-1) rotate(-9deg); }
  .side-loaf {
    --loaf-width: clamp(27px, calc((100vw - 1184px) * .22), 60px);
    --loaf-inset: clamp(6px, calc((100vw - 1184px) / 4 - 16px), 100px);
    display: grid;
    position: fixed;
    opacity: .7;
    filter: drop-shadow(0 5px 8px #ae732b36);
  }
  .side-loaf-left { top: 41vh; left: var(--loaf-inset); transform: rotate(-20deg); }
  .side-loaf-right { top: 61vh; right: var(--loaf-inset); transform: rotate(15deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bread-cursor { transition: none; }
  .bread-flash { display: none; }
}
:focus-visible { outline-color: #8b562c; }
.masthead {
  background: linear-gradient(105deg, #fffaf0, #fffdf8 56%, #fff6e8);
  border-bottom-color: #ead6bb;
  box-shadow: 0 2px 12px #6b431405;
}
.masthead-inner { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 72px; gap: 18px; }
.wordmark { justify-self: start; color: #3b2b23; letter-spacing: -.035em; }
.brand-stamp {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid #edcfaa;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff7e7, #f5dbb5);
  box-shadow: inset 0 1px #fffdfa, 0 2px 4px #8c572a12;
}
.bread-mark { display: inline-flex; align-items: center; padding: 0 1px 3px; border-bottom: 2px solid #cb8741; border-radius: 0 0 9px 9px; }
.bread-mark i { width: 10px; height: 9px; background: linear-gradient(150deg, #f6c77f, #d89142); border: 1px solid #cb8741; border-radius: 8px 8px 4px 4px; }
.bread-mark i + i { margin-inline-start: -1px; }
.home-nav {
  align-items: center;
  padding: 4px;
  border: 1px solid #ecddc8;
  border-radius: 12px;
  background: #f5ebdd;
}
.home-nav a { color: #694935; line-height: 1.3; }
.home-nav #nav-trial { background: #fffaf0; box-shadow: 0 1px 3px #8c572a15; color: var(--accent); }
.home-nav #nav-trial:hover { background: #ffefd9; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 420px;
  margin: 22px 0 26px;
  border: 1px solid #e5caab;
  border-radius: 27px;
  background:
    radial-gradient(ellipse at 0% 95%, var(--hero-wash), transparent 63%),
    radial-gradient(ellipse at 60% 0%, #fffdf6, transparent 68%),
    var(--hero-base);
  box-shadow: 0 16px 28px -17px #764d264d, inset 0 1px 0 #fffdfa;
  overflow: hidden;
}
.hero-copy { display: flex; flex-direction: column; align-items: start; justify-content: center; padding: 30px clamp(24px, 4.2vw, 55px); }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #785032;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .13em;
}
.hero-kicker::before { content: ""; width: 23px; height: 1px; background: #b57848; }
.hero h1 {
  font-family: "Noto Serif CJK SC", "Songti SC", STSong, SimSun, serif;
  font-size: clamp(39px, 4.7vw, 64px);
  font-weight: 800;
  line-height: 1.11;
  letter-spacing: -.065em;
  margin: 12px 0 10px;
}
.hero h1 span { color: var(--hero-ink); }
.hero-description { color: #6d503d; font-size: 15px; }
.track-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.track-picker a {
  padding: 5px 13px;
  border: 1px solid #e5caa8;
  border-radius: 7px;
  background: #fffbf3;
  font-size: 14px;
  font-weight: 720;
}
.track-picker a[aria-current], .track-picker a:hover { color: #fffaf0; background: #875031; border-color: #875031; }
.track-picker:not([hidden]) + .hero-trial { margin-top: 11px; }
.hero-trial {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid #e6c9a4;
  border-radius: 15px;
  background: #fffbf3;
  box-shadow: 0 4px 0 #ead5b9, 0 9px 19px #77512e12;
}
.hero-trial-head { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 9px; }
.hero-trial-head strong { color: #4e3425; font-size: 15px; font-variant-numeric: tabular-nums; }
.hero-trial-label { padding: 2px 8px; border-radius: 5px; background: #875031; color: #fff7e7; font-size: 12px; font-weight: 750; }
.hero-trial-links { gap: 7px; }
.hero-trial-links .paper-part { min-height: 41px; border-radius: 8px; box-shadow: inset 0 1px #ffffff9e; }
.hero-archive { display: inline-flex; align-items: center; gap: 8px; margin-top: 13px; padding-block: 4px; font-size: 14px; font-weight: 740; }
.hero-archive::after { content: "↓"; font-size: 16px; }
.hero-archive:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-image {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  margin: 12px 12px 12px 0;
  border: 1px solid #b68354;
  border-radius: 18px;
  background: #e5bc83;
  box-shadow: 0 3px 9px #70431a30;
}
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.hero-corner { position: absolute; inset: 9px; border: 1px solid #fff8e0a6; border-radius: 11px; pointer-events: none; }
.course-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.course-heading h2 { font-size: 26px; letter-spacing: -.03em; }
.course-heading span, .home-foot { font-size: 13px; color: var(--muted); }
#sections { scroll-margin-top: 13px; }
.year-picker { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 7px; padding: 7px; background: #f2e5d1; border: 1px solid #ecddc3; border-radius: 13px; }
.year-link { display: grid; place-items: center; min-height: 41px; background: #fffbf1; border: 1px solid #e9dbc6; border-radius: 8px; color: var(--muted); font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.year-link:hover { color: var(--accent); border-color: var(--accent); }
.year-link[aria-current] { color: #fff9f0; background: var(--accent); border-color: var(--accent); }
.session-group { margin-top: 17px; }
.session-title { color: var(--muted); font-size: 14px; margin: 0 0 7px 1px; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.course-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  padding: 13px 15px 15px;
  color: var(--ink);
  background: linear-gradient(140deg, #fffdf7, #f9eedb);
  border: 1px solid #e7d4b5;
  border-radius: 15px;
  box-shadow: 0 5px 12px #67471e0b;
}
.course-card .course-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 10px; }
.course-top h4 { font-size: 21px; letter-spacing: -.025em; margin: 0; }
.paper-status { font-weight: 700; color: var(--muted); font-size: 11px; }
.paper-parts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
.paper-part { display: grid; place-items: center; min-height: 37px; border: 1px solid var(--edge); background: #fffaf0; border-radius: 8px; font-size: 14px; font-weight: 715; }
.paper-part[data-part="listening"] { color: #825027; background: #ffe9c8; border-color: #edce9e; }
.paper-part[data-part="reading"] { color: #486148; background: #e7eddc; border-color: #cbd9c3; }
.paper-part[data-part="writing"] { color: #80495a; background: #f9e6e5; border-color: #eaccca; }
.paper-part[data-part="translation"] { color: #645077; background: #f0e8f5; border-color: #dfd0e6; }
.paper-part[data-part="cloze"] { color: #7b4c24; background: #fbecd2; border-color: #ead2af; }
.paper-part[data-part="new-type"] { color: #395f6a; background: #e4eff0; border-color: #cddde2; }
.paper-part:hover { border-color: currentColor; }
[data-site="kaoyan"] .paper-parts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
[data-site="kaoyan"] .course-grid { grid-template-columns: minmax(0, 520px); }
:is([data-site="cet6"], [data-site="kaoyan"]) .year-picker { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
:is([data-site="cet6"], [data-site="kaoyan"]) .year-link { min-width: 76px; }
.home-foot { padding: 19px 0 26px; text-align: center; }
.workspace-heading h1 { letter-spacing: -.045em; }
.practice-notes {
  min-width: 0;
  scroll-margin-top: 15px;
  background: linear-gradient(145deg, #fffcf4, #f9edda);
  border: 1px solid #e7d4b6;
  border-radius: 15px;
  padding: 13px;
  box-shadow: 0 7px 16px #744d2010;
}
.notes-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 7px;
  margin: 0 1px 10px;
}
.notes-heading h2 { color: #493122; font-size: 17px; }
.notes-heading p { color: var(--muted); font-size: 12px; }
.practice-notes textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  height: 224px;
  padding: 6px 9px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid #ebd7b8;
  border-radius: 8px;
  background: repeating-linear-gradient(#fffdf5 0 27px, #efe2cc 27px 28px) 0 6px / 100% 28px local;
  font-family: inherit;
  font-size: 15px;
  line-height: 28px;
}
.practice-notes textarea::placeholder { color: #79604b; }
.notes-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 9px; }
.notes-actions span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.notes-actions .primary { flex: 0 0 auto; }
.notes-jump { justify-self: end; }
@media (min-width: 691px) and (max-width: 1079px) {
  .practice-notes { grid-column: 2; }
}
@media (min-width: 1080px) {
  .practice { grid-template-columns: minmax(0, .92fr) minmax(0, 1.16fr) minmax(198px, .55fr); gap: 15px; }
  .practice-notes { position: sticky; top: 15px; }
  .notes-jump { display: none; }
}
.player {
  background: linear-gradient(133deg, #53371f, #704b30 64%, #855835);
  box-shadow: 0 9px 20px #613f2a24;
}
.player-steam { position: absolute; z-index: -1; pointer-events: none; top: -7px; right: 12px; width: 100px; height: 74px; background: repeating-radial-gradient(ellipse at 90% 0%, transparent 0 15px, #fff4d040 16px 17px, transparent 18px 25px); opacity: .55; }
#segment-paper, #segment-meta, .time { color: #ffebcf; }
.player :focus-visible { outline-color: #ffeed4; }
.play { background: #fff0d9; color: #533720; border-color: #fff0d9; }
.play:hover { background: #ffe0af; }
.player-secondary, .speed, .transcript-toggle { color: #fff5e7; background: #ffe5bd27; border-color: #ffe5bd67; }
.player-secondary:hover, .speed:hover, .transcript-toggle:hover { background: #ffe5bd45; }
.transcript-toggle[aria-expanded="true"] { background: #fff0d9; color: #533720; }
.speed option { background: #67462f; }
.waveform span { background: #f1c69360; }
.waveform span.is-past { background: #ffe3b4; }
#papers, .segment, .option { background: #fffaf2; }
.segment[aria-current] { background: #f4e3c7; }
.segment { min-width: 132px; }
.option:hover, .option.is-selected { background: var(--soft); }
#listening-jump { display: flex; flex-wrap: wrap; gap: 9px 16px; padding: 9px 15px 12px; border-top: 1px solid var(--line); }
.listening-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.listening-group-label { color: var(--muted); font-size: 12px; font-weight: 710; margin-inline-end: 3px; }
.listening-number { min-width: 28px; min-height: 29px; padding: 1px 4px; border: 1px solid var(--line); border-radius: 6px; background: #fffaf2; color: var(--ink); font-size: 12px; font-weight: 710; }
.listening-number:hover { border-color: var(--accent); }
.listening-number.is-current { color: var(--accent); border-color: var(--edge); background: var(--soft); }
.listening-number.is-done { box-shadow: inset 0 -2px #73916f; }
.play-question { display: none; }
.shared-notice { color: var(--muted); font-size: 13px; margin: -7px 0 13px; }
.transcript-lines.has-letters { list-style-type: upper-alpha; }
.passage-instructions { color: var(--muted); padding: 10px 15px 0; font-size: 13px; }
.passage-instructions, .response-prompt { white-space: pre-line; }
.translation-target { padding-inline: 2px; color: var(--ink); background: #f6e2bc; border-radius: 3px; }
.prompt-charts { display: grid; gap: 13px; overflow: auto; padding: 0 15px 15px; }
.prompt-chart { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.prompt-chart caption { font-weight: 750; text-align: start; margin: 0 0 6px; }
.prompt-chart th, .prompt-chart td { border: 1px solid var(--line); padding: 5px 7px; text-align: start; }
.prompt-chart thead th { background: var(--soft); }
.prompt-chart td[style] {
  background: linear-gradient(to right, #ead8bc var(--share), transparent var(--share));
  font-weight: 700;
}
.transcript-lines.response-prompt { list-style: none; padding: 8px 15px; }
.word-bank { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px; border-top: 1px solid var(--line); }
.word-bank span { background: var(--soft); color: var(--ink); padding: 3px 6px; border-radius: 6px; font-size: 12px; }
.choice-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(120px, 100%), 1fr));
  gap: 6px;
}
.choice-grid .option {
  min-height: 41px;
  gap: 5px;
  padding: 4px 6px;
  font-size: 13px;
}
.choice-grid .option-letter { width: 21px; height: 23px; font-size: 12px; }
.choice-grid-letters { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); }
.choice-grid-letters .option { justify-content: center; }
.choice-grid-letters .option-letter { border-color: transparent; }
.answer-line { font-weight: 760; }
.answer-strip {
  margin: 0 0 12px;
  padding: 14px 15px;
  scroll-margin-top: 16px;
  border: 1px solid #d2dfca;
  border-radius: 13px;
  background: #f4f8ef;
  color: #355339;
}
.answer-strip h3 { margin: 0 0 7px; font-size: 16px; }
.answer-strip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.answer-strip-list li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #e6efdf;
  font-size: 13px;
}
.answer-strip-list strong { font-variant-numeric: tabular-nums; }
.response-card textarea { display: block; width: 100%; min-height: 200px; resize: vertical; border: 1px solid var(--edge); background: #fffdf8; color: var(--ink); border-radius: 9px; padding: 11px 12px; font-size: 16px; line-height: 1.7; }
.response-card summary { margin-top: 6px; }
.sample-body { font-family: Georgia, serif; font-size: 16px; }
body[data-mode="choice"] .transcript-lines, body[data-mode="matching"] .transcript-lines, body[data-mode="cloze"] .transcript-lines { max-height: clamp(170px, calc(100dvh - 230px), 570px); }
body[data-mode="choice"] .transcript-lines li, body[data-mode="matching"] .transcript-lines li, body[data-mode="cloze"] .transcript-lines li { font: 17px/1.65 Georgia, serif; }
.crumb { position: fixed; width: 7px; height: 6px; top: var(--y); left: var(--x); border-radius: 60% 40% 48% 52%; background: var(--bake); pointer-events: none; z-index: 12; will-change: transform; animation: crumb-fall .64s ease-out forwards; }
@keyframes crumb-fall {
  from { transform: translate(0, 0) rotate(0); opacity: .9; }
  to { transform: translate(var(--dx), var(--dy)) rotate(138deg) scale(.43); opacity: 0; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-image img { transform: scale(1.045) translate(var(--drift-x, 0), var(--drift-y, 0)); transition: transform .28s ease-out; }
  .course-card { transform: perspective(700px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .18s ease-out, box-shadow .18s ease; }
  .course-card:hover { box-shadow: 0 9px 17px #744d2024; }
  .paper-part:hover { transform: translateY(-2px); }
  .paper-part, .year-link { transition: transform .17s ease, border-color .17s ease, background-color .17s ease; }
}
@media (prefers-reduced-motion: reduce) { .crumb { display: none; } }
@media (max-width: 900px) {
  .year-picker { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .masthead-inner { grid-template-columns: auto 1fr; min-height: 0; gap: 5px 9px; padding-block: 8px; }
  .masthead-nav { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
  .masthead-inner .account-nav { grid-row: 1; grid-column: 2; }
}
@media (max-width: 690px) {
  .masthead-nav { gap: 1px; }
  .masthead-nav a { padding: 7px 9px; font-size: 12px; }
  .brand-stamp { width: 33px; border-radius: 9px; }
  .bread-mark { transform: scale(.78); }
  .hero { min-height: 0; grid-template-columns: 1fr; margin: 14px 0 19px; border-radius: 17px; }
  .hero-copy { padding: 16px 16px 12px; }
  .hero h1 { font-size: clamp(32px, 9vw, 48px); margin: 9px 0 7px; }
  .hero-description { font-size: 14px; }
  .hero-trial { margin-top: 14px; padding: 9px; }
  .hero-trial-links { gap: 5px; }
  .hero-archive { margin-top: 9px; }
  .hero-image { grid-row: 1; min-height: clamp(155px, 39vw, 235px); margin: 8px 8px 0; border-radius: 11px; }
  .hero-image img { object-position: center 51%; }
  .hero-corner { inset: 5px; border-radius: 7px; }
  .course-heading { margin-top: 16px; }
  .course-heading h2 { font-size: 21px; }
  .course-heading span { font-size: 11px; }
  .course-grid { grid-template-columns: 1fr; gap: 7px; }
  .course-card { padding: 9px 11px 11px; }
  .course-card .course-top { margin-bottom: 6px; }
  .course-top h4 { font-size: 17px; }
  .paper-part { min-height: 42px; }
  .year-link { min-height: 44px; }
  .library-head h2 { white-space: nowrap; }
  #rail-help { display: none; }
  #papers { min-width: 0; }
  .segment { min-width: 123px; }
  #listening-jump { padding: 8px; gap: 5px 10px; }
  .listening-group-label { width: 100%; }
  .listening-number { min-width: 29px; min-height: 35px; }
  .play-question { display: inline-block; margin-inline-start: 23px; }
  body[data-mode="choice"] .transcript-lines, body[data-mode="matching"] .transcript-lines, body[data-mode="cloze"] .transcript-lines { max-height: 48dvh; }
}

/* Warm paper surfaces and clearer hierarchy for the practice editions. */
:root {
  --study-surface: #fffcf5;
  --study-border: #e5d2b8;
  --study-shadow: 0 18px 38px -28px #583a25a0;
  --study-highlight: #fbefdb;
}

:root[data-site="cet6"] {
  --study-surface: #fcfcf3;
  --study-border: #d9dac0;
  --study-shadow: 0 18px 38px -28px #3d513085;
  --study-highlight: #edf0de;
}

body {
  background: radial-gradient(ellipse at 9% 4%, #fffdf6 0, transparent 38rem),
    linear-gradient(160deg, #fbf4e7, #f7f0e3 66%, #efe4d2);
}

:root[data-site="cet6"] body {
  background: radial-gradient(ellipse at 9% 4%, #fffdf5 0, transparent 38rem),
    linear-gradient(160deg, #f8f5e7, #f1f0e1 66%, #ebe9d5);
}

.masthead { box-shadow: 0 5px 20px #6b43100c; }
.wordmark { gap: 11px; }
.masthead-inner .account-nav a { min-height: 37px; display: inline-flex; align-items: center; }
.masthead-inner .account-nav #account-link {
  padding-inline: 13px;
  border: 1px solid var(--study-border);
  border-radius: 9px;
  background-color: #fffdf7;
  box-shadow: 0 2px 6px #5f3e2310;
}

.hero {
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  border-color: var(--study-border);
  box-shadow: var(--study-shadow), inset 0 0 0 5px #fffaf268;
}
.hero-copy { position: relative; isolation: isolate; }
.hero-copy::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0 auto;
  width: min(48%, 255px);
  height: 66%;
  background: repeating-radial-gradient(ellipse at 100% 100%, #a176500f 0 1px, transparent 1px 10px);
  mask-image: linear-gradient(140deg, transparent 28%, #000);
  pointer-events: none;
}
.hero-image {
  margin: 15px 15px 15px 0;
  border-color: #b08e68;
  box-shadow: 0 15px 25px -19px #70431aa0, 0 0 0 4px #fff8e696;
}
.hero-corner { inset: 9px; border-color: #fff1cdbb; outline: 1px solid #603e2a25; }
.hero-trial {
  border-color: var(--study-border);
  background: linear-gradient(145deg, #fffdf7e8, #fff4e2c4);
  box-shadow: inset 0 1px #fff, 0 8px 18px -16px #714728ad;
}
.hero-archive {
  min-height: 40px;
  padding: 8px 13px;
  color: #583c2b;
  border: 1px solid var(--study-border);
  border-radius: 9px;
  background: #fffaf2;
  box-shadow: 0 2px 5px #68482511;
}
.hero-archive::after { content: none; }
.hero-archive:hover { background: #fff; text-decoration: none; border-color: var(--accent); }

#sections {
  padding: clamp(14px, 2.1vw, 26px);
  border: 1px solid var(--study-border);
  border-radius: 21px;
  background: var(--study-surface);
  box-shadow: var(--study-shadow);
}
.course-heading { align-items: center; flex-wrap: wrap; margin: 0 0 15px; }
.course-heading h2 { color: #3e3026; }
#home-coverage:not(:empty) {
  padding: 4px 10px;
  border: 1px solid var(--study-border);
  border-radius: 7px;
  color: #574a3c;
  background: var(--study-highlight);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
#sections .year-picker {
  display: grid;
  width: auto;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  padding: 6px;
  background: var(--study-highlight);
  border-color: var(--study-border);
}
#sections .year-link { min-width: 0; border-radius: 7px; box-shadow: inset 0 1px #fff8; }
#sections .year-link[aria-current] { box-shadow: 0 3px 8px #52352430, inset 0 1px #fff3; }
.session-group { margin-top: clamp(17px, 2.6vw, 26px); }
.session-title { display: flex; align-items: center; gap: 10px; color: #684d36; font-weight: 780; }
.session-title::after { content: ""; flex: 1; height: 1px; background: var(--study-border); }
#paper-gallery .course-card {
  padding: clamp(11px, 1.6vw, 17px);
  border-color: var(--study-border);
  background: linear-gradient(155deg, #fffefa 16%, var(--study-highlight));
  box-shadow: inset 0 1px #fff, 0 6px 16px -13px #4e332b86;
}
#paper-gallery .course-top { min-height: 31px; padding-bottom: 8px; border-bottom: 1px dashed var(--study-border); }

.paper-part { gap: 5px; grid-auto-flow: column; justify-content: center; min-height: 42px; box-shadow: inset 0 1px #fff8; }
.paper-part::before { content: ""; display: block; width: 13px; height: 12px; opacity: .8; }
.paper-part[data-part="writing"]::before {
  width: 10px;
  height: 12px;
  border: 1.4px solid currentColor;
  border-radius: 2px;
  background: linear-gradient(currentColor, currentColor) 2px 3px / 4px 1px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 6px / 3px 1px no-repeat;
}
.paper-part[data-part="listening"]::before {
  background: linear-gradient(currentColor, currentColor) 0 55% / 2px 5px no-repeat,
    linear-gradient(currentColor, currentColor) 33% 50% / 2px 9px no-repeat,
    linear-gradient(currentColor, currentColor) 66% 50% / 2px 12px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 50% / 2px 7px no-repeat;
}
.paper-part[data-part="reading"]::before {
  border: 1.4px solid currentColor;
  border-radius: 2px 2px 3px 3px;
  background: linear-gradient(currentColor, currentColor) 50% / 1px 100% no-repeat;
}
.paper-part[data-part="translation"]::before {
  background: linear-gradient(currentColor, currentColor) 0 37% / 10px 1px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 68% / 10px 1px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 32% / 1px 5px no-repeat,
    linear-gradient(currentColor, currentColor) 11px 76% / 1px 5px no-repeat;
}
.paper-part:not([data-part="writing"], [data-part="listening"], [data-part="reading"], [data-part="translation"])::before { display: none; }
.home-foot { padding-block: 18px 28px; }

.workspace-heading {
  padding: 14px clamp(13px, 2.5vw, 23px);
  border: 1px solid var(--study-border);
  border-radius: 17px;
  background: linear-gradient(133deg, var(--study-surface) 47%, var(--study-highlight));
  box-shadow: var(--study-shadow);
}
.paper-meter progress { height: 8px; }
.library, .transcript, .question, .review-bar { border-color: var(--study-border); }
.library, .transcript, .question, .practice-notes { box-shadow: 0 8px 16px -14px #5b402a83; }
.library-head, .transcript-head { background: var(--study-surface); }
.library-head { border-radius: 15px 15px 0 0; }
.segment[aria-current="true"] { box-shadow: inset 3px 0 var(--accent), 0 2px 6px #5e3a2017; }
.player { outline: 1px solid #79452233; outline-offset: 2px; }
.questions-head { padding: 9px 1px; border-bottom: 1px solid var(--study-border); }
.answer-count { border: 1px solid var(--study-border); font-variant-numeric: tabular-nums; }
.question { background: linear-gradient(115deg, #fffef9, var(--study-surface)); }
.question-number {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 28px;
  padding-inline: 3px;
  background: var(--study-highlight);
  border: 1px solid var(--study-border);
  border-radius: 7px;
}
.analysis-body { border: 1px solid var(--study-border); }
.analysis[open] > summary { color: var(--accent); }
.sample-body p { line-height: 1.75; }
.review-bar { box-shadow: 0 10px 24px #61422d24; }
.account-page .account-card { border-color: var(--study-border); box-shadow: var(--study-shadow); }

@media (max-width: 900px) {
  #sections .year-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #paper-gallery .course-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 212px), 1fr)); }
  .paper-part::before { display: none; }
}
@media (max-width: 690px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image { margin: 8px 8px 0; }
  .hero-copy { padding: 16px 15px 15px; }
  .hero-archive { min-height: 44px; }
  #sections { border-radius: 16px; }
  #paper-gallery .course-grid { grid-template-columns: 1fr; }
  .paper-part::before { display: block; }
  .workspace-heading { align-items: center; }
}
@media (max-width: 420px) {
  .masthead-inner .account-nav { gap: 1px; }
  .masthead-inner .account-nav a { padding-inline: 6px; }
  .paper-part { gap: 3px; }
  .paper-part::before { display: none; }
}
@media (prefers-contrast: more) {
  :root, :root[data-site="cet6"] { --study-border: #8d795f; }
}

/* The cover and the catalog share the feel of a bound recipe notebook. */
:root:is([data-site="cet4"], [data-site="cet6"]) {
  --cover-accent: #8c4e31;
  --cover-ink: #563722;
  --cover-paper: #f9eddb;
  --cover-rule: #d9b890;
}
:root[data-site="cet6"] {
  --cover-accent: #4f6241;
  --cover-ink: #37442c;
  --cover-paper: #edf0df;
  --cover-rule: #c3c8a8;
}

.cover-index {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  width: min(100%, 340px);
  margin: 16px 0 0;
  padding: 0;
  border: 1px solid var(--study-border);
  border-inline-start: 4px solid var(--cover-accent);
  border-radius: 6px 11px 11px 6px;
  background: linear-gradient(135deg, #fffdf7 8%, var(--cover-paper));
  box-shadow: 0 5px 13px -10px #53381f90;
}
.cover-index div { padding: 8px 12px; min-width: 0; }
.cover-index div + div { border-inline-start: 1px dashed var(--cover-rule); }
.cover-index dt { color: #625247; font-size: 12px; line-height: 1.55; }
.cover-index dd {
  margin: 2px 0 0;
  color: var(--cover-ink);
  font: 700 clamp(17px, 2vw, 25px)/1.15 Georgia, "Microsoft YaHei", serif;
  letter-spacing: .015em;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.cover-index[hidden], .cover-index div[hidden] { display: none; }

html:is([data-site="cet4"], [data-site="cet6"]) .hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 46px #59402324;
}
html:is([data-site="cet4"], [data-site="cet6"]) .hero-corner { z-index: 1; }
html:is([data-site="cet4"], [data-site="cet6"]) .hero-archive {
  color: #fffaf0;
  background: var(--cover-accent);
  border-color: var(--cover-accent);
  box-shadow: inset 0 1px #ffffff2c, 0 4px 10px #51351f28;
}
html:is([data-site="cet4"], [data-site="cet6"]) .hero-archive:hover { filter: brightness(1.09); }

html:is([data-site="cet4"], [data-site="cet6"]) #sections {
  border-block-start: 5px solid var(--cover-accent);
  background: linear-gradient(180deg, var(--cover-paper), var(--study-surface) 130px);
}
html:is([data-site="cet4"], [data-site="cet6"]) .session-title {
  padding: 0 0 0 8px;
  border-inline-start: 3px solid var(--cover-accent);
  color: var(--cover-ink);
}
html:is([data-site="cet4"], [data-site="cet6"]) #paper-gallery .course-card:has(.is-sample) {
  border-color: var(--cover-rule);
  box-shadow: inset 0 2px var(--cover-rule), 0 7px 16px -13px #4e332b86;
}
html:is([data-site="cet4"], [data-site="cet6"]) .segment[aria-current="true"] {
  border-color: var(--cover-accent);
  box-shadow: inset 3px 0 var(--cover-accent), 0 2px 6px #5e3a2017;
}
html:is([data-site="cet4"], [data-site="cet6"]) .analysis[open] > .analysis-body {
  border-inline-start: 3px solid var(--cover-accent);
  background: linear-gradient(140deg, var(--study-surface), var(--cover-paper));
}
html:is([data-site="cet4"], [data-site="cet6"]) .review-bar .primary:disabled {
  color: #6d6054;
  border-color: var(--study-border);
  background: var(--study-highlight);
  box-shadow: none;
  filter: none;
  transition: none;
}

@media (max-width: 690px) {
  .cover-index { margin-top: 11px; }
  .cover-index div { padding: 7px 11px; }
}
@media (max-width: 365px) {
  html:is([data-site="cet4"], [data-site="cet6"]) .masthead-inner { grid-template-columns: minmax(0, 1fr); }
  html:is([data-site="cet4"], [data-site="cet6"]) .masthead-inner .account-nav {
    grid-row: 2;
    grid-column: 1;
    justify-self: start;
    margin-inline-start: 0;
  }
  html:is([data-site="cet4"], [data-site="cet6"]) .masthead-inner .masthead-nav { grid-row: 3; }
}
