/* ===================================================================
   British Learning Centre — shared design system
   Every tool links this file, so the brand stays consistent and new
   tools inherit everything for free. Change a colour here = change
   it everywhere.
   =================================================================== */

:root {
  --blc-purple:      #57005e;
  --blc-purple-dark: #6e0078;
  --blc-gold:        #d0af35;
  --blc-gold-dark:   #b89728;
  --blc-bg:          #f2f2f5;
  --blc-ink:         #1a1a1a;
  --blc-muted:       #777;
  --blc-faint:       #999;
  --blc-card:        #ffffff;
  --blc-radius:      12px;
  --blc-shadow:      0 1px 6px rgba(0,0,0,0.07);
}

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

body {
  font-family: 'Raleway', sans-serif;
  background: var(--blc-bg);
  color: #222;
  min-height: 100vh;
}

/* -- Header -- */
.blc-header {
  background: #fff;
  color: var(--blc-ink);
  padding: 22px 20px 18px;
  text-align: center;
  position: relative;
}
.blc-logo {
  height: 96px;
  width: auto;
  display: inline-block;
}
.blc-logo.stacked { display: none; height: 128px; }
.blc-tagline {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--blc-purple);
}
.blc-header a.back {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blc-purple);
  opacity: 0.8;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
}
.blc-header a.back:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 560px) {
  .blc-logo.wide { display: none; }
  .blc-logo.stacked { display: inline-block; }
  .blc-header a.back { position: static; transform: none; display: inline-block; margin-bottom: 10px; }
}

.gold-bar { height: 5px; background: var(--blc-gold); }

/* -- Layout -- */
main {
  max-width: 680px;
  margin: 36px auto 80px;
  padding: 0 18px;
}
main.wide { max-width: 980px; }

.card {
  background: var(--blc-card);
  border-radius: var(--blc-radius);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: var(--blc-shadow);
}

.step-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blc-purple);
  margin-bottom: 5px;
}
.card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blc-ink);
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

input[type=text], input[type=number], input[type=date], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  color: var(--blc-ink);
  outline: none;
  background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--blc-purple); }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

/* -- Drop zone -- */
.drop-zone {
  border: 2.5px dashed #c8a0cc;
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  background: #fdf8ff;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--blc-purple);
  background: #f5eaf7;
}
.drop-zone .drop-icon { font-size: 2.2rem; margin-bottom: 10px; }
.drop-zone .drop-label { font-size: 0.95rem; font-weight: 700; color: var(--blc-purple); margin-bottom: 4px; }
.drop-zone .drop-sub { font-size: 0.8rem; color: #aaa; }
.drop-zone .file-chosen { margin-top: 10px; font-size: 0.85rem; font-weight: 600; color: #2e7d32; }

.hint { margin-top: 7px; font-size: 0.78rem; color: var(--blc-faint); line-height: 1.5; }

/* -- Buttons -- */
.btn-primary {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--blc-purple);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
}
.btn-primary:hover { background: var(--blc-purple-dark); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { background: #b8b8b8; cursor: not-allowed; }

.btn-copy {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  background: var(--blc-gold);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.18s;
}
.btn-copy:hover { background: var(--blc-gold-dark); }

/* -- Loading -- */
.loading-state {
  display: none;
  text-align: center;
  padding: 22px 0 6px;
  color: var(--blc-purple);
  font-weight: 600;
  font-size: 0.95rem;
}
.loading-state.on { display: block; }
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid rgba(87,0,94,0.18);
  border-top-color: var(--blc-purple);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: middle;
  margin-right: 7px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-sub { margin-top: 6px; font-size: 0.8rem; color: var(--blc-faint); font-weight: 500; }

/* -- Error -- */
.error-msg {
  display: none;
  margin-top: 14px;
  padding: 11px 15px;
  background: #fdecea;
  border: 1.5px solid #e57373;
  border-radius: 8px;
  color: #b71c1c;
  font-size: 0.855rem;
  line-height: 1.5;
}
.error-msg.on { display: block; }

/* -- Result -- */
.result-section { display: none; }
.result-section.on { display: block; }

textarea.report {
  width: 100%;
  min-height: 480px;
  padding: 15px;
  font-size: 0.88rem;
  line-height: 1.65;
  resize: vertical;
}

.copy-success {
  display: none;
  text-align: center;
  margin-top: 9px;
  color: #2e7d32;
  font-weight: 700;
  font-size: 0.875rem;
}
.copy-success.on { display: block; }

.gold-divider {
  height: 2px;
  background: var(--blc-gold);
  border-radius: 2px;
  margin: 18px 0;
  opacity: 0.5;
}

.edit-note { font-size: 0.83rem; color: var(--blc-muted); margin-bottom: 13px; line-height: 1.55; }
.edit-note strong { color: var(--blc-purple); }

/* -- Subject chips -- */
.subject-chip {
  display: inline-block;
  padding: 3px 13px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}
.chip-english { background: #ede0f5; color: var(--blc-purple); }
.chip-maths   { background: #fff8e1; color: #7b5800; }
.chip-early   { background: #e0f2e9; color: #1b5e20; }

/* ===================================================================
   Hub (index.html) — tool grid
   =================================================================== */
.hub-intro {
  text-align: center;
  margin-bottom: 28px;
  color: var(--blc-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.section-label {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blc-purple);
  margin: 14px 2px 0;
}
.tool-card {
  background: var(--blc-card);
  border-radius: var(--blc-radius);
  padding: 22px 22px 20px;
  box-shadow: var(--blc-shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
  transition: border-color 0.16s, transform 0.1s, box-shadow 0.16s;
  position: relative;
}
.tool-card.live:hover {
  border-color: var(--blc-purple);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(87,0,94,0.12);
}
.tool-card.soon { opacity: 0.62; cursor: default; }
.tool-card .tool-icon { font-size: 2rem; margin-bottom: 12px; }
.tool-card h3 { font-size: 1.02rem; font-weight: 800; color: var(--blc-ink); margin-bottom: 7px; }
.tool-card p { font-size: 0.85rem; color: var(--blc-muted); line-height: 1.5; flex: 1; }
.tool-badge {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 20px;
}
.badge-soon  { background: #eee;     color: #999; }
.badge-admin { background: #ede0f5;  color: var(--blc-purple); }
.tool-cta {
  margin-top: 14px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blc-purple);
}
.tool-card.soon .tool-cta { color: #aaa; }

@media (max-width: 480px) {
  .blc-header h1 { font-size: 1.35rem; }
  .card { padding: 20px 18px; }
}
