/* trig-styles.css — shared styling shared between book + whiteboard skins */

:root {
  --primary: #4f46e5;
  --accent: #facc15;
  --red-pen: #dc2626;
  --green-pen: #16a34a;
  --surface: #ffffff;
  --text: #0f172a;
  --grid-color: #cbd5e1;
}

* { box-sizing: border-box; }

.trig-page {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background-color: #f8fafc;
  background-image: radial-gradient(var(--grid-color) 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 100%;
  padding: 1.25rem 1rem 4rem;
}

.trig-header {
  max-width: 1080px;
  margin: 0 auto 1.25rem;
  text-align: center;
}
.trig-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  gap: 0;
  background: #fff;
  border: 2px solid #000;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  box-shadow: 4px 4px 0 #000;
}
.trig-logo .l-r { color: var(--red-pen); }
.trig-logo .l-b { color: var(--primary); }
.trig-logo .l-g { color: var(--green-pen); }

.trig-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 1rem 0 0.25rem;
  color: #000;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 6px;
  text-underline-offset: 4px;
}
.trig-sub {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.25rem;
  color: #334155;
  margin: 0;
}

/* Tabs */
.trig-tabs {
  max-width: 1080px;
  margin: 1.5rem auto 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.trig-tab {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  background: #fff;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap !important;
  line-height: 1.2;
  flex-shrink: 0;
}
.trig-tab:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 #000; }
.trig-tab.on { background: var(--primary); color: #fff; }
.trig-tab.on.tab-ref { background: var(--green-pen); }

/* Section card with ruler */
.section-card {
  max-width: 1080px;
  margin: 1.25rem auto;
  background: #fff;
  border: 2px solid #000;
  border-radius: 16px;
  box-shadow: 6px 6px 0 #000;
  overflow: hidden;
}
.ruler-top {
  height: 35px;
  background-color: var(--accent);
  border-bottom: 2px solid #000;
  background-image:
    linear-gradient(90deg, #000 2px, transparent 2px),
    linear-gradient(90deg, #000 1px, transparent 1px);
  background-size: 40px 15px, 10px 8px;
  background-repeat: repeat-x;
  background-position: 10px bottom, 10px bottom;
}
.section-body { padding: 1.5rem; }
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  margin: 0 0 1rem;
  color: var(--primary);
}

/* === SOLVER === */
.solver-eq {
  background: #0f172a;
  color: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.eq-text { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.eq-range { font-size: 1rem; color: #facc15; font-family: 'Patrick Hand', cursive; }

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.presets-label {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  color: #334155;
}
.preset-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  background: #eff6ff;
  color: #4338ca;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
}
.preset-btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 3px 3px 0 #000; background: var(--primary); color: #fff; }

.solver-controls { margin-bottom: 1.25rem; }
.control-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.control-row label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 100px;
}
.seg {
  display: inline-flex;
  border: 2px solid #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 3px 3px 0 #000;
}
.seg button {
  background: #fff;
  border: none;
  padding: 0.45rem 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  cursor: pointer;
  border-right: 2px solid #000;
}
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--primary); color: #fff; }

.slider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1.25rem;
}
.sliderrow {
  background: #fffbe8;
  border: 1.5px solid #000;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
.sliderrow-label {
  display: flex;
  justify-content: space-between;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.sliderrow-value { color: var(--primary); }
.sliderrow input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

/* graph + commentary side-by-side */
.graph-and-commentary {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 760px) { .graph-and-commentary { grid-template-columns: 1fr; } }

.graph-card {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 4px 4px 0 #000;
}
.graph-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  padding: 0 0.25rem;
}
.solution-count {
  background: var(--accent);
  color: #000;
  padding: 0.15rem 0.6rem;
  border: 1.5px solid #000;
  border-radius: 999px;
  font-size: 0.78rem;
}

.commentary {
  background: #facc15;
  border: 2px solid #000;
  border-radius: 4px;
  padding: 1rem 1rem 0.85rem;
  position: relative;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.15);
  transform: rotate(1.5deg);
  font-family: 'Patrick Hand', cursive;
  align-self: start;
}
.commentary-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red-pen);
  border: 1.5px solid #000;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.commentary-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.commentary p {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0;
  color: #000;
}

