:root {
  color-scheme: light;
  --bg: #f4efe5;
  --bg-deep: #ebe2d3;
  --surface: #fffdf8;
  --surface-raised: #ffffff;
  --surface-soft: #eee7da;
  --ink: #19352d;
  --ink-strong: #102720;
  --muted: #56655f;
  --muted-strong: #485a54;
  --line: #d8d0c2;
  --line-strong: #bcb3a5;
  --terracotta: #c1492e;
  --terracotta-dark: #a93c24;
  --terracotta-soft: #f5d9cf;
  --sun: #edbe52;
  --sage: #6d8b74;
  --sage-dark: #41634c;
  --sage-soft: #dce8dc;
  --blue-soft: #dbe7e8;
  --focus: #1d4ed8;
  --on-terracotta: #ffffff;
  --shadow-sm: 0 2px 10px rgb(27 45 38 / 7%);
  --shadow-md: 0 14px 35px rgb(27 45 38 / 11%);
  --shadow-lg: 0 28px 70px rgb(27 45 38 / 16%);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shell: 1180px;
  --header-height: 76px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13251f;
  --bg-deep: #0d1c17;
  --surface: #1b3029;
  --surface-raised: #213931;
  --surface-soft: #263c35;
  --ink: #f4efe5;
  --ink-strong: #fffaf1;
  --muted: #aab9b3;
  --muted-strong: #cad4d0;
  --line: #395049;
  --line-strong: #526a62;
  --terracotta: #ee795b;
  --terracotta-dark: #ff9a80;
  --terracotta-soft: #57372f;
  --sun: #f3ca68;
  --sage: #8eae96;
  --sage-dark: #bbd3c0;
  --sage-soft: #294a37;
  --blue-soft: #294348;
  --focus: #f5cf67;
  --on-terracotta: #102720;
  --shadow-sm: 0 2px 10px rgb(0 0 0 / 18%);
  --shadow-md: 0 14px 35px rgb(0 0 0 / 24%);
  --shadow-lg: 0 28px 70px rgb(0 0 0 / 32%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #13251f;
    --bg-deep: #0d1c17;
    --surface: #1b3029;
    --surface-raised: #213931;
    --surface-soft: #263c35;
    --ink: #f4efe5;
    --ink-strong: #fffaf1;
    --muted: #aab9b3;
    --muted-strong: #cad4d0;
    --line: #395049;
    --line-strong: #526a62;
    --terracotta: #ee795b;
    --terracotta-dark: #ff9a80;
    --terracotta-soft: #57372f;
    --sun: #f3ca68;
    --sage: #8eae96;
    --sage-dark: #bbd3c0;
    --sage-soft: #294a37;
    --blue-soft: #294348;
    --focus: #f5cf67;
    --on-terracotta: #102720;
    --shadow-sm: 0 2px 10px rgb(0 0 0 / 18%);
    --shadow-md: 0 14px 35px rgb(0 0 0 / 24%);
    --shadow-lg: 0 28px 70px rgb(0 0 0 / 32%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink-strong);
  color: var(--surface);
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 34px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--ink-strong);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  gap: 3px;
  align-items: end;
  width: 35px;
  height: 39px;
  padding: 8px 7px 5px;
  border: 2px solid currentColor;
  border-radius: 17px 17px 4px 4px;
}

.brand__mark span {
  display: block;
  height: 17px;
  border-radius: 3px 3px 0 0;
  background: var(--terracotta);
}

.brand__mark span:nth-child(2) {
  height: 21px;
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line);
}

.brand__mark span:nth-child(3) {
  height: 14px;
  background: var(--sage);
}

.brand__copy {
  display: flex;
  line-height: 1;
}

.brand__copy strong {
  font-family: var(--serif);
  font-size: 1.26rem;
  letter-spacing: -.025em;
}

.brand__copy small {
  align-self: flex-end;
  margin: 0 0 1px 5px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.desktop-nav a {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  padding: 0 16px;
  color: var(--muted-strong);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.desktop-nav a::after {
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--terracotta);
  content: "";
  opacity: 0;
  transform: scaleX(.5);
  transition: opacity 160ms ease, transform 160ms ease;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--ink-strong);
}

.desktop-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.topbar__actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.icon-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.saved-button[aria-current="page"] {
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
}

.saved-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid var(--bg);
  border-radius: var(--radius-pill);
  background: var(--terracotta);
  color: var(--on-terracotta);
  font-size: .62rem;
  font-weight: 800;
}

.theme-icon--dark,
:root[data-theme="dark"] .theme-icon--light {
  display: none;
}

:root[data-theme="dark"] .theme-icon--dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon--light { display: none; }
  :root:not([data-theme="light"]) .theme-icon--dark { display: block; }
}

