/* =====================================
   EssayCoach Coral Theme — CLEAN FINAL
   ===================================== */

/* Theme tokens */
:root[data-theme="coral"] {
  --ec-bg: #fffdfc;
  --ec-surface: #ffffff;
  --ec-border: #f2c7b0;
  --ec-text: #1a1a1a;
  --ec-muted: #666;

  --ec-accent: #ff7f50;
  --ec-accent-hover: #ff9770;
  --ec-accent-active: #e66a3b;
  --ec-accent-bg: #fff3ee;

  --ec-pill-bg: #ffe9e2;

  --ec-grad-1: #fff6f2;
  --ec-grad-2: #ffe8e0;
  --ec-grad-shadow: rgba(230, 106, 59, 0.14);
}

/* Base reset for buttons so browser blue doesn't bleed through */
button {
  appearance: none;
  -webkit-appearance: none;
  all: unset;
  display: inline-block;
  cursor: pointer;
  font: inherit;
  border-radius: 10px;
  padding: 8px 14px;
  border: 1px solid transparent;
  line-height: 1;
}

/* Base layout & typography */
body {
  background: var(--ec-bg);
  color: var(--ec-text);
  font-family: Inter, system-ui, Arial, sans-serif;
  margin: 0;
  line-height: 1.5;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
}

/* Cards */
.card {
  border: 1px solid var(--ec-border);
  border-radius: 12px;
  background: var(--ec-surface);
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ec-accent-active);
}

/* Feedback title with Alfons avatar */
.card-title--feedback {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-title--feedback::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-image: url("/essay-coach-instant/assets/alfons-icon.jpg");
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* Sentence-insights list (compact) */
#sentencesCard .list--compact li {
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-left: 3px solid #fca5a5;
  background: #fff7ed;
  font-size: 0.9rem;
}

