/*
Theme Name: Teacherfiera.com® Classroom
Theme URI: https://teacherfiera.com
Author: Teacherfiera Resources (M) Sdn. Bhd.
Description: A fast, Gutenberg-ready, free-resources-first classroom theme for Teacherfiera.com®.
Version: 2.0.1
Text Domain: teacherfiera-classroom
*/

@font-face {
  font-family: "KG Blank Space Solid";
  src: url("assets/fonts/KGBlankSpaceSolid.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "KG Primary Penmanship";
  src: url("assets/fonts/KGPrimaryPenmanship.ttf") format("truetype");
  font-display: swap;
}

:root {
  --tf-red: #e51b23;
  --tf-red-dark: #b91017;
  --tf-red-soft: #fff0f1;
  --tf-ink: #272321;
  --tf-muted: #69615c;
  --tf-paper: #fffefa;
  --tf-line: #d8e8ef;
  --tf-blue: #397e9b;
  --tf-blue-soft: #edf8fc;
  --tf-green: #27825c;
  --tf-yellow: #ffd65a;
  --tf-shadow: 8px 9px 0 rgba(229, 27, 35, 0.12);
  --tf-display: "KG Blank Space Solid", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --tf-hand: "KG Primary Penmanship", "Segoe Print", "Bradley Hand", cursive;
  --tf-body: "Trebuchet MS", Arial, sans-serif;
  --tf-max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--tf-ink);
  background: var(--tf-paper);
  font-family: var(--tf-body);
  font-size: 16px;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid var(--tf-yellow);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: #fff;
  background: var(--tf-red);
}

.tf-shell {
  width: min(calc(100% - 44px), var(--tf-max));
  margin-inline: auto;
}

.tf-site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-top: 8px solid var(--tf-red);
  border-bottom: 1px solid #eee4df;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(13px);
}

.tf-header-inner {
  display: flex;
  width: min(calc(100% - 44px), 1500px);
  min-height: 92px;
  align-items: center;
  gap: 24px;
}

.tf-brand {
  display: flex;
  min-width: 330px;
  align-items: center;
  gap: 13px;
}

.tf-logo-circle {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--tf-red);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 0 rgba(229, 27, 35, 0.13);
}

.tf-logo-circle img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.tf-brand-copy {
  display: grid;
  line-height: 1.05;
}

.tf-brand-copy strong {
  color: var(--tf-red);
  font-family: var(--tf-display);
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.tf-brand-copy small {
  margin-top: 7px;
  color: var(--tf-ink);
  font-family: var(--tf-hand);
  font-size: 0.78rem;
  white-space: nowrap;
}

.tf-primary-nav {
  min-width: 0;
  flex: 1;
}

.tf-menu,
.tf-menu ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.tf-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(13px, 1.7vw, 27px);
}

.tf-menu > li {
  position: relative;
}

.tf-menu > li > a {
  display: block;
  padding: 15px 2px 11px;
  border-bottom: 3px solid transparent;
  font-family: var(--tf-display);
  font-size: 0.8rem;
  white-space: nowrap;
}

.tf-menu > li:hover > a,
.tf-menu > li.current-menu-item > a,
.tf-menu > li.current-menu-ancestor > a {
  color: var(--tf-red);
  border-bottom-color: var(--tf-red);
}

.tf-menu .sub-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% - 1px);
  left: 50%;
  display: none;
  width: min(360px, 82vw);
  max-height: 68vh;
  padding: 13px;
  overflow-y: auto;
  border: 2px solid var(--tf-ink);
  border-radius: 14px 18px 16px 13px;
  background: #fff;
  box-shadow: var(--tf-shadow);
  transform: translateX(-50%);
}

.tf-menu li:hover > .sub-menu,
.tf-menu li:focus-within > .sub-menu {
  display: block;
}

.tf-menu .sub-menu li + li {
  border-top: 1px dashed #e5dcd6;
}

.tf-menu .sub-menu a {
  display: block;
  padding: 10px 11px;
  color: #4e4844;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.tf-menu .sub-menu a:hover {
  color: var(--tf-red);
  background: var(--tf-red-soft);
}

