:root {
  --tk-bg: #f6f8f7;
  --tk-surface: #ffffff;
  --tk-surface-alt: #eef5f2;
  --tk-text: #14211f;
  --tk-muted: #66736f;
  --tk-border: #ccd8d2;
  --tk-primary: #0f766e;
  --tk-primary-dark: #115e59;
  --tk-green: #0f766e;
  --tk-green-soft: #def3ec;
  --tk-accent: #1d4ed8;
  --tk-amber: #c98a04;
  --tk-blueprint: #2563eb;
  --tk-yellow: #d6a90f;
  --tk-red: #dc2626;
  --tk-shadow-card: 0 12px 28px rgba(20, 33, 31, 0.08);
  --tk-shadow-soft: 0 1px 2px rgba(20, 33, 31, 0.08), 0 18px 48px rgba(20, 33, 31, 0.08);
  --tk-shadow-pop: 0 22px 54px rgba(20, 33, 31, 0.16);
  --tk-glass: rgba(255, 255, 255, 0.9);
  --tk-panel-border: rgba(204, 216, 210, 0.82);
  --tk-dark: #10211f;
  --tk-dark-2: #0f4f4b;
  --tk-radius-sm: 4px;
  --tk-radius-md: 8px;
  --tk-container: 1180px;
  --tk-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tk-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--tk-bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--tk-text);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.025) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(0deg, rgba(15, 118, 110, 0.02) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 248, 247, 0.96) 42%, rgba(246, 248, 247, 1)),
    var(--tk-bg);
  font-family: var(--tk-font-sans);
  font-size: 16px;
  line-height: 1.55;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.35);
  outline-offset: 2px;
}

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

.tk-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 0 max(20px, calc((100vw - 1480px) / 2));
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--tk-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
}

.tk-logo {
  letter-spacing: 0;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.tk-logo strong {
  color: var(--tk-green);
}

.tk-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(204, 216, 210, 0.7);
  border-radius: var(--tk-radius-md);
  background: rgba(244, 247, 245, 0.72);
}

.tk-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  border-radius: var(--tk-radius-sm);
  color: #303832;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.tk-nav a:hover,
.tk-nav .is-active {
  background: #fff;
  color: var(--tk-green);
  box-shadow: 0 1px 2px rgba(20, 33, 31, 0.08);
}

.tk-top-search input,
.tk-search-panel input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--tk-text);
  border: 1px solid rgba(161, 180, 171, 0.75);
  border-radius: var(--tk-radius-md);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.tk-top-search input:focus,
.tk-search-panel input:focus,
.tk-input:focus,
.tk-textarea:focus,
.tk-filter-form select:focus {
  border-color: rgba(15, 118, 110, 0.65);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  outline: 0;
}

.tk-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tk-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  background: var(--tk-surface);
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  font-weight: 700;
}

.tk-menu-button strong {
  font-size: 14px;
}

.tk-menu-button__icon {
  display: grid;
  gap: 3px;
}

.tk-menu-button__icon span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.tk-mobile-nav {
  display: none;
}

.tk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(161, 180, 171, 0.82);
  border-radius: var(--tk-radius-md);
  background: var(--tk-surface);
  color: var(--tk-text);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.tk-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(20, 33, 31, 0.1);
}

.tk-button--primary {
  border-color: var(--tk-primary);
  background: linear-gradient(180deg, #10847b, var(--tk-primary));
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
}

.tk-button--primary:hover {
  background: var(--tk-primary-dark);
}

.tk-button--light {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.tk-button--light:hover {
  background: rgba(255, 255, 255, 0.2);
}

.tk-button--ghost {
  background: #fff;
}

.tk-button--danger {
  border-color: rgba(185, 28, 28, 0.28);
  background: linear-gradient(180deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.16);
}

.tk-button--danger:hover {
  background: #991b1b;
}

.tk-button--full {
  width: 100%;
}

.tk-avatar-link,
.tk-author-pill,
.tk-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tk-green);
  color: #fff;
  font-weight: 800;
}

.tk-app-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 390px;
  gap: 24px;
  width: min(1480px, calc(100% - 40px));
  margin: 24px auto 64px;
  align-items: start;
}

.tk-sidebar,
.tk-preview-panel,
.tk-form-card,
.tk-info-box,
.tk-table-card,
.tk-empty-state {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(204, 216, 210, 0.82);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-soft);
  backdrop-filter: blur(10px);
}

.tk-sidebar {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.tk-sidebar section + section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--tk-border);
}

.tk-sidebar h2,
.tk-info-box h2,
.tk-table-card h2 {
  margin: 0 0 14px;
  font-family: var(--tk-font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tk-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 11px;
  border-radius: var(--tk-radius-md);
  color: #303832;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.tk-side-link:hover,
.tk-side-link.is-active {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
  transform: translateX(2px);
}

.tk-side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--tk-radius-sm);
  font-family: var(--tk-font-mono);
  font-size: 11px;
  color: var(--tk-green);
  background: rgba(255, 255, 255, 0.86);
}

.tk-filter-form {
  display: grid;
  gap: 12px;
}

.tk-filter-form label,
.tk-form-card label {
  display: grid;
  gap: 8px;
  color: #2f362f;
  font-weight: 700;
}

.tk-filter-form select,
.tk-input,
.tk-textarea {
  width: 100%;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: #fff;
  color: var(--tk-text);
  font-weight: 500;
}

.tk-filter-form select,
.tk-input {
  min-height: 44px;
  padding: 0 12px;
}

.tk-textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.tk-input::placeholder,
.tk-textarea::placeholder {
  color: #7b8682;
  font-weight: 500;
}

.tk-feed {
  min-width: 0;
}

.tk-home-page,
.tk-educators-page {
  display: grid;
  gap: 16px;
  width: min(1240px, calc(100% - 32px));
  margin: 18px auto 56px;
}

.tk-discovery-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(204, 216, 210, 0.82);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-soft);
  backdrop-filter: blur(10px);
}

.tk-category-tabs {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  min-width: 0;
  padding: 4px 2px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tk-category-tabs::-webkit-scrollbar {
  display: none;
}

.tk-category-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: #66736f;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.tk-category-tabs a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: transparent;
  border-radius: 999px 999px 0 0;
}

.tk-category-tabs a:hover,
.tk-category-tabs a.is-active {
  color: var(--tk-text);
}

.tk-category-tabs a.is-active::after {
  background: var(--tk-yellow);
}

.tk-discovery-filters {
  display: flex;
  gap: 8px;
  align-items: end;
}

.tk-discovery-filters label {
  display: grid;
  gap: 4px;
  color: var(--tk-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tk-discovery-filters select {
  min-width: 142px;
  min-height: 40px;
  padding: 0 34px 0 11px;
  border: 1px solid rgba(161, 180, 171, 0.86);
  border-radius: var(--tk-radius-sm);
  background: #fff;
  color: var(--tk-text);
  font-size: 14px;
  font-weight: 700;
}

.tk-hero-strip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: stretch;
  gap: 18px;
  overflow: hidden;
  margin-bottom: 0;
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(204, 216, 210, 0.86);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-soft);
  color: var(--tk-text);
}

.tk-hero-strip--maker {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.44fr);
  margin-bottom: 0;
}

.tk-hero-strip__copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.tk-hero-strip h1,
.tk-page-header h1,
.tk-profile-header h1 {
  margin: 0;
  font-size: clamp(25px, 2.4vw, 36px);
  line-height: 1.06;
  letter-spacing: 0;
}

.tk-hero-strip p,
.tk-page-header p,
.tk-profile-header p {
  margin: 0;
  color: var(--tk-muted);
}

.tk-hero-strip p {
  max-width: 640px;
  color: #53615d;
  font-size: 15px;
}

.tk-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tk-hero-board {
  display: grid;
  align-content: stretch;
  gap: 8px;
}

.tk-hero-board div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(204, 216, 210, 0.86);
  border-radius: var(--tk-radius-sm);
  background: #f5faf7;
  box-shadow: none;
}

.tk-hero-board span {
  color: #6a7773;
  font-family: var(--tk-font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tk-hero-board strong {
  color: var(--tk-text);
  font-size: 22px;
  line-height: 1;
}

.tk-hero-strip--maker .tk-button--light {
  border-color: rgba(161, 180, 171, 0.82);
  background: #fff;
  color: var(--tk-text);
}

.tk-search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid rgba(204, 216, 210, 0.82);
  border-radius: var(--tk-radius-md);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--tk-shadow-soft);
}

.tk-search-panel--wide {
  margin-bottom: 0;
}

.tk-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tk-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(161, 180, 171, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.tk-chip:hover {
  border-color: var(--tk-primary);
  background: #fff;
  color: var(--tk-primary-dark);
  transform: translateY(-1px);
}

.tk-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
}

.tk-section-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.tk-section-title span,
.tk-section-title a {
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-card-list {
  display: grid;
  gap: 16px;
}

.tk-grade-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tk-grade-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 150px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--tk-text);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  border: 1px solid rgba(204, 216, 210, 0.9);
  border-left: 4px solid var(--tk-green);
  border-radius: var(--tk-radius-sm);
  background: #fff;
  box-shadow: none;
}

.tk-grade-strip a:nth-child(1) {
  border-left-color: #b63da5;
}

.tk-grade-strip a:nth-child(2) {
  border-left-color: #159ca0;
}

.tk-grade-strip a:nth-child(3) {
  border-left-color: #c43e43;
}

.tk-grade-strip a:nth-child(4) {
  border-left-color: #7b9f05;
}

.tk-grade-strip a:hover {
  transform: translateY(-2px);
}

.tk-grade-strip--large a {
  min-height: 44px;
}

.tk-subject-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.tk-subject-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  min-height: 76px;
  border: 1px solid rgba(204, 216, 210, 0.86);
  border-radius: var(--tk-radius-sm);
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 33, 31, 0.06);
}

.tk-subject-card img {
  width: 78px;
  height: 76px;
  min-height: 0;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.tk-subject-card::after {
  content: none;
}

.tk-subject-card span {
  position: static;
  z-index: auto;
  padding: 0 12px;
  color: var(--tk-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
}

.tk-subject-card:hover img {
  transform: scale(1.04);
}

.tk-home-section {
  display: grid;
  gap: 14px;
}

.tk-featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tk-project-tile {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  min-width: 0;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(204, 216, 210, 0.9);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tk-project-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 20px 52px rgba(20, 33, 31, 0.12);
}

.tk-project-tile__media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--tk-surface-alt);
}

.tk-project-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.tk-project-tile:hover .tk-project-tile__media img {
  transform: scale(1.035);
}

.tk-project-tile__body {
  display: grid;
  gap: 6px;
  padding: 13px 14px 14px;
}

.tk-project-tile__body > span {
  color: var(--tk-primary-dark);
  font-family: var(--tk-font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tk-project-tile h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.16;
}

.tk-project-tile p {
  margin: 0;
  color: var(--tk-muted);
  font-size: 14px;
  font-weight: 650;
}

.tk-project-tile__stats {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  min-height: 38px;
  padding: 10px 14px;
  border-top: 1px solid rgba(204, 216, 210, 0.78);
  color: var(--tk-muted);
  font-size: 12px;
  font-weight: 800;
}

.tk-educator-callout,
.tk-classroom-panel,
.tk-education-partners {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(204, 216, 210, 0.9);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-soft);
}

.tk-educator-callout,
.tk-classroom-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
}

