:root {
  --ink: #20251f;
  --muted: #686a60;
  --paper: #f7f4ea;
  --canvas: #e9e5d9;
  --red: #b43c2e;
  --green: #274d3c;
  --line: rgba(32, 37, 31, .18);
  --serif: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  --sans: "FZLanTingHeiS", "Noto Sans CJK SC", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(39, 77, 60, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 77, 60, .035) 1px, transparent 1px),
    var(--canvas);
  background-size: 28px 28px;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
.grain {
  position: fixed; inset: 0; pointer-events: none; opacity: .12; z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.site-header {
  width: min(1240px, calc(100% - 48px)); margin: 0 auto; height: 92px;
  display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; color: var(--paper); background: var(--green); }
.brand-mark svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.header-note { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #3f7d57; box-shadow: 0 0 0 4px rgba(63,125,87,.12); }

main { overflow: hidden; }
.hero {
  width: min(1240px, calc(100% - 48px)); min-height: 690px; margin: 0 auto; padding: 86px 0 96px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, .82fr); align-items: center; gap: 100px;
}
.hero-copy { align-self: center; animation: reveal .75s ease both; }
.eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; color: var(--red); font: 700 12px/1 var(--sans); letter-spacing: .2em; }
.eyebrow i { display: block; width: 44px; height: 1px; background: currentColor; position: relative; }
.eyebrow i::after { content: ""; position: absolute; right: -1px; top: -2px; width: 5px; height: 5px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }
h1 { margin: 0; font: 700 clamp(54px, 6.4vw, 94px)/1.02 var(--serif); letter-spacing: -.055em; }
.lede { max-width: 500px; margin: 30px 0 45px; color: var(--muted); font-size: 16px; line-height: 1.9; letter-spacing: .035em; }
.preservation { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 560px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.preservation div { padding: 18px 20px 18px 0; display: grid; grid-template-columns: 28px 1fr; border-right: 1px solid var(--line); }
.preservation div + div { padding-left: 20px; }
.preservation div:last-child { border: 0; }
.preservation span { grid-row: span 2; color: var(--red); font: 700 10px/1 var(--sans); padding-top: 4px; }
.preservation strong { font-family: var(--serif); font-size: 17px; }
.preservation small { margin-top: 4px; color: var(--muted); font-size: 10px; white-space: nowrap; }

.converter-shell { position: relative; animation: reveal .75s .12s ease both; }
.paper-stack i { position: absolute; inset: 0; background: #dad4c4; border: 1px solid rgba(32,37,31,.12); }
.paper-stack i:first-child { transform: rotate(3deg) translate(11px, 2px); }
.paper-stack i:last-child { transform: rotate(-2deg) translate(-8px, 7px); background: #e2ddcf; }
.converter-card { position: relative; min-height: 540px; padding: 32px; background: var(--paper); border: 1px solid rgba(32,37,31,.22); box-shadow: 0 26px 70px rgba(41,43,35,.16); }
.converter-card::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(32,37,31,.07); pointer-events: none; }
.card-heading { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 26px; }
.card-heading p { margin: 0 0 5px; color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.card-heading h2 { margin: 0; font: 700 25px/1.25 var(--serif); }
.edition { color: var(--muted); font: 10px/1 var(--sans); letter-spacing: .12em; border: 1px solid var(--line); padding: 7px 8px; }
.drop-zone { position: relative; z-index: 1; min-height: 220px; padding: 32px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed rgba(39,77,60,.48); background: rgba(39,77,60,.025); cursor: pointer; transition: .25s ease; outline: none; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-dragging { border-color: var(--red); background: rgba(180,60,46,.035); transform: translateY(-2px); }
.upload-seal { width: 64px; height: 64px; margin-bottom: 18px; display: grid; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); }
.upload-seal svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.drop-zone p { margin: 0 0 9px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.drop-zone p strong { color: var(--ink); font: 700 18px/1.4 var(--serif); }
.drop-zone > span { color: #85857b; font-size: 10px; }
.drop-zone b { font-weight: 600; }
.drop-zone.is-compact { min-height: 0; padding: 12px 16px; }
.drop-zone.is-compact .upload-seal, .drop-zone.is-compact > span { display: none; }
.drop-zone.is-compact p { margin: 0; }
.file-panel { position: relative; z-index: 1; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.35); }
.error-panel { position: relative; z-index: 1; min-height: 88px; display: flex; align-items: center; padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.35); }
.file-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.file-panel-title { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.file-panel-title strong { font-family: var(--serif); font-size: 14px; }
.file-panel-title span { color: var(--muted); font-size: 10px; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }
.file-row.is-ok { border-color: rgba(39,77,60,.35); background: rgba(39,77,60,.05); }
.file-row.is-error { border-color: rgba(180,60,46,.35); background: rgba(180,60,46,.05); }
.file-row .file-icon { flex: 0 0 auto; }
.file-row .file-info { min-width: 0; flex: 1; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.file-row .file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.file-row .file-info span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.file-row .icon-button { flex: 0 0 auto; }
.download-button { flex: 0 0 auto; padding: 7px 13px; border: 1px solid var(--green); color: var(--green); background: transparent; font-size: 11px; font-weight: 600; text-decoration: none; cursor: pointer; transition: .18s ease; }
.download-button:hover { color: white; background: var(--green); }
.cache-badge { display: inline-block; margin-left: 5px; padding: 1px 7px; border: 1px solid rgba(39,77,60,.42); border-radius: 99px; color: var(--green); background: rgba(39,77,60,.08); font-style: normal; font-size: 9px; font-weight: 600; letter-spacing: .06em; white-space: nowrap; }
.cache-badge.is-miss { border-color: rgba(32,37,31,.26); color: var(--muted); background: rgba(32,37,31,.05); }
.file-icon { width: 47px; height: 56px; display: grid; place-items: end center; padding-bottom: 7px; color: white; background: var(--green); clip-path: polygon(0 0, 72% 0, 100% 23%, 100% 100%, 0 100%); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.file-info { min-width: 0; flex: 1; padding: 0 14px; display: flex; flex-direction: column; gap: 5px; }
.file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.file-info span { color: var(--muted); font-size: 11px; }
.icon-button { width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; }
.icon-button:hover { background: rgba(180,60,46,.08); color: var(--red); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.progress-panel { position: relative; z-index: 1; min-height: 126px; padding: 23px 19px; border: 1px solid var(--line); }
.progress-copy { display: flex; justify-content: space-between; font-size: 13px; }
.progress-copy span { color: var(--red); font-weight: 700; }
.progress-track { height: 4px; margin: 18px 0 12px; overflow: hidden; background: #dcd8cc; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--red); transition: width .35s ease; }
.progress-panel p { margin: 0; color: var(--muted); font-size: 10px; }
.result-panel { position: relative; z-index: 1; padding: 16px; border: 1px solid rgba(39,77,60,.35); background: rgba(39,77,60,.045); }
.result-head { display: flex; align-items: center; margin-bottom: 13px; }
.result-check { width: 42px; height: 42px; margin-right: 13px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.result-check svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 2; }
.result-title { display: flex; flex-direction: column; gap: 5px; }
.result-title strong { font-family: var(--serif); font-size: 17px; }
.result-title span { color: var(--muted); font-size: 10px; }
.error-panel { border-color: rgba(180,60,46,.35); background: rgba(180,60,46,.05); }
.error-panel > span { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font-weight: 700; }
.error-panel p { margin: 0 0 0 12px; display: flex; flex-direction: column; gap: 4px; }
.error-panel strong { font-size: 13px; }
.error-panel small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.primary-button { position: relative; z-index: 1; width: 100%; height: 56px; margin-top: 18px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border: 0; color: white; background: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .04em; cursor: pointer; transition: .2s ease; }
.primary-button:not(:disabled):hover { background: var(--red); transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .42; }
.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.text-button { position: relative; z-index: 1; width: 100%; margin-top: 12px; border: 0; background: none; color: var(--muted); font-size: 11px; text-decoration: underline; cursor: pointer; }
.privacy-note { position: relative; z-index: 1; margin: 17px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; color: #7e7e74; font-size: 9px; line-height: 1.5; text-align: center; }
.privacy-note svg { width: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.25; }

.method { width: min(1240px, calc(100% - 48px)); margin: 0 auto 100px; padding-top: 80px; display: grid; grid-template-columns: .65fr 1.35fr; gap: 100px; border-top: 1px solid var(--line); }
.method-title p { margin: 0 0 18px; color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.method-title h2 { margin: 0; font: 700 44px/1.18 var(--serif); letter-spacing: -.04em; }
.method-steps article { display: grid; grid-template-columns: 55px 1fr; gap: 20px; padding: 0 0 25px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.method-steps article:last-child { margin-bottom: 0; }
.method-steps article > span { color: var(--red); font: italic 24px/1 var(--serif); }
.method-steps h3 { margin: 0 0 8px; font: 700 18px/1.2 var(--serif); }
.method-steps p { max-width: 570px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.history { width: min(1240px, calc(100% - 48px)); margin: 0 auto 100px; padding-top: 80px; border-top: 1px solid var(--line); }
.history-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.history-title p { margin: 0 0 14px; color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.history-title h2 { margin: 0; font: 700 34px/1.2 var(--serif); }
.history-summary { max-width: 400px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: right; }
.history .file-list { max-height: 440px; }
.history .file-icon { background: #5c6f63; }
footer { min-height: 82px; padding: 0 max(24px, calc((100% - 1240px)/2)); display: flex; align-items: center; justify-content: space-between; color: #d9d8d1; background: var(--ink); font-size: 10px; letter-spacing: .08em; }
footer span { font-family: var(--serif); font-size: 14px; }
footer p { margin: 0; color: #94978f; }
[hidden] { display: none !important; }
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 70px; padding-top: 60px; }
  .hero-copy { max-width: 700px; }
  .converter-shell { width: min(100%, 560px); justify-self: center; }
  .method { grid-template-columns: 1fr; gap: 50px; }
  .history-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .history-summary { text-align: left; }
}
@media (max-width: 600px) {
  .site-header, .hero, .method, .history { width: min(100% - 30px, 1240px); }
  .site-header { height: 72px; }
  .header-note { font-size: 0; }
  .header-note::after { content: "结果缓存"; font-size: 10px; }
  .hero { padding: 54px 0 72px; gap: 52px; }
  h1 { font-size: clamp(48px, 15.4vw, 72px); }
  .lede { margin: 24px 0 32px; font-size: 14px; }
  .preservation { grid-template-columns: 1fr; }
  .preservation div, .preservation div + div { padding: 13px 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .preservation div:last-child { border-bottom: 0; }
  .converter-card { min-height: 520px; padding: 23px; }
  .drop-zone { min-height: 210px; padding: 24px 12px; }
  .method { margin-bottom: 70px; padding-top: 60px; }
  .method-title h2 { font-size: 38px; }
  footer { padding: 20px 18px; flex-direction: column; align-items: flex-start; gap: 8px; }
}