.tf-menu .sub-menu .sub-menu {
  position: static;
  display: block;
  width: 100%;
  max-height: none;
  padding: 0 0 4px 14px;
  border: 0;
  box-shadow: none;
  transform: none;
}

.tf-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tf-pill-button,
.tf-primary-button,
.tf-secondary-button {
  display: inline-flex;
  min-height: 46px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--tf-red);
  border-radius: 999px;
  font-family: var(--tf-display);
  font-size: 0.76rem;
  line-height: 1;
  text-align: center;
}

.tf-pill-button,
.tf-primary-button {
  color: #fff;
  background: var(--tf-red);
  box-shadow: 0 4px 0 var(--tf-red-dark);
}

.tf-pill-button:hover,
.tf-primary-button:hover {
  background: var(--tf-red-dark);
  transform: translateY(1px);
}

.tf-secondary-button {
  color: var(--tf-red);
  background: #fff;
}

.tf-secondary-button:hover {
  color: #fff;
  background: var(--tf-red);
}

.tf-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 2px solid var(--tf-red);
  border-radius: 50%;
  color: var(--tf-red);
  background: #fff;
  cursor: pointer;
}

.tf-menu-toggle > span:not(.screen-reader-text),
.tf-menu-toggle::before,
.tf-menu-toggle::after {
  width: 20px;
  height: 2px;
  background: currentColor;
  content: "";
  transition: transform 180ms ease, opacity 180ms ease;
}

.tf-menu-toggle {
  gap: 4px;
}

.menu-open .tf-menu-toggle > span:not(.screen-reader-text) {
  opacity: 0;
}

.menu-open .tf-menu-toggle::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-open .tf-menu-toggle::after {
  transform: translateY(-6px) rotate(-45deg);
}

.tf-notebook-bg {
  background-color: var(--tf-paper);
  background-image:
    linear-gradient(
      90deg,
      transparent 0,
      transparent 6.8%,
      rgba(229, 27, 35, 0.28) 6.9%,
      transparent 7%
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 35px,
      var(--tf-line) 36px,
      transparent 37px
    );
}

.tf-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 8vw, 112px) 0 clamp(80px, 8vw, 108px);
}

.tf-hero::after {
  position: absolute;
  right: 3.5%;
  bottom: 2%;
  color: rgba(229, 27, 35, 0.14);
  content: "ABC";
  font-family: var(--tf-hand);
  font-size: clamp(6rem, 15vw, 13rem);
  font-weight: 700;
  transform: rotate(-7deg);
}

.tf-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, 0.98fr);
  align-items: center;
  gap: clamp(50px, 7vw, 105px);
}

.tf-eyebrow,
.tf-section-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 15px;
  align-items: center;
  border: 2px solid var(--tf-red);
  border-radius: 999px;
  color: var(--tf-red);
  background: #fff;
  font-family: var(--tf-hand);
  font-size: 1rem;
  font-weight: 700;
  transform: rotate(-1deg);
}