.loading-screen {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  place-content: center;
  justify-items: center;
  color: var(--muted-strong);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.loading-arch {
  width: 48px;
  height: 58px;
  border: 5px solid var(--terracotta);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  animation: breathe 1.2s ease-in-out infinite;
}

@keyframes breathe {
  50% { opacity: .4; transform: scale(.92); }
}

.view {
  min-height: calc(100vh - var(--header-height));
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}

.hero::before {
  position: absolute;
  top: -260px;
  left: -190px;
  width: 560px;
  height: 560px;
  border: 1px solid color-mix(in srgb, var(--terracotta) 16%, transparent);
  border-radius: 50%;
  content: "";
}

.hero__texture {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: .14;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 50%);
  mask-image: linear-gradient(90deg, #000, transparent 50%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr);
  gap: clamp(50px, 8vw, 110px);
  align-items: center;
  min-height: 590px;
  padding-block: 70px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--terracotta-dark);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--terracotta) 16%, transparent);
}

.hero h1,
.page-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6.5vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -.06em;
  line-height: .94;
}

.hero h1 em {
  color: var(--terracotta);
  font-weight: inherit;
}

.hero__lede {
  max-width: 590px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 31px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: .89rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button svg,
.text-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button--primary {
  background: var(--terracotta);
  color: var(--on-terracotta);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--terracotta) 28%, transparent);
}

.button--primary:hover {
  background: var(--terracotta-dark);
}

.button--ghost,
.button--outline {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface) 54%, transparent);
  color: var(--ink-strong);
}

.button--ghost:hover,
.button--outline:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.button--dark {
  background: var(--ink-strong);
  color: var(--surface);
}

.button--dark:hover {
  box-shadow: var(--shadow-md);
}

.button--small {
  min-height: 42px;
  padding: 9px 14px;
  font-size: .8rem;
}

.button--success {
  background: var(--sage-dark);
  color: var(--surface);
}

.button--danger-soft {
  border-color: var(--terracotta-soft);
  background: var(--terracotta-soft);
  color: var(--terracotta-dark);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
}

.hero__facts span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.hero__facts span + span::before {
  width: 3px;
  height: 3px;
  margin-right: 15px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

.hero__facts strong {
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 1.2rem;
}

.rome-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 210px 210px 24px 24px;
  background: #dc6b4d;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
}

.rome-card::before {
  position: absolute;
  inset: 14px;
  border: 1px solid rgb(255 255 255 / 34%);
  border-radius: inherit;
  content: "";
}

.rome-card__sun {
  position: absolute;
  inset: 10px 0 0;
  width: 100%;
  height: 100%;
}

.rome-card__sun circle {
  fill: #f0c55e;
}

.rome-line {
  fill: none;
  stroke: #fff0dc;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.rome-line--back {
  stroke: #17382e;
  stroke-width: 78;
}

.rome-line--thin {
  opacity: .55;
  stroke-width: 2;
}

.rome-card__stamp {
  position: absolute;
  top: 44px;
  left: 38px;
  display: grid;
  color: #17382e;
  line-height: 1;
  transform: rotate(-5deg);
}

.rome-card__stamp span {
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.rome-card__stamp strong {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: .02em;
}

.rome-card__stamp small {
  margin-top: 7px;
  font-size: .66rem;
  font-weight: 700;
}

.home-content {
  padding-block: 0 90px;
}

.today-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 25px;
  align-items: center;
  margin-top: -42px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}

.today-card__day {
  display: grid;
  width: 76px;
  height: 76px;
  place-content: center;
  justify-items: center;
  border-radius: 20px;
  background: var(--terracotta-soft);
  color: var(--terracotta-dark);
  line-height: 1;
}

.today-card__day span {
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .15em;
}

.today-card__day strong {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 500;
}

.today-card__copy .section-kicker {
  margin-bottom: 4px;
}

.today-card__copy h2,
.section-heading h2,
.learn-results-heading h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.today-card__copy p:last-child {
  max-width: 540px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .85rem;
}

.today-card__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 115px;
}

.progress-ring {
  --progress: 0;
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--sage) calc(var(--progress) * 1%), var(--surface-soft) 0);
}

.progress-ring::before {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface-raised);
  content: "";
}

.progress-ring span {
  position: relative;
  color: var(--ink-strong);
  font-size: .68rem;
  font-weight: 850;
}