.sentence-example {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.sentence-issue {
  font-style: italic;
  margin-bottom: 0.1rem;
}

.sentence-explanation,
.sentence-fix {
  margin-bottom: 0.1rem;
}

.sentence-fix strong {
  font-weight: 600;
}

/* Blue “Read the unit in the Course Book” line */
.sentence-hint {
  margin-top: 0.1rem;
  font-size: 0.85rem;
  color: #2563eb;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* =====================================
   Buttons & pills
   ===================================== */

/* Generic baseline (applies to all buttons) */
button,
.btn {
  cursor: pointer;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 14px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.08s ease;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ec-text);
}

/* Layout for the two buttons side-by-side */
.action-row {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Slightly bolder buttons */
.btn {
  font-size: 0.95rem;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Icons inside buttons */
.btn-icon {
  font-size: 1.05em;
}

/* Primary action (Correct) – keep your colours, add a bit of depth */
.btn-primary {
  background: var(--ec-accent);
  border: 1px solid var(--ec-accent-active);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover {
  background: var(--ec-accent-hover);
  border-color: var(--ec-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
.btn-primary:active {
  background: var(--ec-accent-active);
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

/* Ghost button (Clear) – keep your look but match the feel */
.btn-ghost {
  background: #fff;
  border: 1px solid var(--ec-border);
  color: var(--ec-text);
}
.btn-ghost:hover {
  background: var(--ec-accent-bg);
  border-color: var(--ec-accent);
  color: var(--ec-accent-active);
}

/* Optional: keyboard focus outline for accessibility */
.btn:focus-visible {
  outline: 2px solid var(--ec-accent);
  outline-offset: 2px;
}


/* Primary action (Correct) */
.btn-primary {
  background: var(--ec-accent);
  border: 1px solid var(--ec-accent-active);
  color: #fff;
}
.btn-primary:hover {
  background: var(--ec-accent-hover);
  border-color: var(--ec-accent-hover);
}
.btn-primary:active {
  background: var(--ec-accent-active);
}

/* Ghost buttons (Clear, language toggles, vocab alt) */
.btn-ghost {
  background: #fff;
  border: 1px solid var(--ec-border);
  color: var(--ec-text);
}
.btn-ghost:hover {
  background: var(--ec-accent-bg);
  border-color: var(--ec-accent);
  color: var(--ec-accent-active);
}

.status-line {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--ec-accent-active);
  font-style: italic;
  opacity: 0.95;
}

/* Slightly softer when empty (browser still reserves the space nicely) */
.status-line:empty {
  margin-top: 0;
}


/* Safety: any old HTML with .lang-btn behaves like ghost */
.lang-btn {
  background: #fff;
  border: 1px solid var(--ec-border);
  color: var(--ec-text);
  padding: 6px 10px;
  border-radius: 999px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.lang-btn:hover {
  background: var(--ec-accent-bg);
  border-color: var(--ec-accent);
  color: var(--ec-accent-active);
}

/* Level pills */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--ec-border);
  background: var(--ec-pill-bg);
  color: var(--ec-text);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.pill:hover {
  background: var(--ec-accent-hover);
  color: #fff;
  border-color: var(--ec-accent-active);
}
.pill--active,
.pill[aria-pressed="true"] {
  background: var(--ec-accent);
  color: #fff;
  border-color: var(--ec-accent-active);
}

/* Textareas & focus ring */
textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--ec-border);
  background: #fff;
  color: var(--ec-text);
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Task prompt smaller than main essay box */
#task {
  min-height: 4rem;
  max-height: 8rem;
}

textarea:focus {
  outline: none;
  border-color: var(--ec-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ec-accent) 30%, transparent);
}

/* Word counters (as pills) */
.pill[data-i18n] {
  background: var(--ec-pill-bg);
  border: 1px solid var(--ec-border);
  color: var(--ec-muted);
}
.pill[data-i18n]:hover {
  border-color: var(--ec-accent);
  color: var(--ec-accent-active);
}

/* Vocab suggestion buttons */
.vocab-alt {
  margin: 4px 6px 0 0;
  font-size: 0.9rem;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--ec-accent-bg);
  border: 1px solid var(--ec-accent);
  color: var(--ec-accent-active);
}
.vocab-alt:hover {
  background: var(--ec-accent-hover);
  color: #fff;
}

/* =====================================
   Gradient topbar
   ===================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 16px;
  backdrop-filter: saturate(110%) blur(2px);
  background: linear-gradient(
    180deg,
    var(--ec-grad-1) 0%,
    var(--ec-grad-2) 60%,
    var(--ec-grad-1) 100%
  );
  border-bottom: 1px solid var(--ec-border);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.02),
    0 6px 18px -10px var(--ec-grad-shadow);
}

/* Layout inside topbar */
.topbar .row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar .spacer {
  margin-left: auto;
}

/* Title in banner */
.app-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
  color: var(--ec-accent-active);
  margin: 0;
}

/* Optional badge (DEV / API mode) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid var(--ec-border);
  background: var(--ec-accent-bg);
  color: var(--ec-accent-active);
  font-size: 12px;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ec-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ec-accent) 20%, transparent);
}

/* Ensure hover in the topbar wins any cascade */
.topbar .btn-ghost:hover {
  background: color-mix(in srgb, var(--ec-accent) 15%, #fff);
  border-color: var(--ec-accent-active);
  color: var(--ec-accent-active);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--ec-accent) 20%, transparent);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .topbar {
    backdrop-filter: none;
  }
}

/* Bands / paragraph insights helpers */
#bandsCard .pill {
  margin-right: 4px;
}

#bandsCategories li,
#bandsImprovements li {
  padding: 4px 0;
}

/* Extra sentence-insight styling */
#sentenceCard li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.sentence-badge {
  font-size: 0.75rem;
  background: #005bbb;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.sentence-insight {
  margin-bottom: 0.75rem;
}

.sentence-insight__issue {
  font-weight: 600;
  margin: 0.25rem 0;
}

.sentence-insight__expl {
  font-size: 0.95rem;
  margin: 0.25rem 0;
}

.sentence-insight__versions {
  margin: 0.25rem 0 0.25rem 1rem;
  padding-left: 0;
  list-style: none;
}

.sentence-insight__hint {
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0.25rem 0 0.5rem;
}

/* =====================================
   Tagline and level row
   ===================================== */

