/* ═══ THE OLIVER GROVE ACADEMY — PROGRESSION STYLES ═══
   Everything is scoped to .oga-* so the standalone joke pages (404, SchoolCues…) stay untouched. */

/* ── School color policy: "Oliver" ── */
:root.oga-oliver-blue { --olive: #2456a6; --olive-light: #d6e0f2; }

/* ── The tab ── */
.header-nav > a.oga-tab { position: relative; }
.oga-tab--new { animation: oga-tab-in 1.4s ease both; }
@keyframes oga-tab-in {
  0%   { opacity: 0; letter-spacing: 0.6em; }
  60%  { opacity: 1; }
  100% { opacity: 1; }
}
.oga-dot {
  display: inline-block; width: 7px; height: 7px; margin-left: 7px;
  border-radius: 50%; background: #d64545; vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}
.mobile-menu a.oga-tab--mobile { color: var(--olive); font-weight: 600; }
.mobile-toggle.oga-has-dot::after {
  content: ''; position: absolute; top: -6px; right: -8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #d64545; box-shadow: 0 0 0 2px #fff;
  animation: oga-pulse 1.6s ease-in-out infinite;
}
@keyframes oga-pulse { 50% { transform: scale(1.25); } }

/* ── Glitch (Error 505) ── */
.oga-glitch { position: relative; }
.oga-glitch::before, .oga-glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0; padding: inherit;
  display: inherit; align-items: inherit; justify-content: inherit;
  pointer-events: none; opacity: 0;
}
.oga-glitch::before { color: #e0457b; clip-path: inset(0 0 52% 0); animation: oga-g1 2.3s infinite steps(1); }
.oga-glitch::after  { color: #29b6c9; clip-path: inset(52% 0 0 0); animation: oga-g2 1.9s infinite steps(1); }
@keyframes oga-g1 { 0%, 86%, 100% { opacity: 0; transform: none; } 88% { opacity: 1; transform: translate(-3px, -1px); } 93% { opacity: 1; transform: translate(2px, 1px); } }
@keyframes oga-g2 { 0%, 78%, 100% { opacity: 0; transform: none; } 80% { opacity: 1; transform: translate(3px, 1px); } 85% { opacity: 1; transform: translate(-2px, 0); } }

/* ── Toasts (top of screen: clear of the share button, Jimothy and the delete bar) ── */
.oga-toasts {
  position: fixed; z-index: 100000;
  top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.oga-toast {
  pointer-events: auto; display: block; width: 100%; max-width: 440px;
  background: #141a17; color: #fff; text-decoration: none;
  border-left: 4px solid #6b7f6f; border-radius: 6px;
  padding: 12px 16px 12px 14px;
  font: 14px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif;
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
  transform: translateY(-16px); opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.oga-toast.is-in { transform: none; opacity: 1; }
.oga-toast strong {
  display: block; margin-bottom: 3px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #a9c4b0;
}
.oga-toast span { display: block; color: #f2f2ee; }
.oga-toast em {
  display: block; margin-top: 7px; font-style: normal;
  font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #e8c867;
}
.oga-toast--grade  { border-left-color: #3aa76d; }
.oga-toast--stage  { border-left-color: #e0b04a; }
.oga-toast--danger { border-left-color: #d64545; }

/* ── Jimothy (catchable) ── */
.oga-jimothy {
  position: fixed; z-index: 9999;
  left: 16px; bottom: calc(22px + env(safe-area-inset-bottom));
  min-height: 44px; padding: 10px 18px;
  background: #fff; color: #6b7f6f; border: 0; border-radius: 8px;
  font: italic 14px Georgia, serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.16);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s, color 0.2s;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.oga-jimothy.is-in { opacity: 1; transform: none; }
.oga-jimothy.is-caught { background: #3aa76d; color: #fff; }

/* ── Delete mode ── */
html.oga-delete-mode body { cursor: crosshair; }
html.oga-delete-mode body a { cursor: crosshair; }
/* iPhone Safari only sends taps on plain text/images to a page-level listener when the
   element looks clickable. cursor:pointer is the switch that makes it do so. */
@media (hover: none) {
  html.oga-delete-mode body * { cursor: pointer !important; -webkit-tap-highlight-color: rgba(214,69,69,0.25); }
}
.oga-dying {
  outline: 2px solid #d64545 !important; outline-offset: 2px;
  transition: transform 0.26s ease, opacity 0.26s ease !important;
  transform: scale(0.86) rotate(-2deg) !important; opacity: 0 !important;
}
.oga-deleted { display: none !important; }
.oga-pill {
  position: fixed; z-index: 99995;
  left: 12px; right: 76px; bottom: calc(22px + env(safe-area-inset-bottom));
  max-width: 440px;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 7px 7px 16px; border-radius: 999px;
  background: #b3261e; color: #fff;
  font: 600 13px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif;
  box-shadow: 0 10px 28px rgba(179,38,30,0.35);
}
@media (min-width: 801px) { .oga-pill { left: 50%; right: auto; transform: translateX(-50%); width: 400px; } }
.oga-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: oga-blink 1s steps(1) infinite; flex: none; }
@keyframes oga-blink { 50% { opacity: 0.2; } }
.oga-pill__text { flex: 1; min-width: 0; }
.oga-pill__done {
  flex: none; min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px;
  background: #fff; color: #b3261e; cursor: pointer;
  font: 700 12px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0.12em; text-transform: uppercase;
}

/* ── View source ── */
html.oga-noscroll, html.oga-noscroll body { overflow: hidden; }
.oga-source {
  position: fixed; inset: 0; z-index: 100001;
  display: flex; flex-direction: column;
  background: #0f1412; color: #cfd8d3;
}
.oga-source__bar {
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: #18201c; border-bottom: 1px solid #26302b;
}
.oga-source__title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 12px ui-monospace, Menlo, Consolas, monospace; color: #8fb59d;
}
.oga-source__btn {
  flex: none; min-height: 38px; padding: 0 12px; border: 0; border-radius: 6px;
  background: #26302b; color: #e6efe9; cursor: pointer;
  font: 600 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.oga-source__code {
  flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; margin: 0;
  padding: 14px 14px calc(80px + env(safe-area-inset-bottom));
  font: 12px/1.65 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-word;
}
.oga-src-t { color: #7fb3e0; }
.oga-src-c { color: #9be3b0; background: rgba(80,200,120,0.12); border-radius: 3px; transition: background 0.3s; }
.oga-src-c.is-flash { background: rgba(255,215,100,0.38); color: #fff; }
.oga-src-link { color: #ffd76a; text-decoration: underline; text-underline-offset: 2px; }

/* ── Contact page notes ── */
.oga-form-note {
  max-width: 500px; margin: 18px auto 0; padding: 14px 16px; text-align: left;
  background: #f1f5f2; border-left: 4px solid #3aa76d;
  font-size: 14px; line-height: 1.6; color: #333;
}
.oga-form-note.is-error { background: #fbeceb; border-left-color: #b3261e; }

/* ── Home signup (Squarespace behavior: errors + hidden "Thank you!") ── */
.signup-error { color: #b3261e !important; font-size: 13px !important; margin: 10px auto 0 !important; }

/* ═══ PORTAL PAGE ═══ */
.oga-portal {
  max-width: 640px; margin: 0 auto;
  padding: calc(var(--nav-height) + 44px) 40px 90px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400; line-height: 1.5; color: #333;
}
@media (max-width: 800px) { .oga-portal { padding: calc(var(--nav-height) + 28px) 16px 70px; } }

/* Not found (stage 0) */
.oga-notfound h1 { font-family: Georgia, serif; font-weight: 400; font-size: 30px; margin-bottom: 18px; }
.oga-notfound p { margin-bottom: 1em; line-height: 1.7; }
.oga-notfound a { color: inherit; }
.oga-notfound ul { margin: 0 0 1.1em 1.2em; line-height: 1.7; }
.oga-notfound li { margin-bottom: 0.4em; }

/* Password (stage 1) */
.oga-lock { text-align: center; padding: 30px 0 10px; }
.oga-lock__icon { color: var(--text-light); margin-bottom: 16px; display: flex; justify-content: center; }
.oga-lock h1 { font-family: Georgia, serif; font-weight: 400; font-size: 24px; margin-bottom: 24px; line-height: 1.35; }
.oga-lock__form { display: flex; gap: 0; max-width: 380px; margin: 0 auto; }
.oga-lock__form .oga-input { flex: 1; border-right: 0; }
.oga-lock__hint { margin-top: 26px; font-size: 13px; color: var(--text-light); font-style: italic; }
.oga-shake { animation: oga-shake 0.4s ease; }
@keyframes oga-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* Shared document look (SchoolCues-ish) */
.oga-doc { background: #fff; border: 1px solid #e1e1e1; box-shadow: 0 6px 24px rgba(0,0,0,0.05); }
.oga-doc__bar {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--olive); color: #fff;
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.4s;
}
.oga-doc__bar span:last-child { opacity: 0.75; }
.oga-meta { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #eee; }
.oga-meta div { padding: 12px 16px; font-size: 15px; border-top: 1px solid #eee; }
.oga-meta div:nth-child(odd) { border-right: 1px solid #eee; }
.oga-meta b, .oga-summary b {
  display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-light);
}
.oga-note { padding: 14px 16px 4px; font-size: 14px; line-height: 1.6; color: #555; }
.oga-courses { list-style: none; padding: 0 16px; margin: 0; counter-reset: c; }
.oga-course { padding: 14px 0; border-bottom: 1px solid #eee; }
.oga-course__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.oga-course__name { font-weight: 600; font-size: 15px; color: #222; }
.oga-grade {
  flex: none; min-width: 46px; text-align: center;
  padding: 4px 8px; border-radius: 4px; border: 1px solid #ccc;
  font: 700 12px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0.08em; color: #999;
}
.oga-course.is-done .oga-grade { background: #2e7d4f; border-color: #2e7d4f; color: #fff; animation: oga-stamp 0.4s ease; }
@keyframes oga-stamp { 0% { transform: scale(1.6) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.oga-course__task { margin-top: 6px; font-size: 14px; line-height: 1.55; color: #555; }
.oga-course.is-done .oga-course__task { color: #999; text-decoration: line-through; text-decoration-color: #bbb; }
.oga-course__comment { margin-top: 6px; font-size: 13.5px; font-style: italic; color: #2e7d4f; }
.oga-summary { display: grid; grid-template-columns: repeat(3, 1fr); background: #f7f7f5; }
.oga-summary div { padding: 14px 16px; font-size: 18px; font-family: Georgia, serif; }
.oga-fine { padding: 12px 16px 16px; font-size: 12px; color: #999; font-style: italic; }

/* Admin (stage 3) */
.oga-alert { margin: 16px; padding: 12px 14px; background: #fff6d6; border-left: 4px solid #e0b04a; font-size: 14px; line-height: 1.5; }
.oga-h {
  margin: 22px 16px 8px; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-light);
}
.oga-checklist { list-style: none; margin: 0 16px; padding: 0; }
.oga-checklist li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.oga-tick {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #ccc;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff;
}
.oga-checklist li.is-done .oga-tick { background: #2e7d4f; border-color: #2e7d4f; }
.oga-obj__label { display: block; font-size: 15px; color: #222; }
.oga-obj__label em { font-style: normal; color: var(--olive); font-weight: 600; margin-left: 4px; }
.oga-checklist li.is-done .oga-obj__label { color: #999; text-decoration: line-through; }
.oga-obj__hint { display: block; margin-top: 3px; font-size: 13px; line-height: 1.5; color: #888; }
.oga-policy { margin: 0 16px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.oga-policy__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.oga-policy__name { display: block; font-size: 15px; font-weight: 600; color: #222; }
.oga-policy__val { display: block; font-size: 14px; color: var(--olive); }
.oga-policy__note { margin-top: 6px; font-size: 13px; font-style: italic; color: #777; line-height: 1.5; }
.oga-locked { margin: 0 16px 18px; padding: 16px; border: 1px dashed #ccc; font-size: 14px; color: #888; line-height: 1.5; }
.oga-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px; }
.oga-admin .oga-btn--block, .oga-office .oga-btn--block { margin: 4px 16px 0; width: calc(100% - 32px); }
.oga-admin > .oga-link, .oga-office > .oga-link { display: block; margin: 6px 16px 14px; }

/* Buttons + inputs */
.oga-btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 0;
  background: #000; color: #fff !important; text-decoration: none !important; cursor: pointer;
  font: 400 11px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0.2em; text-transform: uppercase;
  -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s;
}
.oga-btn:active { opacity: 0.7; }
.oga-btn:disabled { opacity: 0.6; }
.oga-btn--small { min-height: 40px; padding: 0 16px; flex: none; }
.oga-btn--danger { background: #b3261e; }
.oga-btn--ghost { background: transparent; color: #000 !important; box-shadow: inset 0 0 0 1px #000; }
.oga-btn--block { display: flex; width: 100%; }
.oga-link {
  background: none; border: 0; padding: 10px 0; cursor: pointer;
  font: 13px "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--text-light); text-decoration: underline;
}
.oga-link--danger { color: #b3261e; }
.oga-input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid #ccc; border-radius: 0; background: #fff;
  font: 16px "Helvetica Neue", Helvetica, Arial, sans-serif; color: #222;   /* 16px: no iOS zoom */
  -webkit-appearance: none; appearance: none; outline: none;
}
.oga-input:focus { border-color: #888; }
.oga-err { margin: 14px 0 0; color: #b3261e; font-size: 14px; line-height: 1.5; }

/* Error 505 (stage 4) */
.oga-505 { text-align: center; margin-bottom: 26px; }
.oga-505__code { font: 400 120px/1 Georgia, serif; color: #222; letter-spacing: -0.02em; display: inline-block; }
.oga-505__title { margin: 8px 0 12px; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: #b3261e; font-weight: 600; }
.oga-505 p:last-child { font-size: 15px; line-height: 1.6; color: #555; max-width: 420px; margin: 0 auto; }
.oga-form__body { padding: 18px 16px 20px; }
.oga-field { display: block; margin-bottom: 18px; }
.oga-field > span { display: block; margin-bottom: 6px; font-size: 13px; color: #333; }
.oga-field small { color: #999; }
.oga-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; font-size: 15px; line-height: 1.45; color: #222; cursor: pointer; }
.oga-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--olive); }
.oga-sig {
  display: block; width: 100%; height: 170px;
  background: #fffef7; border: 1px dashed #b9b29a; touch-action: none; cursor: crosshair;
}

/* Office + diploma (stage 5) */
.oga-office__body { padding: 20px 16px 6px; }
.oga-office__title { font: 400 26px/1.3 Georgia, serif; margin-bottom: 10px; color: #222; }
.oga-office__body > p { font-size: 15px; line-height: 1.6; color: #555; margin-top: 4px; }
.oga-diploma { margin: 18px 0 14px; }
.oga-diploma img { display: block; width: 100%; height: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.15); -webkit-touch-callout: default; }
.oga-diploma figcaption { padding: 60px 0; text-align: center; color: #999; font-style: italic; }
.oga-office .oga-btn--block[data-dl] { margin: 0; width: 100%; }
.oga-office .oga-fine { padding: 8px 0 4px; text-align: center; }
.oga-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.oga-stats div { background: #f7f7f5; padding: 12px 10px; font-size: 12px; color: #777; line-height: 1.35; }
.oga-stats b { display: block; font: 400 22px/1.2 Georgia, serif; color: #222; }

@media (max-width: 380px) {
  .oga-summary div { padding: 12px 10px; font-size: 16px; }
  .oga-tools { grid-template-columns: 1fr; }
  .oga-505__code { font-size: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .oga-glitch::before, .oga-glitch::after, .oga-tab--new, .mobile-toggle.oga-has-dot::after,
  .oga-pill__dot, .oga-course.is-done .oga-grade, .oga-shake { animation: none !important; }
}

/* ── Parody notice (only on theolivergroveacademy.org) ── */
.oga-parody {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99999;
  min-height: 46px; padding: 8px 52px 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 14px;
  background: #1f2a24; color: #f2f2ee; text-align: center;
  font: 13.5px/1.35 "Helvetica Neue", Helvetica, Arial, sans-serif;
  transform: translateY(-100%); opacity: 0;
  transition: transform 0.45s ease, opacity 0.45s ease;
}
.oga-parody.is-in { transform: none; opacity: 1; }
.oga-parody strong { font-weight: 600; }
.oga-parody__link {
  color: #e8c867; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; font-weight: 600;
}
.oga-parody__short { display: none; }
.oga-parody__close {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; background: transparent; color: #cfd8d3;
  font-size: 15px; cursor: pointer; border-radius: 50%;
}
.oga-parody__close:hover { background: rgba(255,255,255,0.08); }
/* Header slides down while the notice is up, so nothing is covered */
.header { transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, top 0.45s ease; }
html.oga-parody-on .header { top: 46px; }
@media (max-width: 520px) {
  .oga-parody__long { display: none; }
  .oga-parody__short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .oga-parody, .header { transition: none !important; }
}
