/* SideDog presentation layer. Shared by the public site and account surfaces. */
:root {
  --bg: #080b14;
  --card: #111624;
  --text: #f4f6fb;
  --muted: #a0abc0;
  --border: rgba(178, 194, 230, .14);
  --accent: #e27c59;
  --accent-strong: #f3a083;
  --soft: rgba(226, 124, 89, .13);
  --violet: #8977ff;
  --cyan: #68d8f5;
  color-scheme: dark;
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(ellipse 720px 520px at 12% 3%, rgba(107, 81, 218, .16), transparent 70%),
    radial-gradient(ellipse 660px 480px at 92% 19%, rgba(44, 164, 209, .10), transparent 70%),
    linear-gradient(180deg, #080b14, #0a0e19 48%, #070a12);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(137, 119, 255, .4); color: #fff; }
:where(a, button, select, input, textarea):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
a { text-underline-offset: .2em; }

/* Public home */
body:has(.hero) .wrap { max-width: 1160px; }
body:has(.hero) nav {
  min-height: 76px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
body:has(.hero) .brand { letter-spacing: -.035em; font-size: 19px; }
body:has(.hero) .brand img { width: 38px; height: 38px; }
body:has(.hero) nav .links { display: flex; align-items: center; gap: 4px; }
body:has(.hero) nav .links a {
  margin-left: 0;
  padding: 7px 10px;
  border-radius: 9px;
  transition: color .18s, background .18s, border-color .18s;
}
body:has(.hero) nav .links a:hover { color: var(--text); background: rgba(255,255,255,.055); }
body:has(.hero) nav .links a.signin {
  margin-left: 8px;
  padding: 7px 15px;
  background: rgba(255,255,255,.035);
}
body:has(.hero) .hero {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 68px);
  min-height: 575px;
  padding: 84px 0 82px;
}
body:has(.hero) .hero::before {
  content: '';
  position: absolute;
  inset: 0 -5% auto;
  height: 530px;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(135,160,230,.035) 1px, transparent 1px), linear-gradient(90deg,rgba(135,160,230,.035) 1px,transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 83%, transparent), linear-gradient(#000,transparent 94%);
  mask-composite: intersect;
}
body:has(.hero) .hero h1 {
  max-width: 620px;
  /* 标题两行分别是内容类型和效果，最大字号要让中文第二行「一键秒懂，省时间」在桌面左栏一行放下 */
  font-size: clamp(38px, 3.7vw, 54px);
  line-height: 1.035;
  letter-spacing: -.055em;
  font-weight: 780;
  margin-bottom: 25px;
  text-wrap: balance;
}
body:has(.hero) .hero h1::after {
  content: '';
  display: block;
  width: 76px;
  height: 3px;
  margin-top: 25px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--violet), var(--cyan));
  box-shadow: 0 0 22px rgba(137,119,255,.4);
}
body:has(.hero) .hero p { max-width: 570px; color: var(--muted); line-height: 1.72; }
body:has(.hero) .hero .note { font-size: 13px; margin: 16px 0 0; }
body:has(.hero) .cta { gap: 16px; }
body:has(.hero) .button {
  border-radius: 11px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(219,105,70,.16);
  transition: transform .18s, box-shadow .18s, background .18s;
}
body:has(.hero) .button:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(219,105,70,.24); }
body:has(.hero) .button.ghost { box-shadow: none; }

