/* IGCSE-English Writing Coach page (web/templates/writing/coach.html).
 * Page-scoped plain CSS (linked from the template) — NOT in the bundle, no Tailwind
 * rebuild. Sky/cyan accent to match the hero; matte cards on the site's navy. */

.wc { max-width: 52rem; margin: 0 auto; }

/* ── task picker ─────────────────────────────────────────────────────────── */
.wc-picker-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(148, 163, 184);
  margin-bottom: 0.85rem;
}
.wc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}
.wc-task-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
.wc-task-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(to bottom, rgba(56, 189, 248, 0.08), rgba(255, 255, 255, 0.02));
}
.wc-task-card:focus-visible { outline: 2px solid rgba(56, 189, 248, 0.6); outline-offset: 2px; }
.wc-task-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.5rem;
  border-radius: 0.4rem;
  color: rgb(186, 230, 253);
  background: rgba(56, 189, 248, 0.14);
}
.wc-type-summary { color: rgb(196, 181, 253); background: rgba(167, 139, 250, 0.16); }
.wc-type-article { color: rgb(134, 239, 172); background: rgba(74, 222, 128, 0.14); }
.wc-type-report { color: rgb(253, 224, 71); background: rgba(250, 204, 21, 0.14); }
.wc-type-review { color: rgb(249, 168, 212); background: rgba(244, 114, 182, 0.14); }
.wc-task-title { font-size: 0.95rem; font-weight: 600; color: #fff; }
.wc-task-title-zh { font-size: 0.8rem; color: rgb(148, 163, 184); }
.wc-task-words { font-size: 0.7rem; color: rgb(100, 116, 139); font-variant-numeric: tabular-nums; }

/* ── workspace ───────────────────────────────────────────────────────────── */
.wc-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: rgb(148, 163, 184);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-bottom: 0.9rem;
}
.wc-back:hover { color: rgb(226, 232, 240); }
.wc-back svg { width: 1rem; height: 1rem; }

.wc-brief {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 1rem;
}
.wc-brief-type {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgb(186, 230, 253);
  background: rgba(56, 189, 248, 0.14);
  padding: 0.12rem 0.5rem;
  border-radius: 0.4rem;
}
.wc-brief-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 0.5rem 0 0.85rem;
}
.wc-brief-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(100, 116, 139);
  margin-bottom: 0.3rem;
}
.wc-brief-prompt p { color: rgb(226, 232, 240); font-size: 0.95rem; line-height: 1.55; }
.wc-brief-passage {
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid rgba(56, 189, 248, 0.4);
  border-radius: 0.4rem;
  background: rgba(56, 189, 248, 0.05);
}
.wc-brief-passage p { color: rgb(203, 213, 225); font-size: 0.9rem; line-height: 1.6; }
.wc-brief-bullets { margin-top: 0.9rem; }
.wc-brief-bullets ul { list-style: none; margin: 0; padding: 0; }
.wc-brief-bullets li {
  position: relative;
  padding-left: 1.3rem;
  color: rgb(203, 213, 225);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.25rem;
}
.wc-brief-bullets li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.7);
}

/* ── editor ──────────────────────────────────────────────────────────────── */
.wc-editor { margin-bottom: 1rem; }
.wc-editor-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(148, 163, 184);
  margin-bottom: 0.4rem;
}
.wc-textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.8rem;
  background: rgba(2, 6, 23, 0.5);
  color: #fff;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  line-height: 1.7;
  resize: vertical;
  min-height: 12rem;
}
.wc-textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
.wc-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.6rem;
}
.wc-wordcount {
  font-size: 0.8rem;
  color: rgb(100, 116, 139);
  font-variant-numeric: tabular-nums;
}
.wc-wordcount.is-ok { color: rgb(74, 222, 128); }
.wc-wordcount.is-over { color: rgb(251, 146, 60); }
.wc-check {
  border: none;
  border-radius: 0.6rem;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgb(3, 18, 32);
  background: linear-gradient(to bottom, rgb(125, 211, 252), rgb(56, 189, 248));
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.wc-check:hover { filter: brightness(1.07); }
.wc-check:disabled { opacity: 0.6; cursor: default; }
.wc-check.is-loading { cursor: progress; }
.wc-tip {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  font-style: italic;
  color: rgb(148, 163, 184);
  line-height: 1.5;
}

/* ── feedback ────────────────────────────────────────────────────────────── */
.wc-feedback {
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 1rem;
  padding: 1.2rem 1.35rem;
  background: rgba(56, 189, 248, 0.03);
}
.wc-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
@media (max-width: 480px) { .wc-scores { grid-template-columns: 1fr; } }
.wc-score {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "label value" "bar bar";
  align-items: baseline;
  gap: 0.3rem 0.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.02);
}
.wc-score-label { grid-area: label; font-size: 0.75rem; font-weight: 600; color: rgb(148, 163, 184); text-transform: uppercase; letter-spacing: 0.06em; }
.wc-score-value { grid-area: value; justify-self: end; font-size: 1.4rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.wc-score-max { font-size: 0.85rem; font-weight: 500; color: rgb(100, 116, 139); }
.wc-score-bar { grid-area: bar; height: 0.4rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 0.35rem; }
.wc-score-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: rgb(56, 189, 248); transition: width 0.5s ease; }
.wc-score[data-tier="good"] .wc-score-fill { background: rgb(74, 222, 128); }
.wc-score[data-tier="ok"] .wc-score-fill { background: rgb(250, 204, 21); }
.wc-score[data-tier="low"] .wc-score-fill { background: rgb(251, 146, 60); }

.wc-fb-block { margin-top: 1rem; }
.wc-fb-h {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.45rem;
}
.wc-fb-block ul { list-style: none; margin: 0; padding: 0; }
.wc-fb-block li {
  position: relative;
  padding-left: 1.5rem;
  color: rgb(203, 213, 225);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0.4rem;
}
.wc-fb-strengths li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: rgb(74, 222, 128);
  font-weight: 700;
}
.wc-fb-improve li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: rgb(56, 189, 248);
  font-weight: 700;
}
.wc-fixlist li { padding-left: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.wc-fix-was { color: rgb(148, 163, 184); text-decoration: line-through; text-decoration-color: rgba(251, 113, 133, 0.6); }
.wc-fix-arrow { color: rgb(100, 116, 139); }
.wc-fix-now { color: rgb(134, 239, 172); font-weight: 500; }
.wc-model {
  color: rgb(226, 232, 240);
  font-size: 0.92rem;
  line-height: 1.65;
  padding: 0.8rem 1rem;
  border-left: 3px solid rgba(74, 222, 128, 0.5);
  border-radius: 0.4rem;
  background: rgba(74, 222, 128, 0.05);
  white-space: pre-wrap;
}
.wc-disclaimer {
  margin-top: 1.1rem;
  font-size: 0.72rem;
  color: rgb(100, 116, 139);
  font-style: italic;
}
.wc-error {
  margin-top: 1rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(251, 113, 133, 0.35);
  border-radius: 0.6rem;
  background: rgba(251, 113, 133, 0.08);
  color: rgb(253, 164, 175);
  font-size: 0.88rem;
}
