:root {
  --tt-red: #ff6a00;
  --tt-red-dark: #e65300;
  --tt-ink: #141413;
  --tt-muted: #5e5d59;
  --tt-line: #e8e5da;
  --tt-bg: #f5f4ed;
  --tt-card: #faf9f5;
  --tt-soft: #eef2f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--tt-bg);
  color: var(--tt-ink);
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.tt-shell,
.tt-layout,
.tt-article-layout {
  width: min(1100px, calc(100vw - 48px));
}

.tt-shell {
  margin: 0 auto;
}

.tt-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--tt-line);
  background: rgba(250, 249, 245, 0.96);
  backdrop-filter: blur(12px);
}

.tt-header-row {
  display: flex;
  align-items: center;
  min-height: 58px;
}

.tt-brand {
  display: inline-flex;
  min-width: 132px;
  color: #222;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.tt-topnav {
  display: flex;
  gap: 20px;
  margin-left: 24px;
  color: #4d4c48;
  font-size: 15px;
  font-weight: 600;
}

.tt-topnav a {
  padding: 19px 0 16px;
  border-bottom: 2px solid transparent;
}

.tt-topnav a:hover,
.tt-topnav a.is-active {
  color: var(--tt-red);
  border-bottom-color: var(--tt-red);
}

.tt-admin-link {
  margin-left: auto;
  color: #87867f;
  font-size: 13px;
  font-weight: 600;
}

.tt-admin-link:hover {
  color: var(--tt-red);
}

.tt-main {
  min-height: calc(100vh - 118px);
}

.tt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  margin: 0 auto;
  padding: 18px 0 34px;
  align-items: start;
}

.tt-feed,
.tt-feed-list {
  display: grid;
  gap: 0;
}

.tt-feed-card,
.tt-panel,
.tt-article-module {
  border: 1px solid var(--tt-line);
  border-radius: 18px;
  background: var(--tt-card);
  box-shadow: 0 10px 28px rgba(20, 20, 19, 0.025);
}

.tt-feed-card {
  overflow: hidden;
}

.tt-section-title {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 14px 22px;
  border-bottom: 1px solid var(--tt-line);
  font-size: 18px;
  font-weight: 800;
}

.tt-article-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--tt-line);
  background: var(--tt-card);
}

.tt-article-card:hover {
  background: #f1f0e8;
}

.tt-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #87867f;
  font-size: 13px;
  line-height: 1.5;
}

.tt-pill {
  color: var(--tt-red);
  font-weight: 600;
}

.tt-article-title {
  max-width: none;
  margin: 7px 0 0;
  color: var(--tt-ink);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.tt-article-title a:hover {
  color: var(--tt-red);
}

.tt-article-summary {
  width: 100%;
  margin: 8px 0 0;
  color: var(--tt-muted);
  font-size: 15px;
  line-height: 1.62;
}

.tt-card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: #87867f;
  font-size: 13px;
  font-weight: 500;
}

.tt-card-action:hover {
  color: var(--tt-red);
}

.tt-sidebar {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 16px;
}

.tt-panel {
  padding: 0 18px 16px;
}

.tt-feed-panel {
  padding: 22px 20px 24px;
}

.tt-page-kicker {
  margin-bottom: 8px;
  color: var(--tt-red);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tt-feed-panel-title {
  margin: 8px 0 0;
  color: var(--tt-ink);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.tt-panel .tt-section-title {
  padding-left: 0;
  padding-right: 0;
}

.tt-hot-list {
  display: grid;
  gap: 0;
}

.tt-hot-item,
.tt-related-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--tt-line);
  color: #3d3d3a;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
}

.tt-hot-item:hover,
.tt-related-card:hover {
  color: var(--tt-red);
}

.tt-hot-index,
.tt-related-index {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--tt-soft);
  color: var(--tt-red);
  font-size: 12px;
  font-weight: 700;
}

.tt-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 2px;
  color: #5e5d59;
  font-size: 14px;
}

.tt-pagination p {
  margin: 0;
}

.tt-pagination div {
  display: flex;
  gap: 4px;
}

.tt-pagination a,
.tt-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--tt-line);
  border-radius: 8px;
  background: var(--tt-card);
  color: #5e5d59;
}

