/* ============================================================
   简历工坊 · MUJI 式设计系统（纸白 + 暖黑 + offer蓝点缀）
   ============================================================ */
:root {
  --ink: #2b2a28;
  --ink-2: #55534e;
  --ink-3: #97948d;
  --line: #e8e6e1;
  --paper: #faf9f7;
  --card: #ffffff;
  --blue: #2563eb;
  --blue-soft: #eef3ff;
  --danger: #c0392b;
  --ok: #1b7d46;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(40, 38, 33, .04), 0 10px 28px -14px rgba(40, 38, 33, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.7; font-size: 15px; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; margin: 0 auto; padding: 0 20px; }

/* 头部 */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 249, 247, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1060px; margin: 0 auto; padding: 0 20px; height: 58px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; }
.logo .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.main-nav { margin-left: auto; display: flex; gap: 2px; }
.main-nav a { padding: 7px 13px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.main-nav a:hover { background: #f0eee9; color: var(--ink); }
.main-nav a.active { background: var(--ink); color: #fff; }

/* Hero */
.hero { padding: 60px 0 40px; text-align: center; }
.hero h1 { font-size: 32px; font-weight: 900; letter-spacing: .5px; }
.hero h1 em { font-style: normal; border-bottom: 5px solid var(--blue); }
.hero .sub { margin-top: 14px; color: var(--ink-2); }
.hero .sub b { color: var(--blue); }
.hero-cta { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 24px; border-radius: 999px; border: none; font-size: 15px; font-weight: 700; transition: .15s; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; transform: translateY(-1px); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .6); }
.btn-blue:hover { background: #1d4fd8; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-sm { padding: 7px 15px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 30px 0; }
.grid .card h3 { font-size: 15.5px; margin: 10px 0 6px; }
.grid .card p { font-size: 13.5px; color: var(--ink-2); }
.grid .card .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 19px; }

/* 编辑器布局 */
.editor-wrap { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; gap: 22px; align-items: start; padding: 24px 0 60px; }
@media (max-width: 980px) { .editor-wrap { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { font-size: 14px; font-weight: 800; color: var(--ink-3); letter-spacing: 2px; margin-bottom: 14px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 11px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); transition: .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.field textarea { resize: vertical; min-height: 74px; line-height: 1.7; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

.section-block { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-head b { font-size: 14px; }
.item-card { border: 1px solid var(--line); border-radius: 10px; padding: 13px; margin-bottom: 10px; background: #fdfcfa; position: relative; }
.item-card .del {
  position: absolute; top: 9px; right: 9px; border: none; background: none;
  color: var(--ink-3); font-size: 15px; line-height: 1; padding: 2px 5px;
}
.item-card .del:hover { color: var(--danger); }
.add-btn {
  width: 100%; padding: 9px; border: 1.5px dashed var(--line); background: none;
  border-radius: 9px; color: var(--ink-3); font-size: 13px; font-weight: 600;
}
.add-btn:hover { border-color: var(--blue); color: var(--blue); }

.editor-toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.theme-chip { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.theme-chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.save-state { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* 预览区 */
.preview-area { position: sticky; top: 76px; }
.preview-shell {
  width: 100%; max-width: 620px; margin: 0 auto; background: #fff;
  box-shadow: 0 3px 8px rgba(40, 38, 33, .08), 0 24px 60px -24px rgba(40, 38, 33, .25);
  border-radius: 6px; overflow: hidden;
}
.a4 { width: 210mm; min-height: 297mm; transform-origin: top left; }
.preview-hint { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 12px; }

/* ============================================================
   简历模板（三主题）— 内容字体基于 pt，打印即所得
   ============================================================ */
#resume { padding: 16mm 15mm; color: #2b2a28; font-size: 10.5pt; line-height: 1.6; background: #fff; }
#resume .rz-name { font-size: 21pt; font-weight: 800; letter-spacing: 1px; }
#resume .rz-intent { font-size: 11.5pt; font-weight: 700; margin-top: 2px; }
#resume .rz-contact { font-size: 9.5pt; color: #6b6963; margin-top: 6px; }
#resume .rz-sec { margin-top: 13px; }
#resume .rz-sec-t {
  font-size: 11pt; font-weight: 800; letter-spacing: 3px;
  border-bottom: 1.5px solid currentColor; padding-bottom: 4px; margin-bottom: 8px;
}
#resume .rz-item { margin-bottom: 9px; }
#resume .rz-item-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 10.5pt; }
#resume .rz-item-sub { display: flex; justify-content: space-between; font-size: 9.5pt; color: #6b6963; margin-top: 1px; }
#resume .rz-bullets { margin: 3px 0 0; padding-left: 0; list-style: none; }
#resume .rz-bullets li { position: relative; padding-left: 12px; margin: 2px 0; font-size: 10pt; }
#resume .rz-bullets li::before { content: ""; position: absolute; left: 1px; top: .62em; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .55; }
#resume .rz-tags { display: flex; flex-wrap: wrap; gap: 6px; }
#resume .rz-tag { font-size: 9.5pt; border: 1px solid currentColor; border-radius: 4px; padding: 1px 8px; }
#resume .rz-summary { font-size: 10pt; color: #45433e; text-align: justify; }

/* 主题：极简黑白（默认） */
#resume.t-muji { --accent: #2b2a28; }
/* 主题：offer 蓝 */
#resume.t-blue { --accent: #2563eb; color: #24303f; }
#resume.t-blue .rz-sec-t { color: var(--accent); border-color: var(--accent); }
#resume.t-blue .rz-name span { color: var(--accent); }
/* 主题：商务灰 */
#resume.t-gray { --accent: #4a5460; color: #303540; background: #fff; }
#resume.t-gray .rz-sec-t { color: var(--accent); border-color: #c9cdd3; letter-spacing: 2px; }
#resume.t-gray .rz-tag { border-color: #c9cdd3; }
#resume .rz-name small { font-size: 10pt; color: var(--accent); font-weight: 700; margin-left: 8px; }

/* SEO 内容 */
.seo { padding: 20px 0 30px; }
.seo h2 { font-size: 19px; font-weight: 900; margin: 24px 0 10px; }
.seo h2::before { content: "▎"; color: var(--blue); margin-right: 4px; }
.seo p, .seo li { color: var(--ink-2); font-size: 14.5px; }
.seo ul, .seo ol { padding-left: 20px; margin: 8px 0; }
.seo table { width: 100%; border-collapse: collapse; background: #fff; margin: 12px 0; font-size: 13.5px; }
.seo th, .seo td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; }
details.faq { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 0 16px; margin-bottom: 9px; }
details.faq summary { padding: 13px 0; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.faq summary::after { content: "+"; color: var(--blue); font-size: 19px; }
details.faq[open] summary::after { content: "–"; }
details.faq .a { padding: 0 0 13px; color: var(--ink-2); font-size: 13.5px; }

/* 引流条 */
.lead-bar {
  background: var(--ink); color: #f4f2ee; border-radius: var(--radius);
  padding: 18px 22px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 26px 0;
}
.lead-bar b { color: #fff; }
.lead-bar .btn { background: var(--blue); color: #fff; margin-left: auto; }
.lead-bar p { font-size: 13px; color: #cfcbc3; }

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 26px 0 34px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* Toast */
#toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(16px); background: rgba(43, 42, 40, .95); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 999; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 打印：只输出简历 A4 ============ */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .site-header, .editor-wrap .panel, .editor-toolbar, .preview-hint, .seo, .lead-bar, .site-footer, #toast, .no-print { display: none !important; }
  .editor-wrap { display: block; padding: 0; }
  .preview-area { position: static; }
  .preview-shell { box-shadow: none; border-radius: 0; max-width: none; }
  .a4 { transform: none !important; width: 210mm; min-height: 297mm; }
}
