﻿:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe3ee;
  --brand: #155e75;
  --brand-2: #0f766e;
  --accent: #f59e0b;
  --soft: #e8f3f5;
  --danger: #b91c1c;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --content: 1180px;
  --gutter: 48px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-header-inner {
  display: grid;
  gap: 14px;
  width: min(calc(100% - var(--gutter)), var(--content));
  margin: 0 auto;
  padding: 14px 0;
}

.site-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  flex: 0 0 42px;
}

.mark img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}


.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.site-header nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
}

.site-header nav a,
.admin-sidebar button,
.btn {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 14px;
  cursor: pointer;
}

.site-header nav a:hover,
.admin-sidebar button:hover {
  background: var(--soft);
  color: var(--brand);
}

.site-search {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
}

.site-search input {
  flex: 1 1 auto;
  min-width: 220px;
  height: 38px;
  padding: 8px 10px;
}

.site-search button {
  flex: 0 0 auto;
  min-width: 64px;
  height: 38px;
  padding: 0 12px;
  white-space: nowrap;
  word-break: keep-all;
}

.admin-link {
  border-color: var(--line) !important;
}

.hero,
.page-title,
.brand-hero,
.section {
  width: min(calc(100% - var(--gutter)), var(--content));
  max-width: var(--content);
  margin: 0 auto;
  padding: 64px 0;
}

.content-page {
  width: min(calc(100% - var(--gutter)), 880px);
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 430px;
}

.hero-copy {
  max-width: 880px;
}

.hero h1,
.page-title h1,
.brand-hero h1,
.content-page h1 {
  margin: 10px 0 18px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.content-page h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
}

.hero p,
.page-title p,
.brand-hero p,
.lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.eyebrow a {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-page > .eyebrow a {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  margin-right: 4px;
  border: 1px solid #99d5cf;
  border-radius: 6px;
  background: #ecfeff;
  text-decoration: none;
}

.hero-actions,
.footer-links,
.section-head,
.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-color: var(--line);
  color: var(--text);
  font-weight: 700;
}

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

.btn.danger {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fecaca;
}

.section {
  padding-top: 42px;
  padding-bottom: 42px;
}

.muted {
  width: 100%;
  max-width: none;
  background: #edf4f6;
}

.muted > * {
  width: min(calc(100% - var(--gutter)), var(--content));
  max-width: var(--content);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-head h2,
.content-page h2,
.side-box h2 {
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.25;
}

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

.seo-intro {
  padding-top: 30px;
  padding-bottom: 30px;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.keyword-cloud span {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  font-size: 13px;
}

.brand-card,
.article-card,
.topic-card,
.side-box,
.admin-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.brand-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: 18px;
}

.article-brand-card {
  align-content: stretch;
  min-height: 488px;
}

.article-brand-card > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  height: 100%;
}

.brand-logo {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 800;
}

.brand-logo.large {
  width: 104px;
  height: 104px;
  font-size: 30px;
}

