/* ==========================================================================
   AI 教师助手 (aiforteachers 国内版)
   设计语言复刻自 www.aiforteachers.ai —— 配色 / 栅格 / 字号 / 圆角按原站实测值
   1rem = 16px
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 品牌色（原站实测） */
  --navy: #0e1439;
  --navy-2: #1f2124;
  --blue: #0048ff;
  --blue-dark: #0039cc;
  --green: #1cb034;
  --green-dark: #06826b;
  --gold: #ffc53d;

  /* 背景层 */
  --page-bg: #eaf0f9;
  --tools-bg: #e0e9ee;
  --card: #f9fafd;
  --surface: #ffffff;
  --line: #e0e0e0;
  --line-soft: #eceff6;

  /* 文字 */
  --ink: #0e1439;
  --ink-soft: #4d5776;
  --ink-mute: #78829e;
  --on-dark: #ffffff;
  --band-bg: #0e1439;
  --band-mute: rgba(255, 255, 255, 0.78);

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(14, 20, 57, 0.06);
  --shadow-md: 0 12px 32px rgba(14, 20, 57, 0.1);
  --shadow-lg: 0 24px 60px rgba(14, 20, 57, 0.18);

  /* 形状 */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 60px;

  /* 尺寸 */
  --header-h: 90px;
  --sidebar-w: 275px;
  --gutter: 120px;
  --content-max: 65%;

  /* 字体：全部使用系统内置中文字体，国内访问不依赖任何 CDN */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC",
    "Source Han Sans SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono",
    Menlo, monospace;
}

[data-theme="dark"] {
  --page-bg: #0a0f1f;
  --tools-bg: #0d1428;
  --card: #141b33;
  --surface: #0f1730;
  --line: #28324f;
  --line-soft: #1d2540;

  --ink: #e9edf9;
  --ink-soft: #b3bcd6;
  --ink-mute: #8c96b4;
  --band-bg: #060a18;
  --on-dark: #ffffff;
  --band-mute: rgba(255, 255, 255, 0.72);

  --blue: #6b93ff;
  --blue-dark: #4a76ff;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 800;
  margin: 0;
  line-height: 1.25;
  letter-spacing: 0;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 3. 通用组件 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

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

/* 描边胶囊按钮（原站 header: 白底 + 2px 深蓝描边 + 60px 圆角） */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 16px;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.pill:hover {
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-1px);
}

.pill--solid {
  background: var(--ink);
  color: var(--surface);
}

.pill--solid:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* 黑色实心胶囊（原站卡片按钮） */
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 20px;
  min-height: 34px;
  border: 2px solid transparent;
  border-radius: 24px;
  background: #000;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 16px;
  transition: background 0.16s ease, transform 0.16s ease;
}

.btn-dark:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-1px);
}

/* 蓝色实心胶囊（原站 hero “Start Free”） */
.btn-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 26px;
  border: 2px solid var(--blue);
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 18px;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-blue:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 72, 255, 0.28);
}

/* 绿色像素风按钮（原站侧栏 SVG 按钮：填充 #1CB034 / 描边 #06826B） */
.btn-pixel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border: 2px solid var(--green-dark);
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
  transition: filter 0.16s ease, transform 0.16s ease;
}

.btn-pixel:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  color: #fff;
}

/* 分节容器：与原站一致，整幅出血 + 120px 左内边距 + 65% 居中内容 */
.section {
  padding-left: var(--gutter);
  padding-right: 0;
}

.section__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ---------- 4. 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: var(--surface);
  transition: box-shadow 0.2s ease;
}

.site-header.is-stuck {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 14px;
  padding-right: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  width: 74px;
  height: 62px;
  flex: 0 0 auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.main-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.main-nav__link {
  position: relative;
  padding: 3px 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--ink);
  white-space: nowrap;
}

.main-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.main-nav__link:hover::after,
.main-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 0 0 auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  background: var(--line-soft);
  border-color: var(--line);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

