/* TruGrader brand theme: navy blue, gold, white, black. Loaded last so it wins over the base theme. */
:root {
  --tg-navy: #0a2240;
  --tg-navy-700: #1b3a6b;
  --tg-navy-900: #06152b;
  --tg-navy-50: #e8edf5;
  --tg-gold: #c9a227;
  --tg-gold-light: #e0be4f;
  --tg-gold-dark: #8a6d12;
  --tg-white: #ffffff;
  --tg-black: #000000;
  --tg-ink: #111418;
  --tg-muted: #5b6270;
  --tg-bg: #f5f6f8;
  --tg-border: #dfe3ea;
  --tg-focus: rgba(201, 162, 39, 0.45);
}

body { background-color: var(--tg-bg); color: var(--tg-ink); }
a { color: var(--tg-navy); }
a:hover { color: var(--tg-gold-dark); }
::selection { background: var(--tg-gold); color: var(--tg-black); }

/* headings and body text: black/navy rather than gray */
.dash-main-content h1, .dash-main-content h2, .dash-main-content h3, .dash-main-content h4, .dash-main-content h5,
.dash-main-content .h1, .dash-main-content .h2, .dash-main-content .h3, .dash-main-content .h4, .dash-main-content .h5,
.text-gray-800, .text-gray-900 { color: var(--tg-navy) !important; }
.text-muted { color: var(--tg-muted) !important; }
.text-primary { color: var(--tg-navy) !important; }
.bg-primary { background-color: var(--tg-navy) !important; }
.border-left-primary { border-left-color: var(--tg-gold) !important; }

/* ---------- top bar ---------- */
.topbar { background-color: var(--tg-white) !important; border-bottom: 3px solid var(--tg-gold); }
.topbar .navbar-brand { color: var(--tg-navy); font-weight: 800; letter-spacing: .2px; }
.topbar .navbar-brand:hover { color: var(--tg-navy); }
.topbar .navbar-brand .tg-gold { color: var(--tg-gold-dark); }
.topbar #sidebarToggleTop { color: var(--tg-navy); }

/* ---------- sidebar ---------- */
.bg-gradient-primary { background-color: var(--tg-navy) !important; background-image: linear-gradient(180deg, var(--tg-navy) 0%, var(--tg-navy-900) 60%, var(--tg-black) 100%) !important; }
.sidebar .sidebar-heading h3, .sidebar .sidebar-heading h4 { color: var(--tg-white) !important; }
.sidebar-dark .nav-item .nav-link, .sidebar-dark .nav-item .nav-link i { color: rgba(255, 255, 255, .85); }
.sidebar-dark .nav-item .nav-link:hover, .sidebar-dark .nav-item .nav-link:focus,
.sidebar-dark .nav-item .nav-link:hover i, .sidebar-dark .nav-item .nav-link:focus i { color: var(--tg-gold-light); }
.sidebar-dark .nav-item.active .nav-link, .sidebar-dark .nav-item.active .nav-link i { color: var(--tg-gold); }
.sidebar-dark hr.sidebar-divider { border-top-color: rgba(201, 162, 39, .35); }
.sidebar-subheading h4 { color: var(--tg-gold) !important; }
.sidebar .nav-item .collapse .collapse-inner .collapse-item:hover,
.sidebar .nav-item .collapsing .collapse-inner .collapse-item:hover { background-color: var(--tg-navy-50); color: var(--tg-navy); }
.sidebar .nav-item .collapse .collapse-inner .collapse-item:active,
.sidebar .nav-item .collapse .collapse-inner .collapse-item.active { background-color: var(--tg-gold); color: var(--tg-black); }
.sidebar-dark #sidebarToggle { background-color: rgba(201, 162, 39, .25); }
.sidebar-dark #sidebarToggle:hover { background-color: rgba(201, 162, 39, .45); }

/* ---------- buttons ---------- */
.btn-primary { background-color: var(--tg-navy); border-color: var(--tg-navy); color: var(--tg-white); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--tg-navy-700); border-color: var(--tg-navy-700); color: var(--tg-white); }
.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active {
  background-color: var(--tg-navy-900); border-color: var(--tg-gold); color: var(--tg-white); }
