:root {
  --bg: #fff;
  --surface: #f7f7f7;
  --surface-2: #f1f1f1;
  --text: #0b0b0b;
  --muted: #586070;
  --line: #dcdfe4;
  --dark: #080808;
  --green: #15983c;
  --blue: #4285f4;
  --danger: #b42318;
  --shadow: 0 18px 55px rgba(15, 23, 42, .08);
  --radius: 8px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111214;
  --surface: #191b1f;
  --surface-2: #23262c;
  --text: #f6f7f8;
  --muted: #a2a8b3;
  --line: #343841;
  --dark: #f6f7f8;
  --shadow: 0 20px 60px rgba(0, 0, 0, .32);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; stroke-width: 1.8; }
.hidden { display: none !important; }
.page { min-height: calc(100vh - 148px); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(18px);
}
.brand { font-size: 26px; font-weight: 800; }
.public-nav, .app-nav, .button-row { display: flex; align-items: center; gap: 16px; }
.app-nav { min-width: 0; }
.public-nav { color: var(--muted); }
.public-nav a:hover { color: var(--text); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, .09); }
.button-dark { background: var(--dark); color: var(--bg); border-color: var(--dark); }
[data-theme="dark"] .button-dark { color: #111214; }
.button-outline { background: var(--bg); }
.button-small { min-height: 42px; padding: 0 20px; }
.button-full { width: 100%; }
.align-right { margin-left: auto; display: flex; }
.end { justify-content: flex-end; }
.text-button, .icon-button, .back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.underlined { font-weight: 700; text-decoration: underline; }
.icon-button { justify-content: center; }

.home-hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: 48px;
  width: min(1400px, calc(100% - 64px));
  margin: 0 auto;
  padding: 68px 0 72px;
}
.hero-copy h1 { margin: 0; font-size: clamp(56px, 6vw, 88px); line-height: .98; }
.hero-copy h2 { margin: 26px 0 0; font-size: clamp(22px, 2vw, 30px); }
.hero-copy p { max-width: 610px; margin: 18px 0 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.hero-copy .button-row { margin-top: 32px; flex-wrap: wrap; }
.hero-visual img { display: block; width: 100%; max-height: 520px; object-fit: contain; mix-blend-mode: multiply; }
[data-theme="dark"] .hero-visual img, [data-theme="dark"] .auth-art { mix-blend-mode: normal; border-radius: var(--radius); }

.content-section { width: min(1400px, calc(100% - 64px)); margin: 0 auto; padding: 48px 0; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.center { text-align: center; }
.success { color: var(--green); }
.content-section > h2, .resource-showcase h2 { margin: 0 0 28px; font-size: clamp(30px, 3vw, 42px); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .04);
}
.feature-card h3 { margin: 20px 0 8px; font-size: 20px; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.icon-box, .step-icon, .auth-icon, .large-icon, .dashboard-icon, .success-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.icon-box svg, .large-icon svg { width: 28px; height: 28px; }

.resource-showcase {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 48px;
  width: min(1400px, calc(100% - 64px));
  margin: 32px auto;
  padding: 42px;
  border-radius: var(--radius);
  background: var(--surface);
}
.resource-showcase > div:first-child > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.resource-showcase .button { margin-top: 16px; }
.resource-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.preview-sidebar, .preview-files { display: grid; align-content: start; gap: 8px; padding: 18px; }
.preview-sidebar { border-right: 1px solid var(--line); }
.preview-sidebar span { padding: 10px; color: var(--muted); font-size: 13px; }
.preview-sidebar .active { background: var(--surface); color: var(--text); font-weight: 700; }
.preview-files span { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.preview-files b { padding: 4px; border-radius: 3px; background: var(--dark); color: var(--bg); font-size: 9px; }
.preview-files svg { margin-left: auto; }

.how-section { padding-top: 64px; padding-bottom: 64px; }
.how-section > h2 { margin: 0 0 38px; font-size: 34px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps-grid article { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; }
.steps-grid .step-icon { grid-row: span 3; border-radius: 999px; }
.steps-grid small { color: var(--muted); }
.steps-grid h3 { margin: 4px 0; font-size: 16px; }
.steps-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1400px, calc(100% - 64px));
  margin: 24px auto 48px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
}
.metrics > span { display: grid; grid-template-columns: auto auto; justify-content: center; column-gap: 12px; align-items: center; border-right: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.metrics > span:last-child { border: 0; }
.metrics svg { grid-row: span 2; width: 30px; height: 30px; }
.metrics b { color: var(--text); font-size: 23px; }
.metrics em { color: var(--green); font-style: normal; font-weight: 700; }

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(1200px, calc(100% - 64px));
  margin: 52px auto 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
}
.auth-primary, .auth-secondary { padding: clamp(38px, 5vw, 70px); }
.auth-primary { text-align: center; }
.auth-primary > p:not(.eyebrow):not(.form-message):not(.auth-switch):not(.secure-line) { margin: 12px auto 28px; max-width: 470px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.auth-primary h1 { margin: 22px 0 0; font-size: clamp(38px, 4vw, 54px); }
.auth-icon { width: 72px; height: 72px; border-radius: 999px; }
.auth-icon svg { width: 34px; height: 34px; }
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}
.google-mark { color: var(--blue); font-size: 24px; font-weight: 900; }
.or-divider { display: flex; align-items: center; gap: 20px; margin: 32px 0; color: var(--muted); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.field { display: grid; gap: 9px; margin-bottom: 22px; text-align: left; }
.field > span, .label { color: var(--text); font-size: 13px; text-transform: uppercase; }
.field small { color: var(--muted); }
.field-control { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.field-control input, .field > input, .field > select, .field textarea, .selection-card select {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  outline: none;
  background: var(--bg);
  color: var(--text);
}
.field-control input { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; }
.field textarea { min-height: 110px; padding-top: 16px; resize: vertical; }
.field-control:focus-within, .field > input:focus, .field > select:focus, .field textarea:focus, .selection-card select:focus { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent); }
.form-options { display: flex; align-items: center; justify-content: space-between; margin: -2px 0 24px; font-size: 14px; }
.form-message { min-height: 22px; margin: 0 0 10px; color: var(--danger); text-align: left; }
.auth-switch { margin: 30px 0 0; }
.auth-secondary { border-left: 1px solid var(--line); text-align: left; }
.auth-secondary h2 { margin: 14px 0 34px; font-size: 25px; }
.benefit-list { display: grid; gap: 0; }
.benefit-list article { display: flex; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.benefit-list article > span { display: grid; place-items: center; width: 56px; height: 56px; flex: 0 0 auto; border-radius: 999px; background: var(--surface); }
.benefit-list article > span svg { width: 28px; height: 28px; }
.benefit-list h3 { margin: 0 0 6px; font-size: 17px; }
.benefit-list h3 em { color: var(--green); font-style: normal; }
.benefit-list p { margin: 0; color: var(--muted); line-height: 1.5; }
.auth-art { display: block; width: 82%; max-height: 260px; margin: 24px auto -24px; object-fit: contain; mix-blend-mode: multiply; }
.metrics-auth { margin-bottom: 38px; }
.security-note, .privacy-note { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; }
.security-note svg, .privacy-note svg { width: 32px; height: 32px; }
.security-note p, .privacy-note p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.mini-heading { margin: 36px 0 18px; text-align: left; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.check-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; text-align: left; }
.check-list li { display: flex; align-items: center; gap: 12px; }
.info-dot { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: var(--blue); color: #fff; }
.privacy-note { margin-top: 28px; }
.success-icon { width: 70px; height: 70px; border: 0; border-radius: 999px; background: #e9f8ed; color: var(--green); }
.identity-card { display: flex; align-items: center; gap: 16px; margin: 28px 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; }
.identity-card > div { display: grid; flex: 1; }
.identity-card > div span { color: var(--muted); }
.avatar { display: inline-grid; place-items: center; overflow: hidden; border-radius: 999px; background: var(--dark); color: var(--bg); font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-small { width: 36px; height: 36px; }
.avatar-large { width: 58px; height: 58px; font-size: 22px; }
.secure-line { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }

.profile-menu { position: relative; }
.profile-trigger { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 5px 14px 5px 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; }
.profile-popover { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
.profile-summary { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile-summary > div { display: grid; }
.profile-summary span { color: var(--muted); font-size: 13px; }
.profile-data { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.profile-data span { color: var(--muted); }
.theme-control { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); }
.theme-control > span { display: flex; align-items: center; gap: 7px; }
.switch { position: relative; display: inline-flex; width: 44px; height: 24px; }
.switch input { opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); cursor: pointer; }
.switch span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); transition: .2s; }
.switch input:checked + span { background: var(--dark); }
.switch input:checked + span::before { transform: translateX(20px); }
.profile-action { display: flex; align-items: center; gap: 12px; width: 100%; padding: 17px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.profile-action:last-child { border: 0; }

.dashboard-shell, .inner-page { width: min(1400px, calc(100% - 80px)); margin: 0 auto; padding: 36px 0 64px; }
.dashboard-heading h1, .page-title-row h1, .subjects-title h1, .subject-heading h1 { margin: 0; font-size: clamp(32px, 3vw, 44px); }
.dashboard-heading p, .page-title-row p, .subjects-title p, .subject-heading p { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.dashboard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 26px 0; }
.dashboard-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 24px; min-height: 250px; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.dashboard-icon { width: 72px; height: 72px; }
.dashboard-icon svg { width: 40px; height: 40px; }
.dashboard-card h2 { margin: 12px 0; font-size: 26px; }
.dashboard-card p { max-width: 420px; margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.card-sketch { position: absolute; right: 30px; bottom: 26px; opacity: .16; }
.card-sketch svg { width: 120px; height: 120px; }
.recent-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 21px; }
.order-list { display: grid; }
.order-list.spacious { gap: 14px; margin-top: 26px; }
.order-row { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto auto auto; gap: 22px; align-items: center; padding: 18px 26px; border-bottom: 1px solid var(--line); }
.spacious .order-row { border: 1px solid var(--line); border-radius: var(--radius); }
.order-row:last-child { border-bottom: 0; }
.order-row .order-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; background: var(--surface); }
.order-main { display: grid; gap: 3px; }
.order-main small, .order-date small { color: var(--muted); }
.order-date { display: grid; }
.status-badge { padding: 7px 12px; border-radius: var(--radius); background: var(--surface); font-size: 13px; white-space: nowrap; }
.status-badge::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #222; }
.order-price { display: grid; gap: 3px; }
.order-price small { color: var(--muted); }
.empty-state { padding: 46px; text-align: center; color: var(--muted); }
.back-button { margin-bottom: 28px; font-size: 16px; }
.page-title-row, .subjects-title { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.summary-grid article { display: grid; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.summary-grid span { color: var(--muted); }
.summary-grid strong { font-size: 26px; }

.selection-page { width: min(1400px, calc(100% - 80px)); margin: 0 auto; padding: 36px 0 70px; }
.selection-heading { text-align: center; }
.selection-heading .large-icon { width: 84px; height: 84px; }
.selection-heading h1 { margin: 16px 0 6px; font-size: 52px; }
.selection-heading p { margin: 0; color: var(--muted); font-size: 20px; line-height: 1.5; }
.selection-card { display: grid; gap: 28px; width: min(800px, 100%); margin: 40px auto 0; padding: 38px; border: 1px solid var(--line); border-radius: var(--radius); }
.selection-card label { display: grid; gap: 12px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.selection-card label > span { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.selection-card small { color: var(--muted); }
.selection-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin: -10px 0 0; color: var(--muted); }
.search-control { display: flex; align-items: center; gap: 12px; width: 330px; min-height: 56px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.search-control input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.selection-summary { display: flex; align-items: center; width: max-content; max-width: 100%; margin: 24px 0 28px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.selection-summary > span { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; min-width: 230px; padding-right: 24px; margin-right: 24px; border-right: 1px solid var(--line); }
.selection-summary svg { grid-row: span 2; align-self: center; }
.selection-summary small { color: var(--muted); }
.inner-page hr { border: 0; border-top: 1px solid var(--line); }
.list-heading { margin: 32px 0 20px; font-size: 21px; }
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.subject-card { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; min-height: 150px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; text-align: left; }
.subject-card:hover { border-color: var(--text); }
.subject-card .icon-box { width: 62px; height: 62px; }
.subject-card h3 { margin: 0 0 8px; font-size: 19px; }
.subject-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.breadcrumbs { color: var(--muted); }
.subject-heading { display: flex; align-items: center; gap: 24px; margin: 34px 0; }
.subject-heading .large-icon { width: 72px; height: 72px; }
.subject-counts { display: flex; gap: 16px; margin-top: 18px; }
.subject-counts span { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.chapter-list { display: grid; gap: 10px; }
.chapter-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.chapter-trigger { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; width: 100%; padding: 18px; border: 0; background: var(--bg); color: var(--text); cursor: pointer; text-align: left; }
.chapter-trigger .icon-box { width: 42px; height: 42px; }
.chapter-trigger strong, .chapter-trigger span { display: block; }
.chapter-trigger span { margin-top: 4px; color: var(--muted); }
.chapter-body { padding: 22px 32px 28px; border-top: 1px solid var(--line); background: var(--bg); }
.resource-group + .resource-group { margin-top: 28px; }
.resource-group h4 { margin: 0 0 14px; }
.resource-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.resource-row div { display: grid; }
.resource-row small { color: var(--muted); }
.download-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; }
.resource-help { display: flex; align-items: center; gap: 9px; color: var(--muted); }

.checkout-page { background: var(--bg); }
.checkout-shell { width: min(1450px, calc(100% - 64px)); margin: 0 auto; padding: 30px 0 54px; }
.narrow-checkout { width: min(1100px, calc(100% - 64px)); }
.service-slider { display: grid; grid-template-columns: 1fr 1fr; width: min(520px, 100%); margin: -8px auto 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.service-slider button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; border: 0; background: var(--bg); cursor: pointer; font-weight: 800; }
.service-slider button.active { background: var(--dark); color: var(--bg); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(330px, .8fr); gap: 28px; align-items: start; }
.important-notice { display: flex; gap: 18px; padding: 18px 22px; margin-bottom: 16px; border: 1px solid #e9c98c; border-radius: var(--radius); background: #fffaf0; color: #111; }
[data-theme="dark"] .important-notice { background: #2b2418; color: var(--text); }
.important-notice > svg { width: 34px; height: 34px; color: #9b530e; }
.important-notice strong { color: #8a470a; }
.important-notice h3 { margin: 5px 0; font-size: 15px; }
.important-notice p { margin: 0; line-height: 1.5; }
.builder-card, .cart-card, .delivery-card, .review-section { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.builder-card h2, .cart-card h2, .delivery-card h2, .review-section h2 { margin: 0 0 20px; font-size: 21px; }
.builder-card select { width: 100%; min-height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.three-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.quantity-control { display: grid; grid-template-columns: 48px 1fr 48px; min-height: 54px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.quantity-control button { border: 0; border-right: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 22px; }
.quantity-control button:last-child { border-right: 0; border-left: 1px solid var(--line); }
.quantity-control strong { display: grid; place-items: center; }
.field small em { color: var(--green); font-style: normal; }
.upload-drop { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 18px; min-height: 86px; padding: 18px; border: 1px dashed #bfc5ce; border-radius: var(--radius); text-align: left; cursor: pointer; }
.upload-drop > svg { grid-row: span 2; width: 38px; height: 38px; }
.upload-drop small { color: var(--muted); }
.upload-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.char-count { margin-left: auto; }
.builder-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-top: 30px; }
.builder-actions .button { padding: 0 16px; }
.safety-note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.builder-card + .safety-note { justify-content: center; margin: 22px 0 0; }
.bill-card { position: sticky; top: 94px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.bill-card h2 { margin: 0 0 20px; }
.bill-card > div, .success-order-summary > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; }
.bill-card small { color: var(--muted); }
.bill-card hr, .delivery-card hr, .success-order-summary hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.bill-total { font-size: 19px; font-weight: 800; }
.bill-total strong { font-size: 30px; }
.urgent-line { color: #d83a00; }
.bill-info, .payment-note, .delivery-note, .contact-soon { display: flex; align-items: center; gap: 14px; padding: 18px; margin: 16px 0; border-radius: var(--radius); background: #eef6ff; color: #17335c; line-height: 1.5; }
[data-theme="dark"] .bill-info, [data-theme="dark"] .payment-note, [data-theme="dark"] .delivery-note { background: #1a2738; color: #cfe2ff; }
.payment-note { border: 1px solid var(--line); background: var(--bg); color: var(--muted); }
.urgency-structure, .payment-breakdown { padding: 16px; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.urgency-structure h3, .payment-breakdown > p { margin: 0 0 12px; font-weight: 800; }
.urgency-structure p, .payment-breakdown > span { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0; }
.urgency-structure b { color: var(--green); }
.payment-breakdown > span { padding: 13px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.payment-breakdown > span strong { margin-left: auto; font-size: 25px; }
.payment-breakdown > span small { width: 100%; }
.checkout-heading { display: flex; align-items: center; gap: 18px; margin: 10px 0 26px; }
.checkout-heading h1 { margin: 0; font-size: 32px; }
.checkout-heading p { margin: 5px 0 0; color: var(--muted); }
.cart-layout { grid-template-columns: minmax(0, 1.8fr) minmax(330px, .8fr); }
.cart-card > h2 { padding: 0 2px; }
.cart-item { padding: 20px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.cart-item-title { position: relative; display: grid; grid-template-columns: auto 1fr auto auto; gap: 20px; align-items: start; }
.cart-item-title h3 { margin: 4px 0 8px; font-size: 21px; }
.cart-item-title p { margin: 8px 0 0; color: var(--muted); }
.cart-item-title > b { font-size: 22px; }
.remove-cart-item { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.cart-item-stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 24px; }
.cart-item-stats span { display: grid; gap: 8px; padding: 0 16px; border-right: 1px solid var(--line); }
.cart-item-stats span:first-child { padding-left: 0; }
.cart-item-stats span:last-child { border: 0; }
.cart-item-stats small { color: var(--muted); }
.add-another { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; text-align: left; }
.add-another > svg:first-child { width: 34px; height: 34px; }
.add-another span { display: grid; gap: 4px; }
.add-another small { color: var(--muted); }
.checkout-footer-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; }
.checkout-footer-actions > div { display: flex; gap: 18px; }
.checkout-footer-actions .button:disabled { opacity: .4; cursor: not-allowed; }
.delivery-card { margin-bottom: 16px; }
.delivery-card h3 { margin: 22px 0 4px; }
.delivery-card h2 small { color: var(--muted); font-size: 14px; font-weight: 400; }
.section-number { margin-right: 8px; }
.muted-copy { color: var(--muted); }
.delivery-note { background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.delivery-note p { margin: 4px 0 0; }
.save-details { display: flex; align-items: flex-start; gap: 12px; margin: 24px 0; }
.save-details span { display: grid; gap: 4px; }
.save-details small { color: var(--muted); }
.review-layout { grid-template-columns: minmax(0, 1.5fr) minmax(330px, .8fr); }
.review-section { margin-bottom: 16px; }
.review-section .cart-item { margin-bottom: 14px; }
.review-section dl { display: grid; grid-template-columns: 200px 1fr; gap: 12px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.review-section dt { color: var(--muted); }
.review-section dd { margin: 0; font-weight: 600; }
.review-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.review-addresses > div { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.review-addresses p { color: var(--muted); line-height: 1.7; }
.success-page { width: min(1320px, calc(100% - 64px)); margin: 0 auto; padding: 48px 0 70px; text-align: center; }
.success-check { display: inline-grid; place-items: center; width: 92px; height: 92px; border: 4px solid var(--text); border-radius: 50%; }
.success-check svg { width: 48px; height: 48px; }
.success-page > h1 { margin: 22px 0 8px; font-size: 38px; }
.success-page > p { margin: 0 0 42px; color: var(--muted); }
.success-summary { display: grid; grid-template-columns: repeat(5, 1fr); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; }
.success-summary > span { display: grid; gap: 8px; padding: 0 24px; border-right: 1px solid var(--line); }
.success-summary > span:last-child { border: 0; }
.success-summary small, .success-summary em { color: var(--muted); font-size: 13px; font-style: normal; }
.success-summary strong { font-size: 19px; }
.success-page > h2 { margin: 42px 0 16px; text-align: left; font-size: 20px; }
.tracking-steps { display: grid; grid-template-columns: repeat(5, 1fr); padding: 28px 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.tracking-steps article { position: relative; }
.tracking-steps article:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 64%; width: 72%; height: 1px; background: var(--line); }
.tracking-steps article > span { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--text); border-radius: 50%; background: var(--bg); }
.tracking-steps .active > span { background: var(--dark); color: var(--bg); }
.tracking-steps h3 { font-size: 14px; }
.tracking-steps p { margin: 0 auto; max-width: 190px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.contact-soon { margin: 28px 0; border: 1px solid var(--line); background: var(--bg); color: var(--text); text-align: left; }
.contact-soon p { margin: 5px 0 0; color: var(--muted); }
.success-order-summary { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; }
.success-order-summary h2 { margin: 0 0 18px; }
.success-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 28px; }

.setup-page { display: grid; place-items: center; padding: 40px; }
.setup-card { width: min(600px, 100%); padding: 48px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.setup-card > svg { width: 56px; height: 56px; }
.setup-card code { display: block; margin: 20px 0; padding: 14px; background: var(--surface); }

.footer-panels { position: fixed; left: 50%; bottom: 72px; z-index: 90; display: flex; gap: 16px; width: min(1200px, calc(100% - 40px)); transform: translateX(-50%); pointer-events: none; }
.footer-panels article { position: relative; display: none; width: 280px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); pointer-events: auto; }
.footer-panels article.visible { display: block; }
.footer-panels article > button { position: absolute; top: 14px; right: 14px; border: 0; background: transparent; cursor: pointer; }
.footer-panels h3 { margin: 0 0 14px; }
.footer-panels p { color: var(--muted); line-height: 1.5; }
.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 74px; padding: 20px clamp(24px, 5vw, 72px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; align-items: center; gap: 14px; }
.site-footer nav button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.site-footer nav i { width: 1px; height: 16px; background: var(--line); }
.site-footer > span:last-child { text-align: right; }

.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .48); }
.modal-card { position: relative; z-index: 1; width: min(460px, calc(100% - 32px)); padding: 34px; border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 18px; right: 18px; }
.modal-card h2 { margin: 0 0 24px; }

@media (max-width: 1100px) {
  .home-hero, .auth-layout, .resource-showcase, .dashboard-actions { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-copy .button-row { justify-content: center; }
  .hero-visual img { max-height: 420px; }
  .feature-grid, .steps-grid, .metrics, .subject-grid, .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics > span:nth-child(2) { border: 0; }
  .auth-secondary { border-left: 0; border-top: 1px solid var(--line); }
  .checkout-grid, .cart-layout, .review-layout { grid-template-columns: 1fr; }
  .bill-card { position: static; }
  .three-fields { grid-template-columns: 1fr 1fr; }
  .cart-item-stats { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .cart-item-stats span:nth-child(3) { border-right: 0; }
  .success-summary { grid-template-columns: repeat(2, 1fr); gap: 22px 0; }
  .success-summary > span { border-right: 1px solid var(--line); }
  .success-summary > span:nth-child(2n), .success-summary > span:last-child { border-right: 0; }
  .tracking-steps { grid-template-columns: 1fr; gap: 24px; text-align: left; }
  .tracking-steps article { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
  .tracking-steps article:not(:last-child)::after { top: 42px; bottom: -24px; left: 20px; width: 1px; height: auto; }
  .tracking-steps article > span { grid-row: span 2; }
  .tracking-steps h3 { margin: 0 0 5px; }
  .tracking-steps p { max-width: none; margin: 0; }
  .order-row { grid-template-columns: auto 1fr auto; }
  .order-row > :nth-child(4), .order-row > :nth-child(6) { display: none; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer nav { justify-content: center; flex-wrap: wrap; }
  .site-footer > span:last-child { text-align: center; }
}

@media (max-width: 700px) {
  .site-header { padding: 0 18px; }
  .brand { font-size: 22px; }
  .public-nav a, .app-nav > .button { display: none; }
  .profile-trigger strong { display: none; }
  .profile-trigger { width: 48px; padding: 5px; justify-content: center; }
  .profile-trigger > svg { display: none; }
  .profile-popover { position: fixed; top: 72px; right: 12px; left: 12px; width: auto; }
  .home-hero, .content-section, .resource-showcase, .metrics, .auth-layout, .dashboard-shell, .inner-page, .selection-page, .checkout-shell, .success-page { width: calc(100% - 28px); }
  .home-hero { padding: 42px 0; }
  .hero-copy h1 { font-size: 50px; }
  .hero-copy .button-row, .button-row { flex-direction: column; }
  .hero-copy .button { width: 100%; }
  .feature-grid, .steps-grid, .metrics, .subject-grid, .summary-grid, .two-fields, .three-fields, .builder-actions, .success-actions { grid-template-columns: 1fr; }
  .metrics > span { padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics > span:last-child { border-bottom: 0; }
  .resource-showcase { padding: 24px; }
  .resource-preview { grid-template-columns: 1fr; }
  .preview-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-primary, .auth-secondary { padding: 30px 22px; }
  .auth-primary h1 { font-size: 38px; }
  .dashboard-card { grid-template-columns: 1fr; }
  .dashboard-icon { width: 58px; height: 58px; }
  .card-sketch { display: none; }
  .order-row { grid-template-columns: auto 1fr; }
  .order-row > :not(.order-symbol):not(.order-main) { display: none; }
  .page-title-row, .subjects-title { align-items: stretch; flex-direction: column; }
  .search-control { width: 100%; }
  .selection-heading h1 { font-size: 40px; }
  .selection-card { padding: 24px; }
  .selection-summary { align-items: stretch; flex-direction: column; width: 100%; }
  .selection-summary > span { padding: 12px 0; margin: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .subject-heading { align-items: flex-start; }
  .subject-counts { flex-wrap: wrap; }
  .chapter-body { padding: 18px; }
  .service-slider { margin-top: 0; }
  .important-notice { padding: 16px; }
  .builder-card, .cart-card, .delivery-card, .review-section, .bill-card { padding: 20px; }
  .checkout-heading { align-items: flex-start; }
  .checkout-heading h1 { font-size: 28px; }
  .cart-item-title { grid-template-columns: auto 1fr auto; gap: 12px; }
  .cart-item-title > b { grid-column: 2; }
  .remove-cart-item { grid-column: 3; grid-row: 1; }
  .cart-item-stats { grid-template-columns: 1fr 1fr; }
  .cart-item-stats span { padding: 10px; border: 0; border-bottom: 1px solid var(--line); }
  .cart-item-stats span:first-child { padding-left: 10px; }
  .checkout-footer-actions { align-items: stretch; flex-direction: column; }
  .checkout-footer-actions > div { display: grid; grid-template-columns: 1fr; }
  .checkout-footer-actions .button { width: 100%; }
  .review-section dl { grid-template-columns: 1fr; }
  .review-section dd { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .review-addresses { grid-template-columns: 1fr; }
  .success-summary { grid-template-columns: 1fr; }
  .success-summary > span { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .success-summary > span:last-child { border-bottom: 0; }
  .success-page > h1 { font-size: 31px; }
  .upload-drop { grid-template-columns: 1fr; text-align: center; }
  .upload-drop > svg { grid-row: auto; margin: 0 auto; }
  input, select, textarea, .field, .field-control { min-width: 0; }
  .footer-panels { flex-direction: column; bottom: 82px; }
  .footer-panels article { width: 100%; }
}