.progress-ring--light {
  width: 78px;
  height: 78px;
  background: conic-gradient(#fff calc(var(--progress) * 1%), rgb(255 255 255 / 24%) 0);
}

.progress-ring--light::before {
  inset: 7px;
  background: #bd482f;
}

.progress-ring--light span {
  color: #fff;
  font-size: .82rem;
}

.section-block {
  padding-top: 82px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.section-heading .section-kicker {
  margin-bottom: 7px;
}

.text-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--terracotta-dark);
  font-size: .8rem;
  font-weight: 850;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.essential-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.essential-card {
  position: relative;
  min-height: 145px;
  padding: 20px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.essential-card:last-child {
  border-right: 0;
}

.essential-card:hover {
  background: var(--surface-soft);
}

.essential-card__number {
  color: var(--terracotta-dark);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.essential-card__italian {
  display: block;
  margin-top: 20px;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.08;
}

.essential-card__english {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.3;
}

.situation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.situation-card {
  position: relative;
  display: flex;
  min-height: 205px;
  flex-direction: column;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.situation-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.situation-card::after {
  position: absolute;
  right: -28px;
  bottom: -32px;
  width: 116px;
  height: 116px;
  border: 22px solid var(--card-tint, var(--terracotta-soft));
  border-radius: 50%;
  content: "";
  opacity: .7;
}

.situation-card__icon {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border-radius: 14px;
  background: var(--card-tint, var(--terracotta-soft));
  color: var(--ink-strong);
  font-size: 1.25rem;
}

.situation-card h3 {
  margin: auto 0 5px;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.1;
}

.situation-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 650;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}

.page-hero::after {
  position: absolute;
  right: -120px;
  bottom: -250px;
  width: 520px;
  height: 520px;
  border: 80px solid color-mix(in srgb, var(--terracotta) 12%, transparent);
  border-radius: 50%;
  content: "";
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 310px;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  padding-block: 55px;
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
}

.page-hero p:last-child {
  max-width: 610px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: 1rem;
}

.page-hero__motif {
  display: grid;
  flex: 0 0 auto;
  width: 180px;
  height: 180px;
  place-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--terracotta);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-style: italic;
  line-height: .9;
  text-align: center;
  transform: rotate(7deg);
}

.page-hero__motif span:nth-child(2) {
  margin-left: 24px;
}

.page-hero__motif span:nth-child(3) {
  margin-left: 7px;
  font-size: 2.4rem;
}

.learn-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 42px;
  padding-block: 42px 90px;
}

.learn-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
}

.sidebar-label {
  margin: 0 0 10px 12px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.category-list {
  display: grid;
  gap: 4px;
}

.category-button {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted-strong);
  font-size: .82rem;
  font-weight: 720;
  text-align: left;
}

.category-button:hover {
  background: var(--surface-soft);
}

.category-button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink-strong);
  box-shadow: var(--shadow-sm);
}

.category-button__icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: .82rem;
}

.category-button[aria-pressed="true"] .category-button__icon {
  background: var(--terracotta-soft);
}

.category-button__count {
  margin-left: auto;
  color: var(--muted);
  font-size: .67rem;
}

.learn-toolbar {
  position: sticky;
  top: var(--header-height);
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.search-field {
  display: flex;
  min-height: 46px;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.search-field:focus-within {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--terracotta) 16%, transparent);
}

.search-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 2;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: .88rem;
}

.search-field input::placeholder {
  color: var(--muted);
}

.mobile-category-list {
  display: none;
}

.learn-results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 0 18px;
}

.learn-results-heading .section-kicker {
  margin-bottom: 5px;
}

.learn-results-heading > span {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 750;
}

.learn-context {
  margin: 0 0 17px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sun);
  border-radius: 12px;
  background: var(--surface-soft);
}

.learn-context p {
  margin: 0;
  color: var(--muted-strong);
  font-size: .78rem;
}

.learn-context ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 22px;
  margin: 9px 0 0;
  padding-left: 18px;
  color: var(--muted-strong);
  font-size: .74rem;
}

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

.phrase-card {
  position: relative;
  display: flex;
  min-height: 245px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.phrase-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.phrase-card--staff {
  background: color-mix(in srgb, var(--blue-soft) 45%, var(--surface));
}

.phrase-card--mastered {
  border-color: color-mix(in srgb, var(--sage) 55%, var(--line));
}

.phrase-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.phrase-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: .57rem;
  font-weight: 850;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
}

.badge--staff {
  background: var(--blue-soft);
}

.badge--essential {
  background: var(--terracotta-soft);
  color: var(--terracotta-dark);
}

.badge--number {
  background: var(--sage-soft);
  color: var(--sage-dark);
}

.phrase-card__top-actions {
  display: flex;
  gap: 4px;
}

.card-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.card-icon-button:hover {
  background: var(--surface-soft);
  color: var(--ink-strong);
}

.card-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.card-icon-button[aria-pressed="true"] {
  color: var(--terracotta);
}

.card-icon-button[aria-pressed="true"] .heart-icon {
  fill: currentColor;
}