.btn-outline-primary { color: var(--tg-navy); border-color: var(--tg-navy); }
.btn-outline-primary:hover, .btn-outline-primary:not(:disabled):not(.disabled):active { background-color: var(--tg-navy); border-color: var(--tg-navy); color: var(--tg-white); }
.btn-secondary { background-color: var(--tg-gold); border-color: var(--tg-gold); color: var(--tg-black); }
.btn-secondary:hover, .btn-secondary:focus { background-color: var(--tg-gold-light); border-color: var(--tg-gold-light); color: var(--tg-black); }
.btn-outline-secondary { color: var(--tg-ink); border-color: #9aa1ad; }
.btn-outline-secondary:hover { background-color: var(--tg-ink); border-color: var(--tg-ink); color: var(--tg-white); }
.btn-gold { background-color: var(--tg-gold); border-color: var(--tg-gold); color: var(--tg-black); font-weight: 700; }
.btn-gold:hover, .btn-gold:focus { background-color: var(--tg-gold-light); border-color: var(--tg-gold-light); color: var(--tg-black); }
.btn-link { color: var(--tg-navy); }
.btn-link:hover { color: var(--tg-gold-dark); }
.text-white-50 { color: rgba(255, 255, 255, .7) !important; }

/* focus rings in gold, clearly visible on navy and white */
.btn:focus, .btn.focus, .form-control:focus, .custom-select:focus, .page-link:focus {
  box-shadow: 0 0 0 .2rem var(--tg-focus) !important; }
.form-control:focus, .custom-select:focus { border-color: var(--tg-gold); }

/* ---------- badges, progress, lists ---------- */
.badge-primary { background-color: var(--tg-navy); color: var(--tg-white); }
.badge-secondary { background-color: #4a515c; color: var(--tg-white); }
.badge-gold { background-color: var(--tg-gold); color: var(--tg-black); }
.progress-bar { background-color: var(--tg-navy); }
.page-item.active .page-link { background-color: var(--tg-navy); border-color: var(--tg-navy); }
.page-link { color: var(--tg-navy); }
.list-group-item.active { background-color: var(--tg-navy); border-color: var(--tg-navy); }
.dropdown-item:active { background-color: var(--tg-navy); }

/* ---------- tables and cards ---------- */
.table thead th { color: var(--tg-navy); border-bottom: 2px solid var(--tg-gold); }
.table td { color: var(--tg-ink); }
.card { border-color: var(--tg-border); }
.card-header { background-color: var(--tg-navy-50); color: var(--tg-navy); border-bottom-color: var(--tg-border); }
.alert-info { background-color: var(--tg-navy-50); border-color: #c4cede; color: var(--tg-navy); }
code { color: var(--tg-gold-dark); }

/* ---------- footer ---------- */
.tg-footer { background-color: var(--tg-black); border-top: 3px solid var(--tg-gold); color: var(--tg-white); }
.tg-footer a { color: var(--tg-gold); }
.tg-footer a:hover { color: var(--tg-gold-light); }

/* ---------- public landing / login pages ---------- */
.navbar-light .navbar-nav .nav-link { color: var(--tg-navy); }
.navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link:hover { color: var(--tg-gold-dark); }
.carousel-item:after { background: var(--tg-navy-900); opacity: .65; }
.carousel-caption h1 { color: var(--tg-white); }
.carousel-caption h1 .tg-gold, .tg-gold { color: var(--tg-gold); }

/* sidebar collapse button: solid gold with a navy arrow */
.sidebar-dark #sidebarToggle { background-color: var(--tg-gold); }
.sidebar-dark #sidebarToggle:hover { background-color: var(--tg-gold-light); }
.sidebar-dark #sidebarToggle::after { color: var(--tg-navy); }

/* phones: narrow sidebar shows the short "TD/SD/PD" label, and content uses the full width */
@media (max-width: 767.98px) {
  .sidebar .sidebar-heading h3 { display: none; }
  .sidebar .sidebar-heading h4 { display: block; margin-top: 16px; font-size: 1.3rem; font-weight: 800; color: var(--tg-gold) !important; }
  .dash-main-content { padding-left: 0; }
  .dash-main-content h1.h3 { font-size: 1.35rem; }
}

/* status green darkened so white text stays readable (WCAG AA) */
.btn-success { background-color: #146c43; border-color: #146c43; color: var(--tg-white); }
.btn-success:hover, .btn-success:focus { background-color: #0f5132; border-color: #0f5132; color: var(--tg-white); }
.badge-success { background-color: #146c43; color: var(--tg-white); }
.badge-warning { background-color: var(--tg-gold); color: var(--tg-black); }
.btn-warning { background-color: var(--tg-gold); border-color: var(--tg-gold); color: var(--tg-black); }
.btn-warning:hover { background-color: var(--tg-gold-light); border-color: var(--tg-gold-light); color: var(--tg-black); }

/* privacy policy and other long-form public pages */
.tg-policy { max-width: 820px; padding-top: 110px; padding-bottom: 48px; color: var(--tg-ink); line-height: 1.65; }
.tg-policy h1 { color: var(--tg-navy); font-weight: 800; margin-bottom: 4px; }
.tg-policy h2 { color: var(--tg-navy); font-size: 1.25rem; font-weight: 700; margin-top: 32px; }
.tg-policy-meta { color: var(--tg-muted); margin-bottom: 24px; }
.tg-policy-summary { background: var(--tg-white); border-left: 4px solid var(--tg-gold); border-radius: 6px;
  padding: 16px 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.tg-policy-summary h2 { margin-top: 0; }
.tg-policy a { color: var(--tg-navy); text-decoration: underline; }

/* sign-up notes and admin tabs */
.tg-org-note { color: var(--tg-navy); }
.tg-admin-tabs .nav-link { color: var(--tg-navy); }
.tg-admin-tabs .nav-link.active { color: var(--tg-navy); border-color: var(--tg-border) var(--tg-border) #fff;
  border-top: 3px solid var(--tg-gold); font-weight: 700; }

/* ======================================================================
   Dashboard home: compact welcome banner + tiles that fit one screen
   ====================================================================== */
.tg-home { padding-top: 20px; padding-bottom: 12px; }
.tg-welcome {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 26px 30px; margin-bottom: 22px; border-radius: 14px; color: var(--tg-white);
  background:
    linear-gradient(100deg, rgba(6, 21, 43, .97) 0%, rgba(10, 34, 64, .92) 55%, rgba(10, 34, 64, .55) 100%),
    url("../img/dashboard/teachers_img2.jpg") center 40% / cover no-repeat;
  box-shadow: 0 10px 30px -18px rgba(6, 21, 43, .8);
}
.tg-welcome::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--tg-gold), var(--tg-gold-light) 50%, transparent); }
.tg-welcome-text { max-width: 640px; }
.tg-welcome-eyebrow { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tg-gold-light); margin-bottom: 6px; }
.tg-welcome h1 { color: var(--tg-white) !important; font-size: 1.65rem; font-weight: 800; margin: 0 0 6px; }
.tg-welcome p { color: rgba(255, 255, 255, .82); margin: 0; font-size: .95rem; }
.tg-welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tg-welcome-actions .btn { border-radius: 999px; padding: .45rem 1rem; font-weight: 700; }

.tg-tile { display: flex; flex-direction: column; height: 100%; background: var(--tg-white); border: 1px solid var(--tg-border);
  border-radius: 14px; overflow: hidden; color: var(--tg-ink); text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tg-tile:hover, .tg-tile:focus { transform: translateY(-3px); border-color: var(--tg-gold);
  box-shadow: 0 14px 28px -18px rgba(6, 21, 43, .55); color: var(--tg-ink); }
.tg-tile-img { position: relative; height: 128px; background-size: cover; background-position: center; }
.tg-tile-img::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, rgba(10, 34, 64, .15) 0%, rgba(6, 21, 43, .7) 100%); }
.tg-tile-icon { position: absolute; z-index: 1; left: 18px; bottom: -20px; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; background: var(--tg-navy); color: var(--tg-gold);
  border: 2px solid var(--tg-white); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); font-size: 1.05rem; }
.tg-tile-body { position: relative; padding: 28px 18px 16px; }
.tg-tile-body h2 { font-size: 1.05rem; font-weight: 800; color: var(--tg-navy) !important; margin: 0 0 3px; }
.tg-tile-body p { font-size: .86rem; color: var(--tg-muted); margin: 0; padding-right: 22px; }
.tg-tile-arrow { position: absolute; right: 18px; bottom: 18px; color: var(--tg-gold-dark); transition: transform .18s ease; }
.tg-tile:hover .tg-tile-arrow { transform: translateX(3px); }
@media (max-width: 767.98px) {
  .tg-welcome { padding: 20px; }
  .tg-welcome h1 { font-size: 1.35rem; }
  .tg-tile-img { height: 96px; }
}
@media (min-height: 1000px) { .tg-tile-img { height: 150px; } }

/* ======================================================================
   Landing page: Features and Pricing, matched to the navy hero
   ====================================================================== */
.tg-section { padding: 96px 0; }
.tg-section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.tg-eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--tg-gold-dark); margin-bottom: 14px; }
.tg-eyebrow::before, .tg-eyebrow::after { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor;
  vertical-align: middle; margin: 0 12px; opacity: .6; }
