/* CatAll — Everything about cats
   设计约束：正文 17px 起，标题宽松行距，移动端优先，logo 副标题在小屏也不隐藏 */

:root {
  --bg: #FFFCF7;
  --bg-soft: #F7F1E8;
  --card: #FFFFFF;
  --ink: #221C17;
  --ink-soft: #4A4139;
  --muted: #7A6E62;
  --line: #E8DFD2;
  --accent: #D9752F;
  --accent-ink: #B85F1F;
  --accent-soft: #FBEDE0;
  --teal: #2F6F62;
  --teal-soft: #E8F1EE;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(34, 28, 23, .05), 0 8px 24px -12px rgba(34, 28, 23, .12);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130F;
    --bg-soft: #1E1A15;
    --card: #1F1B16;
    --ink: #F4EDE4;
    --ink-soft: #D9CFC3;
    --muted: #A2958A;
    --line: #322B23;
    --accent: #E88A45;
    --accent-ink: #F0A264;
    --accent-soft: #2A2018;
    --teal: #6FB7A6;
    --teal-soft: #1B2A26;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.72 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; flex-wrap: wrap; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  background: linear-gradient(145deg, var(--accent), #C4562A);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 19px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-title { font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.logo-sub { font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: .01em; }

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft); font-size: 15.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }

.lang-switch {
  font-size: 14px; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; color: var(--ink-soft); text-decoration: none; white-space: nowrap;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 13.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.18; letter-spacing: -.02em; margin: 0 0 18px; }
.hero p.lead { font-size: 18.5px; color: var(--ink-soft); margin: 0 0 26px; max-width: 40em; }
.hero-figure { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: var(--bg-soft); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }

/* ---------- sections ---------- */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; margin: 0; letter-spacing: -.015em; }
.section-head p { margin: 0; color: var(--muted); font-size: 16px; }
.section-head .more { margin-left: auto; font-size: 15.5px; font-weight: 600; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); text-decoration: none; }
.card-media { aspect-ratio: 4/3; background: var(--bg-soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.card-sub { font-size: 14px; color: var(--muted); }
.card-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--muted); }
.chip {
  font-size: 13px; padding: 4px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line);
}

/* ---------- filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 26px; }
.filter-btn {
  font: inherit; font-size: 15px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-soft);
}
.filter-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.empty-note { color: var(--muted); padding: 30px 0; }

/* ---------- breed page ---------- */
.crumbs { font-size: 14.5px; color: var(--muted); padding: 20px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { opacity: .5; }

.breed-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: 26px 0 10px; align-items: center; }
.breed-hero h1 { font-size: clamp(30px, 4.4vw, 42px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; }
.breed-alt { font-size: 17px; color: var(--muted); margin: 0 0 16px; }
.breed-lead { font-size: 18px; color: var(--ink-soft); margin: 0; }
.breed-hero figure { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: var(--bg-soft); }
.breed-hero figure img { aspect-ratio: 4/3; object-fit: cover; }
figcaption.credit { font-size: 12.5px; color: var(--muted); padding: 8px 2px 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 26px 0 0; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.fact dt { font-size: 13px; color: var(--muted); margin-bottom: 4px; letter-spacing: .01em; }
.fact dd { margin: 0; font-size: 17px; font-weight: 600; }

.ratings { display: grid; gap: 12px; margin: 8px 0 0; }
.rating { display: grid; grid-template-columns: 132px 1fr 34px; align-items: center; gap: 12px; font-size: 15.5px; }
.bar { height: 9px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #E9A46B); }

.prose h2 { font-size: 25px; margin: 40px 0 14px; letter-spacing: -.015em; }
.prose h3 { font-size: 19.5px; margin: 26px 0 8px; }
.prose p { margin: 0 0 16px; color: var(--ink-soft); }
.prose ul { margin: 0 0 18px; padding-left: 22px; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 18px 0; }
.panel h3 { margin: 0 0 12px; font-size: 19px; }
.panel.warn { border-left: 4px solid var(--accent); background: var(--accent-soft); }
.panel .kv { display: grid; grid-template-columns: 128px 1fr; gap: 10px 16px; font-size: 16px; }
.panel .kv dt { color: var(--muted); }
.panel .kv dd { margin: 0; }

.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 18px; background: var(--card); margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: var(--accent-ink); margin-bottom: 8px; }
.faq p { margin: 0; color: var(--ink-soft); }

/* ---------- tools ---------- */
.tool-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 17px; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.result { margin-top: 18px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--teal-soft); color: var(--ink); font-size: 17.5px; }
.result strong { color: var(--teal); }

/* ---------- article ---------- */
.article-head { padding: 26px 0 6px; max-width: 46em; }
.article-head h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -.02em; }
.meta { font-size: 14.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.article-body { max-width: 44em; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 56px; padding: 40px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 0.9fr 0.9fr 1fr 0.9fr; gap: 26px; align-items: start; }
.footer-brand p { color: var(--muted); font-size: 15px; margin: 0; max-width: 26em; line-height: 1.6; }
.site-footer h4 { font-size: 15px; margin: 0 0 12px; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--ink-soft); font-size: 15px; }
.footer-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .breed-hero { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding: 34px 0 24px; }
  .hero-figure { max-width: 520px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px 18px; }
  .footer-brand { grid-column: 1 / -1; }
  .nav { margin-left: 0; width: 100%; order: 3; gap: 2px; overflow-x: auto; padding-bottom: 4px; }
  .header-inner { padding: 10px 0; gap: 10px; }
  .lang-switch { margin-left: auto; }
  .rating { grid-template-columns: 108px 1fr 30px; font-size: 15px; }
}

@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .logo-title { font-size: 18.5px; }
  .logo-sub { font-size: 11.5px; }
  .logo-mark { width: 34px; height: 34px; font-size: 17px; }
  .section { padding: 32px 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-title { font-size: 16px; }
  .card-body { padding: 12px 12px 14px; }
  .card-facts { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .panel { padding: 18px; }
  .panel .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .panel .kv dd { margin-bottom: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .site-footer h4 { font-size: 14.5px; margin-bottom: 9px; }
  .site-footer a { font-size: 14.5px; }
  .site-footer li { margin-bottom: 7px; }
  .tool-box { padding: 18px; }
}