.phrase-card__italian {
  margin: 24px 0 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.phrase-card__pronunciation {
  margin: 8px 0 0;
  color: var(--terracotta-dark);
  font-size: .74rem;
  font-weight: 760;
}

.phrase-card__pronunciation span {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.phrase-card__translation {
  margin: auto 0 0;
  padding-top: 21px;
}

.phrase-card__translation p {
  margin: 0;
  color: var(--muted-strong);
  font-size: .9rem;
}

.phrase-card__suggestion {
  margin-top: 9px !important;
  padding-left: 10px;
  border-left: 2px solid var(--sage);
  color: var(--sage-dark) !important;
  font-size: .77rem !important;
}

.phrase-card__examples {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.phrase-card__examples > span {
  color: var(--muted);
  font-size: .57rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.phrase-card__examples p {
  margin: 0;
  font-size: .72rem;
}

.phrase-card__examples strong {
  color: var(--ink-strong);
}

.phrase-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.reveal-button,
.master-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-strong);
  font-size: .7rem;
  font-weight: 800;
}

.reveal-button:hover,
.master-button:hover {
  background: var(--surface-soft);
  color: var(--ink-strong);
}

.master-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.master-button::before {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  content: "";
}

.master-button[aria-pressed="true"] {
  color: var(--sage-dark);
}

.master-button[aria-pressed="true"]::before {
  border-color: var(--sage);
  background: var(--sage);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.empty-state,
.error-panel {
  display: grid;
  min-height: 320px;
  place-content: center;
  justify-items: center;
  padding: 35px;
  text-align: center;
}

.empty-state > span,
.error-panel > span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 2px solid var(--terracotta);
  border-radius: 50%;
  color: var(--terracotta);
  font-family: var(--serif);
  font-size: 2rem;
}

.empty-state h3,
.error-panel h1 {
  margin: 18px 0 4px;
  font-family: var(--serif);
  font-size: 1.7rem;
}

.empty-state p,
.error-panel p {
  margin: 0 0 20px;
  color: var(--muted);
}

.page-hero--practice {
  border-bottom: 0;
  background: var(--ink-strong);
}

.page-hero--practice h1,
.page-hero--practice .eyebrow,
.page-hero--practice p:last-child {
  color: #fff8ed;
}

.page-hero--practice .eyebrow {
  color: #efaf99;
}

.practice-score {
  display: grid;
  flex: 0 0 auto;
  min-width: 165px;
  padding: 23px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: var(--radius-md);
  color: #fff;
}

.practice-score span,
.practice-score small {
  color: rgb(255 255 255 / 66%);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .04em;
}

.practice-score strong {
  margin: 4px 0;
  font-family: var(--serif);
  font-size: 2.7rem;
  font-weight: 500;
  line-height: 1;
}

.practice-layout {
  padding-block: 34px 100px;
}

.mode-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 24px;
}

.mode-button {
  display: grid;
  min-height: 104px;
  justify-items: start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted-strong);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.mode-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.mode-button[aria-pressed="true"] {
  border-color: var(--terracotta);
  background: var(--terracotta-soft);
  color: var(--ink-strong);
}

.mode-button__icon {
  font-size: 1.15rem;
}

.mode-button strong {
  align-self: end;
  margin-top: 12px;
  font-size: .78rem;
}

.practice-workspace {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.practice-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.practice-toolbar__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.practice-toolbar__title span {
  color: var(--terracotta-dark);
  font-size: 1.15rem;
}

.practice-toolbar h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.28rem;
}

.practice-toolbar__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.control-select {
  min-height: 40px;
  padding: 7px 32px 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--ink);
  font-size: .75rem;
  font-weight: 700;
}

.compact-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--muted-strong);
  font-size: .72rem;
  font-weight: 750;
}

.compact-toggle input {
  accent-color: var(--terracotta);
}

.flashcard-session {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 455px;
  padding: 24px;
}

.session-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
}

.session-progress {
  width: min(200px, 45vw);
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
}

.session-progress span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--terracotta);
  transition: width 180ms ease;
}

.flashcard {
  display: grid;
  width: min(620px, 100%);
  min-height: 245px;
  align-self: center;
  justify-self: center;
  place-content: center;
  justify-items: center;
  margin: 26px auto;
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--bg);
  text-align: center;
}

.flashcard__label {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.flashcard__prompt {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.flashcard__answer {
  margin: 17px 0 0;
  color: var(--terracotta-dark);
  font-size: 1rem;
  font-weight: 720;
}

.flashcard__pronunciation {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .75rem;
}

.flashcard__listen {
  margin-top: 18px;
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.session-actions .button {
  min-width: 122px;
}

.practice-intro {
  display: grid;
  min-height: 455px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr);
  gap: 50px;
  align-items: center;
  padding: clamp(28px, 6vw, 64px);
}

.practice-intro h2,
.session-result h2,
.number-drill h2,
.roleplay-panel h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.practice-intro p {
  max-width: 580px;
  margin: 15px 0 24px;
  color: var(--muted);
}

.practice-intro__steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.practice-intro__steps li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted-strong);
  font-size: .78rem;
  font-weight: 720;
}

.practice-intro__steps span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta-soft);
  color: var(--terracotta-dark);
  font-size: .68rem;
}

.session-result {
  display: grid;
  min-height: 455px;
  place-content: center;
  justify-items: center;
  padding: 35px;
  text-align: center;
}

.result-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 2rem;
}

.result-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 18px 0;
}

.result-score strong {
  color: var(--terracotta-dark);
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 1;
}

