:root {
  --topic-ink: #10213d;
  --topic-muted: #61708a;
  --topic-line: rgba(16, 33, 61, .10);
  --topic-blue: #1769ff;
  --topic-page: #f4f7fb;
  --topic-paper: rgba(255, 255, 255, .94);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 3%, rgba(23, 105, 255, .12), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(255, 76, 131, .10), transparent 26%),
    var(--topic-page);
  color: var(--topic-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: inherit; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--topic-ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(16, 33, 61, .18);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

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

.topics-main a:focus-visible,
.topics-main button:focus-visible,
.topics-main input:focus-visible,
.topics-footer a:focus-visible {
  outline: 3px solid rgba(23, 105, 255, .42);
  outline-offset: 3px;
}

.topics-main {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.topics-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 30px;
  background:
    linear-gradient(120deg, rgba(5, 18, 45, .97), rgba(17, 46, 96, .94) 58%, rgba(56, 35, 92, .92)),
    #0b1b39;
  color: #fff;
  box-shadow: 0 26px 70px rgba(17, 38, 77, .18);
}

.topics-hero::before,
.topics-hero::after {
  position: absolute;
  border-radius: 999px;
  content: "";
  filter: blur(3px);
}

.topics-hero::before {
  top: -100px;
  right: -30px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 84, 140, .45), transparent 68%);
}

.topics-hero::after {
  right: 31%;
  bottom: -180px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(39, 166, 255, .34), transparent 66%);
}

.topics-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr);
  gap: 42px;
  align-items: center;
  min-height: 360px;
  padding: 48px 54px;
}

.topics-eyebrow,
.section-eyebrow {
  color: #83b4ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.topics-hero h1 {
  max-width: 720px;
  margin: 16px 0 0;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.topics-hero p {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 16px;
  line-height: 1.8;
}

.hero-topic-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-topic-board a {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: transform .2s ease, background .2s ease;
}

.hero-topic-board a:hover {
  background: rgba(255, 255, 255, .14);
  transform: translateY(-3px);
}

.hero-topic-board span {
  color: #9cc2ff;
  font-size: 11px;
  font-weight: 900;
}

.hero-topic-board strong {
  font-size: 17px;
  line-height: 1.35;
}

.topic-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: end;
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--topic-line);
  border-radius: 24px;
  background: var(--topic-paper);
  box-shadow: 0 14px 38px rgba(22, 44, 80, .07);
}

.topic-toolbar h2,
.topics-section h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.topic-toolbar p,
.topics-section-head p {
  margin: 10px 0 0;
  color: var(--topic-muted);
  line-height: 1.7;
}

.topic-search {
  display: flex;
  min-height: 52px;
  padding: 5px;
  border: 1px solid #d7dfeb;
  border-radius: 15px;
  background: #fff;
}

.topic-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 13px;
  color: var(--topic-ink);
  background: transparent;
}

.topic-search button {
  min-width: 74px;
  border: 0;
  border-radius: 11px;
  background: var(--topic-blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.topic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0 0;
}

.topic-filter {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  background: #fff;
  color: #485770;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.topic-filter[aria-pressed="true"] {
  border-color: var(--topic-blue);
  background: #edf4ff;
  color: var(--topic-blue);
  box-shadow: inset 0 0 0 1px rgba(23, 105, 255, .08);
}

.topics-section { margin-top: 46px; }

.topics-section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.topics-status {
  color: var(--topic-muted);
  font-size: 13px;
}

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

.topic-card {
  --accent: #1769ff;
  position: relative;
  display: flex;
  min-height: 310px;
  overflow: hidden;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--topic-line);
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 44, 78, .07);
  transition: transform .22s ease, box-shadow .22s ease;
}

.topic-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: var(--accent);
  content: "";
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(24, 44, 78, .12);
}

.topic-card[data-category="romance"] { --accent: #f43f7d; }
.topic-card[data-category="traditional"] { --accent: #e39813; }
.topic-card[data-category="corporate"] { --accent: #7357ff; }
.topic-card[data-category="commercial"] { --accent: #00a986; }
.topic-card[data-category="family"] { --accent: #ef6b2e; }

.topic-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.topic-card-meta span:first-child {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f6fa;
  background: color-mix(in srgb, var(--accent) 10%, white);
}

.topic-card h3 {
  margin: 20px 0 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.topic-card > p {
  margin: 12px 0 0;
  color: var(--topic-muted);
  font-size: 14px;
  line-height: 1.7;
}

.topic-needs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.topic-needs li {
  padding: 7px 9px;
  border-radius: 9px;
  background: #f3f6fa;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  color: #536179;
  font-size: 12px;
  font-weight: 750;
}

.topic-card-actions {
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding-top: 22px;
}

.topic-card-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #dbe2ec;
  border-radius: 12px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.topic-card-actions a:first-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.topic-empty {
  padding: 38px;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  background: #fff;
  color: var(--topic-muted);
  text-align: center;
}

.topic-method {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.topic-method article {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--topic-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .84);
}

.topic-method span {
  color: var(--topic-blue);
  font-size: 12px;
  font-weight: 950;
}

.topic-method h3 { margin: 12px 0 0; font-size: 17px; }
.topic-method p { margin: 8px 0 0; color: var(--topic-muted); font-size: 13px; line-height: 1.65; }

.topics-footer {
  border-top: 1px solid var(--topic-line);
  background: #fff;
}

.topics-footer-inner {
  display: flex;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--topic-muted);
  font-size: 12px;
}

.topics-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.topics-footer a { color: var(--topic-ink); font-weight: 800; text-decoration: none; }

@media (max-width: 980px) {
  .topics-hero-inner { grid-template-columns: 1fr; gap: 28px; padding: 40px; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .topics-main { width: calc(100% - 24px); padding-top: 12px; }
  .topics-hero { border-radius: 22px; }
  .topics-hero-inner { min-height: auto; padding: 30px 24px; }
  .topics-hero h1 { font-size: 40px; }
  .hero-topic-board { grid-template-columns: 1fr 1fr; }
  .hero-topic-board a { min-height: 100px; padding: 15px; }
  .topic-toolbar { grid-template-columns: 1fr; padding: 20px; }
  .topics-section-head { display: block; }
  .topics-status { display: block; margin-top: 10px; }
  .topic-grid,
  .topic-method { grid-template-columns: 1fr; }
  .topic-card { min-height: 0; }
  .topic-card-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