.tf-hero h1 {
  max-width: 760px;
  margin: 25px 0 24px;
  color: var(--tf-red);
  font-family: var(--tf-display);
  font-size: clamp(3.4rem, 4.6vw, 4.5rem);
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.tf-hero h1 span {
  display: block;
  margin-top: 28px;
  color: var(--tf-ink);
  font-family: var(--tf-hand);
  font-size: clamp(2rem, 3.8vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.tf-hero-copy > p {
  max-width: 650px;
  margin: 0 0 27px;
  color: var(--tf-muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.8;
}

.tf-hero-actions,
.tf-card-actions,
.tf-community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.tf-hero-actions .tf-primary-button,
.tf-hero-actions .tf-secondary-button {
  min-height: 56px;
  padding-inline: 24px;
  font-size: 0.9rem;
}

.tf-hero-badges {
  display: grid;
  margin-top: 31px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.tf-proof-badge {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 84px;
  padding: 11px 10px 11px 9px;
  align-items: center;
  gap: 9px;
  border: 3px solid var(--tf-ink);
  border-radius: 18px 13px 20px 15px;
  background: #fff;
  box-shadow: 4px 5px 0 var(--tf-red);
  transform: rotate(-1deg);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.tf-proof-badge:nth-child(2) {
  box-shadow: 4px 5px 0 var(--tf-blue);
  transform: rotate(0.8deg);
}

.tf-proof-badge:nth-child(3) {
  box-shadow: 4px 5px 0 var(--tf-yellow);
  transform: rotate(-0.4deg);
}

.tf-proof-badge:hover {
  box-shadow: 2px 3px 0 var(--tf-red);
  transform: translateY(-3px) rotate(0);
}

.tf-proof-badge:nth-child(2):hover {
  box-shadow: 2px 3px 0 var(--tf-blue);
}

.tf-proof-badge:nth-child(3):hover {
  box-shadow: 2px 3px 0 var(--tf-yellow);
}

.tf-badge-seal {
  position: relative;
  display: grid;
  width: 53px;
  height: 53px;
  flex: 0 0 53px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  outline: 3px solid var(--tf-red);
  color: #fff;
  background: var(--tf-red);
  font-family: var(--tf-display);
  font-size: 0.74rem;
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: center;
  transform: rotate(-7deg);
}

.tf-badge-seal::after {
  position: absolute;
  inset: -7px;
  z-index: -1;
  border: 2px dashed var(--tf-red);
  border-radius: 50%;
  content: "";
}

.tf-proof-badge:nth-child(2) .tf-badge-seal {
  outline-color: var(--tf-blue);
  background: var(--tf-blue);
  font-size: 1.05rem;
  transform: rotate(5deg);
}

.tf-proof-badge:nth-child(2) .tf-badge-seal::after {
  border-color: var(--tf-blue);
}

.tf-proof-badge:nth-child(3) .tf-badge-seal {
  outline-color: var(--tf-ink);
  color: var(--tf-ink);
  background: var(--tf-yellow);
  font-family: var(--tf-hand);
  font-size: 1.7rem;
  transform: rotate(-5deg);
}

.tf-proof-badge:nth-child(3) .tf-badge-seal::after {
  border-color: var(--tf-ink);
}

.tf-badge-copy {
  display: block;
  min-width: 0;
}

.tf-badge-copy strong,
.tf-badge-copy small {
  display: block;
}

.tf-badge-copy strong {
  font-family: var(--tf-display);
  font-size: 0.82rem;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.tf-badge-copy small {
  margin-top: 5px;
  color: var(--tf-muted);
  font-family: var(--tf-hand);
  font-size: 0.68rem;
  line-height: 1.15;
}

.tf-lesson-card {
  position: relative;
  padding: clamp(30px, 4vw, 48px);
  border: 4px solid var(--tf-ink);
  border-radius: 28px 23px 31px 25px;
  background: #fff;
  box-shadow: var(--tf-shadow);
  transform: rotate(0.5deg);
}

.tf-tape {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 128px;
  height: 33px;
  background: rgba(255, 214, 90, 0.72);
  transform: translateX(-50%) rotate(-3deg);
}

.tf-card-scribble {
  margin: 0;
  color: var(--tf-blue);
  font-family: var(--tf-hand);
  font-size: 1.05rem;
}

.tf-lesson-card h2 {
  margin: 2px 0 10px;
  font-family: var(--tf-display);
  font-size: clamp(2.1rem, 4.2vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.tf-lesson-card h2 em {
  color: var(--tf-red);
  font-style: normal;
}

.tf-lesson-card > p {
  margin: 0 0 22px;
  color: var(--tf-muted);
}

.tf-resource-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(155px, 0.42fr)) auto;
  gap: 9px;
  margin-bottom: 22px;
}

.tf-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.tf-filter-summary span,
.tf-filter-summary a {
  padding: 7px 11px;
  border: 1px solid #ddd5cf;
  border-radius: 999px;
  background: #fff;
  font-family: var(--tf-display);
  font-size: 0.7rem;
}

.tf-filter-summary a {
  color: var(--tf-red-dark);
}

.tf-resource-type {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--tf-red-dark);
  background: var(--tf-red-soft);
  font-family: var(--tf-display);
  font-size: 0.66rem;
}

.tf-legacy-layout {
  min-width: 0;
}

.tf-legacy-layout + .tf-legacy-layout,
.tf-legacy-text + .tf-legacy-text {
  margin-top: 1rem;
}

.tf-legacy-text > :first-child {
  margin-top: 0;
}

.tf-legacy-text > :last-child {
  margin-bottom: 0;
}

.tf-legacy-separator {
  height: 2px;
  margin: 30px 0;
  border: 0;
  background: var(--tf-line);
}

.tf-resource-search input,
.tf-resource-search select {
  width: 100%;
  min-height: 58px;
  padding: 0 17px;
  border: 2px solid #d8d0ca;
  border-radius: 14px;
  background: #fff;
  color: var(--tf-ink);
  font-family: var(--tf-body);
  font-size: 1rem;
}

.tf-resource-search input {
  font-family: var(--tf-hand);
}

.tf-resource-search input:focus,
.tf-resource-search select:focus {
  border-color: var(--tf-red);
  outline: 3px solid rgba(229, 27, 35, 0.13);
}

.tf-resource-search select {
  cursor: pointer;
  font-family: var(--tf-display);
  font-size: 0.76rem;
}

.tf-resource-search button {
  min-height: 58px;
  padding: 0 21px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--tf-red);
  box-shadow: 0 4px 0 var(--tf-red-dark);
  cursor: pointer;
  font-family: var(--tf-display);
  font-size: 0.8rem;
}

.tf-year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tf-year-chips a {
  padding: 8px 12px;
  border: 1px solid #ddd5cf;
  border-radius: 999px;
  background: #fff;
  font-family: var(--tf-display);
  font-size: 0.73rem;
}

.tf-year-chips a:hover {
  border-color: var(--tf-red);
  color: #fff;
  background: var(--tf-red);
}

.tf-section {
  padding: clamp(76px, 8vw, 104px) 0;
}

@supports (content-visibility: auto) {
  .tf-section,
  .tf-content-wrap {
    content-visibility: auto;
    contain-intrinsic-size: auto 850px;
  }
}

.tf-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 38px;
}

.tf-section-heading h2,
.tf-community-copy h2,
.tf-page-title {
  margin: 13px 0 0;
  font-family: var(--tf-display);
  font-size: clamp(2.15rem, 4.3vw, 4.4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.tf-section-heading p {
  max-width: 450px;
  margin: 0;
  color: var(--tf-muted);
  font-family: var(--tf-hand);
  font-size: 1rem;
  text-align: right;
}

.tf-resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.tf-resource-card {
  position: relative;
  display: flex;
  min-height: 285px;
  flex-direction: column;
  padding: 25px;
  border: 2px solid var(--tf-ink);
  border-radius: 17px 23px 19px 16px;
  background: #fff;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tf-resource-card:nth-child(2n) {
  transform: rotate(0.35deg);
}

.tf-resource-card:hover {
  border-color: var(--tf-red);
  box-shadow: 6px 7px 0 rgba(229, 27, 35, 0.12);
  transform: translateY(-4px) rotate(-0.3deg);
}

.tf-resource-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 15px 18px 14px 17px;
  color: var(--tf-red);
  background: var(--tf-red-soft);
  font-family: var(--tf-hand);
  font-size: 1.9rem;
}

.tf-resource-card:nth-child(2) .tf-resource-icon {
  color: var(--tf-blue);
  background: var(--tf-blue-soft);
}

.tf-resource-card:nth-child(3) .tf-resource-icon {
  color: var(--tf-green);
  background: #eef9f3;
}

.tf-resource-card:nth-child(4) .tf-resource-icon {
  color: #9d6a00;
  background: #fff8df;
}

.tf-resource-card h3 {
  margin: 22px 0 8px;
  font-family: var(--tf-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.tf-resource-card p {
  margin: 0 0 20px;
  color: var(--tf-muted);
  font-size: 0.92rem;
}

.tf-card-link {
  margin-top: auto;
  color: var(--tf-red);
  font-family: var(--tf-display);
  font-size: 0.78rem;
}

.tf-soft-section {
  border-top: 1px solid #eddfd9;
  border-bottom: 1px solid #eddfd9;
  background:
    radial-gradient(circle at 1px 1px, #edd6d7 1px, transparent 1px) 0 0 / 22px 22px,
    #fff8f4;
}

.tf-photo-section {
  position: relative;
  overflow: hidden;
}

.tf-photo-section::after {
  position: absolute;
  right: -30px;
  bottom: 14px;
  color: rgba(229, 27, 35, 0.09);
  content: "★";
  font-family: var(--tf-hand);
  font-size: clamp(7rem, 14vw, 13rem);
  line-height: 1;
  pointer-events: none;
  transform: rotate(12deg);
}

.tf-community-gallery {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr 0.96fr 0.96fr;
  grid-template-rows: repeat(2, 245px);
  gap: 20px;
}

.tf-photo-card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 10px 10px 42px;
  overflow: hidden;
  border: 3px solid var(--tf-ink);
  border-radius: 15px 20px 17px 14px;
  background: #fff;
  box-shadow: 6px 7px 0 rgba(39, 35, 33, 0.09);
  transform: rotate(-0.45deg);
}

.tf-photo-card:nth-child(2n) {
  transform: rotate(0.55deg);
}

.tf-photo-card:first-child {
  grid-row: 1 / span 2;
}

.tf-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px 12px 9px 8px;
  object-fit: cover;
}

.tf-photo-card-1 img {
  object-position: 50% 42%;
}

.tf-photo-card-2 img {
  object-position: 50% 44%;
}

.tf-photo-card-3 img {
  object-position: 50% 42%;
}

.tf-photo-card figcaption {
  position: absolute;
  right: 13px;
  bottom: 9px;
  left: 13px;
  overflow: hidden;
  color: var(--tf-red);
  font-family: var(--tf-hand);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-photo-tape {
  position: absolute;
  z-index: 2;
  top: -8px;
  left: 50%;
  width: 92px;
  height: 25px;
  background: rgba(255, 214, 90, 0.86);
  transform: translateX(-50%) rotate(-2deg);
}

.tf-photo-card:nth-child(2n) .tf-photo-tape {
  background: rgba(185, 225, 239, 0.9);
  transform: translateX(-50%) rotate(2deg);
}

.tf-photo-note {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  color: var(--tf-green);
  font-family: var(--tf-hand);
  font-size: 1rem;
  text-align: center;
}

.tf-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.tf-post-card {
  overflow: hidden;
  border: 2px solid var(--tf-ink);
  border-radius: 19px 24px 20px 17px;
  background: #fff;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tf-post-card:hover {
  box-shadow: 6px 7px 0 rgba(229, 27, 35, 0.12);
  transform: translateY(-4px);
}

.tf-post-thumb {
  display: block;
  height: 205px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(57, 126, 155, 0.16) 30px 31px),
    var(--tf-blue-soft);
}

.tf-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 250ms ease;
}

.tf-post-card:hover .tf-post-thumb img {
  transform: scale(1.035);
}

.tf-thumb-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--tf-blue);
  font-family: var(--tf-hand);
  font-size: 4rem;
}

.tf-post-body {
  padding: 23px;
}

.tf-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--tf-blue);
  font-family: var(--tf-hand);
  font-size: 0.82rem;
}

.tf-post-body h3 {
  margin: 0 0 12px;
  font-family: var(--tf-display);
  font-size: 1.22rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.tf-post-body p {
  margin: 0 0 18px;
  color: var(--tf-muted);
  font-size: 0.9rem;
}

.tf-post-body .tf-card-link {
  display: inline-block;
}

.tf-level-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
}

.tf-level-card {
  position: relative;
  display: grid;
  min-height: 165px;
  padding: 20px 12px;
  place-items: center;
  border: 2px solid var(--tf-ink);
  border-radius: 18px 24px 20px 16px;
  background: #fff;
  text-align: center;
  transition: transform 180ms ease, background 180ms ease;
}

.tf-level-card:nth-child(2n) {
  transform: rotate(0.7deg);
}

.tf-level-card:hover {
  color: #fff;
  background: var(--tf-red);
  transform: translateY(-4px) rotate(-0.3deg);
}

.tf-level-card strong {
  display: block;
  font-family: var(--tf-display);
  font-size: 1.3rem;
}

.tf-level-card span {
  display: block;
  color: var(--tf-blue);
  font-family: var(--tf-hand);
  font-size: 0.82rem;
}

.tf-level-card:hover span {
  color: #fff;
}

.tf-community {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  align-items: center;
  gap: clamp(40px, 7vw, 95px);
}

.tf-community-copy > p {
  max-width: 620px;
  margin: 22px 0 27px;
  color: var(--tf-muted);
  font-size: 1.05rem;
}

.tf-community-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 32px;
  border: 4px solid var(--tf-ink);
  border-radius: 28px 22px 31px 24px;
  background: #fff;
  box-shadow: var(--tf-shadow);
}