.result-score span {
  color: var(--muted);
  font-size: .8rem;
}

.number-drill {
  display: grid;
  min-height: 455px;
  place-content: center;
  justify-items: center;
  padding: clamp(25px, 6vw, 60px);
  text-align: center;
}

.number-drill__word {
  margin: 26px 0 8px;
  color: var(--terracotta-dark);
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 6.3rem);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .95;
}

.number-drill__hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 23px;
  color: var(--muted);
  font-size: .8rem;
}

.number-drill__hint .card-icon-button {
  display: inline-grid;
}

.number-answer-form {
  display: flex;
  width: min(380px, 100%);
  gap: 8px;
}

.number-answer-form input {
  width: 100%;
  min-height: 51px;
  padding: 10px 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  outline: 0;
  text-align: center;
}

.number-answer-form input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--terracotta) 16%, transparent);
}

.number-feedback {
  min-height: 26px;
  margin-top: 15px;
  font-size: .83rem;
  font-weight: 800;
}

.number-feedback--correct { color: var(--sage-dark); }
.number-feedback--wrong { color: var(--terracotta-dark); }

.listening-prompt {
  position: relative;
}

.sound-orb {
  display: grid;
  width: 105px;
  height: 105px;
  margin: 8px auto 25px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--on-terracotta);
  box-shadow: 0 0 0 15px var(--terracotta-soft), var(--shadow-md);
}

.sound-orb:hover {
  transform: scale(1.03);
}

.sound-orb svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.listening-placeholder {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
}

.roleplay-setup {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 455px;
}

.scenario-list {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.scenario-list > p {
  margin: 2px 8px 6px;
  color: var(--muted);
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.scenario-button {
  display: grid;
  gap: 2px;
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
}

.scenario-button:hover,
.scenario-button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--surface);
}

.scenario-button strong {
  font-size: .79rem;
}

.scenario-button span {
  color: var(--muted);
  font-size: .65rem;
}

.roleplay-panel {
  padding: clamp(24px, 5vw, 46px);
}

.roleplay-panel__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.roleplay-panel h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.roleplay-panel__objective {
  max-width: 640px;
  margin: 10px 0 25px;
  color: var(--muted);
  font-size: .82rem;
}

.roleplay-panel__note {
  max-width: 720px;
  margin: -15px 0 22px;
  color: var(--muted);
  font-size: .7rem;
  font-style: italic;
}

.roleplay-vocabulary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: -8px 0 18px;
}

.roleplay-vocabulary > span {
  margin-right: 3px;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.roleplay-vocabulary button {
  min-height: 31px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: .78rem;
  font-weight: 700;
}

.difficulty-picker {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
}

.difficulty-picker button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 800;
}

.difficulty-picker button[aria-pressed="true"] {
  background: var(--surface-raised);
  color: var(--ink-strong);
  box-shadow: var(--shadow-sm);
}

.dialogue {
  display: grid;
  gap: 14px;
  min-height: 210px;
  align-content: center;
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.roleplay-phrase-bank {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
}

.roleplay-phrase-bank ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.roleplay-phrase-bank li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 9px;
}

.roleplay-phrase-bank__target {
  background: var(--terracotta-soft);
}

.roleplay-phrase-bank button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
}

.roleplay-phrase-bank button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.roleplay-phrase-bank li > span {
  display: grid;
}

.roleplay-phrase-bank strong {
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: .92rem;
}

.roleplay-phrase-bank small {
  color: var(--muted);
  font-size: .65rem;
}

.roleplay-phrase-bank em {
  color: var(--terracotta-dark);
  font-size: .55rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.speech-bubble {
  max-width: 78%;
  padding: 14px 17px;
  border-radius: 18px 18px 18px 4px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.speech-bubble--you {
  justify-self: end;
  border-radius: 18px 18px 4px 18px;
  background: var(--terracotta-soft);
}

.speech-bubble__speaker {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.inline-listen {
  margin-left: 6px;
  padding: 2px 5px;
  border: 0;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--terracotta-dark);
  font-size: inherit;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.speech-bubble p {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}

.speech-bubble small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .7rem;
}

.roleplay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}

.rescue-drawer {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--terracotta) 40%, var(--line));
  border-radius: 13px;
  background: var(--terracotta-soft);
}

.rescue-drawer > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--terracotta-dark);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rescue-drawer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rescue-drawer button {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--terracotta) 25%, var(--line));
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-strong);
  text-align: left;
}

.rescue-drawer button span {
  font-family: var(--serif);
  font-weight: 700;
}

.rescue-drawer button small,
.roleplay-complete-copy {
  color: var(--muted);
  font-size: .65rem;
}

.page-hero--plan {
  background: #bf4d34;
}

.page-hero--plan h1,
.page-hero--plan .eyebrow,
.page-hero--plan p:last-child {
  color: #fff8ed;
}

.page-hero--plan .eyebrow {
  color: #fff;
}

