:root {
  --surface-ink: #0f0b18;
  --surface-ink-2: #171225;
  --surface-panel: #171221;
  --surface-panel-soft: #1e182c;
  --surface-panel-raised: #241d34;
  --surface-text: #fff5e4;
  --surface-muted: #d8c8b0;
  --surface-muted-2: #a38f7d;
  --surface-line: rgba(255, 245, 228, 0.14);
  --surface-line-strong: rgba(255, 245, 228, 0.22);
  --surface-accent: #ff8b2f;
  --surface-accent-cool: #8398eb;
  --surface-accent-rose: #cb8ea0;
  --surface-shadow: rgba(0, 0, 0, 0.34);
  --surface-font-display: "P22 Typewriter", "American Typewriter", "IBM Plex Mono", "Courier New", serif;
  --surface-font-body: "Jost", "Avenir Next", "Helvetica Neue", Helvetica, sans-serif;
  --surface-font-literary: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --surface-page-width: min(1480px, calc(100vw - 24px));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 139, 47, 0.13), transparent 22%),
    radial-gradient(circle at 88% 0%, rgba(131, 152, 235, 0.16), transparent 26%),
    linear-gradient(180deg, #0b0812 0%, var(--surface-ink) 40%, #09070d 100%);
  color: var(--surface-text);
  font-family: var(--surface-font-body);
}

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

.tcnd,
.tcd {
  width: var(--surface-page-width);
  margin: 0 auto;
  padding: 18px 0 30px;
  display: grid;
  gap: 18px;
}

.tcnd__header,
.tcd__header {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--surface-line);
}

.tcnd__eyebrow,
.tcd__eyebrow,
.tcnd__kicker,
.tcd__kicker {
  color: var(--surface-accent-cool);
  font-family: var(--surface-font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tcnd__title,
.tcd__title {
  margin: 0;
  font-family: var(--surface-font-literary);
  font-size: clamp(2.3rem, 3vw, 3.5rem);
  line-height: 0.92;
}

.tcnd__sub,
.tcd__sub,
.tcnd__subtitle,
.tcnd__body,
.tcd__card-meta,
.tcd__overlay-sub,
.tcd__overlay-body {
  color: var(--surface-muted);
}

.tcnd__sub,
.tcd__sub,
.tcnd__body {
  margin: 0;
  max-width: 760px;
  font-size: 0.98rem;
  line-height: 1.5;
}

.tcnd__meta,
.tcd__meta,
.tcd__toolbar,
.tcnd__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tcnd__pill,
.tcd__pill,
.tcd__btn,
.tcnd__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--surface-line-strong);
  border-radius: 999px;
  background: rgba(255, 245, 228, 0.04);
  color: var(--surface-text);
  text-decoration: none;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.tcd__btn,
.tcnd__action {
  cursor: pointer;
  font-family: var(--surface-font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tcd__btn:hover,
.tcnd__action:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 139, 47, 0.34);
}

.tcd__btn.is-active {
  background:
    linear-gradient(180deg, rgba(255, 245, 228, 0.16), transparent 18%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-accent) 88%, #ffd1ac 12%), var(--surface-accent));
  border-color: color-mix(in srgb, var(--surface-accent) 68%, white 32%);
  color: #180f0f;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.tcnd__grid,
.tcd__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.tcnd__card,
.tcd__card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--surface-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 12%, rgba(131, 152, 235, 0.1), transparent 24%),
    radial-gradient(circle at 82% 88%, rgba(255, 139, 47, 0.1), transparent 20%),
    linear-gradient(180deg, rgba(255, 245, 228, 0.04), transparent 24%),
    var(--surface-panel);
  box-shadow: 0 20px 40px var(--surface-shadow);
}

.tcnd__card {
  min-height: 250px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.tcnd__card-head,
.tcnd__card-body,
.tcnd__card-foot {
  position: relative;
  z-index: 1;
}

.tcnd__card-title {
  margin: 0;
  font-family: var(--surface-font-literary);
  font-size: 1.55rem;
  line-height: 0.94;
}

.tcnd__subtitle {
  font-size: 0.86rem;
}

.tcnd__tags,
.tcd__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tcnd__tag,
.tcd__tag {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--surface-line);
  background: rgba(131, 152, 235, 0.1);
  color: var(--surface-text);
  font-size: 0.72rem;
}

.tcnd__card-foot,
.tcd__card-meta {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.tcd__card {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.tcd__preview {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 245, 228, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.tcd__preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tcd__overlay {
  position: absolute;
  inset: 0;
  padding: 14px 14px 12px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  background:
    linear-gradient(180deg, rgba(15, 11, 24, 0.14), rgba(15, 11, 24, 0.34)),
    radial-gradient(circle at 50% 55%, rgba(255, 245, 228, 0.14), transparent 60%);
  color: #180f0f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

.tcd__overlay-title {
  font-family: var(--surface-font-literary);
  font-size: 1.55rem;
  line-height: 0.96;
}

.tcd__overlay-sub,
.tcd__overlay-body {
  color: rgba(28, 16, 10, 0.84);
}

.tcd__overlay-body {
  align-self: end;
  max-width: 84%;
  font-size: 0.74rem;
  line-height: 1.35;
}

strong {
  color: var(--surface-text);
  font-weight: 600;
}

@media (max-width: 820px) {
  .tcnd,
  .tcd {
    width: min(100vw - 18px, 100%);
    padding: 16px 0 24px;
  }
}