.tk-educator-callout h2,
.tk-classroom-panel h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.08;
}

.tk-educator-callout p,
.tk-classroom-panel p {
  max-width: 760px;
  margin: 0;
  color: #3d4946;
  font-size: 16px;
}

.tk-teacher-hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-soft);
  background: #10211f;
}

.tk-teacher-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.tk-teacher-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 23, 21, 0.92), rgba(11, 23, 21, 0.46) 48%, rgba(11, 23, 21, 0.18));
}

.tk-teacher-hero > div {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 14px;
  max-width: 640px;
  min-height: 320px;
  padding: 38px 44px;
  color: #fff;
}

.tk-teacher-hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.02;
}

.tk-teacher-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.42;
}

.tk-classroom-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
}

.tk-classroom-checks span {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--tk-radius-sm);
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
  font-weight: 900;
}

.tk-education-partners {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.tk-education-partners > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tk-education-partners article {
  min-height: 108px;
  padding: 16px;
  background: #f2f6f4;
  border: 1px solid rgba(204, 216, 210, 0.9);
  border-radius: var(--tk-radius-md);
}

.tk-education-partners strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.tk-education-partners p {
  margin: 0;
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-project-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 42%) 1fr;
  overflow: hidden;
  min-height: 248px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(204, 216, 210, 0.9);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tk-project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 20px 52px rgba(20, 33, 31, 0.12);
}

.tk-project-card__media {
  min-height: 248px;
  background: var(--tk-surface-alt);
  overflow: hidden;
}

.tk-project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.tk-project-card:hover .tk-project-card__media img {
  transform: scale(1.035);
}

.tk-project-card__body {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 24px;
}

.tk-project-card h2 {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.08;
}

.tk-project-card h2 a:hover {
  color: var(--tk-primary-dark);
}

.tk-project-card p {
  margin: 0;
  color: #4c544d;
}

.tk-project-card__meta,
.tk-project-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--tk-muted);
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 700;
}

.tk-difficulty {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: var(--tk-font-sans);
  font-size: 12px;
  font-weight: 800;
}

.tk-difficulty--beginner {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-difficulty--intermediate {
  background: #fff5d6;
  color: #805900;
}

.tk-difficulty--advanced {
  background: #fee2e2;
  color: #991b1b;
}

.tk-author-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-author-line--large {
  margin-top: 6px;
}

.tk-reaction-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tk-reaction-bar form {
  margin: 0;
}

.tk-reaction-bar button,
.tk-reaction-bar a {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(204, 216, 210, 0.8);
  border-radius: 999px;
  background: #fff;
  color: #394039;
  font-weight: 800;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.tk-reaction-bar button:hover,
.tk-reaction-bar a:hover {
  border-color: rgba(15, 118, 110, 0.32);
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-reaction-bar button.is-active {
  border-color: rgba(15, 118, 110, 0.32);
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(204, 216, 210, 0.78);
}

.tk-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--tk-radius-md);
  background: #14211f;
  color: #fff;
  font-weight: 900;
}

.tk-card-cta:hover {
  background: var(--tk-primary-dark);
}

.tk-preview-panel {
  position: sticky;
  top: 96px;
  overflow: hidden;
}

.tk-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 12px;
}

.tk-preview-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

.tk-preview-head p {
  margin: 6px 0 0;
  color: var(--tk-muted);
}

.tk-preview-image {
  width: calc(100% - 44px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 22px 16px;
  border-radius: var(--tk-radius-md);
}

.tk-preview-tabs {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 22px 12px;
  border-bottom: 1px solid var(--tk-border);
  color: var(--tk-muted);
  font-weight: 800;
  white-space: nowrap;
}

.tk-preview-tabs span:first-child {
  color: var(--tk-green);
}

.tk-preview-panel > p {
  margin: 16px 22px;
  color: #4c544d;
}

.tk-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--tk-border);
}

.tk-preview-grid section {
  padding: 18px 22px;
  border-bottom: 1px solid var(--tk-border);
}

.tk-preview-grid h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.tk-mini-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.tk-mini-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tk-green);
  color: #fff;
  font-weight: 800;
}

.tk-clean-list,
.tk-file-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tk-clean-list li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(216, 209, 195, 0.7);
}

.tk-file-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.tk-file-list span {
  display: inline-flex;
  justify-content: center;
  min-width: 42px;
  padding: 3px 6px;
  border: 1px solid #bdd2ff;
  border-radius: var(--tk-radius-sm);
  color: var(--tk-blueprint);
  font-family: var(--tk-font-mono);
  font-size: 11px;
  font-weight: 700;
}

.tk-preview-panel .tk-button {
  margin: 18px 22px 22px;
  width: calc(100% - 44px);
}

.tk-empty-preview,
.tk-empty-state {
  padding: 30px;
}

.tk-flash-wrap {
  position: fixed;
  right: 20px;
  top: 90px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100% - 40px));
}

.tk-flash {
  padding: 14px 16px;
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-pop);
  font-weight: 800;
}

.tk-flash--success {
  background: var(--tk-green);
  color: #fff;
}

.tk-flash--error {
  background: var(--tk-red);
  color: #fff;
}

.tk-project-page,
.tk-create-page,
.tk-profile-page,
.tk-admin-page,
.tk-narrow,
.tk-auth-page {
  width: min(var(--tk-container), calc(100% - 40px));
  margin: 34px auto 64px;
}

.tk-project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 46%);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
  color: var(--tk-text);
}

.tk-project-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 0.98;
}

.tk-project-hero__copy > p {
  max-width: 700px;
  color: #424941;
  font-size: 18px;
}

.tk-project-hero__image {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  border-radius: var(--tk-radius-md);
}

.tk-back-link {
  color: var(--tk-green);
  font-weight: 800;
}

.tk-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tk-project-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.tk-project-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}

.tk-info-box {
  padding: 20px;
}

.tk-file-list--large li {
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--tk-border);
}

.tk-file-list--large div {
  flex: 1;
}

.tk-file-list--large small {
  display: block;
  color: var(--tk-muted);
}

.tk-file-list--large a {
  color: var(--tk-blueprint);
  font-weight: 800;
}

.tk-steps {
  min-width: 0;
}

.tk-step-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  margin-bottom: 14px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tk-primary);
  color: #fff;
  font-weight: 900;
}

.tk-step-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.tk-step-card p {
  margin: 0;
  color: #424941;
}

.tk-comments {
  margin-top: 30px;
}

.tk-comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.tk-comment-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  resize: vertical;
}

.tk-comment-list {
  display: grid;
  gap: 12px;
}

.tk-comment {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
}

.tk-comment p {
  margin: 4px 0 0;
  color: #424941;
}

.tk-project-reader {
  width: min(1220px, calc(100% - 40px));
}

.tk-project-reader-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.72fr);
  gap: 26px;
  align-items: stretch;
  margin-bottom: 18px;
}

.tk-project-reader-hero__intro,
.tk-project-cover-panel,
.tk-project-section,
.tk-project-toc,
.tk-build-cta {
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-project-reader-hero__intro {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 32px;
}

.tk-project-category {
  width: max-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tk-project-reader-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 0.96;
}

.tk-project-lead {
  max-width: 720px;
  margin: 0;
  color: #3d4946;
  font-size: 20px;
  line-height: 1.45;
}

.tk-project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tk-project-cover-panel {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  margin: 0;
}

.tk-project-cover-panel img {
  width: 100%;
  min-height: 420px;
  height: 100%;
  object-fit: cover;
}

.tk-project-cover-panel figcaption {
  padding: 12px 16px;
  color: var(--tk-muted);
  font-size: 14px;
  font-weight: 700;
}

.tk-project-fact-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.tk-project-fact {
  min-height: 86px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-project-fact span,
.tk-project-section__head span,
.tk-recipe-step__eyebrow,
.tk-build-cta span,
.tk-project-license span {
  display: block;
  color: var(--tk-primary-dark);
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tk-project-fact strong {
  display: block;
  margin-top: 8px;
  color: var(--tk-ink);
  font-size: 18px;
}

.tk-project-reader-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.tk-project-toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.tk-project-toc strong {
  margin-bottom: 6px;
  font-family: var(--tk-font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tk-project-toc a {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: var(--tk-radius-sm);
  color: #243531;
  font-weight: 800;
}

.tk-project-toc a:hover {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-project-article {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.tk-project-section {
  padding: 26px;
  scroll-margin-top: 96px;
}

.tk-project-section__head {
  margin-bottom: 18px;
}

.tk-project-section__head h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.tk-project-prose {
  max-width: 860px;
  color: #36433f;
  font-size: 18px;
  line-height: 1.7;
}

.tk-project-prose p {
  margin: 0;
}

.tk-project-license {
  display: inline-grid;
  gap: 4px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--tk-radius-md);
  background: var(--tk-surface-alt);
}

.tk-supply-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tk-supply-grid h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.tk-supply-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tk-supply-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-sm);
  background: #fffdf8;
  font-weight: 700;
}

.tk-supply-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--tk-green);
}

.tk-muted-text {
  margin: 0;
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-download-grid {
  display: grid;
  gap: 10px;
}

.tk-download-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: #fffdf8;
}

.tk-download-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--tk-radius-sm);
  background: #eff6ff;
  color: var(--tk-blueprint);
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 900;
}

.tk-download-card small {
  display: block;
  margin-top: 3px;
  color: var(--tk-muted);
}

.tk-recipe-step {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: #fff;
}

.tk-recipe-step__number {
  position: sticky;
  top: 112px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--tk-green);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.tk-recipe-step__body h3 {
  margin: 4px 0 12px;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.05;
}

.tk-recipe-step__media {
  overflow: hidden;
  margin: 0 0 16px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: var(--tk-surface-alt);
  aspect-ratio: 16 / 9;
}

.tk-recipe-step__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tk-recipe-step__body p:last-child {
  margin: 0;
  color: #37433f;
  font-size: 18px;
  line-height: 1.7;
}

.tk-build-cta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: var(--tk-green-soft);
}

.tk-build-cta h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 36px);
}

.tk-auth-page {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 28px;
  align-items: start;
}

.tk-auth-copy {
  padding: 32px 0;
}

.tk-auth-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.95;
}

.tk-auth-copy p {
  color: #424941;
  font-size: 18px;
}

.tk-auth-copy li {
  margin: 8px 0;
}

.tk-auth-grid {
  display: grid;
  gap: 16px;
}

.tk-form-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.tk-form-card h2 {
  margin: 0;
  font-size: 24px;
}

.tk-form-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tk-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tk-form-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tk-page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.tk-create-form {
  display: grid;
  gap: 18px;
}

.tk-help {
  margin: 0;
  color: var(--tk-muted);
}

.tk-upload-dropzone {
  padding: 18px;
  border: 2px dashed var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: var(--tk-surface-alt);
}

.tk-upload-dropzone input {
  margin-top: 10px;
  width: 100%;
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-upload-dropzone input::file-selector-button {
  min-height: 38px;
  margin-right: 10px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: var(--tk-radius-md);
  background: #eef4ff;
  color: var(--tk-blueprint);
  font-weight: 800;
  cursor: pointer;
}

.tk-step-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: #fffdf8;
}

.tk-step-editor + .tk-step-editor {
  margin-top: 12px;
}

.tk-step-editor > span {
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--tk-primary-dark);
}

.tk-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tk-page-kicker,
.tk-step-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 8px;
  color: var(--tk-primary-dark);
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tk-create-page--guided {
  width: min(1420px, calc(100% - 40px));
}