.tg-section-title { font-size: 2.5rem; font-weight: 800; line-height: 1.15; color: var(--tg-navy); letter-spacing: -.01em; margin-bottom: 16px; }
.tg-section-lead { font-size: 1.12rem; color: var(--tg-muted); line-height: 1.6; margin: 0; }

.tg-features { background: var(--tg-white); }
.tg-control { background: #f5f7fb; }
.tg-feature { width: 100%; margin-bottom: 28px; padding: 30px 28px; border: 1px solid var(--tg-border); border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfbfd 100%); position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.tg-feature::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--tg-gold), var(--tg-gold-light)); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease; }
.tg-feature:hover { transform: translateY(-4px); border-color: #cfd6e2; box-shadow: 0 22px 40px -28px rgba(6, 21, 43, .55); }
.tg-feature:hover::before { transform: scaleX(1); }
.tg-feature-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--tg-navy) 0%, var(--tg-navy-700) 100%); color: var(--tg-gold-light);
  font-size: 1.3rem; margin-bottom: 22px; box-shadow: 0 10px 20px -12px rgba(10, 34, 64, .9); }
.tg-feature h3 { font-size: 1.2rem; font-weight: 800; color: var(--tg-navy); margin-bottom: 10px; }
.tg-feature p { color: var(--tg-muted); line-height: 1.65; margin: 0; }

.tg-pricing { position: relative; color: var(--tg-white);
  background: radial-gradient(1200px 500px at 50% -10%, rgba(201, 162, 39, .18), transparent 60%),
              linear-gradient(180deg, var(--tg-navy) 0%, var(--tg-navy-900) 100%); }
.tg-pricing .tg-eyebrow { color: var(--tg-gold-light); }
.tg-pricing .tg-section-title { color: var(--tg-white); }
.tg-pricing .tg-section-lead { color: rgba(255, 255, 255, .75); }
.tg-billing-toggle { display: inline-flex; margin-top: 28px; padding: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); }
.tg-billing-toggle button { border: 0; background: transparent; color: rgba(255, 255, 255, .8); font-weight: 700;
  padding: 8px 22px; border-radius: 999px; transition: background .15s ease, color .15s ease; }
.tg-billing-toggle button span { font-size: .75rem; color: var(--tg-gold-light); margin-left: 4px; }
.tg-billing-toggle button.active { background: var(--tg-white); color: var(--tg-navy); }
.tg-billing-toggle button.active span { color: var(--tg-gold-dark); }
.tg-billing-toggle button:focus-visible { outline: 2px solid var(--tg-gold); outline-offset: 2px; }

.tg-plan { position: relative; width: 100%; display: flex; flex-direction: column; margin-bottom: 28px; padding: 36px 32px;
  border-radius: 20px; background: var(--tg-white); color: var(--tg-ink); border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .8); }
.tg-plan-title { font-size: 1.05rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tg-navy); margin-bottom: 6px; }
.tg-plan-tagline { color: var(--tg-muted); font-size: .95rem; min-height: 2.9em; margin-bottom: 18px; }
.tg-plan-price { font-size: 2.9rem; font-weight: 800; color: var(--tg-navy); line-height: 1; margin-bottom: 8px; letter-spacing: -.02em; }
.tg-plan-price > span:not(.tg-price-amount) { font-size: 1rem; font-weight: 600; color: var(--tg-muted); letter-spacing: 0; margin-left: 4px; }
.tg-plan-price-text { font-size: 2.3rem; }
.tg-plan-subnote { font-size: .85rem; color: var(--tg-muted); min-height: 1.3em; margin-bottom: 0; }
.tg-plan-features { list-style: none; padding: 22px 0 0; margin: 22px 0 30px; border-top: 1px solid var(--tg-border); flex-grow: 1; }
.tg-plan-features li { position: relative; padding-left: 30px; margin-bottom: 12px; line-height: 1.45; }
.tg-plan-features li::before { content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: .7rem;
  position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: rgba(201, 162, 39, .16); color: var(--tg-gold-dark); }
.tg-plan-btn { display: block; width: 100%; padding: .8rem 1rem; border-radius: 999px; font-weight: 800; letter-spacing: .02em; }
.tg-plan-btn-outline { border: 2px solid var(--tg-navy); color: var(--tg-navy); background: transparent; }
.tg-plan-btn-outline:hover { background: var(--tg-navy); color: var(--tg-white); }
.tg-plan-btn-gold { background: var(--tg-gold); border: 2px solid var(--tg-gold); color: var(--tg-black); }
.tg-plan-btn-gold:hover { background: var(--tg-gold-light); border-color: var(--tg-gold-light); color: var(--tg-black); }

.tg-plan-featured { background: linear-gradient(180deg, #0f2c52 0%, var(--tg-navy-900) 100%); color: var(--tg-white);
  border: 1px solid var(--tg-gold); box-shadow: 0 0 0 1px rgba(201, 162, 39, .35), 0 40px 70px -35px rgba(0, 0, 0, .9); }
.tg-plan-featured .tg-plan-title { color: var(--tg-gold-light); }
.tg-plan-featured .tg-plan-tagline, .tg-plan-featured .tg-plan-subnote,
.tg-plan-featured .tg-plan-price > span:not(.tg-price-amount) { color: rgba(255, 255, 255, .72); }
.tg-plan-featured .tg-plan-price { color: var(--tg-white); }
.tg-plan-featured .tg-plan-features { border-top-color: rgba(255, 255, 255, .14); }
.tg-plan-featured .tg-plan-features li::before { background: var(--tg-gold); color: var(--tg-navy-900); }
.tg-plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 5px 16px; border-radius: 999px;
  background: var(--tg-gold); color: var(--tg-black); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(201, 162, 39, .9); }
@media (min-width: 992px) { .tg-plan-featured { transform: translateY(-14px); } }
.tg-pricing-fine { text-align: center; color: rgba(255, 255, 255, .6); font-size: .85rem; margin: 16px 0 0; }

@media (max-width: 767.98px) {
  .tg-section { padding: 64px 0; }
  .tg-section-head { margin-bottom: 36px; }
  .tg-section-title { font-size: 1.9rem; }
  .tg-eyebrow::before, .tg-eyebrow::after { width: 16px; margin: 0 8px; }
  .tg-plan { padding: 30px 24px; }
}