.expert-tagline {
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 6px;
  margin-bottom: 18px;
  font-style: italic;
  opacity: 0.9;
  color: var(--text-muted, #444);
  letter-spacing: 0.25px;
  display: block;
}

.level-row {
  width: 100%;
  text-align: center;
  margin: 8px 0 12px;
  font-size: 0.95rem;
  font-weight: 500;
}

.level-row .pill {
  margin-left: 4px;
  margin-right: 4px;
}

/* =====================================
   Layout container + responsive grid
   ===================================== */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-container {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

/* Main app content: center and narrow it a bit */
.app-main {
  max-width: 880px;        /* try 880px first; tweak to taste */
  margin: 2rem auto 4rem;  /* center inside .app-container */
}


/* Two-column sections → stack on smaller screens */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

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

/* Top bar rows */
.topbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;

  /* NEW: match or slightly exceed .app-main width */
  max-width: 900px;   /* try 900px so it’s just a bit wider than the text */
  margin: 0 auto;     /* center inside the topbar */
  width: 100%;
}

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

/* On narrow screens, let the top bar wrap neatly */
@media (max-width: 640px) {
  .topbar-row {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .topbar-right .btn-ghost {
    padding-inline: 0.5rem;
  }
}

/* Toolbar layout */
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

@media (max-width: 640px) {
  .toolbar-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .toolbar-row > .btn-primary,
  .toolbar-row > .btn-ghost {
    flex: 1 1 140px;
  }

  .toolbar-row #inWC,
  .toolbar-row #outWC {
    margin-top: 4px;
  }
}

/* Make cards breathe a bit on mobile */
@media (max-width: 640px) {
  .card {
    padding: 12px;
  }

  .card-title {
    font-size: 0.95rem;
  }
}

/* Shorter Course Book button on mobile */
@media (max-width: 640px) {
  #btnCourseBook span {
    display: none;
  }

  #btnCourseBook {
    padding-inline: 6px;
    font-size: 1.1rem;
  }
}

/* =====================================
   JSON debug viewer
   ===================================== */

.debug-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 12px;
}

.debug-toggle {
  font-size: 0.8rem;
  opacity: 0.8;
  padding-inline: 0.5rem;
}

.debug-json {
  max-height: 260px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  background: #0b1120;
  color: #e5e7eb;
  padding: 8px;
  border-radius: 6px;
  white-space: pre;
  line-height: 1.4;
}

/* Hide debug on very small screens */
@media (max-width: 640px) {
  .debug-toggle-row,
  #debugCard {
    display: none;
  }
}

/* =====================================
   Busy / loading state for Correct button
   ===================================== */

.btn-primary.is-busy {
  position: relative;
  opacity: 0.8;
  cursor: wait;
}

/* Tiny spinner on the right side of the button text */
.btn-primary.is-busy::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-left-color: transparent;
  animation: ec-spin 0.6s linear infinite;
}

/* Spinner animation */
@keyframes ec-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =====================================
   Developer mobile preview (?mobile=1)
   ===================================== */

.force-mobile body,
.force-mobile .app-container {
  max-width: 380px !important;
  margin: 0 auto !important;
  border: 2px dashed #888;
  padding: 8px;
}

.force-mobile .topbar-row,
.force-mobile .grid-2 {
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.force-mobile body {
  border: 2px dashed #999;
  padding: 4px;
}

.force-mobile .topbar-row {
  flex-wrap: wrap !important;
  row-gap: 8px;
}

.force-mobile .topbar-right {
  width: 100%;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.force-mobile .card {
  padding: 12px;
}

.force-mobile .card-title {
  font-size: 0.95rem;
}

.force-mobile #debugCard,
.force-mobile .debug-toggle-row {
  display: none !important;
}

/* =====================================
   Sentence insight → Course Book links
   ===================================== */

.si-link {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #2563eb;
  font-weight: 500;
}

.si-link::before {
  content: "📘 ";
}

.si-link:hover {
  text-decoration: underline;
  cursor: pointer;
}

.si-link-btn {
  margin-top: 6px;
  padding: 4px 8px;
  font-size: 0.85rem;
  background: #eef3ff;
  border: 1px solid #c3d4ff;
  color: #2353c4;
  border-radius: 6px;
  cursor: pointer;
}

.si-link-btn:hover {
  background: #dce7ff;
}
.unit-page {
  margin-top: 32px;
  margin-bottom: 64px;
}

.unit-back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.95rem;
  text-decoration: none;
}

.unit-back-link:hover {
  text-decoration: underline;
}

.unit-hero {
  margin-bottom: 32px;
}

.unit-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 4px;
}

.unit-hero h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.unit-intro {
  max-width: 60rem;
}

.unit-section {
  margin-top: 32px;
}

.unit-section h2 {
  margin-bottom: 8px;
}

.unit-section h3 {
  margin-top: 16px;
  margin-bottom: 4px;
}

.formula {
  font-family: "IBM Plex Serif", serif;
  font-style: italic;
  margin: 8px 0 16px;
}