.tt-pagination a.is-active {
  background: var(--tt-soft);
  color: var(--tt-red);
  font-weight: 700;
}

.tt-empty {
  padding: 30px 22px;
  color: var(--tt-muted);
}

.tt-article-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 auto;
  padding: 34px 0 56px;
}

.tt-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 15px 22px;
  color: #87867f;
  font-size: 13px;
  line-height: 1.5;
}

.tt-breadcrumb a {
  color: #5e5d59;
  font-weight: 600;
}

.tt-breadcrumb a:hover {
  color: var(--tt-red);
}

.tt-article-main {
  padding: 42px 56px 50px;
}

.tt-article-h1 {
  max-width: 100%;
  margin: 14px 0 0;
  color: #141413;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tt-prose {
  margin-top: 22px;
  color: #222;
  font-size: 17px;
  line-height: 1.9;
}

.tt-prose h2 {
  margin: 1.9em 0 0.75em;
  padding-left: 10px;
  border-left: 3px solid var(--tt-red);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.tt-prose h3 {
  margin: 2em 0 0.8em;
  font-size: 20px;
}

.tt-prose p,
.tt-prose ul,
.tt-prose ol {
  margin: 1.05em 0;
}

.tt-prose li {
  margin: 0.45em 0;
}

.tt-prose a {
  color: var(--tt-red-dark);
  border-bottom: 1px solid rgba(255, 106, 0, 0.24);
}

.tt-related-block {
  padding: 28px 56px 34px;
}

.tt-related-block .tt-section-title {
  padding: 0 0 16px;
  border-bottom: 0;
}

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

.tt-footer {
  border-top: 1px solid var(--tt-line);
  background: var(--tt-bg);
}

.tt-footer-inner {
  padding: 28px 0;
  color: var(--tt-muted);
  text-align: center;
  font-size: 14px;
}

.admin-page {
  width: min(1100px, calc(100vw - 32px));
  margin: 28px auto 56px;
}

.admin-card {
  border: 1px solid var(--tt-line);
  border-radius: 18px;
  background: var(--tt-card);
  box-shadow: 0 10px 28px rgba(20, 20, 19, 0.025);
}

.admin-head,
.admin-toolbar,
.admin-form {
  padding: 20px;
  border-bottom: 1px solid var(--tt-line);
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-head h1 {
  margin: 0;
  font-size: 24px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: #5e5d59;
  font-size: 13px;
  font-weight: 700;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid var(--tt-line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: var(--tt-ink);
}

.admin-form textarea {
  min-height: 260px;
  resize: vertical;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--tt-line);
  border-radius: 10px;
  background: #fff;
  padding: 0 14px;
  color: #3d3d3a;
  cursor: pointer;
  font-weight: 700;
}

.btn.primary {
  border-color: var(--tt-red);
  background: var(--tt-red);
  color: #fff;
}

.btn.danger {
  color: #b91c1c;
}

.admin-list {
  display: grid;
  gap: 0;
}

.admin-row {
  display: grid;
  gap: 7px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--tt-line);
  cursor: pointer;
}

.admin-row:hover,
.admin-row.is-active {
  background: #f1f0e8;
}

.admin-row strong {
  line-height: 1.35;
}

.admin-row span {
  color: #87867f;
  font-size: 13px;
}

.login-box {
  width: min(420px, calc(100vw - 32px));
  margin: 80px auto;
}

.notice {
  color: var(--tt-red-dark);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .tt-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .tt-sidebar {
    display: none;
  }
}

@media (max-width: 820px) {
  .tt-shell,
  .tt-layout,
  .tt-article-layout {
    width: min(100% - 20px, 1100px);
  }

  .tt-header-row {
    min-height: 56px;
  }

  .tt-brand {
    min-width: auto;
    font-size: 21px;
  }

  .tt-topnav {
    margin-left: 16px;
    gap: 14px;
  }

  .tt-layout {
    padding-top: 16px;
  }

  .tt-article-main {
    padding: 26px 20px 32px;
  }

  .tt-article-h1 {
    font-size: 28px;
    line-height: 1.24;
  }

  .tt-prose {
    font-size: 16px;
    line-height: 1.82;
  }

  .tt-related-block {
    padding: 24px 20px 28px;
  }

  .tt-related-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .tt-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}