/* ======================================================================
   Billing pages
   ====================================================================== */
.tg-panel { background: var(--tg-white); border: 1px solid var(--tg-border); border-radius: 14px; padding: 22px 24px; }
.tg-panel-label { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tg-muted); margin-bottom: 10px; }
.tg-plan-name { font-size: 1.9rem; font-weight: 800; color: var(--tg-navy) !important; }
.tg-stat { font-size: 1.7rem; font-weight: 800; color: var(--tg-navy); }
.tg-progress { height: 8px; border-radius: 999px; background: var(--tg-navy-50); }
.tg-progress .progress-bar { background: var(--tg-gold); border-radius: 999px; }
.tg-check-list { list-style: none; padding: 0; }
.tg-check-list li { position: relative; padding-left: 26px; margin-bottom: 6px; }
.tg-check-list li::before { content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; position: absolute; left: 0; top: 1px;
  font-size: .8rem; color: var(--tg-gold-dark); }
.tg-check-list-light li { color: rgba(255, 255, 255, .88); }
.tg-check-list-light li::before { color: var(--tg-gold-light); }
.tg-upgrade { background: linear-gradient(120deg, var(--tg-navy-900) 0%, var(--tg-navy) 60%, var(--tg-navy-700) 100%); border-color: var(--tg-navy); }
.tg-upgrade h2 { color: var(--tg-white) !important; }
.text-gold { color: var(--tg-gold-light) !important; }
.tg-buy { height: 100%; padding: 18px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); }
.tg-buy-price { font-size: 2rem; font-weight: 800; color: var(--tg-white); line-height: 1.1; }
.tg-buy-price span { font-size: .95rem; font-weight: 600; color: rgba(255, 255, 255, .7); margin-left: 3px; }
.tg-buy-note { font-size: .82rem; color: rgba(255, 255, 255, .7); margin: 4px 0 14px; min-height: 2.4em; }
.tg-upgrade-fine { color: rgba(255, 255, 255, .65); }

/* hero runs straight into the Features section */
#Page_Slider .carousel, #Page_Slider2 .carousel { margin-bottom: 0; }
.dash-main-content .tg-upgrade h2, .dash-main-content .tg-upgrade .h4 { color: var(--tg-white) !important; }

/* ======================================================================
   Landing page: Contact
   ====================================================================== */
.tg-contact { background: var(--tg-bg); }
.tg-contact-info { width: 100%; margin-bottom: 28px; padding: 36px 32px; border-radius: 20px; color: var(--tg-white);
  background: radial-gradient(500px 260px at 100% 0%, rgba(201, 162, 39, .22), transparent 65%),
              linear-gradient(160deg, var(--tg-navy) 0%, var(--tg-navy-900) 100%);
  box-shadow: 0 30px 60px -40px rgba(6, 21, 43, .9); display: flex; flex-direction: column; }
.tg-contact-info h3 { font-size: 1.35rem; font-weight: 800; color: var(--tg-white); margin-bottom: 6px; }
.tg-contact-intro { color: rgba(255, 255, 255, .75); margin-bottom: 28px; }
.tg-contact-list { list-style: none; padding: 0; margin: 0 0 24px; flex-grow: 1; }
.tg-contact-list li { display: flex; align-items: flex-start; margin-bottom: 22px; line-height: 1.45; color: rgba(255, 255, 255, .92); }
.tg-contact-list a { color: var(--tg-white); text-decoration: underline; text-decoration-color: rgba(201, 162, 39, .7); word-break: break-all; }
.tg-contact-list a:hover { color: var(--tg-gold-light); }
.tg-contact-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; margin-right: 14px; display: flex;
  align-items: center; justify-content: center; background: rgba(201, 162, 39, .16); color: var(--tg-gold-light);
  border: 1px solid rgba(201, 162, 39, .35); }
.tg-contact-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tg-gold-light); margin-bottom: 2px; }
.tg-contact-fine { font-size: .82rem; color: rgba(255, 255, 255, .62); margin: 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.tg-contact-fine a { color: rgba(255, 255, 255, .85); text-decoration: underline; }

.tg-contact-card { width: 100%; margin-bottom: 28px; padding: 36px 34px; border-radius: 20px; background: var(--tg-white);
  border: 1px solid var(--tg-border); box-shadow: 0 30px 60px -45px rgba(6, 21, 43, .6); }
.tg-contact-form label { font-size: .85rem; font-weight: 700; color: var(--tg-navy); margin-bottom: 6px; }
.tg-contact-form .tg-optional { font-weight: 500; color: var(--tg-muted); }
.tg-contact-form .form-control, .tg-contact-form .custom-select { height: auto; padding: .7rem .9rem; border-radius: 10px;
  border: 1px solid var(--tg-border); background-color: #fbfbfd; color: var(--tg-ink); }
.tg-contact-form .form-control:focus, .tg-contact-form .custom-select:focus { border-color: var(--tg-gold); background-color: var(--tg-white);
  box-shadow: 0 0 0 3px var(--tg-focus); }
.tg-contact-form textarea.form-control { resize: vertical; min-height: 140px; }
.tg-contact-submit { width: auto; display: inline-block; padding: .8rem 2.2rem; margin-top: 4px; }
.tg-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 767.98px) {
  .tg-contact-info, .tg-contact-card { padding: 28px 22px; }
  .tg-contact-submit { width: 100%; }
}

/* explanation shown under each auto-graded answer */
.tg-explanation { display: flex; align-items: flex-start; margin: 6px 0 8px; padding: 10px 14px; border-radius: 10px;
  background: rgba(201, 162, 39, .10); border-left: 3px solid var(--tg-gold); color: var(--tg-ink); font-size: .92rem; line-height: 1.5; }
.tg-explanation .fa-lightbulb { color: var(--tg-gold-dark); margin-top: 3px; }
.tg-prompt { white-space: pre-line; }

/* pricing: four plans per audience */
@media (min-width: 1200px) {
  .tg-pricing .tg-plan { padding: 32px 24px; }
  .tg-pricing .tg-plan-price { font-size: 2.5rem; }
}
.tg-school-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  margin: 12px 0 0; padding: 26px 32px; border-radius: 20px; border: 1px solid rgba(201, 162, 39, .45);
  background: rgba(255, 255, 255, .06); }
.tg-school-strip h3 { font-size: 1.15rem; font-weight: 800; color: var(--tg-white); margin-bottom: 6px; }
.tg-school-strip h3 span { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tg-gold-light); margin-left: 8px; }
.tg-school-strip p { color: rgba(255, 255, 255, .75); margin: 0; max-width: 760px; }
.tg-school-strip .tg-plan-btn { width: auto; padding: .75rem 2rem; }