.tip-box {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 165, 0, 0.06);
  border: 1px solid rgba(255, 165, 0, 0.4);
}

.definition-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .definition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.definition-card {
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
}

.definition-card h3 {
  margin-bottom: 6px;
}

.definition-card .example {
  margin-top: 8px;
}

.table-scroll {
  overflow-x: auto;
}

.unit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.unit-table th,
.unit-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
}

.example {
  margin: 8px 0;
}

.breakdown-list {
  margin-top: 8px;
}

.practice-section ol {
  padding-left: 1.5rem;
}

.next-unit {
  margin-top: 16px;
  font-weight: 500;
}

.next-unit a {
  margin-left: 6px;
}
.reader-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .reader-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

.reader-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 900px) {
  .reader-nav {
    flex-direction: column;
  }
}

.reader-unit-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 0.95rem;
}

.reader-unit-btn.is-active {
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 128, 0, 0.7);
}
/* === Feedback card (course book suggestions) ========================== */

.feedback-panel {
  margin-top: 1.5rem;
}

.feedback-panel__title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #757575;
  margin-bottom: 0.5rem;
}

.ec-feedback-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ec-feedback-card__header {
  margin-bottom: 0.25rem;
}

.ec-feedback-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.ec-feedback-card__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #555;
}

.ec-feedback-card__empty {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #444;
}