.brand-card h3,
.article-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.brand-card p,
.article-card p,
.topic-card span {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.article-brand-card p {
  min-height: 98px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tags span {
  padding: 4px 8px;
  border-radius: 6px;
  background: #eef6ff;
  color: #155e75;
  font-size: 12px;
}

.large-tags span {
  font-size: 14px;
  padding: 7px 10px;
}

.brand-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.invite-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.article-card,
.topic-card {
  display: block;
  padding: 20px;
}

.card-meta {
  justify-content: space-between;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.brand-hero {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.side-box {
  padding: 22px;
}

.content-page {
  max-width: 880px;
  background: var(--surface);
  margin-top: 34px;
  margin-bottom: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.content-page .lead,
.content-page .article-meta,
.content-page .article-body,
.content-page .related-brands {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.content-page > .eyebrow,
.content-page > h1 {
  display: block;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.article-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.article-body h2 {
  margin-top: 30px;
}

.article-body p {
  color: #334155;
}

.article-body figure {
  width: min(100%, 820px);
  margin: 26px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.article-body figure img {
  display: block;
  width: 100%;
  height: auto;
}

.article-body figcaption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.promo-box,
.source-box {
  margin: 24px 0;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #b6d7df;
  background: #eef9fb;
}

.promo-box h2,
.source-box h2 {
  margin-top: 0;
}

.promo-box a {
  color: var(--brand);
  font-weight: 800;
  word-break: break-all;
}

.article-body a.promo-link,
.visual-editor a.promo-link,
.promo-box a.promo-link {
  display: inline-block;
  padding: 2px 7px;
  border: 1px dashed #ef4444;
  border-radius: 4px;
  color: #dc2626;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.article-body a.promo-link:hover,
.visual-editor a.promo-link:hover,
.promo-box a.promo-link:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.related-brands {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.related-brands a {
  display: inline-flex;
  margin: 0 8px 8px 0;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 700;
}

.article-cta-box {
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article-cta-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 18px 24px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  text-align: center;
}

.article-cta-kicker {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.article-cta-title {
  margin: 10px 0 14px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.45;
}

.article-cta-sub {
  max-width: 640px;
  margin: 0 auto 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.75;
}

.article-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.article-cta-link {
  margin-top: 6px;
  padding: 12px 28px;
  border: 1px dashed #ef4444;
  border-radius: 6px;
  color: #dc2626;
  font-weight: 900;
  background: #fff;
  line-height: 1.4;
}

.article-cta-link:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.article-cta-note {
  margin-top: 14px;
  margin-bottom: 0;
}

.empty {
  color: var(--muted);
  padding: 20px;
}

.site-footer {
  background: #102536;
  color: #fff;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - var(--gutter)), var(--content));
  margin: 0 auto;
  padding: 34px 0;
}

.site-footer p {
  max-width: 720px;
  color: #cbd5e1;
}

.footer-links a {
  color: #dbeafe;
}

.admin-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  background: #102536;
  color: #fff;
}

.admin-brand {
  min-width: 0;
  margin-bottom: 22px;
}

.admin-sidebar button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  margin-bottom: 8px;
  background: transparent;
  color: #dbeafe;
  text-align: left;
}

.admin-sidebar button.active {
  background: #155e75;
  color: #fff;
}

.admin-main {
  padding: 28px;
}

.action-status {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: grid;
  gap: 4px;
  width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
}

.action-status.show {
  opacity: 1;
  transform: translateY(0);
}

.action-status strong {
  color: var(--text);
}

.action-status span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.action-status.loading {
  border-left: 5px solid #0e7490;
}

.action-status.success {
  border-left: 5px solid #16a34a;
}

.action-status.error {
  border-left: 5px solid #dc2626;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-top h1 {
  margin: 0;
}

.admin-top p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.admin-card {
  padding: 18px;
}

.admin-card strong {
  display: block;
  font-size: 30px;
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0 0 16px;
}

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

.compact-form {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
}

.form-grid > label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.inline-check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.inline-check input {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.checkbox-grid input {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
}

.editor-toolbar .btn {
  min-height: 34px;
  padding: 7px 10px;
}

.visual-editor {
  min-height: 520px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #fff;
  outline: none;
  overflow: auto;
}

.visual-editor:focus {
  border-color: #0e7490;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, .12);
}

.source-editor {
  min-height: 520px;
  border-radius: 0 0 8px 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.quality-report ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.quality-report .ok {
  color: #15803d;
}

.quality-report .bad {
  color: #b91c1c;
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  padding: 28px;
  background: rgba(15, 23, 42, .45);
  overflow: auto;
}

.modal-dialog {
  width: min(980px, 100%);
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.modal .article-body {
  max-height: 72vh;
  overflow: auto;
  border: 0;
  border-radius: 0 0 8px 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #e8f3f5;
  color: #123447;
}

.status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.status.published {
  background: #dcfce7;
  color: #166534;
}

.status.scheduled {
  background: #fef3c7;
  color: #92400e;
}

.notice {
  margin: 12px 0;
  padding: 12px;
  border-radius: 7px;
  background: #ecfeff;
  color: #155e75;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(21, 94, 117, 0.12), transparent 28%),
    radial-gradient(circle at 78% 20%, rgba(15, 118, 110, 0.10), transparent 30%),
    #f6f8fb;
}

.login-card {
  width: min(100%, 420px);
  padding: 34px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 227, 238, 0.9);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.login-card .brand {
  min-width: 0;
  margin-bottom: 26px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form input {
  height: 46px;
}

.login-form .btn {
  width: 100%;
  height: 46px;
  margin-top: 4px;
}

.danger-note {
  background: #fee2e2;
  color: var(--danger);
}

.quality-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.quality-pill.good {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.quality-pill.warn {
  background: #fef3c7;
  border-color: #facc15;
  color: #92400e;
}

.quality-pill.bad {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

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

.tool-list > div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.tool-list > div:last-child {
  border-bottom: 0;
}

.tool-list a,
.tool-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 920px) {
  .site-header,
  .site-footer,
  .site-header-inner,
  .site-footer-inner,
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .brand-hero,
  .two-col,
  .admin-body {
    grid-template-columns: 1fr;
  }

  .brand-grid,
  .article-grid,
  .topic-grid,
  .admin-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .content-page {
    padding: 36px 22px;
  }

  .article-brand-card {
    min-height: 0;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .tool-list > div {
    grid-template-columns: 1fr;
  }

  .site-header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-search {
    justify-content: stretch;
  }

  .site-search input {
    min-width: 0;
  }
}

