.tg-page {
  --tg-ink: #29231f;
  --tg-muted: #625c56;
  --tg-accent: #a45234;
  --tg-line: #e1d9d1;
  font: 400 16px/1.68 Inter, Arial, sans-serif;
  color: var(--tg-ink);
  background: #fff;
}

.tg-page * { box-sizing: border-box; }
.tg-page [hidden] { display: none !important; }
.tg-page :is(h1, h2, h3, p) { margin: 0; }
.tg-page :is(h1, h2, h3) {
  font-family: Inter, Arial, sans-serif;
  color: var(--tg-ink);
  font-weight: 700;
}
.tg-page a { color: inherit; text-decoration: none; }
.tg-page :is(a, button, input):focus-visible {
  outline: 2px solid var(--tg-accent);
  outline-offset: 3px;
}

.tg-hero { padding: 72px max(24px, calc((100% - 1240px) / 2)) 38px; }
.tg-page .tg-hero h1 {
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.12;
  letter-spacing: -.045em;
  max-width: none;
}
.tg-page .tg-hero .editorial-dek {
  max-width: 680px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--tg-muted);
  margin-top: 20px;
}

.tg-section { padding: 0 max(24px, calc((100% - 1240px) / 2)) 64px; }
.tg-page .tg-topic-section h2 {
  font-size: clamp(27px, 3vw, 39px);
  line-height: 1.2;
  letter-spacing: -.035em;
  margin-bottom: 22px;
}
.tg-topic-section {
  scroll-margin-top: 100px;
  padding: 34px 0 40px;
  border-top: 1px solid var(--tg-line);
}

.tg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.tg-card {
  border: 1px solid var(--tg-line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}
.tg-image {
  aspect-ratio: 1.65;
  position: relative;
  background: #efe6dc;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}
.tg-image img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tg-copy {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tg-page .tg-card h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.025em;
  margin-bottom: 9px;
}
.tg-page .tg-description {
  color: var(--tg-muted);
  font-size: 15px;
  line-height: 1.55;
}
.tg-card time {
  font-size: 13px;
  color: var(--tg-muted);
  margin-top: auto;
  padding-top: 16px;
}

.tg-controls { padding-bottom: 24px; }
.tg-controls-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(26%, 320px);
  align-items: center;
  gap: 16px 24px;
}
.tg-controls input {
  width: 100%;
  min-height: 46px;
  font: 400 16px Inter, Arial, sans-serif;
  color: var(--tg-ink);
  padding: 11px 15px;
  border: 1px solid var(--tg-line);
  border-radius: 10px;
  background: #fff;
}
.tg-page .tg-status { font-size: 14px; color: var(--tg-muted); }
.tg-status:not(:empty) { padding-top: 10px; }

.tg-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tg-topics button {
  min-height: 44px;
  padding: 8px 14px;
  font: 650 14px/1.3 Inter, Arial, sans-serif;
  color: var(--tg-ink);
  border: 1px solid var(--tg-line);
  border-radius: 99px;
  background: #fff;
  cursor: pointer;
}
.tg-topics button:hover { border-color: var(--tg-accent); }
.tg-topics button[aria-pressed="true"] {
  color: #fff;
  background: var(--tg-ink);
  border-color: var(--tg-ink);
}
.tg-empty {
  text-align: center;
  border: 1px solid var(--tg-line);
  border-radius: 14px;
  margin-top: 24px;
  padding: 30px 20px;
}
.tg-empty button {
  cursor: pointer;
  font: 700 14px Inter, Arial, sans-serif;
  color: var(--tg-accent);
  background: #fff;
  border: 1px solid var(--tg-line);
  border-radius: 9px;
  padding: 11px 18px;
  margin-top: 14px;
}
.tg-tour-link { padding-top: 12px; font-size: 15px; }
.tg-page .tg-tour-link a {
  color: var(--tg-accent);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tg-card { transition: transform 230ms ease-out, box-shadow 230ms ease-out; }
  .tg-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px #29231f17; }
}
@media (max-width: 980px) {
  .tg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-controls-row { grid-template-columns: minmax(0, 1fr); }
  .tg-controls label { max-width: 360px; }
}
@media (max-width: 650px) {
  .tg-hero { padding: 44px 20px 28px; }
  .tg-section { padding: 0 20px 42px; }
  .tg-grid { grid-template-columns: 1fr; gap: 16px; }
  .tg-controls { padding-bottom: 20px; }
  .tg-topic-section { padding: 26px 0 30px; }
}