.ec-feedback-list {
  list-style: none;
  margin: 0.5rem 0 0.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ec-feedback-item {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ec-feedback-item__main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ec-feedback-item__label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.ec-feedback-item__desc {
  margin: 0;
  font-size: 0.85rem;
  color: #4b5563;
}

.ec-feedback-item__link {
  align-self: flex-start;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 0.1rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #15803d;
  text-decoration: none;
  border: 1px solid rgba(22, 163, 74, 0.25);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.ec-feedback-item__link:hover {
  background: #dcfce7;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(22, 163, 74, 0.2);
}

.ec-feedback-card__footer {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #6b7280;
}
/* ===== Hide in-app Unit Reader on small screens ===== */
@media (max-width: 900px) {
  .reader-layout,
  .reader-header {
    display: none !important;
  }
}
/* ---------------------------------------------------------------
   LANDING PAGE — Coral Edition
   Works with your existing style.css + theme="coral"
--------------------------------------------------------------- */

/* Root theme harmony */
:root {
  --landing-bg: #fff7f5;               /* soft coral tint */
  --landing-coral: #ff6f61;            /* your main coral */
  --landing-coral-dark: #e65b4f;
  --landing-text-dark: #2d2d2d;
  --landing-text-light: #555;
  --landing-radius: 16px;
}

/* Landing wrapper */
.landing {
  width: 100%;
  min-height: 100vh;
  padding: 4rem 1.5rem;
  background: var(--landing-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.landing-inner {
  max-width: 960px;
  background: #ffffff;
  padding: 3rem 2rem;
  border-radius: var(--landing-radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 0.8s ease forwards;
}

/* Header */
.landing-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--landing-coral-dark);
  text-align: center;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

.landing-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: var(--landing-text-light);
  margin-bottom: 2.5rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Grid */
.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.landing-column {
  background: #fdfdfd;
  border: 1px solid #ffd7d2;
  padding: 1.5rem;
  border-radius: var(--landing-radius);
  transition: box-shadow 0.25s ease;
}

.landing-column:hover {
  box-shadow: 0 6px 20px rgba(255, 111, 97, 0.15);
}

.landing-column h2 {
  color: var(--landing-coral-dark);
  font-family: 'Inter', sans-serif;
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
}

.landing-column p,
.landing-column li {
  color: var(--landing-text-light);
  line-height: 1.55;
}

/* List style */
.landing-list {
  padding-left: 1.2rem;
}

.landing-list li {
  margin-bottom: 0.4rem;
}

.landing-list li::marker {
  color: var(--landing-coral);
}

/* CTA */
.landing-cta {
  text-align: center;
  margin-top: 2rem;
}

.cta-button {
  padding: 1rem 2.2rem;
  background: var(--landing-coral);
  border: none;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}

.cta-button:hover {
  background: var(--landing-coral-dark);
  transform: translateY(-2px);
}

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

.landing-note {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: #666;
  letter-spacing: 0.1px;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile layout */
@media (max-width: 800px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }
  .landing-inner {
    padding: 2.2rem 1.4rem;
  }
  .landing-title {
    font-size: 2rem;
  }
}
/* Coral wave header for landing page */
.landing {
  position: relative;
  overflow: hidden; /* hides anything that extends outside */
}

.landing-wave {
  position: absolute;
  inset: 0 0 auto 0; /* top: 0; left: 0; right: 0 */
  height: 220px;
  pointer-events: none;
  z-index: 0;
}

.landing-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.landing-wave path {
  fill: #ff6f61; /* main coral */
  opacity: 0.9;
}

/* Make sure the card sits on top of the wave */
.landing-inner {
  position: relative;
  z-index: 1;
  margin-top: 80px; /* so it doesn’t overlap the highest part of the wave */
}
.landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  background:
    radial-gradient(
      circle at top center,
      rgba(255, 140, 120, 0.35) 0,
      rgba(255, 140, 120, 0) 55%
    ),
    linear-gradient(
      180deg,
      #fff7f4 0%,
      #ffffff 45%,
      #ffffff 100%
    );
}
.landing-wave {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.landing-wave svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Optional: make the wave itself coral */
.landing-wave path {
  fill: #ff7b6b; /* tweak to match your existing coral */
}
.landing-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
}
/* Landing layout */
.landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  background:
    radial-gradient(
      circle at top center,
      rgba(255, 123, 107, 0.25) 0,
      rgba(255, 123, 107, 0) 55%
    ),
    linear-gradient(
      180deg,
      #fff7f4 0%,
      #ffffff 45%,
      #ffffff 100%
    );
}

.landing-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  width: 100%;
}

/* Optional: if you still have .landing-wave SVG */
.landing-wave {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.landing-wave path {
  fill: #ff7b6b;
}

/* Hero grid */
.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  margin-top: 2.5rem;
}

.landing-column {
  min-width: 0;
}

.landing-copy p {
  margin-bottom: 0.75rem;
}

.landing-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.landing-list li + li {
  margin-top: 0.35rem;
}

/* SVG hero */
.landing-illustration {
  display: flex;
  justify-content: center;
}

.hero-svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* CTA styling tweak (optional: uses teal accent) */
.landing-cta .btn-primary,
.cta-button {
  background: linear-gradient(135deg, #ff7b6b, #ff5b4a);
  border: none;
}

.landing-cta .btn-primary:hover,
.cta-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.landing-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Mobile layout: landing */
@media (max-width: 768px) {
  .landing-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .landing-illustration {
    order: -1;
  }

  .landing {
    padding-top: 2.5rem;
  }
}

/* --------------------------------------------------
   Top bar logo (file-based SVG)
-------------------------------------------------- */

.app-title--logo {
  display: flex;
  align-items: center;
  margin: 0;
}

.app-title--logo .logo-inline {
  height: 32px;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .app-title--logo .logo-inline {
    height: 28px;
  }
}
/* =====================================
   Premium Section Title Styling
   ===================================== */

.app-block__title {
  font-family: "IBM Plex Serif", serif;  /* elegant exam-book vibe */
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ec-accent-active);
  margin-bottom: 0.35rem;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

/* Subtitle / hint */
.app-block__hint {
  font-size: 1rem;
  color: var(--ec-muted);
  margin-bottom: 1.2rem;
  line-height: 1.45;
}

/* Optional: lighten the whole block top spacing so the page breathes */
.app-block {
  margin-bottom: 2.5rem;
}
/* =====================================
   GLOBAL HARMONISED TITLES (ALL BLOCKS)
   ===================================== */

.app-block__title,
.ec-block__title,
.summary-item .summary-label,
.feedback-panel__title {
  font-family: "IBM Plex Serif", serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ec-accent-active);
  margin-bottom: 0.35rem;
  line-height: 1.25;
  letter-spacing: -0.2px;
}
.app-block__hint {
  font-size: 1rem;
  color: var(--ec-muted);
  margin-bottom: 1.2rem;
  line-height: 1.45;
}
.app-block,
.ec-block {
  margin-bottom: 2.6rem;
}
/* Shared card styling */
.app-box,
.ec-box {
  background: #ffffff;
  border: 1px solid var(--ec-border);
  border-radius: 12px;
  padding: 1.3rem 1.4rem;
  box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.05);
}
.summary-label {
  font-family: "IBM Plex Serif", serif;
  font-size: 1rem;
  color: var(--ec-accent-active);
}

.summary-value {
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 4px;
}
#feedback p,
#edits p {
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 0.65rem;
}

