/* Rewired Education Group — public resources (reg.rewirededucationgroup.com)
   Same brand palette as the internal directory, trimmed to just what this site needs. */

:root {
  --ink: #10515f;
  --ink-deep: #0b3944;
  --teal-mid: #1f7a83;
  --orange: #da7f26;
  --orange-deep: #c76c17;
  --mint: #cfe3e2;
  --mint-soft: #e6f1ef;
  --cream: #f8f5ee;
  --paper: #ffffff;
  --line: #dfe6e2;
  --text: #1f2d2f;
  --muted: #5c7370;
  --radius: 10px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { height: 40px; width: auto; display: block; }

/* ---------- landing page ---------- */
.landing-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(50px, 9vw, 96px) 24px 70px;
  text-align: center;
}
.landing-wrap h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  color: var(--ink);
  margin: 0 0 14px;
}
.landing-wrap p.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0 auto 40px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  text-align: left;
}
.resource-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.resource-card:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 18px rgba(16,81,95,0.08);
}
.resource-card .title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
.resource-card .desc { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.resource-card .go {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
}

footer {
  padding: 30px clamp(20px, 5vw, 56px) 50px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- shared page chrome (catalog + template pages) ---------- */
.back-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-mid);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}
.back-link:hover { text-decoration: underline; }

.btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover { border-color: var(--orange); color: var(--orange); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-deep); color: #fff; }
.btn.ghost { border-style: dashed; }
.btn:disabled { opacity: 0.45; cursor: default; }

.status-msg { font-size: 0.78rem; color: var(--muted); }

/* ---------- District Catalog: vertical scroll ---------- */
.deck-wrap { max-width: 820px; margin: 0 auto; padding: clamp(16px, 3vw, 28px) 20px 60px; }
.deck-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.deck-head h1 { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0; color: var(--ink); }
.deck-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  font-size: 0.82rem; font-weight: 600; color: var(--teal-mid); text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px;
  background: var(--paper); cursor: pointer;
}
.icon-btn:hover { border-color: var(--orange); color: var(--orange); }
.deck-list { display: flex; flex-direction: column; gap: 22px; }
.deck-slide { background: var(--mint-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.deck-slide img { width: 100%; height: auto; display: block; border-radius: 4px; box-shadow: 0 10px 28px rgba(16,81,95,0.14); }
.deck-slide .slide-num { font-size: 0.78rem; font-weight: 600; color: var(--muted); padding: 2px 4px 8px; display: block; }

/* ---------- Bring Rewired template page ---------- */
.tmpl-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 56px); border-bottom: 1px solid var(--line);
  gap: 12px; flex-wrap: wrap; background: var(--paper);
}
.auth-area { display: flex; align-items: center; gap: 10px; }
.auth-area .who { font-size: 0.8rem; color: var(--teal-mid); font-weight: 600; }

.tmpl-wrap { max-width: 720px; margin: 0 auto; padding: clamp(30px, 6vw, 56px) 20px 70px; }
.tmpl-wrap .eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 8px;
}
.tmpl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

.doc-mirror {
  max-width: 640px; font-family: Arial, Helvetica, sans-serif; color: #202124;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px clamp(20px, 5vw, 44px);
}
.doc-title { font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 1.7rem; color: #1f2d4a; margin: 0 0 6px; }
.doc-subtitle { font-style: italic; color: #1e7a6f; font-size: 1rem; margin: 0 0 16px; }
.doc-howto { color: #3c3c3c; font-size: 0.95rem; margin: 0 0 8px; line-height: 1.55; }
.doc-personalize { margin: 0 0 18px; color: #3c3c3c; }
.doc-divider { border: none; border-top: 2px solid #1e7a6f; margin: 4px 0 22px; }
.doc-heading { font-weight: 700; color: #1e7a6f; font-size: 0.92rem; letter-spacing: 0.02em; margin: 0 0 10px; }
.doc-list { margin: 0 0 22px; padding-left: 22px; }
.doc-list li { margin-bottom: 7px; line-height: 1.55; }
.doc-body p { margin: 0 0 16px; line-height: 1.65; }
.doc-body .doc-list { margin: 4px 0 18px; }
.doc-link { color: #1155cc; text-decoration: underline; }
.doc-before { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.doc-body[contenteditable="true"] { outline: 2px dashed var(--orange); outline-offset: 8px; }

.save-bar {
  display: none; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 16px;
  border: 1px solid var(--orange); border-radius: 8px; background: var(--mint-soft); font-size: 0.85rem;
}
.save-bar.visible { display: flex; }

@media (max-width: 560px) {
  .topbar, .tmpl-topbar { flex-wrap: wrap; gap: 8px; }
}