.tk-create-header {
  align-items: flex-start;
}

.tk-create-studio {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.tk-create-progress,
.tk-create-preview {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-create-progress > strong,
.tk-create-preview > strong {
  font-family: var(--tk-font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tk-create-progress a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--tk-radius-md);
  color: #25332f;
  font-weight: 800;
}

.tk-create-progress a span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tk-surface-alt);
  color: var(--tk-primary-dark);
  font-family: var(--tk-font-mono);
  font-size: 13px;
}

.tk-create-progress a:hover,
.tk-create-progress a.is-active {
  background: var(--tk-green-soft);
  border-color: rgba(15, 118, 110, 0.22);
}

.tk-create-help,
.tk-guidance-box,
.tk-create-checklist {
  padding: 14px;
  border-radius: var(--tk-radius-md);
  background: var(--tk-surface-alt);
  color: #2b3935;
}

.tk-create-help p,
.tk-guidance-box span {
  margin: 4px 0 0;
  color: var(--tk-muted);
}

.tk-create-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.tk-form-card--section {
  scroll-margin-top: 96px;
}

.tk-form-card label small {
  color: var(--tk-muted);
  font-weight: 500;
}

.tk-form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tk-guidance-box {
  display: grid;
  gap: 2px;
  border-left: 4px solid var(--tk-green);
}

.tk-publish-checks {
  display: grid;
  gap: 10px;
}

.tk-publish-checks label {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: #fff;
}

.tk-publish-checks input {
  width: 20px;
  height: 20px;
  accent-color: var(--tk-green);
}

.tk-form-actions--sticky {
  margin-top: 16px;
  z-index: 6;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-pop);
}

.tk-preview-card {
  display: grid;
  gap: 10px;
}

.tk-preview-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  border: 1px dashed #8bbeb5;
  border-radius: var(--tk-radius-md);
  background: linear-gradient(135deg, #effaf6, #f8fbff);
  color: var(--tk-primary-dark);
  font-weight: 800;
}

.tk-preview-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.tk-preview-card p {
  margin: 0;
  color: var(--tk-muted);
}

.tk-preview-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.tk-preview-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--tk-border);
}

.tk-preview-card dt {
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-preview-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.tk-create-checklist h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.tk-create-checklist ul {
  margin: 0;
  padding-left: 18px;
  color: #33413d;
}

.tk-create-checklist li + li {
  margin-top: 7px;
}

.tk-editor-page {
  width: min(1280px, calc(100% - 40px));
  margin-top: 24px;
}

.tk-editor-form {
  display: grid;
  gap: 18px;
}

.tk-editor-toolbar {
  position: sticky;
  top: 72px;
  z-index: 18;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
  backdrop-filter: blur(10px);
}

.tk-editor-toolbar > strong {
  justify-self: center;
  color: var(--tk-muted);
}

.tk-editor-toolbar__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.tk-editor-help,
.tk-editor-attach {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--tk-primary-dark);
  font-weight: 900;
}

.tk-editor-help::before {
  content: "?";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
}

.tk-editor-library {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  min-height: 118px;
  padding: 22px 26px;
  background: #fff;
  border: 2px solid #9aa8a3;
  border-radius: var(--tk-radius-md);
  text-align: center;
}

.tk-editor-library h1 {
  margin: 0;
  font-size: 24px;
}

.tk-editor-library p {
  margin: 8px 0 0;
  color: var(--tk-muted);
}

.tk-editor-add-file,
.tk-editor-block__add,
.tk-step-editor__head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 50%;
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
  font-size: 26px;
  font-weight: 500;
  cursor: pointer;
}

.tk-editor-library > span {
  color: var(--tk-muted);
  font-weight: 900;
}

.tk-editor-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.tk-editor-nav,
.tk-editor-preview {
  position: sticky;
  top: 154px;
  display: grid;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-editor-nav > strong,
.tk-editor-preview > strong {
  font-family: var(--tk-font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tk-editor-nav a {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: var(--tk-radius-sm);
  color: #263733;
  font-weight: 900;
}

.tk-editor-nav a:hover,
.tk-editor-nav a.is-active {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-editor-mobile-stepper {
  display: none;
}

.tk-editor-tip {
  margin-top: 8px;
  padding: 14px;
  border-radius: var(--tk-radius-md);
  background: var(--tk-surface-alt);
}

.tk-editor-tip p {
  margin: 6px 0 0;
  color: var(--tk-muted);
  font-size: 14px;
}

.tk-editor-canvas {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.tk-editor-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
  scroll-margin-top: 160px;
}

.tk-editor-basics {
  display: grid;
  grid-template-columns: minmax(220px, 0.58fr) minmax(0, 1fr);
  gap: 24px;
}

.tk-editor-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: 18px;
  border: 2px dashed var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: linear-gradient(135deg, #f8fbf8, #effaf6);
  color: var(--tk-primary-dark);
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.tk-editor-cover span {
  margin-top: 10px;
  color: var(--tk-muted);
  font-size: 14px;
}

.tk-editor-cover small {
  max-width: 260px;
  margin: 10px auto 14px;
  color: var(--tk-muted);
  font-size: 13px;
  font-weight: 700;
}

.tk-editor-cover input {
  width: 100%;
  max-width: 260px;
  min-height: 44px;
}

.tk-editor-cover input::file-selector-button {
  min-height: 40px;
  margin-right: 8px;
  padding: 0 12px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-sm);
  background: #fff;
  color: var(--tk-ink);
  font-weight: 800;
}

.tk-editor-basics__fields,
.tk-editor-block {
  display: grid;
  gap: 16px;
}

.tk-editor-block__head {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.tk-editor-block__head h2 {
  margin: 0;
  font-size: 28px;
}

.tk-editor-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 14px;
  border: 2px dashed var(--tk-border);
  border-radius: var(--tk-radius-sm);
  background: #fffdf8;
  color: var(--tk-muted);
  font-weight: 800;
  cursor: pointer;
}

.tk-editor-drop:hover,
.tk-editor-cover:hover,
.tk-upload-modal__drop:hover {
  border-color: rgba(15, 118, 110, 0.45);
  background: #f3fbf7;
}

.tk-editor-attach {
  justify-self: start;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tk-editor-attach::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-sm);
}

.tk-step-image-input {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(15, 118, 110, 0.35);
  border-radius: var(--tk-radius-sm);
  background: #f8fcfa;
  color: #1d2b27;
  font-weight: 900;
}

.tk-step-image-input span {
  color: var(--tk-muted);
  font-size: 13px;
  font-weight: 700;
}

.tk-step-image-input input {
  width: 100%;
  min-height: 44px;
  font-weight: 700;
}

.tk-step-image-input input::file-selector-button {
  min-height: 40px;
  margin-right: 8px;
  padding: 0 12px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-sm);
  background: #fff;
  color: var(--tk-ink);
  font-weight: 800;
}

.tk-step-editor__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.tk-step-editor__head span {
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tk-primary-dark);
}

.tk-upload-modal[hidden] {
  display: none;
}

.tk-upload-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tk-upload-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 18, 0.72);
}

.tk-upload-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(720px, 100%);
  padding: 24px;
  background: #fff;
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-pop);
}

.tk-upload-modal__dialog h2 {
  margin: 0;
}

.tk-upload-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--tk-muted);
  font-size: 28px;
  cursor: pointer;
}

.tk-upload-modal__dialog nav {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--tk-border);
}

.tk-upload-modal__dialog nav button {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--tk-muted);
  font-weight: 900;
  cursor: pointer;
}

.tk-upload-modal__dialog nav button.is-active {
  border-color: var(--tk-primary);
  color: var(--tk-ink);
}

.tk-upload-modal__drop {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 300px;
  padding: 28px;
  border: 2px dashed var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: #fffdf8;
  color: #33413d;
  text-align: center;
  cursor: pointer;
}

.tk-upload-modal__drop span {
  color: #cfd8d4;
  font-size: 52px;
  line-height: 1;
}

.tk-upload-modal__drop small {
  max-width: 460px;
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-upload-modal__dialog footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.has-modal-open {
  overflow: hidden;
}

.tk-profile-header {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 22px;
  align-items: center;
  margin-bottom: 24px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
}

.tk-profile-avatar {
  width: 112px;
  height: 112px;
  font-size: 44px;
}

.tk-profile-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.tk-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tk-admin-dashboard {
  width: min(1360px, calc(100% - 40px));
}

.tk-admin-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 22px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-admin-hero h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.96;
}

.tk-admin-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #3f4b47;
  font-size: 18px;
}