.plan-summary {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: var(--radius-md);
  color: #fff;
}

.plan-summary > div:last-child {
  display: grid;
}

.plan-summary strong {
  font-family: var(--serif);
  font-size: 1.4rem;
}

.plan-summary span {
  color: #fff;
  font-size: .67rem;
  font-weight: 730;
}

.plan-layout {
  padding-block: 40px 100px;
}

.day-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.day-button {
  min-height: 80px;
  padding: 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.day-button:last-child {
  border-right: 0;
}

.day-button:hover {
  background: var(--surface-soft);
}

.day-button[aria-pressed="true"] {
  background: var(--ink-strong);
  color: var(--surface);
}

.day-button--complete:not([aria-pressed="true"]) {
  color: var(--sage-dark);
}

.day-button span {
  display: block;
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.day-button strong {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
}

.day-card {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.3fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.day-card__overview {
  position: relative;
  padding: clamp(28px, 5vw, 48px);
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.day-card__number {
  color: var(--terracotta-dark);
  font-family: var(--serif);
  font-size: 5.5rem;
  line-height: .8;
  opacity: .28;
}

.day-card__overview .section-kicker {
  margin-top: 38px;
}

.day-card__overview h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}

.day-card__overview > p:not(.section-kicker) {
  margin: 16px 0 24px;
  color: var(--muted-strong);
  font-size: .85rem;
}

.day-card__meta {
  display: flex;
  gap: 17px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 730;
}

.day-card__meta strong {
  color: var(--ink-strong);
}

.day-card__activities {
  padding: clamp(26px, 5vw, 44px);
}

.activities-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.activities-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.activities-heading span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 750;
}

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

.activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-raised);
}

.activity-item--complete {
  background: var(--sage-soft);
}

.activity-check {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: transparent;
}

.activity-check svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.activity-check[aria-pressed="true"] {
  border-color: var(--sage);
  background: var(--sage);
  color: #fff;
}

.activity-copy {
  display: grid;
  gap: 2px;
}

.activity-copy strong {
  color: var(--terracotta-dark);
  font-size: .61rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.activity-copy span {
  color: var(--ink);
  font-size: .8rem;
}

.activity-item--complete .activity-copy span {
  color: var(--muted-strong);
  text-decoration: line-through;
}

.activity-minutes {
  color: var(--muted);
  font-size: .67rem;
  font-weight: 800;
}

.day-card__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

.day-practice-options {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.day-practice-options > span {
  color: var(--muted);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.day-practice-options > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.page-hero--kit {
  background: var(--sage-soft);
}

.kit-badge {
  display: grid;
  width: 150px;
  height: 150px;
  flex: 0 0 auto;
  place-content: center;
  justify-items: center;
  border: 2px solid var(--sage);
  border-radius: 50% 50% 48% 52%;
  color: var(--sage-dark);
  transform: rotate(-5deg);
}

.kit-badge span {
  font-family: var(--serif);
  font-size: 3.4rem;
  line-height: .9;
}

.kit-badge small {
  margin-top: 5px;
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.kit-layout {
  padding-block: 38px 100px;
}

.kit-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
}

.kit-tabs button {
  min-height: 41px;
  padding: 7px 15px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted-strong);
  font-size: .76rem;
  font-weight: 800;
}

.kit-tabs button[aria-pressed="true"] {
  background: var(--surface-raised);
  color: var(--ink-strong);
  box-shadow: var(--shadow-sm);
}

.kit-tabs button span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: 4px;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta-soft);
  color: var(--terracotta-dark);
  font-size: .62rem;
}

.kit-intro {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 20px;
}

.kit-intro h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
}

.kit-intro p {
  max-width: 610px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.kit-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 103px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kit-card__number {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 10px;
  background: var(--terracotta-soft);
  color: var(--terracotta-dark);
  font-family: var(--serif);
  font-weight: 700;
}

.kit-card__copy {
  min-width: 0;
}

.kit-card__copy strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.13;
}

.kit-card__copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.25;
}