/* "Free during beta" note above the pricing cards (shown while Stripe isn't set up) */
.tg-beta-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px;
  margin: 0 auto 28px; padding: 14px 22px; max-width: 900px; border-radius: 14px; text-align: center;
  border: 1px solid rgba(201, 162, 39, .45); background: rgba(201, 162, 39, .12); color: rgba(255, 255, 255, .9); }
.tg-beta-tag { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--tg-gold); color: var(--tg-navy, #0b1f3a); }
.tg-plan-btn.disabled { opacity: .65; cursor: default; pointer-events: none; }
.tg-plan-featured .tg-plan-btn.disabled { color: var(--tg-white); border-color: rgba(255, 255, 255, .55);
  background: transparent; }

/* billing page plan cards */
.tg-tier { position: relative; width: 100%; display: flex; flex-direction: column; padding: 22px 20px 18px;
  border: 1px solid var(--tg-border); border-radius: 14px; background: var(--tg-white); }
.tg-tier-featured { border-color: var(--tg-gold); box-shadow: 0 0 0 1px rgba(201, 162, 39, .35); }
.tg-tier-current { background: var(--tg-navy-50); border-color: var(--tg-navy); }
.tg-tier-tag { position: absolute; top: -11px; left: 18px; padding: 3px 10px; border-radius: 999px; font-size: .68rem;
  font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--tg-navy); color: var(--tg-white); }
.tg-tier-tag-gold { background: var(--tg-gold); color: var(--tg-black); }
.tg-tier-name { font-size: .85rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--tg-navy); }
.tg-tier-price { font-size: 1.9rem; font-weight: 800; color: var(--tg-navy); margin: 4px 0 12px; }
.tg-tier-price span { font-size: .9rem; font-weight: 600; color: var(--tg-muted); margin-left: 2px; }
.tg-buy-sm .tg-buy-price { font-size: 1.5rem; white-space: nowrap; }
.tg-buy-sm .tg-buy-price span { font-size: .8rem; }