/* A page and a true side panel, using the existing translated conversation. */
.product-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(218px, .88fr);
  min-width: 0;
  min-height: 364px;
  border: 1px solid rgba(150,172,220,.23);
  border-radius: 18px;
  overflow: hidden;
  background: #101522;
  box-shadow: 0 32px 80px rgba(0,0,0,.36), 0 0 0 8px rgba(255,255,255,.015);
}
.product-frame::after {
  content: '';
  position: absolute;
  inset: auto 8% -55px 8%;
  height: 80px;
  z-index: -1;
  background: rgba(101,104,250,.35);
  filter: blur(55px);
}
.mock-page {
  padding: 0 19px 25px;
  border-right: 1px solid var(--border);
  background: linear-gradient(160deg,#131a2a,#0d1220);
}
.mock-browser {
  height: 47px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 -19px 27px;
  padding: 0 15px;
  border-bottom: 1px solid var(--border);
}
.mock-browser i { width: 7px; height: 7px; border-radius: 50%; background: #39465c; }
.mock-browser i:first-child { background: #e27c59; }
.mock-browser i:nth-child(2) { background: #e1bf72; }
.mock-browser i:nth-child(3) { background: #73c6a9; }
.mock-browser b { height: 17px; flex: 1; margin-left: 13px; border-radius: 5px; background: #1e293b; }
.mock-article-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg,rgba(137,119,255,.85),rgba(104,216,245,.6)); margin-bottom: 24px; box-shadow: 0 9px 26px rgba(137,119,255,.2); }
.mock-line { display: block; height: 8px; width: 83%; border-radius: 10px; margin: 11px 0; background: #2b3650; }
.mock-line.wide { width: 97%; height: 13px; margin-bottom: 20px; background: #65728c; }
.mock-line.short { width: 58%; }
.mock-picture { height: 87px; margin: 25px 0 20px; border: 1px solid rgba(137,119,255,.16); border-radius: 10px; background: radial-gradient(circle at 73% 31%,rgba(104,216,245,.28),transparent 34%),linear-gradient(145deg,#302b60,#17263b); }
.mock-panel { min-width: 0; padding: 0 14px 14px; background: #151b29; }
.mock-panel-head { display: flex; align-items: center; gap: 7px; min-height: 47px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 12px; }
.mock-panel-head img { width: 22px; height: 22px; }
.mock-panel-head::after { content: ''; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #69d9b6; box-shadow: 0 0 12px #69d9b6; }
.product-frame .bubble { font-size: 12px; line-height: 1.55; padding: 10px 11px; margin: 14px 0; overflow-wrap: anywhere; }
.product-frame .bubble.user { margin-left: 11%; background: rgba(226,124,89,.17); }
.product-frame .bubble.bot { margin-right: 0; background: #0e1420; border-color: rgba(137,119,255,.28); }
.mock-compose { height: 35px; margin-top: 30px; border: 1px solid var(--border); border-radius: 9px; background: #101624; }
.mock-compose::after { content: '↗'; float: right; margin: 5px; width: 23px; height: 23px; border-radius: 6px; background: var(--accent); color: white; text-align: center; line-height: 22px; }

body:has(.hero) section { border-top: 1px solid var(--border); padding: 68px 0; }
body:has(.hero) section h2 { font-size: clamp(27px, 3.3vw, 39px); letter-spacing: -.04em; line-height: 1.2; margin-bottom: 28px; }
body:has(.hero) .grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
body:has(.hero) #features .card { grid-column: span 2; min-height: 175px; }
/* 第一张（视频大纲，主打功能）占满一行，其余五张沿用 3 + 3 / 2 + 2 + 2 的排法 */
body:has(.hero) #features .card:first-child { grid-column: 1 / -1; }
body:has(.hero) #features .card:nth-child(2),
body:has(.hero) #features .card:nth-child(3) { grid-column: span 3; }
body:has(.hero) .card {
  background: linear-gradient(155deg,rgba(23,29,48,.92),rgba(14,19,32,.94));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
body:has(.hero) #features .card { position: relative; padding-top: 37px; transition: transform .18s,border-color .18s; }
body:has(.hero) #features .card::before { content: ''; position: absolute; top: 20px; left: 22px; width: 24px; height: 2px; background: linear-gradient(90deg,var(--accent),var(--violet)); }
body:has(.hero) #features .card:hover { transform: translateY(-3px); border-color: rgba(137,119,255,.5); }
body:has(.hero) .card h3 { font-size: 18px; letter-spacing: -.02em; }
body:has(.hero) .card p { line-height: 1.7; }
body:has(.hero) #install .card { max-width: 760px; }
body:has(.hero) #install .steps li { padding-left: 7px; margin-top: 10px; }
body:has(.hero) .pricing .plan .button { min-height: 36px; border-radius: 9px; }
body:has(.hero) .plan.best { border-color: rgba(226,124,89,.68); box-shadow: 0 0 32px rgba(226,124,89,.07); }
body:has(.hero) .faq { grid-template-columns: repeat(2,minmax(0,1fr)); }
body:has(.hero) footer { padding-top: 35px; }
body:has(.hero) footer a:hover { color: var(--text); }

/* Sign-in and account. */
.page { max-width: 640px; padding-top: 48px; }
.page .top { padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.page .card { background: linear-gradient(150deg,rgba(24,30,49,.96),rgba(14,19,33,.96)); box-shadow: 0 24px 70px rgba(0,0,0,.22); border-color: var(--border); }
.page .card.center { padding: clamp(26px,5vw,46px); }
.page h1 { font-size: clamp(26px,4vw,34px); letter-spacing: -.045em; }
.page .button { transition: transform .18s,border-color .18s,background .18s; }
.page .button:hover { transform: translateY(-1px); }
.page .button.primary { box-shadow: 0 12px 28px rgba(226,124,89,.16); }
.page .row { align-items: baseline; }
.page .option { background: rgba(255,255,255,.025); transition: background .18s,border-color .18s; }
.page .option:hover { background: rgba(137,119,255,.075); }
.page .option:has(input:checked) { background: rgba(226,124,89,.09); }

/* Admin retains its dense information layout. */
body:has(#app) header.top { background: rgba(13,18,32,.91); backdrop-filter: blur(18px); }
body:has(#app) .card, body:has(#app) .panel, body:has(#app) .login { background: #121827; border-color: var(--border); box-shadow: inset 0 1px rgba(255,255,255,.025); }
body:has(#app) header.top nav button.active { background: rgba(137,119,255,.14); color: var(--text); }
body:has(#app) .card .value { letter-spacing: -.035em; }
body:has(#app) tr:hover td { background: rgba(137,119,255,.035); }

/* Legal reading pages. */
body:has(main > h1):not(:has(.page)) main { max-width: 800px; }
body:has(main > h1):not(:has(.page)) h1 { font-size: clamp(32px,5vw,48px); letter-spacing: -.045em; }
body:has(main > h1):not(:has(.page)) h2 { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 38px; }
body:has(main > h1):not(:has(.page)) p, body:has(main > h1):not(:has(.page)) li { color: #c6cede; }

@media (max-width: 900px) {
  body:has(.hero) .hero { grid-template-columns: 1fr; padding-top: 58px; min-height: 0; }
  body:has(.hero) .hero > div:first-child { max-width: 720px; }
  body:has(.hero) .product-frame { max-width: 650px; width: 100%; }
}
@media (max-width: 760px) {
  body:has(.hero) nav .links a:not(.signin) { display: none; }
  body:has(.hero) .hero { gap: 36px; padding: 48px 0 58px; }
  body:has(.hero) .hero h1 { font-size: clamp(34px,9.5vw,56px); }
  body:has(.hero) section { padding: 48px 0; }
  body:has(.hero) #features .card, body:has(.hero) #features .card:first-child, body:has(.hero) #features .card:nth-child(2), body:has(.hero) #features .card:nth-child(3) { grid-column: span 3; }
  body:has(.hero) .faq { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  body:has(.hero) #features .card, body:has(.hero) #features .card:first-child, body:has(.hero) #features .card:nth-child(2), body:has(.hero) #features .card:nth-child(3) { grid-column: 1 / -1; min-height: 0; }
  body:has(.hero) .product-frame { grid-template-columns: minmax(0,.65fr) minmax(0,1fr); min-height: 320px; }
  .mock-page { padding-inline: 12px; }
  .mock-browser { margin-inline: -12px; }
  .mock-panel { padding-inline: 9px; }
  .product-frame .bubble { font-size: 11px; }
  body:has(.hero) .hero p { font-size: 16px; }
  .page { padding: 24px 16px 40px; }
  .page .inline-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body:has(.hero) .button, body:has(.hero) #features .card, .page .button { transition: none; }
}

/* 首页安装区：打不开商店时的手动安装说明 */
#install details.manual { margin-top: 14px; }
#install details.manual summary { cursor: pointer; font-weight: 600; }
#install details.manual .button { display: inline-block; margin: 12px 0 4px; }
#install .edge-cta { margin: 14px 0 10px; }
