/* The two feature pages: /quiz-maker-for-schools/ (Teams) and /quiz-folders/ (folders). Extends /styles.css + /page.css.
   Everything that moves is pure CSS and stops for people who prefer less motion. */
.fp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.fp-hero-note { margin-top: 14px; font-size: 14px; color: var(--ink-muted); }
.fp-visual { position: relative; border-radius: 22px; background: #fff; border: 1px solid var(--paper-line); box-shadow: 0 30px 60px -36px rgba(28, 25, 23, .35); overflow: hidden; }
.fp-visual::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(var(--brand-rgb), .16) 1px, transparent 1.3px); background-size: 16px 16px; }
.fp-visual > * { position: relative; }

/* Teams: the school tree, a spotlight moving from campus to campus */
.fp-tree { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 28px 18px; }
.fp-node { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--paper-line); background: #fff; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; animation: fp-pop .5s ease backwards; animation-delay: var(--d, 0s); }
.fp-node.is-top { background: var(--brand); border-color: var(--brand); color: #fff; font-size: 14px; padding: 8px 16px; }
.fp-node.is-class { background: var(--brand-soft); border-color: transparent; }
.fp-node.is-teacher { background: #e8f6ec; border-color: transparent; font-weight: 600; }
.fp-branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.fp-branch { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border: 1px dashed var(--paper-line); border-radius: 14px; animation: fp-spot 9s ease-in-out infinite; animation-delay: var(--s, 0s); }
@keyframes fp-spot { 0%, 30%, 100% { background: transparent; box-shadow: none; } 8%, 24% { background: rgba(var(--brand-rgb), .06); box-shadow: 0 0 0 2px var(--brand); } }
@keyframes fp-pop { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
.fp-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 18px 22px; }
.fp-legend span { padding: 4px 10px; border-radius: 99px; background: var(--paper-2); font-size: 12px; font-weight: 700; color: var(--ink-2); }

/* Folders: the pile that files itself */
.fp-sort { height: 330px; }
.fp-visual.fp-sort > div { position: absolute; inset: 0; }
.fp-folder { position: absolute; left: var(--fx); bottom: 14px; width: 30.5%; height: 52%; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--g) 30%, var(--paper-line)); border-top: 4px solid var(--g); background: linear-gradient(180deg, color-mix(in srgb, var(--g) 10%, #fff), #fff 70%); }
.fp-folder::before { content: ""; position: absolute; top: -12px; left: 10px; width: 46px; height: 10px; border-radius: 7px 7px 0 0; background: var(--g); }
.fp-folder b { display: block; padding: 9px 10px; font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-card { position: absolute; z-index: 2; left: var(--mx); top: var(--my); width: 28%; padding: 7px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--paper-line); border-left: 3px solid var(--g); box-shadow: 0 8px 18px -10px rgba(28, 25, 23, .4); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: rotate(var(--mr)); animation: fp-file 7s cubic-bezier(.3, .8, .2, 1) infinite; animation-delay: var(--d); }
@keyframes fp-file {
  0%, 12% { left: var(--mx); top: var(--my); transform: rotate(var(--mr)); }
  30%, 82% { left: var(--sx); top: var(--sy); transform: none; box-shadow: none; }
  100% { left: var(--mx); top: var(--my); transform: rotate(var(--mr)); }
}
.fp-teal { --g: #0d9488; } .fp-amber { --g: #d97706; } .fp-indigo { --g: #4f46e5; }

/* Problem → fix cards */
.fp-problems { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fp-problem { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--paper-line); }
.fp-problem h3 { margin: 0; font-size: 18px; color: var(--ink); }
.fp-quote { margin: 0; padding: 12px 14px 12px 16px; border-radius: 12px; border-left: 4px solid #e11d48; background: #fdf1f3; font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.fp-fix { margin: 0; padding: 12px 14px 12px 16px; border-radius: 12px; border-left: 4px solid #16a34a; background: #eef8f1; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.fp-fix strong { color: #166534; }

/* Steps */
.fp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 14px; counter-reset: fp; }
.fp-steps li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--paper-line); counter-increment: fp; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.fp-steps li::before { content: counter(fp); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 11px; background: var(--brand); color: #fff; font-weight: 800; }
.fp-steps strong { color: var(--ink); font-size: 16px; }

/* Tables */
.fp-table-wrap { overflow-x: auto; border: 1px solid var(--paper-line); border-radius: 16px; background: #fff; }
.fp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.fp-table th, .fp-table td { padding: 12px 14px; border-bottom: 1px solid var(--paper-line-soft); text-align: center; vertical-align: middle; }
.fp-table thead th { background: var(--paper-2); font-size: 13px; color: var(--ink); }
.fp-table tbody th { text-align: left; font-weight: 600; color: var(--ink); min-width: 190px; }
.fp-table tr:last-child th, .fp-table tr:last-child td { border-bottom: 0; }
.fp-yes { color: #166534; font-weight: 800; }
.fp-no { color: var(--ink-muted); }
.fp-if { display: inline-block; padding: 2px 9px; border-radius: 99px; background: #fff4d6; color: #92400e; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.fp-part { display: inline-block; padding: 2px 9px; border-radius: 99px; background: #e8f6ec; color: #166534; font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* Folders: the student's phone */
.fp-two { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.fp-phone { width: 260px; padding: 10px; border-radius: 34px; background: #111827; box-shadow: 0 26px 50px -24px rgba(17, 24, 39, .6); }
.fp-phone-body { display: flex; flex-direction: column; gap: 8px; min-height: 360px; padding: 28px 12px 16px; border-radius: 26px; background: var(--paper); }
.fp-ph-h { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.fp-ph-fold { padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--paper-line); border-top: 3px solid #d97706; }
.fp-ph-fold b { display: block; font-size: 13px; color: var(--ink); }
.fp-ph-fold small { font-size: 11px; color: var(--ink-muted); }
.fp-ph-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 9px; border-radius: 9px; background: #fff; border: 1px solid var(--paper-line); font-size: 12px; font-weight: 600; color: var(--ink); }
.fp-ph-row em { font-style: normal; padding: 2px 8px; border-radius: 99px; background: var(--paper-2); font-size: 10.5px; font-weight: 700; color: var(--ink-muted); white-space: nowrap; }
.fp-ph-row em.is-go { background: #d97706; color: #fff; }

/* Folder or Team */
.fp-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fp-compare > div { padding: 24px; border-radius: 18px; background: #fff; border: 1px solid var(--paper-line); }
.fp-compare > div:first-child { border-top: 4px solid var(--brand); }
.fp-compare h3 { margin: 0 0 6px; font-size: 20px; color: var(--ink); }
.fp-compare p { margin: 0 0 10px; color: var(--ink-muted); }
.fp-compare ul { margin: 0; padding-left: 20px; color: var(--ink-2); line-height: 1.7; }

.fp-section-lead { max-width: 70ch; margin: -6px 0 22px; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.fp-mt { margin-top: 56px; }

@media (max-width: 1023px) {
  .fp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .fp-hero-grid, .fp-two { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .fp-two .fp-phone { margin: 0 auto; }
}
@media (max-width: 640px) {
  .fp-problems, .fp-compare, .fp-steps { grid-template-columns: minmax(0, 1fr); }
  .fp-branches { gap: 6px; }
  .fp-node { font-size: 11.5px; padding: 5px 8px; }
  .fp-node.is-teacher { display: none; }
  .fp-branch > .fp-node:first-child { white-space: normal; text-align: center; line-height: 1.2; max-width: 100%; }
  .fp-sort { height: 300px; }
  /* Phones: names wrap onto two lines instead of being cut ("Grade 9 Sci…"); a two-line card still fits the 40px row step. */
  .fp-card { font-size: 10.5px; padding: 5px 7px; white-space: normal; line-height: 1.2; }
  .fp-folder b { font-size: 10.5px; padding: 7px 8px; white-space: normal; line-height: 1.2; }
}
/* The smallest phones (320px): one long word ("Fractions") must still fit a card about 70px wide. */
@media (max-width: 360px) {
  .fp-card { font-size: 9.5px; padding: 5px 4px 5px 5px; letter-spacing: -0.01em; }
  .fp-folder b { font-size: 9.5px; padding: 6px 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .fp-node, .fp-branch { animation: none !important; }
  .fp-card { animation: none !important; left: var(--sx); top: var(--sy); transform: none; box-shadow: none; }
}