.kit-empty {
  display: grid;
  min-height: 340px;
  place-content: center;
  justify-items: center;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.kit-empty svg {
  width: 37px;
  height: 37px;
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 1.4;
}

.kit-empty h2 {
  margin: 15px 0 5px;
  font-family: var(--serif);
}

.kit-empty p {
  max-width: 440px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .8rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.site-footer .shell {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: .72rem;
}

.site-footer p {
  margin: 0;
}

.site-footer p:last-child {
  color: var(--terracotta-dark);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
}

.mobile-nav {
  display: none;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 17px;
  border-radius: 12px;
  background: var(--ink-strong);
  color: var(--surface);
  font-size: .78rem;
  font-weight: 720;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript {
  position: fixed;
  right: 15px;
  bottom: 15px;
  left: 15px;
  z-index: 1000;
  padding: 15px;
  border-radius: 10px;
  background: var(--terracotta);
  color: var(--on-terracotta);
  text-align: center;
}

@media (max-width: 1050px) {
  .hero__inner { gap: 45px; }
  .today-card { grid-template-columns: auto minmax(0, 1fr) auto; }
  .today-card__progress { display: none; }
  .essential-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .essential-card:nth-child(3) { border-right: 0; }
  .essential-card:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .situation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mode-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  :root { --header-height: 67px; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .shell { width: min(calc(100% - 30px), var(--shell)); }
  .desktop-nav,
  .saved-button { display: none; }
  .topbar__actions { margin-left: auto; }
  .brand__copy small { display: none; }
  .hero,
  .hero__inner { min-height: 540px; }
  .hero__inner { grid-template-columns: minmax(0, 1fr) 270px; gap: 25px; }
  .rome-card { min-height: 355px; }
  .rome-card__stamp { top: 38px; left: 27px; }
  .rome-card__stamp strong { font-size: 1.6rem; }
  .today-card { grid-template-columns: auto minmax(0, 1fr); }
  .today-card .button { grid-column: 1 / -1; }
  .learn-layout { display: block; padding-top: 26px; }
  .learn-sidebar { display: none; }
  .mobile-category-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 4px 1px 10px;
    scrollbar-width: none;
  }
  .mobile-category-list::-webkit-scrollbar { display: none; }
  .mobile-category-list .category-button {
    width: auto;
    min-height: 38px;
    flex: 0 0 auto;
    padding: 7px 12px;
    border-color: var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
  }
  .mobile-category-list .category-button__icon,
  .mobile-category-list .category-button__count { display: none; }
  .page-hero__inner { min-height: 270px; }
  .mode-picker { display: flex; overflow-x: auto; padding: 2px 2px 9px; scrollbar-width: none; }
  .mode-picker::-webkit-scrollbar { display: none; }
  .mode-button { min-width: 142px; min-height: 92px; }
  .roleplay-setup { grid-template-columns: 210px minmax(0, 1fr); }
  .day-card { grid-template-columns: 1fr; }
  .day-card__overview { border-right: 0; border-bottom: 1px solid var(--line); }
  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 5px 7px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 -8px 24px rgb(12 25 20 / 8%);
  }
  .mobile-nav a {
    display: grid;
    min-height: 54px;
    place-content: center;
    justify-items: center;
    gap: 2px;
    border-radius: 12px;
    color: var(--muted);
    font-size: .59rem;
    font-weight: 750;
    text-decoration: none;
  }
  .mobile-nav a[aria-current="page"] { background: var(--surface-soft); color: var(--terracotta-dark); }
  .mobile-nav svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }
  .mobile-nav a[data-nav="practice"] svg { fill: currentColor; stroke: none; }
  .site-footer { display: none; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (max-width: 700px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  .topbar__inner { gap: 15px; }
  .brand__copy strong { font-size: 1.12rem; }
  .brand__mark { width: 31px; height: 35px; padding: 7px 6px 4px; }
  .hero { min-height: auto; }
  .hero__inner { display: block; min-height: auto; padding-block: 55px 75px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
  .hero__lede { font-size: .95rem; }
  .hero__actions { display: grid; grid-template-columns: 1fr; }
  .hero__actions .button { width: 100%; }
  .hero__facts { gap: 10px 14px; margin-top: 29px; }
  .hero__facts span + span::before { margin-right: 8px; }
  .rome-card { display: none; }
  .today-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    margin-top: -31px;
    padding: 17px;
    border-radius: 21px;
  }
  .today-card__day { width: 57px; height: 57px; border-radius: 15px; }
  .today-card__day strong { font-size: 1.8rem; }
  .today-card__copy h2 { font-size: 1.35rem; }
  .today-card__copy p:last-child { display: block; font-size: .72rem; }
  .today-card__copy .section-kicker { font-size: .59rem; }
  .section-block { padding-top: 60px; }
  .section-heading { align-items: start; }
  .section-heading .text-link { padding-top: 5px; }
  .section-heading h2 { font-size: 1.7rem; }
  .essential-strip {
    display: flex;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .essential-strip::-webkit-scrollbar { display: none; }
  .essential-card {
    width: min(72vw, 250px);
    min-height: 150px;
    flex: 0 0 auto;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-md);
    background: var(--surface);
    scroll-snap-align: start;
  }
  .essential-card + .essential-card { margin-left: 9px; }
  .situation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .situation-card { min-height: 175px; padding: 17px; }
  .situation-card__icon { width: 41px; height: 41px; }
  .situation-card h3 { font-size: 1.17rem; }
  .page-hero__inner { min-height: auto; padding-block: 46px; }
  .page-hero h1 { font-size: clamp(2.45rem, 12vw, 3.5rem); }
  .page-hero p:last-child { margin-top: 13px; font-size: .9rem; }
  .page-hero__motif,
  .kit-badge { display: none; }
  .page-hero--practice .page-hero__inner,
  .page-hero--plan .page-hero__inner { display: grid; gap: 22px; }
  .practice-score { min-width: 0; width: 100%; grid-template-columns: 1fr auto; align-items: center; padding: 12px 15px; }
  .practice-score strong { grid-row: 1 / 3; grid-column: 2; font-size: 2rem; }
  .plan-summary { width: 100%; justify-content: flex-start; padding: 10px 14px; }
  .plan-summary .progress-ring { width: 55px; height: 55px; }
  .learn-layout { padding-bottom: 80px; }
  .learn-toolbar { top: var(--header-height); margin-inline: -12px; padding: 9px 12px; }
  .learn-toolbar .button { flex: 0 0 auto; padding-inline: 12px; }
  .learn-results-heading { margin-top: 14px; }
  .phrase-grid { grid-template-columns: 1fr; }
  .phrase-card { min-height: 225px; }
  .phrase-card__italian { font-size: 1.7rem; }
  .practice-layout { width: 100%; padding-top: 20px; }
  .mode-picker { padding-inline: 12px; }
  .practice-workspace { min-height: calc(100vh - 300px); border-right: 0; border-left: 0; border-radius: 0; }
  .practice-toolbar { padding: 13px; }
  .practice-toolbar__controls { width: 100%; }
  .control-select { flex: 1; min-width: 0; }
  .flashcard-session { min-height: 430px; padding: 18px 14px; }
  .flashcard { min-height: 235px; margin-block: 20px; padding: 25px 18px; }
  .session-actions { display: grid; grid-template-columns: repeat(2, 1fr); }
  .session-actions .button { min-width: 0; }
  .session-actions .button:only-child,
  .session-actions .button:first-child:nth-last-child(3) { grid-column: 1 / -1; }
  .practice-intro { display: block; min-height: 430px; padding: 35px 20px; }
  .practice-intro__steps { margin-top: 28px; }
  .roleplay-setup { display: block; }
  .scenario-list { display: flex; overflow-x: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .scenario-list > p { display: none; }
  .scenario-button { min-width: 145px; }
  .roleplay-panel { padding: 24px 14px; }
  .roleplay-panel__heading { display: block; }
  .difficulty-picker { margin-top: 15px; }
  .dialogue { padding: 17px 12px; }
  .speech-bubble { max-width: 90%; }
  .day-picker { display: flex; overflow-x: auto; border-radius: 14px; scrollbar-width: none; }
  .day-button { min-width: 78px; flex: 1 0 auto; }
  .day-card { border-radius: 21px; }
  .day-card__overview { padding: 28px 22px; }
  .day-card__number { font-size: 4rem; }
  .day-card__overview .section-kicker { margin-top: 25px; }
  .day-card__activities { padding: 24px 14px; }
  .activity-item { grid-template-columns: auto minmax(0, 1fr); }
  .activity-minutes { grid-column: 2; }
  .day-card__actions { flex-direction: column; }
  .day-practice-options { justify-items: stretch; }
  .day-practice-options > div { display: grid; justify-content: stretch; }
  .kit-layout { padding-top: 24px; }
  .kit-tabs { display: flex; overflow-x: auto; margin-inline: -2px; scrollbar-width: none; }
  .kit-tabs button { flex: 0 0 auto; }
  .kit-grid { grid-template-columns: 1fr; }
  .kit-card { min-height: 91px; }
}

@media (max-width: 430px) {
  .topbar__actions .icon-button { width: 39px; height: 39px; }
  .hero__facts span { font-size: .7rem; }
  .hero__facts strong { font-size: 1rem; }
  .section-heading { display: block; }
  .section-heading .text-link { margin-top: 12px; }
  .situation-grid { grid-template-columns: 1fr 1fr; }
  .situation-card { min-height: 158px; }
  .situation-card::after { width: 90px; height: 90px; border-width: 17px; }
  .search-field { padding-inline: 11px; }
  .search-field input { font-size: .8rem; }
  #pronunciation-toggle { width: 45px; overflow: hidden; color: transparent; }
  #pronunciation-toggle::before { color: var(--ink); content: "Aa"; }
  .learn-results-heading h2 { font-size: 1.5rem; }
  .practice-toolbar__controls .compact-toggle { flex: 1; justify-content: center; }
  .number-answer-form { display: grid; }
  .number-drill__word { font-size: 3.3rem; }
  .kit-tabs { width: 100%; }
  .kit-tabs button { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .topbar,
  .mobile-nav,
  .site-footer,
  .hero__actions,
  .learn-toolbar,
  .card-icon-button,
  .phrase-card__footer { display: none !important; }
  body { background: #fff; color: #111; }
  .view[hidden] { display: none !important; }
  .shell { width: 100%; }
  .phrase-grid { grid-template-columns: repeat(2, 1fr); }
  .phrase-card { break-inside: avoid; box-shadow: none; }
  .phrase-card__translation p[hidden] { filter: none; opacity: 1; }
}