.tk-admin-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tk-admin-kpis,
.tk-admin-alerts {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.tk-admin-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tk-admin-kpi,
.tk-admin-alerts article {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-admin-kpi span,
.tk-admin-panel__head span {
  color: var(--tk-primary-dark);
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tk-admin-kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 36px;
  line-height: 1;
}

.tk-admin-kpi small,
.tk-admin-alerts small,
.tk-table-card small {
  display: block;
  margin-top: 6px;
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-admin-alerts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tk-admin-alerts article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
}

.tk-admin-alerts article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
  font-size: 18px;
  font-weight: 900;
}

.tk-admin-alerts strong {
  display: block;
  line-height: 1.2;
}

.tk-admin-grid--overview {
  margin-bottom: 18px;
}

.tk-table-card {
  overflow: hidden;
  padding: 20px;
}

.tk-admin-panel {
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-table-card--wide {
  grid-column: 1 / -1;
}

.tk-admin-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.tk-admin-panel__head h2 {
  margin: 0;
}

.tk-table-wrap {
  overflow-x: auto;
}

.tk-table-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tk-table-card th,
.tk-table-card td {
  padding: 10px;
  border-bottom: 1px solid var(--tk-border);
  text-align: left;
  vertical-align: top;
}

.tk-table-card th {
  font-family: var(--tk-font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.tk-table-card td a {
  color: var(--tk-primary-dark);
  font-weight: 900;
}

.tk-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tk-status-pill--good {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-status-pill--warn {
  background: #fff5d6;
  color: #785b00;
}

.tk-status-pill--danger {
  background: #fee2e2;
  color: #991b1b;
}

.tk-status-pill--neutral {
  background: var(--tk-surface-alt);
  color: var(--tk-muted);
}

.tk-admin-bars {
  display: grid;
  gap: 12px;
}

.tk-admin-bar {
  display: grid;
  gap: 8px;
}

.tk-admin-bar > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.tk-admin-bar span {
  color: var(--tk-muted);
  font-size: 13px;
  font-weight: 800;
}

.tk-admin-bar meter {
  width: 100%;
  height: 12px;
}

.tk-admin-feed {
  display: grid;
  gap: 10px;
}

.tk-admin-feed article {
  padding: 14px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: #fffdf8;
}

.tk-admin-feed article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.tk-admin-feed p {
  margin: 9px 0;
  color: #33413d;
}

/* Modernização global das telas internas */
.tk-page-header,
.tk-profile-header,
.tk-auth-copy,
.tk-admin-hero,
.tk-project-reader-hero__intro,
.tk-project-cover-panel,
.tk-project-section,
.tk-project-toc,
.tk-build-cta,
.tk-editor-toolbar,
.tk-editor-library,
.tk-editor-nav,
.tk-editor-preview,
.tk-editor-card,
.tk-form-card,
.tk-table-card,
.tk-admin-panel,
.tk-empty-state,
.tk-comment,
.tk-recipe-step,
.tk-project-fact,
.tk-download-card,
.tk-supply-item,
.tk-step-editor {
  border-color: var(--tk-panel-border);
  box-shadow: var(--tk-shadow-soft);
}

.tk-page-header,
.tk-profile-header,
.tk-auth-copy,
.tk-admin-hero,
.tk-project-reader-hero__intro {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(135deg, var(--tk-dark) 0%, var(--tk-dark-2) 62%, #174ea6 130%);
  color: #fff;
}

.tk-page-header,
.tk-profile-header,
.tk-auth-copy {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--tk-radius-md);
  box-shadow: 0 22px 54px rgba(16, 33, 31, 0.18);
}

.tk-page-header p,
.tk-profile-header p,
.tk-auth-copy p,
.tk-admin-hero p,
.tk-project-reader-hero__intro .tk-project-lead {
  color: rgba(255, 255, 255, 0.78);
}

.tk-profile-header .tk-project-meta span,
.tk-auth-copy li {
  color: rgba(255, 255, 255, 0.88);
}

.tk-auth-copy ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tk-auth-copy li {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--tk-radius-md);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.tk-auth-copy li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: #55d6c2;
  vertical-align: 1px;
}

.tk-form-card,
.tk-table-card,
.tk-admin-panel,
.tk-empty-state,
.tk-editor-card,
.tk-editor-library,
.tk-editor-nav,
.tk-editor-preview,
.tk-project-section,
.tk-project-toc,
.tk-comment,
.tk-recipe-step {
  background: var(--tk-glass);
  backdrop-filter: blur(10px);
}

.tk-form-card h2,
.tk-table-card h2,
.tk-admin-panel__head h2,
.tk-editor-block__head h2,
.tk-project-section__head h2,
.tk-comments h2,
.tk-section-title h2 {
  letter-spacing: 0;
}

.tk-form-card h2,
.tk-table-card h2,
.tk-admin-panel__head h2 {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
}

.tk-form-card label,
.tk-filter-form label {
  color: #20312d;
  font-size: 14px;
}

.tk-input,
.tk-textarea,
.tk-filter-form select,
.tk-comment-form textarea {
  border-color: rgba(161, 180, 171, 0.78);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tk-profile-avatar,
.tk-author-pill,
.tk-avatar-link {
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

.tk-profile-header .tk-profile-avatar {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tk-profile-header .tk-project-meta {
  margin-top: 14px;
}

.tk-profile-header .tk-project-meta span,
.tk-project-card__meta span:not(.tk-difficulty),
.tk-project-meta span {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(204, 216, 210, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.tk-profile-header .tk-project-meta span {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.11);
}

.tk-page-header {
  align-items: center;
}

.tk-page-header h1,
.tk-profile-header h1,
.tk-auth-copy h1,
.tk-admin-hero h1,
.tk-project-reader-hero h1 {
  text-wrap: balance;
}

.tk-project-reader {
  width: min(1320px, calc(100% - 40px));
}

.tk-project-reader-hero {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.7fr);
}

.tk-project-reader-hero__intro {
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 54px rgba(16, 33, 31, 0.18);
}

.tk-project-reader-hero__intro .tk-back-link {
  color: rgba(255, 255, 255, 0.82);
}

.tk-project-reader-hero__intro .tk-author-line {
  color: rgba(255, 255, 255, 0.76);
}

.tk-project-reader-hero__intro .tk-author-line strong {
  color: #fff;
}

.tk-project-reader-hero__intro .tk-author-pill {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: none;
}

.tk-project-category {
  background: rgba(255, 255, 255, 0.12);
  color: #bff4e7;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tk-project-cover-panel {
  background: #fff;
}

.tk-project-cover-panel img {
  transition: transform 0.28s ease;
}

.tk-project-cover-panel:hover img {
  transform: scale(1.02);
}

.tk-project-fact {
  background: rgba(255, 255, 255, 0.92);
}

.tk-project-fact strong {
  color: var(--tk-text);
  font-size: 22px;
}

.tk-project-toc a {
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.tk-project-toc a:hover {
  transform: translateX(2px);
}

.tk-supply-item,
.tk-download-card,
.tk-step-editor,
.tk-admin-feed article {
  background: rgba(255, 255, 255, 0.78);
}

.tk-supply-item:hover,
.tk-download-card:hover {
  border-color: rgba(15, 118, 110, 0.32);
  background: #fff;
}

.tk-recipe-step {
  background: rgba(255, 255, 255, 0.94);
}

.tk-recipe-step__number,
.tk-mini-step span {
  background: linear-gradient(180deg, #10847b, var(--tk-primary));
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
}

.tk-build-cta {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(29, 78, 216, 0.12)),
    rgba(255, 255, 255, 0.9);
}

.tk-editor-toolbar,
.tk-editor-library {
  background: rgba(255, 255, 255, 0.94);
}

.tk-editor-library {
  border-width: 1px;
  text-align: left;
}

.tk-editor-add-file,
.tk-editor-block__add,
.tk-step-editor__head button {
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(180deg, #e8faf4, #d9f0e8);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12);
}

.tk-editor-cover,
.tk-editor-drop,
.tk-upload-modal__drop {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.06), rgba(37, 99, 235, 0.05)),
    rgba(255, 255, 255, 0.88);
}

.tk-editor-cover input,
.tk-step-image-input input {
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  text-overflow: ellipsis;
}

.tk-editor-nav a,
.tk-editor-preview,
.tk-preview-card__media {
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.tk-editor-nav a:hover,
.tk-editor-nav a.is-active {
  transform: translateX(2px);
}

.tk-admin-dashboard {
  width: min(1420px, calc(100% - 40px));
}

.tk-admin-hero {
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 54px rgba(16, 33, 31, 0.18);
}

.tk-admin-kpi,
.tk-admin-alerts article {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 250, 0.92));
  border-color: var(--tk-panel-border);
  box-shadow: var(--tk-shadow-soft);
}

.tk-admin-kpi strong {
  font-size: clamp(34px, 4vw, 48px);
}

.tk-admin-alerts article > span {
  border-radius: var(--tk-radius-md);
  background: linear-gradient(180deg, #e8faf4, #d9f0e8);
}

.tk-admin-bar meter {
  overflow: hidden;
  border-radius: 999px;
  background: var(--tk-surface-alt);
}

.tk-admin-bar meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: var(--tk-surface-alt);
}

.tk-admin-bar meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tk-primary), var(--tk-accent));
}

.tk-table-wrap {
  border: 1px solid rgba(204, 216, 210, 0.72);
  border-radius: var(--tk-radius-md);
  background: #fff;
}

.tk-table-card table {
  overflow: hidden;
}

.tk-table-card th {
  background: #f5faf7;
  color: #45524e;
}

.tk-table-card tr:hover td {
  background: #fbfefd;
}

.tk-empty-state {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.tk-footer {
  align-items: center;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--tk-panel-border);
  border-radius: var(--tk-radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--tk-shadow-soft);
  backdrop-filter: blur(10px);
}

.tk-footer nav a {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: var(--tk-radius-sm);
}

.tk-footer nav a:hover {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--tk-container), calc(100% - 40px));
  margin: 0 auto 36px;
  padding-top: 24px;
  border-top: 1px solid var(--tk-border);
  color: var(--tk-muted);
}

.tk-footer strong {
  color: var(--tk-text);
  font-size: 24px;
}

.tk-footer p {
  margin: 4px 0 0;
}

.tk-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-weight: 700;
}

.tk-content-page {
  display: grid;
  gap: 18px;
  width: min(1040px, calc(100% - 40px));
  margin: 28px auto 48px;
}

.tk-policy-hero {
  align-items: flex-end;
  padding: 30px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(15, 118, 110, 0.07) 1px, transparent 1px) 0 0 / 36px 36px,
    #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
  color: var(--tk-text);
}

.tk-policy-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
}

.tk-policy-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: #3d4946;
  font-size: 18px;
  line-height: 1.55;
}

.tk-policy-grid,
.tk-license-grid,
.tk-contact-grid {
  display: grid;
  gap: 16px;
}

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

.tk-license-grid,
.tk-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tk-policy-card,
.tk-policy-section,
.tk-contact-aside article,
.tk-owner-panel {
  background: #fff;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-policy-card,
.tk-policy-section,
.tk-contact-aside article {
  padding: 24px;
}

.tk-policy-card > span,
.tk-contact-aside span,
.tk-owner-panel > div > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
  font-family: var(--tk-font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tk-policy-card h2,
.tk-policy-section h2,
.tk-contact-aside h2,
.tk-owner-panel h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.tk-policy-card p,
.tk-policy-section p,
.tk-contact-aside p,
.tk-owner-panel p {
  margin: 0;
  color: #3d4946;
  line-height: 1.65;
}

.tk-policy-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: #33413d;
  line-height: 1.65;
}

.tk-contact-form,
.tk-contact-aside {
  align-self: start;
}

.tk-contact-aside {
  display: grid;
  gap: 16px;
}

.tk-honeypot {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tk-owner-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
  padding: 24px;
  scroll-margin-top: 96px;
}

.tk-delete-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(185, 28, 28, 0.18);
  border-radius: var(--tk-radius-md);
  background: #fff7f7;
}

.tk-delete-form label {
  display: grid;
  gap: 8px;
  color: #4f1f1f;
  font-weight: 800;
}