/* 主题图标：浅色模式显示月亮，深色模式显示太阳 */
[data-theme-toggle] .icon-sun {
  display: none;
}

[data-theme="dark"] [data-theme-toggle] .icon-sun {
  display: block;
}

[data-theme="dark"] [data-theme-toggle] .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

/* ---------- 5. 左侧固定导航（原站 .scrollnav） ---------- */
.sidenav {
  position: fixed;
  left: 0;
  top: var(--header-h);
  z-index: 55;
  width: var(--sidebar-w);
  max-height: calc(100vh - var(--header-h) - 10px);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scrollbar-width: thin;
}

.sidenav::-webkit-scrollbar {
  width: 8px;
}

.sidenav::-webkit-scrollbar-track {
  background: var(--line-soft);
  border-radius: 10px;
}

.sidenav::-webkit-scrollbar-thumb {
  background: #bcc3d4;
  border: 2px solid var(--line-soft);
  border-radius: 10px;
}

.sidenav::-webkit-scrollbar-thumb:hover {
  background: #97a0b8;
}

.sidenav__title {
  padding: 20px 14px 15px 11px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.sidenav__divider {
  height: 1px;
  background: var(--line);
  flex: 0 0 auto;
}

.sidenav__cta {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

/* 仅移动端显示：主导航复制到抽屉里 */
.sidenav__mobile-nav,
.sidenav__mobile-divider {
  display: none;
}

.sidenav__extra {
  padding: 6px 0;
}

.sidenav__extra a {
  font-size: 15px;
  font-weight: 600;
}

/* 折叠分组 */
.nav-group {
  border: 0;
}

.nav-group > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  list-style: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  user-select: none;
}

.nav-group > summary::-webkit-details-marker {
  display: none;
}

.nav-group > summary:hover {
  color: var(--blue);
}

.nav-group__chevron {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.nav-group[open] > summary .nav-group__chevron {
  transform: rotate(180deg);
}

.nav-group__list {
  list-style: none;
}

.nav-group__list a {
  display: block;
  padding: 0 20px;
  font-size: 17px;
  font-weight: 700;
  line-height: 46px;
  color: var(--ink);
  transition: background 0.14s ease, color 0.14s ease;
}

.nav-group__list a:hover,
.nav-group__list a[aria-current="page"] {
  background: var(--page-bg);
  color: var(--blue);
}

/* 移动端抽屉遮罩 */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(10, 15, 31, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.scrim.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- 6. 首页 Hero ---------- */
.hero {
  background: var(--page-bg);
  padding-top: 78px;
  padding-bottom: 52px;
  text-align: center;
}

.hero__eyebrow {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--ink);
  margin: 0 0 12px;
}

.hero__title {
  max-width: 940px;
  margin: 0 auto;
  font-size: 54px;
  line-height: 1.22;
  font-weight: 800;
}

.hero__lead {
  max-width: 830px;
  margin: 20px auto 0;
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
}

.hero__lead a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero__trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-soft);
}

.hero__trust li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero__trust svg {
  width: 15px;
  height: 15px;
  color: var(--green);
  flex: 0 0 auto;
}

/* ---------- 7. 深色横幅 ---------- */
.band {
  background: var(--band-bg);
  color: var(--on-dark);
  padding-top: 22px;
  padding-bottom: 32px;
  text-align: center;
}