/* steps */
.steps { margin-top: 0.75rem; }
.steps-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  margin: 0.5rem 0 0.75rem;
  color: #000;
}
.step-card {
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: 3px 3px 0 #000;
}
.step-header {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.step-body { padding: 0.85rem 1rem; }
.step-body p { margin: 0 0 0.5rem; font-size: 0.95rem; }
.step-body p:last-child { margin-bottom: 0; }
.step-body ul { margin: 0.4rem 0 0.5rem 1.25rem; font-size: 0.95rem; }
.step-body code {
  font-family: 'Space Grotesk', sans-serif;
  background: #fef9c3;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #fbbf24;
  font-weight: 600;
  font-size: 0.92em;
}
.aside {
  font-family: 'Patrick Hand', cursive !important;
  font-size: 1.05rem !important;
  color: #4338ca !important;
  background: #eff6ff;
  padding: 0.4rem 0.75rem;
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
}
.eqn { padding: 0.4rem 0.6rem; background: #f8fafc; border-radius: 6px; font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.5rem; }

.solset { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.solchip {
  background: #f1f5f9;
  border: 1px solid #000;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
}
.solchip-final { background: var(--green-pen); color: #fff; }

.final-banner {
  background: #fff;
  border: 3px dashed var(--green-pen);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.final-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--green-pen);
  margin-bottom: 0.5rem;
}
.final-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.final-chip {
  background: var(--green-pen);
  color: #fff;
  padding: 0.4rem 0.85rem;
  border: 2px solid #000;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  box-shadow: 3px 3px 0 #000;
}

/* === REFERENCE === */
.ref-section { margin-bottom: 2rem; }
.ref-section:last-child { margin-bottom: 0; }
.ref-h {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
  color: var(--primary);
}
.ref-sub { font-family: 'Patrick Hand', cursive; font-size: 1.1rem; color: #334155; margin: 0 0 0.85rem; }

.graph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}
.ref-graph-card {
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 10px;
  padding: 0.6rem;
  box-shadow: 3px 3px 0 #000;
}
.ref-graph-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  padding-left: 0.25rem;
}

.ident-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}
@media (max-width: 760px) { .ident-layout { grid-template-columns: 1fr; } }

.ident-list { display: flex; flex-direction: column; gap: 0.85rem; }
.ident-group { background: #f8fafc; border: 1.5px solid #000; border-radius: 10px; padding: 0.6rem; }
.ident-group-head {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.4rem;
}
.ident-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.15s;
}
.ident-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #000; }
.ident-btn.active { background: var(--primary); color: #fff; box-shadow: 3px 3px 0 #000; }
.ident-formula { display: block; }

.ident-detail {
  background: #facc15;
  border: 2px solid #000;
  border-radius: 4px;
  padding: 1.25rem 1.25rem 1rem;
  position: relative;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.15);
  transform: rotate(-1deg);
  align-self: start;
  position: sticky;
  top: 1rem;
}
.ident-detail-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red-pen);
  border: 1.5px solid #000;
}
.ident-detail-formula {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #000;
}
.ident-note {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
  color: #1e3a8a;
}
.ident-uses-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.ident-detail ul { margin: 0; padding-left: 1.1rem; font-family: 'Patrick Hand', cursive; font-size: 1.08rem; line-height: 1.4; color: #000; }
.ident-detail li { margin-bottom: 0.15rem; }

.exact-table {
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 3px 3px 0 #000;
}
.exact-table table { width: 100%; border-collapse: collapse; font-family: 'Space Grotesk', sans-serif; }
.exact-table th, .exact-table td { padding: 0.55rem 0.75rem; text-align: center; border-bottom: 1px solid #cbd5e1; border-right: 1px solid #cbd5e1; }
.exact-table th { background: var(--primary); color: #fff; font-weight: 700; }
.exact-table td:first-child { background: #fef9c3; font-weight: 700; }

/* ============ WHITEBOARD SKIN OVERRIDES ============ */
.solver-whiteboard, .reference-whiteboard {
  font-family: 'Inter', sans-serif;
}
.solver-whiteboard .solver-eq {
  background: #064e3b;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 12px 12px;
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 5px 5px 0 #000;
}
.solver-whiteboard .eq-text { color: #fff; font-family: 'Patrick Hand', cursive; font-size: 2rem; }
.solver-whiteboard .eq-range { color: #86efac; }

.solver-whiteboard .step-header { background: var(--green-pen); }
.solver-whiteboard .preset-btn:hover { background: var(--green-pen); }
.solver-whiteboard .ident-btn.active { background: var(--green-pen); }
.solver-whiteboard .seg button.on { background: var(--green-pen); }
.solver-whiteboard .sliderrow input[type="range"] { accent-color: var(--green-pen); }
.solver-whiteboard .sliderrow-value { color: var(--green-pen); }
.solver-whiteboard .commentary {
  background: #fff;
  transform: rotate(0deg);
  border-radius: 10px;
  border: 2px dashed #000;
}
.reference-whiteboard .ref-h { color: var(--green-pen); }
.reference-whiteboard .ident-btn.active { background: var(--green-pen); }
.reference-whiteboard .ident-detail { background: #ecfccb; border-radius: 10px; transform: rotate(0deg); border: 2px dashed #000; }
.reference-whiteboard .exact-table th { background: var(--green-pen); }

/* === UNIT CIRCLE === */
.uc-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 760px) { .uc-wrap { grid-template-columns: 1fr; } }
.uc-graphic {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 0.6rem;
  box-shadow: 4px 4px 0 #000;
}
.uc-hint {
  font-family: 'Patrick Hand', cursive;
  text-align: center;
  margin: 0.4rem 0 0;
  color: #475569;
  font-size: 1.05rem;
}
.uc-readout { display: flex; flex-direction: column; gap: 0.85rem; }
.uc-row {
  background: #fffbe8;
  border: 1.5px solid #000;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
}
.uc-row label { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.9rem; }
.uc-row input[type="range"] { width: 100%; accent-color: var(--primary); }
.uc-val { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--primary); min-width: 44px; text-align: right; }
.uc-readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.uc-pill {
  background: #fff;
  border: 2px solid;
  border-radius: 10px;
  padding: 0.5rem 0.4rem;
  text-align: center;
  box-shadow: 3px 3px 0 #000;
}
.uc-pill-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
}
.uc-pill-val {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #000;
}

/* === CAST === */
.cast-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 760px) { .cast-wrap { grid-template-columns: 1fr; } }
.cast-graphic {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 0.6rem;
  box-shadow: 4px 4px 0 #000;
}
.cast-detail { display: flex; flex-direction: column; }
.cast-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--primary);
  color: #000;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
  align-self: flex-start;
  box-shadow: 4px 4px 0 #000;
}
.cast-letter { font-family: 'Space Grotesk',sans-serif; font-weight: 700; font-size: 2.6rem; line-height: 1; }
.cast-word { font-family: 'Patrick Hand',cursive; font-size: 1.2rem; }
.cast-angle { font-family: 'Space Grotesk',sans-serif; font-size: 1rem; margin: 0 0 0.5rem; }
.cast-detail > p { font-size: 1rem; line-height: 1.5; }

/* === R-FORM === */
.rform-target-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.rform-target-label {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
  color: #334155;
}
.rform-target-btns {
  display: inline-flex;
  border: 2px solid #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 4px 4px 0 #000;
  background: #fff;
}
.rform-target-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  background: #fff;
  color: #000;
  border: none;
  border-right: 2px solid #000;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.rform-target-btn:last-child { border-right: none; }
.rform-target-btn:hover { background: #fef9c3; }
.rform-target-btn.on { background: var(--primary); color: #fff; }

.rform-equate {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  background: #0f172a;
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 6px 6px 0 #000;
  margin-bottom: 1rem;
}
.rform-equate-side {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  text-align: center;
  letter-spacing: -0.01em;
}
.rform-equate-lhs { color: #93c5fd; }
.rform-equate-rhs { color: #facc15; }
.rform-equate-rhs b { color: #fff; }
.rform-equate-equiv {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #facc15;
  text-align: center;
}
@media (max-width: 760px) {
  .rform-equate { grid-template-columns: 1fr; }
  .rform-equate-side { font-size: 1.15rem; }
  .rform-equate-equiv { font-size: 1.6rem; }
}

.rform-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}
.rform-step-card {
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 3px 3px 0 #000;
}
.rform-step-head {
  background: var(--primary);
  color: #fff;
  padding: 0.4rem 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
}
.rform-step-body {
  padding: 0.6rem 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
}
.rform-step-card-final .rform-step-head { background: var(--green-pen); }
.rform-step-card-final { background: #ecfccb; }

.rform-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}
.rform-card {
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  box-shadow: 3px 3px 0 #000;
}
.rform-card-label {
  font-family: 'Space Grotesk',sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.rform-card-formula { font-family: 'Space Grotesk',sans-serif; font-size: 0.95rem; line-height: 1.4; }
.rform-card-final { background: #ecfccb; border-color: var(--green-pen); }
.rform-card-final .rform-card-label { color: var(--green-pen); }

/* === Floating shapes (homepage) === */
.shape {
  position: fixed;
  z-index: -1;
  opacity: 0.32;
  animation: trig-float 10s infinite ease-in-out;
  pointer-events: none;
}
.shape-triangle { width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 28px solid var(--accent); }
.shape-circle { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--red-pen); }
.shape-square { width: 26px; height: 26px; border: 3px solid var(--primary); transform: rotate(12deg); background: rgba(255,255,255,0.3); }
.shape-diamond { width: 24px; height: 24px; border: 3px solid var(--green-pen); transform: rotate(45deg); }
.shape-plus { width: 28px; height: 28px; }
.shape-plus::before, .shape-plus::after { content: ''; position: absolute; background: var(--primary); border-radius: 2px; }
.shape-plus::before { width: 28px; height: 4px; top: 12px; left: 0; }
.shape-plus::after { width: 4px; height: 28px; top: 0; left: 12px; }
@keyframes trig-float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-24px) rotate(180deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

/* footer */
.trig-footer {
  max-width: 1080px;
  margin: 2rem auto 0;
  text-align: center;
  font-family: 'Patrick Hand', cursive;
  color: #475569;
  font-size: 1rem;
}
.trig-footer a { color: var(--primary); text-decoration: underline; }

/* === CALCULUS TABLE ============================================== */
.calc-table-wrap {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  box-shadow: 4px 4px 0 #000;
  padding: 0.85rem 1rem;
}
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Space Grotesk', sans-serif;
}
.calc-table th {
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid #000;
}
.calc-table td {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid #000;
  font-size: 0.95rem;
  background: #fffbe8;
}
.calc-table tr:nth-child(even) td { background: #eff6ff; }
.calc-table code {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 0;
}
@media (max-width: 600px) {
  .calc-table th, .calc-table td { font-size: 0.82rem; padding: 0.4rem 0.5rem; }
}

/* === TRICK CARDS ============================================== */
.trick-card {
  background: #fff;
  border: 2px solid #000;
  border-radius: 14px;
  box-shadow: 5px 5px 0 #000;
  overflow: hidden;
}
.trick-head {
  background: #fef9c3;
  border-bottom: 2px solid #000;
  padding: 0.9rem 1.2rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.trick-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--primary);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: 1.5px solid #000;
  border-radius: 6px;
}
.trick-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #000;
}
.trick-body { padding: 1rem 1.2rem 1.2rem; }
.trick-problem {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  background: #0f172a;
  color: #fff;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  box-shadow: 4px 4px 0 #000;
}
.trick-problem-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #facc15;
}
.trick-problem-eq {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
}
.trick-check {
  margin-top: 1rem;
  background: #ecfccb;
  border: 1.5px solid #000;
  border-radius: 8px;
  padding: 0.7rem 0.95rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  color: #14532d;
}
.trick-check-label {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #14532d;
  margin-right: 0.4rem;
}

