/* ============================================================
   PrintWeekly — 全站样式
   结构：基础 → 头尾 → Hero → 生成器 → 计划表纸张 → 内容区 → 响应式
   ============================================================ */

:root {
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #ccfbf1;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 8px 24px rgba(17, 24, 39, .07);
}
body.accent-pink { --accent: #db2777; --accent-dark: #be185d; --accent-soft: #fce7f3; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------------- 头部导航 ---------------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); display: inline-block; }
.brand strong { color: var(--accent); }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 7px 11px; border-radius: 8px; }
.site-nav a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* ---------------- Hero ---------------- */
.hero { padding: 56px 0 40px; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, #fff) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; max-width: 820px; margin: 0 auto 16px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: clamp(15px, 2vw, 18px); color: var(--muted); max-width: 640px; margin: 0 auto 22px; }
.hero-sub { padding: 40px 0 32px; text-align: left; }
.hero-sub h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); }
.hero-sub .lead { margin: 0; max-width: 720px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.badge { font-size: 13px; font-weight: 600; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; padding: 5px 13px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 15.5px;
  border-radius: 11px; padding: 12px 22px; transition: .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-block { width: 100%; }

/* ---------------- 生成器 ---------------- */
.gen-section { padding: 36px 0 10px; }
.gen-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 26px; align-items: start; }
.gen-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.gen-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field select, .field input[type="text"] {
  font: inherit; font-size: 14px; padding: 9px 10px; border: 1.5px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); width: 100%;
}
.field select:focus, .field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input[type="color"] { width: 100%; height: 38px; padding: 3px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.field-full { grid-column: 1 / -1; }
.gen-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; cursor: pointer; user-select: none; }
.chip input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.gen-actions { margin-top: 18px; }
.gen-hint { font-size: 12.5px; color: var(--muted); margin-top: 9px; text-align: center; }
.mode-habit .planner-only { display: none; }

.gen-preview { min-width: 0; }
.gen-notice {
  text-align: center; font-size: 13.5px; color: #64748b;
  background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 8px;
  padding: 8px 14px; margin: 0 0 14px;
}
@media print { .gen-notice { display: none; } }
.sheet-wrap { position: relative; width: 100%; }

/* ---------------- 计划表纸张（核心预览） ---------------- */
.sheet {
  background: #fff;
  box-shadow: 0 2px 6px rgba(17, 24, 39, .1), 0 14px 40px rgba(17, 24, 39, .14);
  border-radius: 4px;
  padding: 34px 38px;
  display: flex; flex-direction: column; gap: 14px;
  color: #111827;
  transform-origin: top left;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 3px solid var(--accent); padding-bottom: 9px; }