@media (max-width: 1240px) {
  .tk-app-grid {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .tk-discovery-bar,
  .tk-educator-callout,
  .tk-classroom-panel {
    grid-template-columns: 1fr;
  }

  .tk-discovery-filters {
    justify-content: space-between;
  }

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

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

  .tk-hero-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tk-preview-panel {
    position: static;
    grid-column: 2;
  }

  .tk-form-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tk-editor-shell {
    grid-template-columns: 1fr;
  }

  .tk-editor-nav,
  .tk-editor-preview {
    position: static;
  }

  .tk-editor-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .tk-editor-nav > strong,
  .tk-editor-tip {
    display: none;
  }

  .tk-editor-nav a {
    white-space: nowrap;
  }

  .tk-admin-kpis,
  .tk-admin-alerts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .tk-topbar {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 0 16px;
  }

  .tk-nav,
  .tk-top-search,
  .tk-top-actions {
    display: none;
  }

  .tk-menu-button {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tk-mobile-nav {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    top: 84px;
    z-index: 30;
    padding: 12px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(204, 216, 210, 0.9);
    border-radius: var(--tk-radius-md);
    box-shadow: var(--tk-shadow-pop);
    backdrop-filter: blur(12px);
  }

  .tk-mobile-nav.is-open {
    display: grid;
  }

  .tk-mobile-nav a {
    padding: 12px;
    border-radius: var(--tk-radius-sm);
    font-weight: 800;
  }

  .tk-mobile-nav a:hover {
    background: var(--tk-green-soft);
  }

  .tk-mobile-nav__primary {
    min-height: 52px;
    margin-bottom: 6px;
    background: var(--tk-green);
    color: #fff;
    text-align: center;
  }

  .tk-mobile-nav__primary:hover {
    background: var(--tk-primary-dark) !important;
  }

  .tk-app-grid,
  .tk-project-layout,
  .tk-project-reader-hero,
  .tk-project-reader-layout,
  .tk-auth-page,
  .tk-profile-grid,
  .tk-project-hero,
  .tk-admin-grid,
  .tk-education-partners > div:last-child,
  .tk-policy-grid,
  .tk-license-grid,
  .tk-contact-grid,
  .tk-owner-panel,
  .tk-editor-shell,
  .tk-editor-basics {
    grid-template-columns: 1fr;
  }

  .tk-admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .tk-admin-hero__actions {
    justify-content: flex-start;
  }

  .tk-sidebar,
  .tk-project-aside,
  .tk-project-toc,
  .tk-editor-nav,
  .tk-editor-preview,
  .tk-editor-toolbar,
  .tk-preview-panel {
    position: static;
  }

  .tk-editor-toolbar {
    grid-template-columns: auto 1fr auto;
  }

  .tk-editor-toolbar > strong {
    display: none;
  }

  .tk-editor-help {
    justify-self: start;
  }

  .tk-editor-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .tk-editor-nav > strong,
  .tk-editor-tip {
    display: none;
  }

  .tk-editor-nav a {
    white-space: nowrap;
  }

  .tk-project-toc {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
  }

  .tk-project-toc strong {
    display: none;
  }

  .tk-project-toc a {
    white-space: nowrap;
  }

  .tk-project-fact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tk-category-tabs {
    gap: 18px;
  }

  .tk-discovery-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
  }

  .tk-discovery-filters select {
    min-width: 0;
    width: 100%;
  }

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

  .tk-subject-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tk-sidebar {
    order: 2;
  }

  .tk-app-grid > .tk-preview-panel {
    display: none;
  }

  .tk-preview-panel {
    grid-column: auto;
  }

  .tk-project-card {
    grid-template-columns: 1fr;
  }

  .tk-create-studio {
    grid-template-columns: 1fr;
  }

  .tk-create-progress,
  .tk-create-preview {
    position: static;
  }

  .tk-create-progress {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .tk-create-progress > strong,
  .tk-create-help {
    grid-column: 1 / -1;
  }

  .tk-create-progress a {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 74px;
    padding: 8px 5px;
    text-align: center;
    font-size: 13px;
  }

  .tk-project-card__media {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .tk-project-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tk-profile-header {
    grid-template-columns: 1fr;
  }

  .tk-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tk-logo {
    font-size: 34px;
  }

  .tk-menu-button strong {
    display: none;
  }

  .tk-menu-button {
    width: 48px;
    padding: 0;
  }

  .tk-app-grid,
  .tk-home-page,
  .tk-educators-page,
  .tk-project-page,
  .tk-create-page,
  .tk-profile-page,
  .tk-admin-page,
  .tk-content-page,
  .tk-narrow,
  .tk-auth-page {
    width: min(100% - 24px, var(--tk-container));
    margin-top: 18px;
  }

  .tk-editor-page {
    width: min(100% - 24px, var(--tk-container));
  }

  .tk-hero-strip {
    gap: 14px;
    padding: 16px;
  }

  .tk-discovery-bar {
    padding: 10px;
  }

  .tk-category-tabs {
    gap: 14px;
    padding-right: 14px;
  }

  .tk-category-tabs a {
    min-height: 38px;
    font-size: 14px;
  }

  .tk-discovery-filters {
    grid-template-columns: 1fr;
  }

  .tk-discovery-filters .tk-button {
    width: 100%;
  }

  .tk-hero-strip h1 {
    font-size: 26px;
  }

  .tk-hero-strip p {
    font-size: 14px;
  }

  .tk-card-cta {
    width: 100%;
  }

  .tk-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .tk-hero-actions .tk-button {
    width: auto;
    padding: 0 10px;
    font-size: 13px;
  }

  .tk-hero-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tk-grade-strip,
  .tk-subject-rail,
  .tk-featured-grid,
  .tk-classroom-checks {
    grid-template-columns: 1fr;
  }

  .tk-grade-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tk-grade-strip a {
    min-height: 40px;
    font-size: 14px;
  }

  .tk-subject-card {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 70px;
  }

  .tk-subject-card img {
    width: 72px;
    height: 70px;
    min-height: 0;
  }

  .tk-subject-card span {
    font-size: 15px;
  }

  .tk-project-tile__stats {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .tk-teacher-hero,
  .tk-teacher-hero > div {
    min-height: 320px;
  }

  .tk-teacher-hero > div {
    padding: 22px 18px;
  }

  .tk-teacher-hero h1 {
    font-size: 34px;
  }

  .tk-teacher-hero p {
    font-size: 16px;
  }

  .tk-educator-callout,
  .tk-classroom-panel,
  .tk-education-partners {
    padding: 18px;
  }

  .tk-hero-board div {
    padding: 8px 6px;
  }

  .tk-hero-board span {
    font-size: 8px;
    line-height: 1.2;
  }

  .tk-hero-board strong {
    font-size: 18px;
  }

  .tk-search-panel {
    padding: 8px;
  }

  .tk-project-card__body {
    padding: 18px;
  }

  .tk-reaction-bar,
  .tk-reaction-bar form,
  .tk-reaction-bar button,
  .tk-reaction-bar a {
    width: 100%;
  }

  .tk-editor-page.is-mobile-stepper .tk-editor-nav,
  .tk-editor-page.is-mobile-stepper .tk-editor-preview {
    display: none;
  }

  .tk-editor-page.is-mobile-stepper .tk-editor-card:not(.is-active) {
    display: none;
  }

  .tk-editor-page.is-mobile-stepper .tk-editor-mobile-stepper {
    position: sticky;
    top: 84px;
    z-index: 19;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-md);
    box-shadow: var(--tk-shadow-card);
    backdrop-filter: blur(10px);
  }

  .tk-editor-mobile-stepper span {
    color: var(--tk-muted);
    font-family: var(--tk-font-mono);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
  }

  .tk-editor-mobile-stepper .tk-button {
    width: 100%;
    min-width: 0;
    padding-right: 10px;
    padding-left: 10px;
  }

  .tk-editor-mobile-stepper .tk-button[disabled] {
    cursor: default;
    opacity: 0.45;
  }

  .tk-editor-page.is-mobile-stepper .tk-editor-card {
    scroll-margin-top: 86px;
  }

  .tk-editor-toolbar,
  .tk-editor-toolbar__actions,
  .tk-editor-library,
  .tk-upload-modal__dialog footer {
    grid-template-columns: 1fr;
  }

  .tk-editor-toolbar,
  .tk-editor-toolbar__actions,
  .tk-upload-modal__dialog footer {
    display: grid;
  }

  .tk-editor-help {
    justify-self: stretch;
  }

  .tk-editor-library,
  .tk-editor-card,
  .tk-upload-modal__dialog {
    padding: 16px;
  }

  .tk-editor-library {
    text-align: left;
  }

  .tk-editor-add-file {
    justify-self: start;
  }

  .tk-editor-block__head {
    justify-content: space-between;
    text-align: left;
  }

  .tk-editor-block__head h2 {
    font-size: 24px;
  }

  .tk-editor-cover {
    min-height: 220px;
  }

  .tk-upload-modal {
    align-items: flex-end;
    padding: 12px;
  }

  .tk-upload-modal__drop {
    min-height: 220px;
  }

  .tk-admin-dashboard {
    width: min(100% - 24px, var(--tk-container));
  }

  .tk-admin-kpis,
  .tk-admin-alerts {
    grid-template-columns: 1fr;
  }

  .tk-admin-hero,
  .tk-admin-kpi,
  .tk-admin-alerts article,
  .tk-table-card {
    padding: 16px;
  }

  .tk-admin-hero h1 {
    font-size: 38px;
  }

  .tk-admin-panel__head,
  .tk-admin-bar > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .tk-table-card table {
    min-width: 680px;
  }

  .tk-project-reader {
    width: min(100% - 24px, var(--tk-container));
  }

  .tk-project-reader-hero__intro,
  .tk-project-section,
  .tk-build-cta,
  .tk-policy-hero,
  .tk-policy-card,
  .tk-policy-section,
  .tk-contact-aside article,
  .tk-owner-panel {
    padding: 18px;
  }

  .tk-project-reader-hero h1 {
    font-size: 38px;
  }

  .tk-policy-hero h1 {
    font-size: 36px;
  }

  .tk-project-lead,
  .tk-project-prose,
  .tk-recipe-step__body p:last-child {
    font-size: 16px;
  }

  .tk-project-cover-panel img {
    min-height: 260px;
  }

  .tk-project-fact-grid,
  .tk-supply-grid,
  .tk-download-card,
  .tk-policy-grid,
  .tk-license-grid,
  .tk-contact-grid,
  .tk-owner-panel {
    grid-template-columns: 1fr;
  }

  .tk-project-fact {
    min-height: 0;
  }

  .tk-download-card .tk-button {
    width: 100%;
  }

  .tk-recipe-step {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .tk-recipe-step__media {
    aspect-ratio: 4 / 3;
  }

  .tk-recipe-step__number {
    position: static;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .tk-build-cta {
    display: grid;
  }

  .tk-build-cta .tk-button {
    width: 100%;
  }

  .tk-hero-strip,
  .tk-search-panel,
  .tk-section-title,
  .tk-footer,
  .tk-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tk-search-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tk-form-grid,
  .tk-form-grid--four,
  .tk-form-grid--three {
    grid-template-columns: 1fr;
  }

  .tk-project-hero,
  .tk-profile-header,
  .tk-form-card,
  .tk-info-box,
  .tk-step-card {
    padding: 18px;
  }

  .tk-project-hero__image {
    min-height: 260px;
  }

  .tk-step-card {
    grid-template-columns: 40px 1fr;
  }

  .tk-create-page--guided {
    width: min(100% - 24px, var(--tk-container));
  }

  .tk-create-header .tk-button {
    width: 100%;
  }

  .tk-create-progress {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tk-create-progress a {
    min-height: 58px;
    grid-template-columns: 30px 1fr;
    justify-items: start;
    text-align: left;
  }

  .tk-form-actions--sticky {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tk-step-card__number {
    width: 40px;
    height: 40px;
  }

  .tk-footer nav {
    justify-content: flex-start;
  }
}

/* Mobile final layer: keep the first screen useful on narrow devices. */
@media (max-width: 640px) {
  .tk-discover-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tk-discover-search input {
    min-width: 0;
    text-overflow: ellipsis;
  }

  .tk-discover-search .tk-button {
    width: auto;
    padding: 0 12px;
  }

  .tk-discover-hero {
    gap: 10px;
    padding: 15px 14px;
  }

  .tk-discover-hero h1 {
    max-width: 15ch;
    font-size: 26px;
    line-height: 1.04;
  }

  .tk-discover-hero p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.42;
  }

  .tk-discover-hero__actions {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }

  .tk-discover-hero__actions > span {
    flex: 1 1 auto;
    font-size: 9px;
    line-height: 1.2;
  }

  .tk-discover-hero__actions .tk-button {
    width: auto;
    min-height: 42px;
    padding: 0 13px;
    white-space: nowrap;
  }

  .tk-feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .tk-feed-toolbar > div {
    min-width: 0;
  }

  .tk-feed-toolbar .tk-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .tk-project-card__body {
    gap: 9px;
    padding: 13px;
  }

  .tk-project-card__meta {
    gap: 5px 7px;
    font-size: 11px;
  }

  .tk-project-card h2 {
    font-size: 20px;
    line-height: 1.08;
  }

  .tk-project-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 14px;
    line-height: 1.4;
  }

  .tk-author-line {
    gap: 8px;
    font-size: 13px;
  }

  .tk-project-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }

  .tk-reaction-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .tk-reaction-bar form,
  .tk-reaction-bar button,
  .tk-reaction-bar a {
    width: 100%;
    min-width: 0;
  }

  .tk-reaction-bar button,
  .tk-reaction-bar a {
    min-height: 36px;
    padding: 0 5px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tk-card-cta {
    grid-column: auto;
    width: 100%;
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .tk-discover-hero h1 {
    font-size: 24px;
  }

  .tk-discover-hero__actions > span {
    max-width: 92px;
  }

  .tk-discover-hero__actions .tk-button {
    padding: 0 10px;
    font-size: 13px;
  }

  .tk-feed-toolbar h2 {
    font-size: 18px;
  }

  .tk-feed-toolbar .tk-button {
    padding: 0 6px;
    font-size: 10px;
  }

  .tk-reaction-bar button,
  .tk-reaction-bar a {
    padding: 0 3px;
    font-size: 10px;
  }
}

/* Final mobile overrides: preserve density after the global responsive layer. */
@media (max-width: 640px) {
  .tk-discover-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tk-discover-search input {
    min-width: 0;
    text-overflow: ellipsis;
  }

  .tk-discover-search .tk-button {
    width: auto;
    padding: 0 12px;
  }

  .tk-discover-hero {
    gap: 10px;
    padding: 15px 14px;
  }

  .tk-discover-hero h1 {
    max-width: 15ch;
    font-size: 26px;
    line-height: 1.04;
  }

  .tk-discover-hero p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.42;
  }

  .tk-discover-hero__actions {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }

  .tk-discover-hero__actions > span {
    flex: 1 1 auto;
    font-size: 9px;
    line-height: 1.2;
  }

  .tk-discover-hero__actions .tk-button {
    width: auto;
    min-height: 42px;
    padding: 0 13px;
    white-space: nowrap;
  }

  .tk-feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .tk-feed-toolbar > div {
    min-width: 0;
  }

  .tk-feed-toolbar .tk-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .tk-project-card__body {
    gap: 9px;
    padding: 13px;
  }

  .tk-project-card__meta {
    gap: 5px 7px;
    font-size: 11px;
  }

  .tk-project-card h2 {
    font-size: 20px;
    line-height: 1.08;
  }

  .tk-project-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 14px;
    line-height: 1.4;
  }

  .tk-author-line {
    gap: 8px;
    font-size: 13px;
  }

  .tk-project-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }

  .tk-reaction-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .tk-reaction-bar form,
  .tk-reaction-bar button,
  .tk-reaction-bar a {
    width: 100%;
    min-width: 0;
  }

  .tk-reaction-bar button,
  .tk-reaction-bar a {
    min-height: 36px;
    padding: 0 5px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tk-card-cta {
    grid-column: auto;
    width: 100%;
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .tk-discover-hero h1 {
    font-size: 24px;
  }

  .tk-discover-hero__actions > span {
    max-width: 92px;
  }

  .tk-discover-hero__actions .tk-button {
    padding: 0 10px;
    font-size: 13px;
  }

  .tk-feed-toolbar h2 {
    font-size: 18px;
  }

  .tk-feed-toolbar .tk-button {
    padding: 0 6px;
    font-size: 10px;
  }

  .tk-reaction-bar button,
  .tk-reaction-bar a {
    padding: 0 3px;
    font-size: 10px;
  }
}

/* Refinamento visual: menos moldura, mais hierarquia e leitura rápida. */
:root {
  --tk-primary: #16766e;
  --tk-primary-dark: #105d57;
  --tk-green-soft: #e6f3ef;
  --tk-border: #d5dfdb;
  --tk-muted: #66736f;
  --tk-shadow-card: 0 8px 22px rgba(20, 33, 31, 0.055);
  --tk-shadow-soft: 0 1px 2px rgba(20, 33, 31, 0.06), 0 12px 32px rgba(20, 33, 31, 0.055);
}

body {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.016) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(15, 118, 110, 0.014) 1px, transparent 1px) 0 0 / 72px 72px,
    #f7f9f8;
}

.tk-topbar {
  grid-template-columns: auto auto minmax(280px, 1fr) auto;
  min-height: 62px;
  gap: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 rgba(20, 33, 31, 0.06);
}

.tk-logo {
  font-size: 32px;
}

.tk-nav {
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.tk-nav a {
  position: relative;
  min-height: 62px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #33413d;
  font-size: 14px;
}

.tk-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--tk-primary);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.tk-nav a:hover,
.tk-nav .is-active {
  background: transparent;
  color: var(--tk-primary-dark);
  box-shadow: none;
}

.tk-nav a:hover::after,
.tk-nav .is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.tk-top-search input {
  min-height: 40px;
  border-radius: 6px;
  background: #fbfdfc;
}

.tk-button--primary,
.tk-card-cta {
  background: var(--tk-primary);
  box-shadow: none;
}

.tk-button--primary:hover,
.tk-card-cta:hover {
  background: var(--tk-primary-dark);
  box-shadow: none;
}

.tk-discover-page {
  gap: 18px;
}

.tk-discover-hero {
  align-items: end;
  padding: 12px 0 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tk-discover-hero h1 {
  font-size: clamp(30px, 3.2vw, 42px);
  letter-spacing: -0.02em;
}

.tk-discover-hero p {
  max-width: 720px;
  margin-top: 7px;
}

.tk-discover-hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.tk-discover-hero__actions > span {
  color: var(--tk-muted);
  font-family: var(--tk-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tk-discover-search {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tk-discover-search input {
  min-height: 42px;
  border-radius: 6px;
}

.tk-discover-search .tk-button {
  min-height: 42px;
}

.tk-discover-sidebar {
  top: 78px;
  padding: 14px;
  box-shadow: none;
}

.tk-discover-feed {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tk-feed-toolbar {
  margin-bottom: 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--tk-border);
}

.tk-feed-toolbar h2 {
  font-size: 23px;
  letter-spacing: -0.01em;
}

.tk-feed-toolbar .tk-button {
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tk-primary-dark);
  box-shadow: none;
}

.tk-project-card {
  grid-template-columns: minmax(260px, 32%) minmax(0, 1fr);
  min-height: 220px;
  border-radius: 8px;
  box-shadow: none;
}

.tk-project-card__media {
  min-height: 220px;
}

.tk-project-card__body {
  min-width: 0;
  gap: 9px;
  padding: 16px 18px;
}

.tk-project-card h2 {
  font-size: clamp(21px, 2vw, 26px);
  letter-spacing: -0.015em;
}

.tk-project-card p {
  max-width: 58ch;
  line-height: 1.45;
}

.tk-project-card__footer {
  margin-top: auto;
  padding-top: 10px;
}

.tk-project-card__meta > span:not(.tk-difficulty) {
  color: var(--tk-muted);
}

.tk-educator-callout {
  padding: 18px 0 2px;
  border: 0;
  border-top: 1px solid var(--tk-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tk-educator-callout h2 {
  font-size: clamp(22px, 2.2vw, 30px);
}

.tk-educator-callout .tk-button {
  background: transparent;
  color: var(--tk-primary-dark);
  border-color: var(--tk-border);
}

.tk-project-reader-hero__intro {
  padding: 26px;
}

.tk-project-reader-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.tk-project-lead {
  font-size: 18px;
}

.tk-project-cover-panel img {
  min-height: 360px;
}

.tk-teacher-hero {
  min-height: 260px;
}

.tk-teacher-hero > div {
  min-height: 260px;
  padding: 30px 34px;
}

.tk-teacher-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.tk-policy-hero h1 {
  font-size: clamp(34px, 4vw, 50px);
}

@media (min-width: 921px) {
  .tk-discover-page .tk-discover-search {
    display: none;
  }
}

@media (max-width: 920px) {
  .tk-topbar {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .tk-nav a {
    min-height: 44px;
  }

  .tk-discover-hero {
    padding-top: 8px;
  }

  .tk-project-card {
    grid-template-columns: 1fr;
  }

  .tk-project-card__media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 640px) {
  .tk-topbar {
    min-height: 58px;
    padding: 0 12px;
  }

  .tk-logo {
    font-size: 28px;
  }

  .tk-discover-hero {
    gap: 12px;
    padding: 8px 0 0;
  }

  .tk-discover-hero__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .tk-discover-hero__actions > span {
    font-size: 10px;
  }

  .tk-discover-hero__actions .tk-button {
    width: 100%;
  }

  .tk-discover-search {
    display: grid;
    gap: 7px;
  }

  .tk-discover-sidebar {
    padding: 12px;
    box-shadow: none;
  }

  .tk-discover-sidebar > section:first-child {
    display: none;
  }

  .tk-discover-filters {
    gap: 9px;
  }

  .tk-feed-toolbar {
    align-items: end;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .tk-feed-toolbar h2 {
    font-size: 21px;
  }

  .tk-feed-toolbar p {
    font-size: 13px;
  }

  .tk-project-card {
    box-shadow: 0 1px 2px rgba(20, 33, 31, 0.06);
  }

  .tk-project-card__body {
    padding: 14px;
  }

  .tk-project-card h2 {
    font-size: 21px;
  }

  .tk-project-card__footer {
    gap: 9px;
  }

  .tk-educator-callout {
    padding-top: 16px;
  }
}

@media (max-width: 920px) {
  .tk-project-toc {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .tk-project-toc a {
    flex: 1 1 auto;
    min-width: max-content;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .tk-table-card table {
    min-width: 0 !important;
    table-layout: fixed;
  }

  .tk-table-card tbody,
  .tk-table-card tr,
  .tk-table-card td {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tk-table-card td {
    grid-template-columns: 96px minmax(0, 1fr);
    overflow-wrap: anywhere;
  }

  .tk-table-card td > *,
  .tk-table-card td a,
  .tk-table-card td small,
  .tk-table-card .tk-status-pill {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

/* Discovery mobile: keep the feed visible and make refinement intentional. */
.tk-discover-filter-disclosure {
  min-width: 0;
}

.tk-discover-filter-disclosure > summary {
  display: none;
}

.tk-discover-filter-disclosure > summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 640px) {
  .tk-discover-sidebar {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .tk-discover-filter-disclosure {
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-md);
    background: #fff;
    box-shadow: var(--tk-shadow-card);
  }

  .tk-discover-filter-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    color: var(--tk-text);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
  }

  .tk-discover-filter-disclosure > summary::after {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.16s ease;
  }

  .tk-discover-filter-disclosure[open] > summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
  }

  .tk-filter-summary__meta {
    margin-left: auto;
    color: var(--tk-muted);
    font-family: var(--tk-font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .tk-discover-filter-disclosure[open] > .tk-discover-filters {
    padding: 0 14px 14px;
  }

  .tk-discover-filter-disclosure .tk-discover-filters h2 {
    display: none;
  }

  .tk-discover-filter-disclosure:not([open]) > .tk-discover-filters {
    display: none;
  }
}

/* Mobile refinement: show the feed sooner and keep project actions compact. */
@media (max-width: 640px) {
  .tk-discover-page {
    gap: 10px;
  }

  .tk-discover-hero {
    gap: 10px;
    padding: 15px 14px;
  }

  .tk-discover-hero h1 {
    max-width: 15ch;
    font-size: 26px;
    line-height: 1.04;
  }

  .tk-discover-hero p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.42;
  }

  .tk-discover-hero__actions {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }

  .tk-discover-hero__actions > span {
    flex: 1 1 auto;
    font-size: 9px;
    line-height: 1.2;
  }

  .tk-discover-hero__actions .tk-button {
    width: auto;
    min-height: 42px;
    padding: 0 13px;
    white-space: nowrap;
  }

  .tk-discover-search {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 7px;
  }

  .tk-discover-search input {
    min-width: 0;
    padding: 0 10px;
    font-size: 14px;
    text-overflow: ellipsis;
  }

  .tk-discover-search .tk-button {
    min-height: 42px;
    padding: 0 12px;
  }

  .tk-feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .tk-feed-toolbar > div {
    min-width: 0;
  }

  .tk-feed-toolbar h2 {
    font-size: 20px;
  }

  .tk-feed-toolbar p {
    font-size: 12px;
  }

  .tk-feed-toolbar .tk-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .tk-project-card__body {
    gap: 9px;
    padding: 13px;
  }

  .tk-project-card__meta {
    gap: 5px 7px;
    font-size: 11px;
  }

  .tk-project-card h2 {
    font-size: 20px;
    line-height: 1.08;
  }

  .tk-project-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 14px;
    line-height: 1.4;
  }

  .tk-author-line {
    gap: 8px;
    font-size: 13px;
  }

  .tk-project-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }

  .tk-reaction-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .tk-reaction-bar form,
  .tk-reaction-bar button,
  .tk-reaction-bar a {
    width: 100%;
    min-width: 0;
  }

  .tk-reaction-bar button,
  .tk-reaction-bar a {
    min-height: 36px;
    padding: 0 5px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tk-card-cta {
    grid-column: auto;
    width: 100%;
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .tk-discover-hero h1 {
    font-size: 24px;
  }

  .tk-discover-hero__actions > span {
    max-width: 92px;
  }

  .tk-discover-hero__actions .tk-button {
    padding: 0 10px;
    font-size: 13px;
  }

  .tk-feed-toolbar h2 {
    font-size: 18px;
  }

  .tk-feed-toolbar .tk-button {
    padding: 0 6px;
    font-size: 10px;
  }

  .tk-reaction-bar button,
  .tk-reaction-bar a {
    padding: 0 3px;
    font-size: 10px;
  }
}

.tk-project-reader-hero__intro {
  background: rgba(255, 255, 255, 0.96);
  color: var(--tk-ink);
}

.tk-project-reader-hero h1 {
  color: var(--tk-ink);
}

.tk-project-reader-hero__intro .tk-back-link,
.tk-project-reader-hero__intro .tk-author-line,
.tk-project-reader-hero__intro .tk-author-line strong,
.tk-project-reader-hero__intro .tk-project-lead {
  color: var(--tk-muted);
}

.tk-project-reader-hero__intro .tk-author-line strong {
  color: var(--tk-ink);
}

.tk-project-reader-hero__intro .tk-author-pill {
  background: var(--tk-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
}

.tk-project-reader-hero__intro .tk-project-category {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
  border-color: transparent;
}

/* Tinkr professional redesign layer */
:root {
  --tk-bg: #f7f9f8;
  --tk-surface: #ffffff;
  --tk-surface-alt: #f1f6f4;
  --tk-ink: #15211f;
  --tk-text: #15211f;
  --tk-muted: #66736f;
  --tk-border: #d7e0dc;
  --tk-panel-border: #d7e0dc;
  --tk-primary: #08766d;
  --tk-primary-dark: #075f58;
  --tk-green: #08766d;
  --tk-green-soft: #e5f5ef;
  --tk-warning-soft: #fff7dc;
  --tk-danger-soft: #feecec;
  --tk-shadow-card: 0 1px 2px rgba(17, 24, 22, 0.08);
  --tk-shadow-soft: 0 1px 2px rgba(17, 24, 22, 0.08), 0 12px 32px rgba(17, 24, 22, 0.06);
  --tk-shadow-pop: 0 18px 48px rgba(17, 24, 22, 0.16);
  --tk-radius-sm: 6px;
  --tk-radius-md: 8px;
  --tk-container: 1180px;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(90deg, rgba(8, 118, 109, 0.018) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(0deg, rgba(8, 118, 109, 0.014) 1px, transparent 1px) 0 0 / 56px 56px,
    #f7f9f8;
  color: var(--tk-text);
  font-size: 15px;
}

.tk-topbar {
  grid-template-columns: auto auto minmax(280px, 1fr) auto auto;
  min-height: 66px;
  padding: 0 max(18px, calc((100vw - 1360px) / 2));
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(17, 24, 22, 0.06);
}

.tk-logo {
  font-size: 36px;
}

.tk-nav {
  gap: 2px;
  padding: 3px;
  background: #f5f8f7;
}

.tk-nav a {
  min-height: 38px;
  padding: 0 11px;
  font-size: 14px;
}

.tk-top-search input,
.tk-search-panel input,
.tk-discover-search input,
.tk-mobile-search input {
  min-height: 44px;
  border-color: #cfdad5;
  border-radius: 7px;
  font-size: 15px;
}

.tk-button,
.tk-reaction-bar button,
.tk-reaction-bar a,
.tk-card-cta {
  min-height: 44px;
  border-radius: 7px;
  font-size: 14px;
}

.tk-button:hover,
.tk-project-card:hover,
.tk-project-tile:hover,
.tk-subject-card:hover,
.tk-grade-strip a:hover {
  transform: none;
}

.tk-button--primary {
  background: linear-gradient(180deg, #0a8278, #08766d);
  box-shadow: 0 8px 18px rgba(8, 118, 109, 0.16);
}

.tk-button--ghost,
.tk-button--light {
  background: #fff;
  color: var(--tk-text);
  border-color: #cfdad5;
  box-shadow: none;
}

.tk-mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--tk-border);
}

.tk-mobile-search .tk-button {
  padding: 0 12px;
}

.tk-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--tk-container), calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 18px 20px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--tk-shadow-card);
  backdrop-filter: none;
}

.tk-footer strong {
  font-size: 22px;
}

.tk-footer nav {
  gap: 8px 14px;
}

.tk-home-page,
.tk-educators-page,
.tk-project-page,
.tk-create-page,
.tk-profile-page,
.tk-admin-page,
.tk-content-page,
.tk-narrow,
.tk-auth-page {
  width: min(var(--tk-container), calc(100% - 32px));
  margin: 18px auto 48px;
}

.tk-discover-page {
  gap: 14px;
}

.tk-discover-hero,
.tk-discover-search,
.tk-discover-sidebar,
.tk-discover-feed,
.tk-educator-callout,
.tk-classroom-panel,
.tk-education-partners,
.tk-project-reader-hero__intro,
.tk-project-cover-panel,
.tk-project-section,
.tk-project-toc,
.tk-build-cta,
.tk-form-card,
.tk-info-box,
.tk-table-card,
.tk-empty-state,
.tk-profile-header,
.tk-auth-copy,
.tk-page-header,
.tk-policy-card,
.tk-policy-section,
.tk-contact-aside article {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-card);
}

.tk-discover-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
}

.tk-discover-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.06;
}

.tk-discover-hero p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--tk-muted);
  font-size: 16px;
}

.tk-discover-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
}

.tk-discover-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.tk-discover-sidebar {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 18px;
  padding: 16px;
}

.tk-discover-sidebar h2,
.tk-discover-filters h2 {
  margin: 0 0 10px;
  color: var(--tk-muted);
  font-family: var(--tk-font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tk-discover-categories,
.tk-discover-filters {
  display: grid;
  gap: 8px;
}

.tk-discover-categories a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  border-radius: var(--tk-radius-sm);
  color: #263532;
  font-weight: 800;
}

.tk-discover-categories a:hover,
.tk-discover-categories a.is-active {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-discover-filters label {
  display: grid;
  gap: 6px;
  color: #33413d;
  font-size: 13px;
  font-weight: 800;
}

.tk-discover-filters select {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-sm);
  background: #fff;
  color: var(--tk-text);
}

.tk-discover-feed {
  min-width: 0;
  padding: 18px;
}

.tk-feed-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tk-feed-toolbar h2 {
  margin: 0;
  font-size: 25px;
}

.tk-feed-toolbar p {
  margin: 4px 0 0;
  color: var(--tk-muted);
  font-weight: 700;
}

.tk-active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.tk-active-filters span,
.tk-active-filters a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--tk-border);
  border-radius: 999px;
  background: #f8fbfa;
  color: #33413d;
  font-size: 13px;
  font-weight: 800;
}

.tk-active-filters a {
  color: var(--tk-primary-dark);
  background: var(--tk-green-soft);
}

.tk-feed-list {
  display: grid;
  gap: 12px;
}

.tk-project-card {
  grid-template-columns: minmax(210px, 36%) minmax(0, 1fr);
  min-height: 210px;
  border-color: var(--tk-border);
  box-shadow: var(--tk-shadow-card);
}

.tk-project-card__media {
  min-height: 210px;
}

.tk-project-card__body {
  gap: 10px;
  padding: 18px;
}

.tk-project-card h2 {
  font-size: clamp(21px, 2vw, 27px);
}

.tk-project-card p {
  color: #43504c;
}

.tk-project-card__footer {
  gap: 10px;
}

.tk-reaction-bar button,
.tk-reaction-bar a {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.tk-educator-callout,
.tk-classroom-panel {
  padding: 20px;
}

.tk-educator-callout h2,
.tk-classroom-panel h2 {
  font-size: clamp(23px, 2.2vw, 31px);
}

.tk-teacher-hero {
  min-height: 300px;
  box-shadow: var(--tk-shadow-card);
}

.tk-teacher-hero > div {
  min-height: 300px;
  padding: 34px 40px;
}

.tk-teacher-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.tk-grade-strip a,
.tk-subject-card {
  box-shadow: var(--tk-shadow-card);
}

.tk-project-reader {
  width: min(1180px, calc(100% - 32px));
}

.tk-project-reader-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  gap: 16px;
  margin-bottom: 14px;
}

.tk-project-reader-hero__intro {
  padding: 24px;
}

.tk-project-reader-hero h1 {
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.02;
}

.tk-project-lead {
  font-size: 17px;
}

.tk-project-cover-panel img {
  min-height: 320px;
}

.tk-project-fact-grid {
  gap: 8px;
  margin-bottom: 16px;
}

.tk-project-fact {
  min-height: 74px;
  padding: 13px;
  box-shadow: var(--tk-shadow-card);
}

.tk-project-section {
  padding: 22px;
}

.tk-project-section__head h2 {
  font-size: clamp(24px, 2.4vw, 32px);
}

.tk-project-prose,
.tk-recipe-step__body p:last-child {
  font-size: 16px;
  line-height: 1.65;
}

.tk-project-toc a.is-active,
.tk-project-toc a:hover {
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
}

.tk-recipe-step {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.tk-recipe-step__number {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.tk-recipe-step__body h3 {
  font-size: clamp(22px, 2.1vw, 28px);
}

.tk-download-card {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  background: #fff;
}

.tk-editor-page {
  width: min(1280px, calc(100% - 32px));
}

.tk-editor-toolbar {
  top: 74px;
  min-height: 58px;
  box-shadow: var(--tk-shadow-soft);
}

.tk-editor-toolbar > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tk-green-soft);
  color: var(--tk-primary-dark);
  font-size: 13px;
}

.tk-editor-library {
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid var(--tk-border);
  text-align: left;
  box-shadow: var(--tk-shadow-card);
}

.tk-editor-library h1 {
  font-size: 22px;
}

.tk-editor-add-file,
.tk-editor-block__add,
.tk-step-editor__head button {
  width: 40px;
  height: 40px;
  border-radius: var(--tk-radius-sm);
  font-size: 22px;
}

.tk-editor-shell {
  grid-template-columns: 210px minmax(0, 1fr) 300px;
  gap: 16px;
}

.tk-editor-nav,
.tk-editor-preview,
.tk-editor-card {
  box-shadow: var(--tk-shadow-card);
}

.tk-editor-card {
  padding: 22px;
}

.tk-editor-basics {
  grid-template-columns: minmax(210px, 0.48fr) minmax(0, 1fr);
  gap: 20px;
}

.tk-editor-cover {
  min-height: 220px;
  background: #f8fbfa;
}

.tk-editor-block__head {
  justify-content: space-between;
  text-align: left;
}

.tk-editor-block__head h2 {
  font-size: 24px;
}

.tk-form-errors,
.tk-field-error {
  color: #8f1d1d;
  font-weight: 800;
}

.tk-form-errors {
  padding: 12px 14px;
  border: 1px solid rgba(185, 28, 28, 0.22);
  border-radius: var(--tk-radius-sm);
  background: var(--tk-danger-soft);
}

.tk-field-error {
  margin: 6px 0 0;
  font-size: 13px;
}

[aria-invalid="true"] {
  border-color: #b91c1c !important;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1) !important;
}

.tk-upload-modal {
  align-items: center;
}

.tk-upload-modal__dialog {
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.tk-upload-status {
  margin: -4px 0 0;
  color: var(--tk-muted);
  font-size: 13px;
  font-weight: 800;
}

.tk-auth-copy,
.tk-profile-header,
.tk-admin-hero,
.tk-policy-hero {
  padding: 24px;
  color: var(--tk-text);
}

.tk-auth-copy h1,
.tk-profile-header h1,
.tk-admin-hero h1,
.tk-policy-hero h1 {
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.04;
}

.tk-admin-dashboard {
  width: min(1320px, calc(100% - 32px));
}

.tk-admin-hero {
  align-items: center;
  margin-bottom: 16px;
}

.tk-admin-hero p {
  max-width: 680px;
  font-size: 16px;
}

.tk-admin-kpis,
.tk-admin-alerts {
  gap: 10px;
  margin-bottom: 12px;
}

.tk-admin-kpi,
.tk-admin-alerts article,
.tk-admin-panel {
  box-shadow: var(--tk-shadow-card);
}

.tk-admin-kpi {
  padding: 14px;
}

.tk-admin-kpi strong {
  font-size: 30px;
}

.tk-admin-alerts article {
  grid-template-columns: 40px 1fr;
  padding: 14px;
}

.tk-admin-alerts article > span {
  width: 40px;
  height: 40px;
}

.tk-table-card {
  padding: 16px;
}

.tk-table-card caption {
  margin-bottom: 10px;
  color: var(--tk-muted);
  font-weight: 800;
  text-align: left;
}

.tk-table-card th,
.tk-table-card td {
  padding: 9px;
}

.tk-status-pill {
  min-height: 26px;
}

.tk-content-page {
  width: min(960px, calc(100% - 32px));
}

.tk-policy-hero {
  background: #fff;
}

.tk-policy-hero h1 {
  max-width: 720px;
}

.tk-policy-hero p {
  font-size: 16px;
}

.tk-policy-card,
.tk-policy-section,
.tk-contact-aside article {
  padding: 20px;
}

.tk-policy-card h2,
.tk-policy-section h2,
.tk-contact-aside h2,
.tk-owner-panel h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 920px) {
  .tk-project-toc {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .tk-project-toc a {
    flex: 1 1 auto;
    min-width: max-content;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .tk-table-card table {
    min-width: 0 !important;
    table-layout: fixed;
  }

  .tk-table-card tbody,
  .tk-table-card tr,
  .tk-table-card td {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tk-table-card td {
    grid-template-columns: 96px minmax(0, 1fr);
    overflow-wrap: anywhere;
  }

  .tk-table-card td > *,
  .tk-table-card td a,
  .tk-table-card td small,
  .tk-table-card .tk-status-pill {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 1100px) {
  .tk-discover-layout,
  .tk-project-reader-hero,
  .tk-project-reader-layout,
  .tk-editor-shell,
  .tk-editor-basics,
  .tk-profile-grid {
    grid-template-columns: 1fr;
  }

  .tk-discover-sidebar,
  .tk-project-toc,
  .tk-editor-nav,
  .tk-editor-preview {
    position: static;
  }

  .tk-discover-sidebar {
    order: 1;
  }

  .tk-discover-feed {
    order: 2;
  }

  .tk-admin-kpis,
  .tk-admin-alerts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .tk-topbar {
    grid-template-columns: auto 1fr auto;
    min-height: 62px;
  }

  .tk-mobile-nav {
    top: 72px;
    display: none;
    gap: 4px;
  }

  .tk-mobile-nav.is-open {
    display: grid;
  }

  .tk-mobile-nav a {
    min-height: 44px;
  }

  .tk-project-toc {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .tk-project-toc strong {
    display: none;
  }

  .tk-project-toc a {
    white-space: nowrap;
  }

  .tk-editor-toolbar {
    grid-template-columns: auto 1fr auto;
  }

  .tk-editor-toolbar > strong {
    justify-self: stretch;
  }

  .tk-editor-nav {
    display: flex;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .tk-logo {
    font-size: 30px;
  }

  .tk-home-page,
  .tk-educators-page,
  .tk-project-page,
  .tk-create-page,
  .tk-profile-page,
  .tk-admin-page,
  .tk-content-page,
  .tk-narrow,
  .tk-auth-page,
  .tk-project-reader,
  .tk-editor-page {
    width: min(100% - 20px, var(--tk-container));
    margin-top: 12px;
  }

  .tk-discover-hero,
  .tk-feed-toolbar,
  .tk-educator-callout,
  .tk-classroom-panel,
  .tk-admin-hero,
  .tk-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tk-discover-hero,
  .tk-discover-feed,
  .tk-discover-sidebar,
  .tk-project-reader-hero__intro,
  .tk-project-section,
  .tk-editor-card,
  .tk-editor-library,
  .tk-auth-copy,
  .tk-profile-header,
  .tk-admin-hero,
  .tk-policy-hero,
  .tk-policy-card,
  .tk-policy-section {
    padding: 14px;
  }

  .tk-discover-hero h1,
  .tk-project-reader-hero h1,
  .tk-teacher-hero h1,
  .tk-auth-copy h1,
  .tk-profile-header h1,
  .tk-admin-hero h1,
  .tk-policy-hero h1 {
    font-size: 28px;
  }

  .tk-discover-search,
  .tk-mobile-search {
    grid-template-columns: 1fr;
  }

  .tk-project-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .tk-project-card__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .tk-project-card__footer,
  .tk-reaction-bar,
  .tk-reaction-bar form,
  .tk-reaction-bar button,
  .tk-reaction-bar a,
  .tk-card-cta {
    width: 100%;
  }

  .tk-reaction-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tk-card-cta {
    grid-column: 1 / -1;
  }

  .tk-project-fact-grid,
  .tk-admin-kpis,
  .tk-admin-alerts,
  .tk-policy-grid,
  .tk-license-grid,
  .tk-contact-grid,
  .tk-supply-grid {
    grid-template-columns: 1fr;
  }

  .tk-project-cover-panel img {
    min-height: 240px;
  }

  .tk-recipe-step {
    grid-template-columns: 1fr;
  }

  .tk-recipe-step__number {
    position: static;
  }

  .tk-download-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .tk-download-card .tk-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .tk-editor-toolbar {
    top: 62px;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .tk-editor-toolbar > strong,
  .tk-editor-toolbar__actions {
    grid-column: 1 / -1;
  }

  .tk-editor-toolbar__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tk-editor-mobile-stepper {
    position: sticky;
    top: 62px;
    z-index: 12;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-md);
    box-shadow: var(--tk-shadow-soft);
  }

  .tk-editor-page.is-mobile-stepper .tk-editor-card:not(.is-active) {
    display: none;
  }

  .tk-upload-modal {
    align-items: flex-end;
    padding: 0;
  }

  .tk-upload-modal__dialog {
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
  }

  .tk-upload-modal__drop {
    min-height: 210px;
  }

  .tk-table-wrap {
    overflow: visible;
  }

  .tk-table-card table,
  .tk-table-card tbody,
  .tk-table-card tr,
  .tk-table-card td {
    display: block;
    width: 100%;
  }

  .tk-table-card thead {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .tk-table-card tr {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-sm);
    background: #fff;
  }

  .tk-table-card td {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #edf2f0;
  }

  .tk-table-card td:last-child {
    border-bottom: 0;
  }

  .tk-table-card td::before {
    content: attr(data-label);
    color: var(--tk-muted);
    font-family: var(--tk-font-mono);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .tk-footer nav {
    justify-content: flex-start;
  }
}

/* Mobile final layer: keep the first screen useful on narrow devices. */
@media (max-width: 640px) {
  .tk-discover-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tk-discover-search input {
    min-width: 0;
    text-overflow: ellipsis;
  }

  .tk-discover-search .tk-button {
    width: auto;
    padding: 0 12px;
  }

  .tk-discover-hero {
    gap: 10px;
    padding: 15px 14px;
  }

  .tk-discover-hero h1 {
    max-width: 15ch;
    font-size: 26px;
    line-height: 1.04;
  }

  .tk-discover-hero p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.42;
  }

  .tk-discover-hero__actions {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }

  .tk-discover-hero__actions > span {
    flex: 1 1 auto;
    font-size: 9px;
    line-height: 1.2;
  }

  .tk-discover-hero__actions .tk-button {
    width: auto;
    min-height: 42px;
    padding: 0 13px;
    white-space: nowrap;
  }

  .tk-feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .tk-feed-toolbar > div {
    min-width: 0;
  }

  .tk-feed-toolbar .tk-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .tk-project-card__body {
    gap: 9px;
    padding: 13px;
  }

  .tk-project-card__meta {
    gap: 5px 7px;
    font-size: 11px;
  }

  .tk-project-card h2 {
    font-size: 20px;
    line-height: 1.08;
  }

  .tk-project-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 14px;
    line-height: 1.4;
  }

  .tk-author-line {
    gap: 8px;
    font-size: 13px;
  }

  .tk-project-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }

  .tk-reaction-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .tk-reaction-bar form,
  .tk-reaction-bar button,
  .tk-reaction-bar a {
    width: 100%;
    min-width: 0;
  }

  .tk-reaction-bar button,
  .tk-reaction-bar a {
    min-height: 36px;
    padding: 0 5px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tk-card-cta {
    grid-column: auto;
    width: 100%;
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .tk-discover-hero h1 {
    font-size: 24px;
  }

  .tk-discover-hero__actions > span {
    max-width: 92px;
  }

  .tk-discover-hero__actions .tk-button {
    padding: 0 10px;
    font-size: 13px;
  }

  .tk-feed-toolbar h2 {
    font-size: 18px;
  }

  .tk-feed-toolbar .tk-button {
    padding: 0 6px;
    font-size: 10px;
  }

  .tk-reaction-bar button,
  .tk-reaction-bar a {
    padding: 0 3px;
    font-size: 10px;
  }
}