.band h2 {
  color: var(--on-dark);
  font-size: 40px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.band p {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: var(--band-mute);
}

/* ---------- 8. 工具卡片 ---------- */
.tools {
  background: var(--tools-bg);
  padding-top: 0;
  padding-bottom: 75px;
}

.tool-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.tool-card {
  flex: 0 0 calc(33.3333% - 53.4px);
  margin: 20px;
  min-height: 261px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px 24px;
  background: var(--card);
  border: 4px solid var(--surface);
  border-radius: var(--radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.tool-card__icon {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 6px rgba(14, 20, 57, 0.12));
}

.tool-card__title {
  font-size: 25px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-card__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.tool-card__action {
  margin-top: auto;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  background: var(--surface);
  padding: 50px 0 26px;
  color: var(--ink);
}

.footer__top {
  display: flex;
  align-items: flex-start;
  gap: 4%;
  padding-left: 290px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer__col--brand {
  flex: 0 0 26%;
}

.footer__col--links {
  flex: 1 1 0;
  min-width: 0;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.footer__logo img {
  width: 36px;
  height: 36px;
}

.footer__logo strong {
  font-size: 17px;
  font-weight: 800;
}

.footer__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

.footer__heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.footer__links li {
  padding: 5px 0;
}

.footer__links a {
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__links a:hover {
  color: var(--blue);
}

.footer__bottom {
  display: flex;
  align-items: flex-start;
  gap: 4%;
  margin-top: 8px;
  padding: 35px 0 0 290px;
}

.footer__copy {
  flex: 0 0 26%;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

.footer__icp {
  display: block;
}

.footer__legal {
  flex: 1 1 0;
  list-style: none;
  display: block;
}

.footer__legal a {
  font-size: 15px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- 10. 内页通用 ---------- */
.page-head {
  background: var(--page-bg);
  padding-top: 46px;
  padding-bottom: 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 16px;
  list-style: none;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--ink-mute);
}

.page-head h1 {
  font-size: 44px;
  line-height: 1.25;
}

.page-head__lead {
  max-width: 760px;
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.section-pad {
  background: var(--page-bg);
  padding-top: 48px;
  padding-bottom: 64px;
}

.section-alt {
  background: var(--tools-bg);
  padding-top: 56px;
  padding-bottom: 72px;
}

.block-title {
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.block-lead {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 760px;
  margin-bottom: 28px;
}

/* 工具列表页：筛选条 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.search-field {
  position: relative;
  flex: 1 1 320px;
  max-width: 460px;
}

.search-field svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-mute);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 13px 16px 13px 46px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  transition: border-color 0.16s ease;
}

.search-field input:focus {
  border-color: var(--blue);
  outline: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.result-count {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0 0 18px;
}

/* 工具列表卡片 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.tool-tile {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tool-tile:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.tool-tile__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-tile__icon {
  font-size: 32px;
  line-height: 1;
}

.tool-tile__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.tool-tile__desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.tool-tile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  list-style: none;
}

.tag {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--page-bg);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.tool-tile__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tool-tile__link {
  font-size: 14px;
  font-weight: 700;
}

.tool-tile__link::after {
  content: " →";
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

.empty-state strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}

/* ---------- 11. 表单 ---------- */
.form-card {
  padding: 30px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.field {
  margin-bottom: 18px;
}

.field > label,
.field > .field__legend {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 7px;
}

.req {
  color: #d6293e;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s ease;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field input[type="password"]:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  outline: none;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #d6293e;
}

.field__error {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  color: #d6293e;
}

.field__error.is-shown {
  display: block;
}

.field__hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-mute);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.radio-set {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.radio-set label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}

.radio-set input {
  margin-top: 5px;
  accent-color: var(--blue);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.form-note {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0;
}

.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  background: rgba(28, 176, 52, 0.08);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.form-success.is-shown {
  display: flex;
}

.form-success svg {
  width: 22px;
  height: 22px;
  color: var(--green);
  flex: 0 0 auto;
}

/* ---------- 12. 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  background: rgba(10, 15, 31, 0.6);
  backdrop-filter: blur(3px);
}

.modal.is-open {
  display: flex;
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: auto;
  padding: 32px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-soft);
}

.modal__close:hover {
  background: var(--line-soft);
  color: var(--ink);
}

.modal__title {
  font-size: 28px;
  margin-bottom: 8px;
  padding-right: 40px;
}

.modal__lead {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  margin-bottom: 24px;
  background: var(--page-bg);
  border-radius: var(--radius-pill);
}

.tab {
  flex: 1 1 0;
  padding: 9px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

[hidden] {
  display: none !important;
}

/* ---------- 13. AI 作文批改页 ---------- */
.grader-demo {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.grader-panel {
  padding: 24px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.grader-panel h3 {
  font-size: 19px;
  margin-bottom: 14px;
}

.grader-panel textarea {
  width: 100%;
  min-height: 220px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.grader-panel textarea:focus {
  border-color: var(--blue);
  outline: none;
}

.grader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.grader-counter {
  font-size: 13px;
  color: var(--ink-mute);
}

.grade-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
}

.grade-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 14px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
}

.grade-empty span {
  font-size: 34px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-ring {
  --score: 0;
  position: relative;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--score) * 1%), var(--line-soft) 0);
  display: grid;
  place-items: center;
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--card);
}

.score-ring b {
  position: relative;
  z-index: 1;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}

.score-meta strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.score-meta p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.rubric-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
}

.rubric-item {
  padding: 12px 14px;
  background: var(--surface);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
}

.rubric-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
}

.rubric-item__head em {
  font-style: normal;
  font-size: 13px;
  color: var(--blue);
}

.rubric-item p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.feature {
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  border: 2px solid transparent;
}

.feature__icon {
  font-size: 30px;
  margin-bottom: 12px;
}

.feature h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.check-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px 24px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  line-height: 1.6;
}

.check-list svg {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  flex: 0 0 auto;
  color: var(--green);
}

/* ---------- 14. 帮助中心 ---------- */
.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.help-card {
  padding: 24px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.help-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
}

.help-card__icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.help-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.help-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__item[open] {
  border-color: var(--blue);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.faq__item[open] .faq__q svg {
  transform: rotate(180deg);
}

.faq__a {
  padding: 0 22px 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.faq__a p:last-child {
  margin-bottom: 0;
}

/* ---------- 15. 提示条 / 返回顶部 ---------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: rgba(0, 72, 255, 0.07);
  border: 2px solid rgba(0, 72, 255, 0.28);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.notice svg {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  flex: 0 0 auto;
  color: var(--blue);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top svg {
  width: 20px;
  height: 20px;
}

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1400px) {
  :root {
    --gutter: 60px;
  }

  .footer__top,
  .footer__bottom {
    padding-left: 140px;
  }
}

@media (max-width: 1200px) {
  .hero__title {
    font-size: 46px;
  }

  .band h2 {
    font-size: 34px;
  }

  .footer__top,
  .footer__bottom {
    padding-left: 60px;
  }
}

@media (max-width: 1024px) {
  :root {
    --gutter: 24px;
    --content-max: 100%;
    --header-h: 74px;
  }

  .main-nav {
    display: none;
  }

  .sidenav__mobile-nav {
    display: block;
    padding: 8px 0;
  }

  .sidenav__mobile-divider {
    display: block;
    height: 1px;
    background: var(--line);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .sidenav {
    top: var(--header-h);
    left: 0;
    width: min(320px, 86vw);
    max-height: calc(100vh - var(--header-h));
    border-radius: 0 var(--radius) var(--radius) 0;
    transform: translateX(-102%);
    transition: transform 0.24s ease;
  }

  .sidenav.is-open {
    transform: translateX(0);
  }

  .hero {
    padding-top: 46px;
    padding-bottom: 40px;
  }

  .hero__title {
    font-size: 36px;
  }

  .hero__lead {
    font-size: 17px;
  }

  .band {
    padding-top: 20px;
    padding-bottom: 26px;
  }

  .band h2 {
    font-size: 27px;
  }

  .band p {
    font-size: 16px;
  }

  .tools {
    padding-bottom: 40px;
  }

  .tool-card {
    flex: 0 0 calc(50% - 53.4px);
    min-height: 240px;
  }

  .page-head h1 {
    font-size: 34px;
  }

  .block-title {
    font-size: 26px;
  }

  .grader-demo {
    grid-template-columns: 1fr;
  }

  .footer__top {
    flex-wrap: wrap;
    gap: 30px;
    padding-left: 24px;
  }

  .footer__col--brand {
    flex: 0 0 100%;
  }

  .footer__col--links {
    flex: 1 1 40%;
  }

  .footer__bottom {
    flex-wrap: wrap;
    gap: 16px;
    padding-left: 24px;
  }

  .footer__copy {
    flex: 0 0 100%;
  }
}

@media (max-width: 700px) {
  .brand__tag {
    display: none;
  }

  .brand__mark {
    width: 52px;
    height: 44px;
  }

  .header__inner {
    gap: 10px;
    padding-right: 14px;
  }

  .brand {
    padding-left: 8px;
    gap: 8px;
  }

  .brand__name {
    font-size: 17px;
  }

  .header__actions {
    gap: 8px;
  }

  .header__actions .pill {
    padding: 6px 13px;
    font-size: 14px;
    line-height: 14px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .header__actions .pill--login {
    display: none;
  }

  .hero__title {
    font-size: 29px;
  }

  .hero__eyebrow {
    font-size: 14px;
    letter-spacing: 1.4px;
  }

  .tool-card {
    flex: 0 0 calc(100% - 16px);
    margin: 8px;
    min-height: 0;
  }

  .tool-card__title {
    min-height: 0;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .modal__panel {
    padding: 24px 20px;
  }

  .form-card {
    padding: 22px 18px;
  }

  .section-alt,
  .section-pad {
    padding-top: 36px;
    padding-bottom: 44px;
  }
}

/* 窄屏：顶栏只保留图标按钮，主 CTA 收进抽屉 */
@media (max-width: 520px) {
  .header__actions .pill {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .sidenav,
  .site-header,
  .to-top,
  .modal {
    display: none !important;
  }
}

/* ==========================================================================
   17. AI 接入：设置面板 / 工具运行器 / Markdown 输出
   ========================================================================== */

/* ---------- 顶栏 AI 设置入口 ---------- */
.ai-btn {
  position: relative;
}

.ai-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #b9c0d4;
  transition: background 0.2s ease;
}

.ai-dot.is-on {
  background: var(--green);
}

.ai-dot--inline {
  position: static;
  display: inline-block;
  margin-left: 7px;
  vertical-align: middle;
  border-color: var(--surface);
}

/* ---------- 提示条变体 ---------- */
.notice--warn {
  background: rgba(255, 197, 61, 0.12);
  border-color: rgba(214, 158, 20, 0.55);
  color: var(--ink);
}

.notice--warn svg {
  color: #c98a00;
}

.notice--warn strong {
  font-weight: 800;
}

.notice--ok {
  background: rgba(28, 176, 52, 0.1);
  border-color: rgba(28, 176, 52, 0.45);
  color: var(--ink);
}

.notice--ok svg {
  color: var(--green-dark);
}

/* ---------- 密码框 ---------- */
.secret-field {
  position: relative;
}

.secret-field input {
  padding-right: 74px;
}

.secret-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  padding: 5px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.secret-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.ai-status {
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mute);
  min-height: 22px;
  line-height: 1.6;
}

.ai-status.is-ok {
  color: var(--green-dark);
}

.ai-status.is-bad {
  color: #d6293e;
}

[data-theme="dark"] .ai-status.is-ok {
  color: #4ade80;
}

/* ---------- 工具运行器 ---------- */
.runner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}

.runner__form-col {
  padding: 24px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.runner__form .field:last-of-type {
  margin-bottom: 6px;
}

.runner__out-col {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.runner__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.runner__state {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
}

.runner__state.is-busy {
  color: var(--blue);
}

.runner__state.is-ok {
  color: var(--green-dark);
}

.runner__state.is-bad {
  color: #d6293e;
}

[data-theme="dark"] .runner__state.is-ok {
  color: #4ade80;
}

.runner__tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.runner__btn {
  padding: 5px 13px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: border-color 0.16s ease, color 0.16s ease;
}

.runner__btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.runner__btn--stop:hover {
  border-color: #d6293e;
  color: #d6293e;
}

.runner__result {
  flex: 1 1 auto;
  padding: 20px 22px 26px;
  overflow-wrap: anywhere;
}

.runner__meta {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-mute);
}

.runner__bar + .runner__result .grade-empty {
  border: 0;
  min-height: 320px;
}

.ai-error {
  padding: 18px 20px;
  border: 2px solid #e8a4ac;
  border-radius: var(--radius-sm);
  background: rgba(214, 41, 62, 0.06);
}

.ai-error strong {
  display: block;
  font-size: 16px;
  color: #b3172c;
  margin-bottom: 6px;
}

[data-theme="dark"] .ai-error strong {
  color: #ff8a9b;
}

.ai-error p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.ai-error pre {
  margin: 0 0 10px;
  padding: 10px 12px;
  overflow-x: auto;
  background: var(--page-bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  white-space: pre-wrap;
}

/* ---------- 作文批改页的接入状态 ---------- */
.grader-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.grader-rubric-input {
  width: 100%;
  min-height: 0;
  margin-bottom: 14px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.grader-hint {
  margin: 14px 0 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: rgba(255, 197, 61, 0.14);
  border: 1px solid rgba(214, 158, 20, 0.4);
  border-radius: var(--radius-sm);
}

.grader-hint.is-live {
  background: rgba(28, 176, 52, 0.1);
  border-color: rgba(28, 176, 52, 0.45);
}

.grade-mode {
  margin-top: 6px !important;
  font-size: 12px !important;
  color: var(--ink-mute) !important;
}

.grade-h {
  margin: 22px 0 12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.grade-dims {
  margin-top: 4px;
}

.rubric-item--sug {
  border-left-color: #f0a500;
}

.rubric-item__quote {
  margin: 0 0 8px !important;
  padding: 8px 12px;
  font-size: 14px !important;
  line-height: 1.7;
  color: var(--ink-soft) !important;
  background: var(--page-bg);
  border-radius: var(--radius-sm);
}

.grade-highs {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* 示例提示词卡片上的「填入」按钮 */
.prompt-use {
  margin-top: 10px;
  padding: 4px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

.prompt-use:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ---------- Markdown 输出排版 ---------- */
.md {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
}

.md > *:first-child {
  margin-top: 0;
}

.md h3,
.md h4,
.md h5,
.md h6 {
  margin: 26px 0 10px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
}

.md h3 {
  font-size: 19px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line-soft);
}

.md p {
  margin: 0 0 12px;
}

.md ul,
.md ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.md li {
  margin-bottom: 5px;
}

.md strong {
  font-weight: 800;
}

.md code {
  padding: 2px 6px;
  background: var(--page-bg);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.md .md-code {
  margin: 0 0 16px;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--band-bg);
  border-radius: var(--radius-sm);
}

.md .md-code code {
  padding: 0;
  background: none;
  color: #e8ecf7;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.md blockquote {
  margin: 0 0 14px;
  padding: 10px 16px;
  border-left: 4px solid var(--blue);
  background: var(--page-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
}

.md hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.md-table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.md th,
.md td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.md th {
  background: var(--page-bg);
  font-weight: 800;
  white-space: nowrap;
}

.md tr:last-child td {
  border-bottom: 0;
}

.md a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md--streaming::after {
  content: "▍";
  color: var(--blue);
  animation: md-caret 1s steps(2, start) infinite;
}

@keyframes md-caret {
  50% {
    opacity: 0;
  }
}

@media (max-width: 1024px) {
  .runner {
    grid-template-columns: 1fr;
  }

  .runner__out-col {
    min-height: 340px;
  }
}