.tf-community-link {
  display: flex;
  min-height: 130px;
  padding: 20px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid #ddd4ce;
  border-radius: 15px 20px 17px 14px;
  background: #fff;
}

.tf-community-link:hover {
  border-color: var(--tf-red);
  background: var(--tf-red-soft);
}

.tf-community-link span {
  color: var(--tf-blue);
  font-family: var(--tf-hand);
  font-size: 0.82rem;
}

.tf-community-link strong {
  font-family: var(--tf-display);
  font-size: 1.12rem;
}

.tf-content-wrap {
  min-height: 60vh;
  padding: 72px 0 92px;
}

.tf-page-header {
  padding: 72px 0 58px;
}

.tf-page-title {
  max-width: 920px;
  color: var(--tf-red);
}

.tf-page-card {
  position: relative;
  padding: clamp(28px, 5vw, 62px);
  border: 3px solid var(--tf-ink);
  border-radius: 25px 20px 28px 22px;
  background: #fff;
  box-shadow: var(--tf-shadow);
}

.tf-page-card .entry-content {
  color: #413b37;
}

.tf-page-card .entry-content > *:first-child {
  margin-top: 0;
}

.tf-page-card h2,
.tf-page-card h3,
.tf-page-card h4 {
  color: var(--tf-ink);
  font-family: var(--tf-display);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.tf-page-card h2 {
  color: var(--tf-red);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.tf-page-card a:not(.tf-primary-button):not(.tf-secondary-button) {
  color: var(--tf-red);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.tf-page-card iframe {
  max-width: 100%;
}

.tf-legacy-gallery {
  margin: 24px 0 42px;
  padding: 18px;
  border: 2px solid var(--tf-ink);
  border-radius: 18px 23px 19px 16px;
  background: var(--tf-blue-soft);
  box-shadow: 5px 6px 0 rgba(57, 126, 155, 0.14);
}

.tf-legacy-gallery-actions {
  display: flex;
  margin-bottom: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tf-legacy-gallery-actions > span {
  color: var(--tf-blue);
  font-family: var(--tf-hand);
  font-size: 0.88rem;
  font-weight: 700;
}

.tf-legacy-gallery-actions > div {
  display: flex;
  gap: 7px;
}

.tf-gallery-control {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 2px solid var(--tf-red);
  border-radius: 50%;
  color: var(--tf-red);
  background: #fff;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 800;
}

.tf-gallery-control:hover {
  color: #fff;
  background: var(--tf-red);
}

.tf-legacy-gallery-track {
  display: grid;
  grid-auto-columns: minmax(240px, 31%);
  grid-auto-flow: column;
  gap: 14px;
  padding: 2px 3px 13px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-color: var(--tf-red) rgba(229, 27, 35, 0.12);
  scrollbar-width: thin;
}

.tf-legacy-gallery-item {
  min-width: 0;
  margin: 0;
  padding: 7px;
  scroll-snap-align: start;
  border: 2px solid var(--tf-ink);
  border-radius: 12px 16px 13px 11px;
  background: #fff;
}

.tf-legacy-gallery-item a,
.tf-page-card .entry-content .tf-legacy-gallery-item a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tf-legacy-gallery-item img {
  display: block;
  width: 100%;
  height: clamp(210px, 29vw, 330px);
  border-radius: 7px 10px 8px 7px;
  object-fit: contain;
  background: #fff;
}

.tf-page-card table {
  width: 100%;
  border-collapse: collapse;
}

.tf-page-card th,
.tf-page-card td {
  padding: 10px;
  border: 1px solid #ddd4ce;
}

.tf-page-card th {
  color: #fff;
  background: var(--tf-red);
}

.tf-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.tf-library-intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--tf-muted);
  font-size: 1.04rem;
}

.tf-library-header-tools {
  width: min(100%, 980px);
  margin-top: 31px;
}

.tf-library-header-tools .tf-resource-search {
  margin-bottom: 15px;
}

.tf-library-results-head {
  display: flex;
  margin-bottom: 27px;
  padding: 16px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 2px solid var(--tf-ink);
  border-radius: 14px 18px 13px 16px;
  background: #fff;
  box-shadow: 4px 5px 0 rgba(57, 126, 155, 0.16);
}

.tf-library-results-head strong {
  font-family: var(--tf-display);
  font-size: 0.92rem;
}

.tf-library-results-head span {
  color: var(--tf-blue);
  font-family: var(--tf-hand);
  font-size: 0.83rem;
  text-align: right;
}

.tf-library-empty .tf-resource-search {
  margin: 28px 0 20px;
}

.tf-library-empty .tf-secondary-button {
  display: inline-flex;
}

.tf-pagination {
  margin-top: 38px;
}

.tf-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tf-pagination a,
.tf-pagination span {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid #dbd2cc;
  border-radius: 10px;
  background: #fff;
  font-family: var(--tf-display);
  font-size: 0.76rem;
}

.tf-pagination .current {
  color: #fff;
  border-color: var(--tf-red);
  background: var(--tf-red);
}

.tf-site-footer {
  color: #fff;
  background: var(--tf-red);
}

.tf-footer-main {
  display: grid;
  grid-template-columns: minmax(270px, 1.25fr) repeat(2, minmax(150px, 0.75fr));
  gap: 42px;
  padding: 48px 0 38px;
}

.tf-footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.tf-footer-brand .tf-logo-circle {
  width: 65px;
  height: 65px;
  flex-basis: 65px;
  border-color: #fff;
  box-shadow: none;
}

.tf-footer-brand .tf-logo-circle img {
  width: 56px;
  height: 56px;
}

.tf-footer-brand strong,
.tf-footer-column strong {
  display: block;
  font-family: var(--tf-display);
}

.tf-footer-brand p {
  margin: 4px 0 0;
  font-family: var(--tf-hand);
  font-size: 0.85rem;
}

.tf-footer-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.tf-footer-column strong {
  margin-bottom: 4px;
}

.tf-footer-column a {
  width: fit-content;
  font-size: 0.9rem;
}

.tf-footer-column a:hover {
  text-decoration: underline;
}

.tf-footer-column .tf-footer-minor-link {
  margin-top: 3px;
  font-size: 0.78rem;
  opacity: 0.72;
}

.tf-footer-bottom {
  display: flex;
  padding: 19px 0 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
}

.tf-footer-bottom p {
  margin: 0;
}

@media (max-width: 1120px) {
  .tf-header-actions .tf-secondary-button {
    display: none;
  }

  .tf-brand {
    min-width: 230px;
  }

  .tf-menu {
    gap: 12px;
  }

  .tf-menu > li > a {
    font-size: 0.72rem;
  }

  .tf-hero-grid {
    grid-template-columns: 1fr;
  }

  .tf-hero-copy {
    max-width: 850px;
  }

  .tf-lesson-card {
    width: min(100%, 820px);
  }

  .tf-resource-grid,
  .tf-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-community-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 400px repeat(2, 245px);
  }

  .tf-photo-card:first-child {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  .tf-level-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tf-community {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .tf-header-inner {
    min-height: 82px;
  }

  .tf-logo-circle {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .tf-logo-circle img {
    width: 49px;
    height: 49px;
  }

  .tf-brand {
    min-width: 0;
    flex: 1;
  }

  .tf-brand-copy strong {
    font-size: clamp(0.98rem, 3.7vw, 1.25rem);
  }

  .tf-brand-copy small {
    font-size: clamp(0.66rem, 2.4vw, 0.76rem);
  }

  .tf-menu-toggle {
    display: grid;
  }

  .tf-header-actions {
    display: none;
  }

  .tf-primary-nav {
    position: absolute;
    z-index: 110;
    top: 100%;
    right: 0;
    bottom: auto;
    width: min(430px, 92vw);
    height: calc(100vh - 90px);
    padding: 20px;
    overflow-y: auto;
    border-left: 2px solid var(--tf-ink);
    background: #fff;
    box-shadow: -8px 0 0 rgba(229, 27, 35, 0.11);
    opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 170ms ease, visibility 0s linear 170ms;
  }

  .tf-brand-copy {
    min-width: 0;
    overflow: hidden;
  }

  .tf-brand-copy strong,
  .tf-brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu-open .tf-primary-nav {
    opacity: 1;    pointer-events: auto;    visibility: visible;    transition-delay: 0s;
  }

  .tf-menu {
    display: block;
  }

  .tf-menu > li {
    border-bottom: 1px dashed #ddd4ce;
  }

  .tf-menu > li > a {
    padding: 14px 6px;
    border: 0;
    font-size: 0.9rem;
    white-space: normal;
  }

  .tf-menu .sub-menu {
    position: static;
    display: block;
    width: 100%;
    max-height: none;
    padding: 0 0 10px 14px;
    border: 0;
    box-shadow: none;
    transform: none;
  }

  .tf-menu .sub-menu a {
    padding-block: 8px;
  }
}

@media (max-width: 680px) {
  .tf-shell {
    width: min(calc(100% - 32px), var(--tf-max));
  }

  .tf-site-header {
    border-top-width: 7px;
  }

  .tf-header-inner {
    gap: 9px;
  }

  .tf-brand {
    gap: 8px;
  }

  .tf-logo-circle {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .tf-logo-circle img {
    width: 46px;
    height: 46px;
  }

  .tf-brand-copy strong {
    font-size: clamp(0.87rem, 4vw, 1.02rem);
  }

  .tf-brand-copy small {
    font-size: clamp(0.55rem, 2.6vw, 0.68rem);
  }

  .tf-primary-nav {
    width: 100vw;
    border-left: 0;
  }

  .tf-hero {
    padding-block: 62px 70px;
  }

  .tf-hero h1 {
    font-size: clamp(2.5rem, 10.5vw, 3.7rem);
    line-height: 0.88;
  }

  .tf-hero h1 span {
    margin-top: 23px;
    font-size: clamp(1.8rem, 9.5vw, 2.8rem);
  }

  .tf-lesson-card {
    padding: 35px 20px 25px;
    border-width: 3px;
    border-radius: 23px;
  }

  .tf-hero-badges {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tf-proof-badge {
    min-height: 80px;
    padding-inline: 13px;
  }

  .tf-badge-copy strong {
    font-size: 0.9rem;
  }

  .tf-badge-copy small {
    font-size: 0.73rem;
  }

  .tf-resource-search {
    grid-template-columns: 1fr;
  }

  .tf-library-results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tf-library-results-head span {
    text-align: left;
  }

  .tf-resource-grid,
  .tf-post-grid,
  .tf-archive-grid {
    grid-template-columns: 1fr;
  }

  .tf-community-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .tf-photo-card,
  .tf-photo-card:first-child {
    grid-row: auto;
    grid-column: auto;
    min-height: 330px;
  }

  .tf-photo-card:not(:first-child) {
    min-height: 280px;
  }

  .tf-legacy-gallery {
    margin-inline: -8px;
    padding: 14px;
  }

  .tf-legacy-gallery-track {
    grid-auto-columns: 82%;
  }

  .tf-legacy-gallery-item img {
    height: 320px;
  }

  .tf-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tf-section-heading p {
    text-align: left;
  }

  .tf-level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-community-board {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }

  .tf-footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .tf-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