#feedback strong,
#edits strong {
  color: var(--ec-accent-active);
  font-weight: 600;
}
.app-box--coursebook {
  background: #fff8f5;
  border: 1px solid var(--ec-border);
  padding: 1.4rem 1.6rem;
}

.app-box--coursebook a {
  color: var(--ec-accent-active);
  font-weight: 600;
  text-decoration: none;
}

.app-box--coursebook a:hover {
  text-decoration: underline;
}
.app-textarea--draft {
  background: #fefefe;
  border: 1px solid var(--ec-border);
  border-radius: 10px;
  padding: 12px;
  font-size: 1rem;
}
.summary-mini-label {
  display: block;
  font-size: 0.85rem;
  color: var(--ec-muted);
  margin-bottom: 4px;
  font-style: italic;
}
/* ===== Key focus "sticky note" in Summary ===== */

.summary-item--focus {
  /* optional: let it span full width on wider grids */
  grid-column: 1 / -1;
}

.summary-focus-card {
  position: relative;
  background: #fff9d6;                 /* soft sticky-note yellow */
  border-radius: 10px;
  border: 1px solid #f4d58a;
  padding: 0.8rem 1rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.07);
  margin-top: 0.25rem;
}

/* little "tape" effect at the top */
.summary-focus-card::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 24px;
  width: 62px;
  height: 16px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transform: rotate(-3deg);
}

/* label text: small, teacher-ish */
.summary-focus-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #a26b1f;
  margin-bottom: 0.2rem;
}

/* main focus sentence */
.summary-focus-text {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #3a2a13;
  line-height: 1.4;
}
/* ===========================================
   KEY FOCUS — Sticky Note Style (Final Version)
   Rotation calibrated to -1.2deg
   =========================================== */

/* Summary layout: ensures the sticky note has space */
.summary-item {
  position: relative;
}

/* Sticky note container */
.summary-item .summary-value {
  background: #fff7d1; /* soft yellow sticky-note colour */
  border: 1px solid #e6d28a;
  padding: 12px 14px;
  border-radius: 8px;
  display: block;
  width: 100%;
  max-width: 260px;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #5a4a00;

  /* Your exact rotation */
  transform: rotate(-1.2deg);

  /* Layering so the tape sits nicely */
  position: relative;

  /* Gentle floating animation */
  animation: floatNote 3.4s ease-in-out infinite;
}

/* Tape on the top */
.summary-item .summary-value::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 74px;
  height: 22px;
  background: rgba(255, 255, 200, 0.65);
  border-radius: 3px;
  transform: translateX(-50%) rotate(3deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Small label: “Most important thing to fix:” */
.summary-mini-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #7c6a00;
  display: block;
  margin-bottom: 6px;
  opacity: 0.85;
}

/* Floating animation — locked to your -1.2deg rotation */
@keyframes floatNote {
  0%   { transform: rotate(-1.2deg) translateY(0); }
  50%  { transform: rotate(-1.2deg) translateY(-3px); }
  100% { transform: rotate(-1.2deg) translateY(0); }
}
/* ===========================================
   KEY FOCUS — Sticky Note Style (matches
   .summary-item--focus markup)
   =========================================== */

.summary-item--focus .summary-focus-card {
  position: relative;
  background: #fff7d1; /* soft sticky-note yellow */
  border: 1px solid #e6d28a;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 5px 12px rgba(0,0,0,0.08);
  margin-top: 0.4rem;
  max-width: 100%;
  transform: rotate(-1.2deg);
  animation: floatNote 3.4s ease-in-out infinite;
}

/* Tape on top */
.summary-item--focus .summary-focus-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 74px;
  height: 20px;
  background: rgba(255, 255, 200, 0.7);
  border-radius: 3px;
  transform: translateX(-50%) rotate(3deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.16);
}

/* Tiny all-caps label inside the card */
.summary-focus-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a26b1f;
  margin-bottom: 4px;
}

/* Main Key Focus text */
.summary-focus-text {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #3a2a13;
  line-height: 1.4;
}

/* Floating animation (locked to -1.2deg) */
@keyframes floatNote {
  0%   { transform: rotate(-1.2deg) translateY(0); }
  50%  { transform: rotate(-1.2deg) translateY(-3px); }
  100% { transform: rotate(-1.2deg) translateY(0); }
}