/* printable student sign-in cards (course roster > Create sign-in) */
.tg-login-card { border: 2px dashed var(--tg-border, #d9dee7); border-radius: 12px; padding: 16px 18px; background: #fff;
  height: 100%; break-inside: avoid; }
.tg-login-brand { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--tg-gold, #c9a227); }
.tg-login-name { font-size: 1.15rem; font-weight: 800; color: var(--tg-navy, #0a2240); }
.tg-login-card dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; }
.tg-login-card dt { font-weight: 600; color: #5a6270; font-size: .85rem; }
.tg-login-card dd { margin: 0; overflow-wrap: anywhere; }
.tg-login-secret { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; font-weight: 700; color: #1b1f27; }
@media print {
  .tg-no-print, #accordionSidebar, .topbar, footer, .sticky-footer, .scroll-to-top { display: none !important; }
  .tg-logins { padding: 0 !important; }
  .tg-login-col { flex: 0 0 50%; max-width: 50%; }
}

/* "Sign in with Google" (login page) - white button with the Google "G", per Google's branding guidelines */
.tg-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #6b7280; font-size: .8rem; }
.tg-or::before, .tg-or::after { content: ""; flex: 1; border-top: 1px solid #dde2ec; }
.tg-google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: .7rem 1rem; border: 1px solid #747775; border-radius: 999px; background: #fff; color: #1f1f1f;
  font: 500 .95rem Roboto, "Segoe UI", Arial, sans-serif; text-decoration: none; }
.tg-google-btn:hover { background: #f8f9fa; color: #1f1f1f; text-decoration: none; }
.tg-google-btn:focus-visible { outline: 3px solid var(--tg-gold, #c9a227); outline-offset: 2px; }

/* Pro teacher tools: Assessment Builder page, sidebar "Pro" badge, grade sheet question results */
.sidebar .nav-item .nav-link .tg-pro-badge { display: inline-block; font-size: .6rem; padding: .2em .45em; vertical-align: middle; }
.sidebar.toggled .nav-item .nav-link .tg-pro-badge { display: block; width: max-content; margin: 2px auto 0 !important; }
.tg-builder-form { max-width: 860px; }
.tg-kind-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tg-kind { position: relative; display: block; margin: 0; cursor: pointer; }
.tg-kind input { position: absolute; opacity: 0; }
.tg-kind-box { display: block; height: 100%; padding: 12px 14px; border: 2px solid var(--tg-border); border-radius: 10px; background: var(--tg-white); color: var(--tg-navy); }
.tg-kind input:checked + .tg-kind-box { border-color: var(--tg-gold); background: #fdf8e8; }
.tg-kind input:focus-visible + .tg-kind-box { box-shadow: 0 0 0 3px var(--tg-focus); }
.tg-qresults { padding-top: 16px; padding-bottom: 16px; }
.tg-qresults-summary { cursor: pointer; list-style-position: outside; }
.tg-qresults-summary .tg-panel-label { display: inline; }
.tg-qresult { padding: 12px 0; border-top: 1px solid var(--tg-border); }
.tg-qresult:first-child { border-top: 0; }
.tg-qresult-prompt { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; margin-right: 12px; }
.tg-qresult-score { color: var(--tg-navy); }
.tg-qresult-bar { height: 6px; margin: 6px 0; border-radius: 3px; background: var(--tg-navy-50); overflow: hidden; }
.tg-qresult-bar span { display: block; height: 100%; background: var(--tg-navy); }
.tg-qresult.is-missed .tg-qresult-bar span { background: #c0392b; }
.tg-qresult-similar { color: var(--tg-gold-dark); }
@media (max-width: 575.98px) {
  .tg-builder .tg-panel { padding: 16px; }
  .tg-builder-submit { width: 100%; }
}

/* ======================================================================
   Student study tools: Flashcards and Quiz Prep (study_routes)
   ====================================================================== */
.tg-study .tg-study-select { width: auto; min-width: 5rem; }
.tg-study .tg-study-grow { flex: 1 1 12rem; min-width: 0; }
.tg-study .tg-study-file { max-width: 100%; font-size: .85rem; }
.tg-study details summary { cursor: pointer; }
.tg-study details summary:focus-visible { outline: 3px solid var(--tg-focus); outline-offset: 2px; }
.tg-deck h3 a { color: var(--tg-navy); }
.tg-card-row { padding: 16px 18px; }

/* study mode: one big card that flips */
.tg-flash-wrap { max-width: 640px; margin: 0 auto 2rem; }
.tg-flashcard { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%;
  min-height: 260px; padding: 28px 22px 40px; position: relative; text-align: center; cursor: pointer;
  background: var(--tg-white); color: var(--tg-ink); border: 1px solid var(--tg-border);
  border-top: 5px solid var(--tg-navy); border-radius: 16px; box-shadow: 0 6px 20px rgba(10, 34, 64, .08);
  transition: transform .15s ease, border-color .15s ease; }
.tg-flashcard:hover { transform: translateY(-2px); }
.tg-flashcard:focus { outline: none; }
.tg-flashcard:focus-visible { box-shadow: 0 0 0 4px var(--tg-focus), 0 6px 20px rgba(10, 34, 64, .08); }
.tg-flashcard.is-flipped { border-top-color: var(--tg-gold); background: #fffdf5; }
.tg-flashcard-side { position: absolute; top: 12px; left: 16px; font-size: .7rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--tg-muted); }
.tg-flashcard-text { font-size: 1.35rem; font-weight: 600; line-height: 1.4; white-space: pre-line;
  overflow-wrap: anywhere; color: var(--tg-navy); }
.tg-flashcard.is-flipped .tg-flashcard-text { font-size: 1.1rem; font-weight: 500; color: var(--tg-ink); }
.tg-flashcard-hint { margin-top: 12px; font-size: .88rem; color: var(--tg-muted); }
.tg-flashcard-tap { position: absolute; bottom: 12px; font-size: .78rem; color: var(--tg-muted); }
.tg-flash-grade { display: flex; gap: 10px; margin-top: 14px; }
.tg-flash-grade .btn { flex: 1 1 0; padding-top: .7rem; padding-bottom: .7rem; }
.tg-study kbd { background: var(--tg-navy-50); color: var(--tg-navy); font-size: .75rem; padding: 1px 6px; }
.tg-flash-grade .btn-primary kbd { background: rgba(255, 255, 255, .2); color: var(--tg-white); }

/* quiz prep */
.tg-practice-q { font-size: 1rem; width: 100%; margin-bottom: 12px; }
.tg-practice-list li { padding: 14px 20px; border-bottom: 1px solid var(--tg-border); }
.tg-practice-list li:last-child { border-bottom: 0; }
.tg-result { border-left-width: 4px; }
.tg-result.is-right { border-left-color: #146c43; }
.tg-result.is-wrong { border-left-color: #b02a37; }
.tg-result.is-check { border-left-color: var(--tg-gold); }

@media (max-width: 575.98px) {
  .tg-study .tg-panel { padding: 16px; }
  .tg-flashcard { min-height: 220px; }
  .tg-flashcard-text { font-size: 1.15rem; }
  .tg-flash-grade { flex-direction: column; }
}

/* ======================================================================
   Lesson plans (Teacher Pro): week strip, plan view, edit form, print
   ====================================================================== */
.tg-nav-pro { font-size: .6rem; padding: 2px 6px; margin-left: 6px; vertical-align: middle; letter-spacing: .06em; }
.sidebar.toggled .tg-nav-pro { display: none; }
.tg-optional { font-weight: 500; color: var(--tg-muted); font-size: .85em; }
.tg-lesson-form label { font-weight: 700; color: var(--tg-navy); font-size: .9rem; }
.tg-lesson-tabs .nav-link { color: var(--tg-muted); font-weight: 600; }
.tg-lesson-tabs .nav-link.active { color: var(--tg-navy); border-bottom: 3px solid var(--tg-gold); }

/* week strip: Mon-Fri columns, stacked on phones */
.tg-week-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tg-week-day { min-width: 0; border: 1px solid var(--tg-border); border-radius: 10px; padding: 10px; background: var(--tg-bg); }
.tg-week-today { border-color: var(--tg-gold); box-shadow: 0 0 0 1px rgba(201, 162, 39, .35); }
.tg-week-date { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--tg-navy); margin-bottom: 8px; }
.tg-week-date span { font-weight: 600; color: var(--tg-muted); letter-spacing: 0; text-transform: none; margin-left: 4px; }
.tg-week-plan { display: block; padding: 8px 10px; margin-bottom: 6px; border-radius: 8px; background: var(--tg-white);
  border: 1px solid var(--tg-border); border-left: 4px solid var(--tg-gold); color: var(--tg-ink); text-decoration: none; }
.tg-week-plan:hover { text-decoration: none; border-color: var(--tg-navy); color: var(--tg-ink); }
.tg-week-approved { border-left-color: #146c43; }
.tg-week-title { display: block; font-weight: 700; font-size: .88rem; line-height: 1.3; overflow-wrap: anywhere; }
.tg-week-course { display: block; font-size: .75rem; color: var(--tg-muted); margin: 2px 0 4px; }
.tg-week-none { font-size: .8rem; color: var(--tg-muted); }
.tg-earlier-toggle { cursor: pointer; }
@media (max-width: 575.98px) {
  .tg-week-strip { grid-template-columns: 1fr; }
  .tg-week-empty { display: none; }
}

/* plan view */
.tg-lesson-meta { font-size: .85rem; font-weight: 600; color: var(--tg-muted); margin-bottom: 4px; }
.tg-draft-badge { background: rgba(201, 162, 39, .14); color: var(--tg-gold-dark); border: 1px solid rgba(201, 162, 39, .5); font-weight: 700; }
.tg-lesson-sec { overflow-wrap: anywhere; }
.tg-min { display: inline-block; min-width: 52px; margin-right: 8px; padding: 1px 7px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--tg-navy-50); color: var(--tg-navy); text-align: center; }
.tg-flow-item { padding: 10px 0; border-top: 1px solid var(--tg-border); }
.tg-flow-item:first-child { border-top: 0; padding-top: 0; }
.tg-flow-title { font-size: .95rem; font-weight: 800; margin-bottom: 6px; }
.tg-flow-item ol li { margin-bottom: 4px; }
.tg-vocab dt { color: var(--tg-navy); }
.tg-vocab dd { margin-bottom: 6px; color: var(--tg-ink); }
.tg-sr-text { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* edit form: minutes box beside each timed part */
.tg-timed { display: flex; gap: 10px; align-items: flex-start; }
.tg-timed-min { flex: 0 0 110px; }
.tg-flow-total { font-weight: 700; letter-spacing: 0; text-transform: none; }
@media (max-width: 575.98px) {
  .tg-timed { flex-direction: column; }
  .tg-timed-min { flex-basis: auto; width: 120px; }
  .tg-lesson-actions .btn, .tg-lesson-actions form, .tg-lesson-submit { width: 100%; }
  .tg-lesson-form, .tg-lesson .tg-panel, .tg-week { padding: 16px 14px; }
}

/* print: just the plan, on one or two pages */
@media print {
  #accordionSidebar, .topbar, .tg-no-print, .scroll-to-top, .alert, footer { display: none !important; }
  body, #content-wrapper, #content { background: #fff !important; }
  .tg-lesson { padding: 0 !important; font-size: 10.5pt; color: #000; }
  .tg-lesson .tg-panel { border: 0; border-top: 1px solid #999; border-radius: 0; padding: 6px 0; margin-bottom: 6px !important; break-inside: avoid; }
  .tg-lesson .row { display: flex; flex-wrap: nowrap; margin: 0 -8px; }
  .tg-lesson .row > [class*="col-"] { flex: 1 1 50%; max-width: 50%; padding: 0 8px; }
  .tg-lesson .tg-panel-label { color: #000; margin-bottom: 4px; }
  .tg-lesson h1 { font-size: 16pt; }
  .tg-lesson .tg-min { border: 1px solid #999; background: none; }
  .tg-lesson .text-muted { color: #444 !important; }
  .tg-lesson-head { margin-bottom: 6px !important; }
  .tg-sr-text { display: none; }
  a[href]::after { content: none !important; }
  @page { margin: 1.4cm; }
}

/* lesson plans: a printed draft says it is a draft */
.tg-print-only { display: none; }
@media print { .tg-print-only { display: block; } }

/* grading options (review page) and targeted redo (grade sheet) */
.tg-grading-options .tg-option-help { max-width: 720px; }
.tg-grading-options .tg-option-select { width: auto; min-width: 220px; max-width: 100%; }
.tg-redo-percent { width: 110px; }
.tg-floor-badge { white-space: normal; text-align: left; }
.tg-redo-confirm p { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .tg-grading-options .tg-option-select { width: 100%; min-width: 0; }
  .tg-redo-form .d-flex > div, .tg-redo-form .btn { width: 100%; }
  .tg-redo-percent { width: 100%; }
}

/* ===== weekly family newsletter (Pro): checklist, preview frame, edit form ===== */
.tg-news-meta { font-size: .85rem; font-weight: 600; color: var(--tg-muted); }
.tg-news-week { max-width: 220px; }
.tg-news-checks { list-style: none; padding: 0; }
.tg-news-checks li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--tg-border); overflow-wrap: anywhere; }
.tg-news-checks li:first-child { border-top: 0; padding-top: 0; }
.tg-news-checks li > i { margin-top: 3px; font-size: 1.05rem; }
.tg-news-ok > i { color: #146c43; }
.tg-news-fail > i { color: #b02a37; }
.tg-news-frame-wrap { background: #eef0f4; border-radius: 10px; padding: 8px; overflow-x: auto; }
.tg-news-frame { display: block; width: 100%; max-width: 100%; height: 900px; margin: 0 auto; border: 1px solid var(--tg-border); border-radius: 8px; background: #fff; transition: width .2s ease; }
.tg-news-item { padding: 10px 0; border-top: 1px solid var(--tg-border); }
.tg-news-history td { vertical-align: middle; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .tg-news-form, .tg-news .tg-panel { padding: 16px 14px; }
  .tg-news-actions .btn, .tg-news-actions form, .tg-news-submit { width: 100%; }
  .tg-news-frame { height: 720px; }
  .tg-news-week { max-width: none; }
}

/* lesson plans: subject-aware parts and teaching materials (handout, three levels, check for understanding, prep note) */
.tg-task { padding: 10px 12px; border: 1px solid var(--tg-border); border-left: 4px solid var(--tg-gold); border-radius: 6px; background: var(--tg-white); }
.tg-task-label, .tg-item-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--tg-muted); margin-bottom: 4px; }
.tg-flow-sub { margin: 10px 0 4px; font-size: .8rem; font-weight: 800; color: var(--tg-navy); }
.tg-sort { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tg-sort > div { padding: 8px 10px; border: 1px solid var(--tg-border); border-radius: 6px; font-size: .85rem; }
.tg-sort strong { display: block; color: var(--tg-navy); }
.tg-lesson-table th, .tg-lesson-table td { font-size: .86rem; vertical-align: top; }
.tg-lesson-table thead th { color: var(--tg-navy); border-top: 0; }
.tg-correct-row td { background: #f0f7f0; }
.tg-route { display: inline-block; padding: 0 6px; border-radius: 999px; border: 1px solid var(--tg-border); font-size: .72rem; color: var(--tg-muted); }
.tg-look-across { padding: 10px 12px; border-left: 4px solid var(--tg-gold); background: #fef9ec; border-radius: 6px; }
.tg-look-across strong { display: block; margin-bottom: 4px; }
.tg-meta { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; }
.tg-meta dt { color: var(--tg-muted); }
.tg-meta dd { margin: 0; }
.tg-standards-note { margin-top: -4px; }
.tg-material-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tg-border); }
.tg-material-row:first-of-type { border-top: 0; }
.tg-material-actions { flex: 0 0 auto; }
.tg-edit-group { border: 1px solid var(--tg-border); border-radius: 8px; padding: 10px 14px 4px; margin-bottom: 16px; }
.tg-edit-group legend { width: auto; padding: 0 6px; font-size: .9rem; font-weight: 800; color: var(--tg-navy); }
.tg-edit-item { padding-top: 8px; border-top: 1px dashed var(--tg-border); }
.tg-prep summary { cursor: pointer; color: var(--tg-navy); }

/* student pages: plain, black-and-white friendly, every write-in space labeled */
.tg-sheet { max-width: 820px; margin-bottom: 24px; padding: 24px; background: var(--tg-white); border: 1px solid var(--tg-border); border-radius: 8px; color: var(--tg-ink); }
.tg-sheet-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; }
.tg-sheet-heading { font-size: 1.05rem; font-weight: 800; margin: 18px 0 6px; }
.tg-sheet-note { font-style: italic; margin-bottom: 6px; }
.tg-sheet-item { margin-bottom: 14px; break-inside: avoid; page-break-inside: avoid; }
.tg-item-num { display: inline-block; min-width: 26px; font-weight: 800; }
.tg-name-line { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 14px; }
.tg-name-line span { display: inline-block; flex: 1 1 160px; border-bottom: 1px solid #767676; min-height: 1.2em; }
.tg-name-line .tg-name-date { flex: 0 1 120px; }
.tg-support { padding-left: 26px; font-style: italic; }
.tg-support-list { margin-bottom: 12px; }
.tg-word-bank { padding: 8px 12px; margin-bottom: 12px; border: 1px solid #999; border-radius: 6px; }
.tg-word-bank-title { font-weight: 800; margin-bottom: 4px; }
.tg-step { margin: 4px 0 6px 26px; padding: 6px 10px; border: 1px dashed #999; border-radius: 6px; }
.tg-step-title { font-weight: 800; font-size: .9rem; }
.tg-choices { list-style: none; padding: 0; margin: 0 0 6px; }
.tg-choices li { padding: 6px 10px; margin: 5px 0; border: 1px solid #767676; border-radius: 4px; }
.tg-answer { position: relative; margin-left: 26px; border: 1px solid #999; border-radius: 4px; }
.tg-answer-label { position: absolute; top: 2px; left: 8px; font-size: .7rem; font-style: italic; color: var(--tg-muted); }
.tg-answer-lines { height: 110px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 26px, #c8c8c8 26px, #c8c8c8 27px); }
.tg-answer-open { height: 150px; }
.tg-answer-short { height: 40px; }
@media (max-width: 575.98px) {
  .tg-sheet { padding: 16px 12px; }
  .tg-sort { grid-template-columns: 1fr; }
  .tg-meta { grid-template-columns: 1fr; }
  .tg-material-row { flex-direction: column; align-items: stretch; }
  .tg-material-actions .btn, .tg-material-actions form { width: 100%; }
  .tg-answer, .tg-step, .tg-support { margin-left: 0; padding-left: 0; }
  .tg-step { padding: 6px 10px; }
}
@media print {
  .tg-sheet { max-width: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
  .tg-sheet-break { break-before: page; page-break-before: always; }
  .tg-answer-lines { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tg-prep summary { display: none; }
  .tg-task, .tg-look-across { border-left-color: #000; background: none; }

}
/* lesson slides: deck list, outline preview with per-slide edit, phone width */
.tg-deck-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--tg-border); }
.tg-deck-row:first-child { border-top: 0; padding-top: 0; }
.tg-deck-name { font-weight: 700; color: var(--tg-navy); }
.tg-deck-dl { margin-left: auto; }
.tg-slide-list { counter-reset: none; margin: 0; }
.tg-slide-card { background: var(--tg-white); border: 1px solid var(--tg-border); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.tg-slide-meta { display: flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tg-muted); margin-bottom: 8px; }
.tg-slide-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tg-gold); color: var(--tg-navy); letter-spacing: 0; }
.tg-slide-preview { border-radius: 10px; background: var(--tg-navy-50); padding: 14px 16px; color: var(--tg-ink); overflow-wrap: anywhere; }
.tg-slide-dark .tg-slide-preview { background: var(--tg-navy); color: var(--tg-white); }
.tg-slide-dark .tg-slide-preview .text-muted { color: #d5ddea !important; }
.tg-slide-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; color: inherit; }
.tg-slide-preview ul { padding-left: 1.2rem; }
.tg-slide-notes { font-size: .875rem; color: var(--tg-muted); margin-top: 10px; white-space: pre-line; overflow-wrap: anywhere; }
.tg-slide-notes .tg-panel-label { display: block; margin-bottom: 2px; }
.tg-slide-edit { margin-top: 10px; }
.tg-slide-edit summary { cursor: pointer; font-size: .875rem; font-weight: 700; color: var(--tg-navy); }
.tg-slide-edit[open] summary { margin-bottom: 8px; }
.tg-slides-save { position: sticky; bottom: 0; background: var(--tg-bg); padding: 10px 0; z-index: 5; }
@media (max-width: 575.98px) {
  .tg-slides .tg-panel, .tg-slide-card { padding: 14px 12px; }
  .tg-slides-actions .btn, .tg-slides-actions form, .tg-slides-save .btn { width: 100%; }
  .tg-deck-dl { margin-left: 0; width: 100%; }
}

/* ======================================================================
   Phones (25 Nov 2026): smaller type and tighter containers. Most sizes are in rem, so a smaller root size scales
   text, buttons, cards and spacing together.
   ====================================================================== */
@media (max-width: 767.98px) {
  html { font-size: 15px; }
  /* form fields stay at 16px: iPhones zoom the page into any field smaller than that */
  input.form-control, select.form-control, textarea.form-control, .custom-select { font-size: 16px; }

  /* the sidebar hides behind the menu button instead of taking a third of the screen */
  #accordionSidebar.sidebar { width: 0 !important; overflow: hidden !important; }
  #accordionSidebar.sidebar.toggled { width: 6.5rem !important; overflow: visible !important; }

  /* even side margins */
  #content .container-fluid, .dash-main-content { padding-left: 12px !important; padding-right: 12px !important; }
  /* sign-in and sign-up cards: less padding around the fields, readable button text */
  .the-inner .p-5 { padding: 1.75rem 1.25rem !important; }
  .btn-user { font-size: .95rem; }
  .card-body { padding: .9rem; }
  .card-header { padding: .6rem .9rem; }
  .table td, .table th { padding: .5rem; }

  /* page headers (title on the left, buttons on the right) stack instead of squeezing the title */
  .dash-main-content > .d-flex.justify-content-between { flex-wrap: wrap; align-items: flex-start !important; gap: .5rem; margin-left: 0 !important; }
  .dash-main-content > .d-flex.justify-content-between > :first-child { flex: 1 1 100%; }
  .dash-main-content > .d-flex.justify-content-between .btn { margin-bottom: .25rem; }

  /* landing hero: a wide caption with smaller type, so the headline and line under it take a few lines */
  .carousel-item, .carousel-item > img { height: 72vh; min-height: 460px; object-fit: cover; }
  .carousel { margin-bottom: 2rem; }
  .carousel-caption, .carousel-item .caption { left: 12px; right: 12px; padding: 18px 16px; border-radius: 10px; }
  .carousel-caption h1 { font-size: 1.6rem; line-height: 1.2; margin-bottom: .6rem; }
  .carousel-caption p { font-size: 1rem; line-height: 1.45; margin-bottom: 0; }
  .slider-btn { margin-top: 16px; display: flex; justify-content: center; gap: 10px; }
  .slider-btn .btn { font-size: .9rem; padding: .55rem 1.1rem; margin-right: 0; border-radius: 999px; font-weight: 700; }

  /* landing sections */
  .tg-section { padding: 56px 0; }
  .tg-section-head { margin-bottom: 32px; }
  .tg-section-title { font-size: 1.75rem; }
  .tg-section-lead { font-size: 1rem; }
  .tg-feature { padding: 22px 18px; margin-bottom: 16px; }
  .tg-policy { padding-top: 90px; }
  .tg-policy h1 { font-size: 1.75rem; }
}
@media (max-width: 575.98px) {
  html { font-size: 14px; }
}