.sheet-title { font-size: 25px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); line-height: 1.1; }
.sheet-label { font-size: 13.5px; color: #374151; white-space: nowrap; }

.ruled {
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, #cbd5e1 25px, #cbd5e1 26px);
}
.goals { border: 2px solid var(--accent); border-radius: 10px; padding: 10px 14px 12px; }
.goals h3, .notes h3, .month-cal h3 { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }

.days.cols { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; min-height: 0; }
.days.rows { flex: 1; display: grid; grid-template-rows: repeat(7, 1fr); gap: 6px; min-height: 0; }
.day { border: 1.5px solid #cbd5e1; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.days.rows .day { flex-direction: row; }
.day h4 { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-align: center; color: #fff; background: var(--accent); padding: 5px 4px; }
.days.rows .day h4 { flex: 0 0 96px; display: flex; align-items: center; justify-content: center; }
.day .lines { flex: 1; min-height: 0; }

.mini { display: grid; grid-template-columns: 1fr repeat(7, 38px); border: 1.5px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.mini-cell { display: flex; align-items: center; justify-content: center; border-top: 1px solid #e2e8f0; min-height: 30px; font-size: 12px; }
.mini-cell:nth-child(8n + 1) { justify-content: flex-start; padding-left: 12px; border-right: 1.5px solid #cbd5e1; }
.mini-head { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent-dark); font-weight: 700; border-top: none; }
.mini-line { height: 100%; }
.cbx { display: inline-block; width: 20px; height: 20px; border: 1.5px solid #94a3b8; border-radius: 4px; background: #fff; }

.notes { border-top: 2px solid var(--accent); padding-top: 6px; }

/* 空白迷你月历（undated 模板招牌模块） */
.month-cal { border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 8px 12px 12px; }
.mcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 7px; }
.mcal-cell { height: 24px; border: 1px solid #e2e8f0; border-radius: 3px; }
.mcal-head { height: auto; border: none; font-size: 11px; font-weight: 700; color: var(--accent-dark); text-align: center; }
.mcal-num { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #334155; border-color: #cbd5e1; }
.sheet-ls .mcal-cell { height: 20px; }
.sheet.cute .month-cal { border-color: color-mix(in srgb, var(--accent) 32%, #fff); border-radius: 16px; border-style: dashed; }
.sheet.cute .mcal-cell { border-radius: 7px; border-color: color-mix(in srgb, var(--accent) 25%, #fff); }

/* cute 风格覆盖 */
.sheet.cute { gap: 16px; }
.sheet.cute .day { border: 1.5px solid color-mix(in srgb, var(--accent) 32%, #fff); border-radius: 14px; }
.sheet.cute .day h4 { background: color-mix(in srgb, var(--accent) 15%, #fff); color: var(--accent-dark); border-radius: 12px 12px 0 0; }
.sheet.cute .days.rows .day h4 { border-radius: 12px 0 0 12px; }
.sheet.cute .goals { border-style: dashed; border-radius: 18px; background: color-mix(in srgb, var(--accent) 5%, #fff); }
.sheet.cute .ruled { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, color-mix(in srgb, var(--accent) 28%, #fff) 25px, color-mix(in srgb, var(--accent) 28%, #fff) 26px); }
.sheet.cute .mini { border-radius: 16px; border-color: color-mix(in srgb, var(--accent) 32%, #fff); }
.sheet.cute .cbx { border-radius: 7px; border-color: color-mix(in srgb, var(--accent) 45%, #fff); }

/* 习惯追踪整页模式 */
.hgrid { flex: 1; display: grid; grid-template-columns: 1fr repeat(7, 42px); grid-auto-rows: auto; border: 1.5px solid #cbd5e1; border-radius: 10px; overflow: hidden; align-content: stretch; }
.hgrid > div { display: flex; align-items: center; justify-content: center; border-top: 1px solid #e2e8f0; min-height: 34px; }
.hgrid > div:nth-child(8n + 1) { justify-content: flex-start; padding-left: 13px; font-size: 13px; border-right: 1.5px solid #cbd5e1; }
.hgrid .hhead { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent-dark); font-weight: 700; font-size: 12px; border-top: none; }
.hgrid .hline { border-right: 1.5px solid #cbd5e1; }

/* ---------------- 打印 ---------------- */
@media print {
  body { background: #fff; }
  body * { visibility: hidden !important; }
  #sheet, #sheet * { visibility: visible !important; }
  #sheet {
    position: fixed !important; left: 0 !important; top: 0 !important;
    transform: none !important; margin: 0 !important;
    box-shadow: none !important; border-radius: 0 !important;
    width: 100% !important; height: 100vh !important;
  }
}

/* ---------------- 内容区 ---------------- */
.section { padding: 44px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(21px, 3vw, 28px); font-weight: 800; letter-spacing: -.01em; margin-bottom: 10px; }
.section-sub { color: var(--muted); max-width: 640px; margin-bottom: 26px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.feature h3 { font-size: 16.5px; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; transition: .15s ease; }
.tcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.tcard .tag { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tcard h3 { font-size: 17px; color: var(--ink); }
.tcard p { font-size: 13.5px; color: var(--muted); flex: 1; }
.tcard .go { font-size: 13.5px; font-weight: 700; color: var(--accent); }

.prose { max-width: 780px; }
.prose h2 { font-size: 22px; font-weight: 800; margin: 34px 0 12px; letter-spacing: -.01em; }
.prose h3 { font-size: 17px; font-weight: 700; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { margin-bottom: 14px; color: #374151; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; font-size: 15.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--accent); font-weight: 400; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; font-size: 14.5px; color: #4b5563; }

.cta-box { background: color-mix(in srgb, var(--accent) 7%, #fff); border: 1.5px solid color-mix(in srgb, var(--accent) 25%, #fff); border-radius: var(--radius); padding: 28px; text-align: center; }
.cta-box h2 { margin-bottom: 8px; }
.cta-box p { color: var(--muted); margin-bottom: 16px; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: #0f172a; color: #94a3b8; margin-top: 60px; }
.site-footer .container { padding: 44px 20px 30px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.foot-brand { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.foot-brand strong { color: #2dd4bf; }
.foot-desc { font-size: 13.5px; max-width: 320px; }
.foot-col h4 { color: #e2e8f0; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px; }
.foot-col a { display: block; color: #94a3b8; font-size: 14px; padding: 4px 0; }
.foot-col a:hover { color: #2dd4bf; text-decoration: none; }
.foot-bottom { border-top: 1px solid #1e293b; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 920px) {
  .gen-layout { grid-template-columns: 1fr; }
  .feature-grid, .card-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 40px 0 30px; }
  .gen-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid, .card-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .site-header .container { justify-content: center; }
}
