/*
 * Fonts: Fraunces and Source Sans 3, served from this site (SIL Open Font
 * License 1.1; see /fonts/OFL-fraunces.txt and /fonts/OFL-sourcesans3.txt).
 * These are Google Fonts' own @font-face rules and files with only the URLs
 * changed, so visitors' browsers no longer contact Google.
 */
/* vietnamese */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/fraunces-normal-vietnamese.7e3c0466.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/fraunces-normal-latin-ext.f120089b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/fraunces-normal-latin.48282a41.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 650;
  font-display: swap;
  src: url(../fonts/fraunces-normal-vietnamese.7e3c0466.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 650;
  font-display: swap;
  src: url(../fonts/fraunces-normal-latin-ext.f120089b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 650;
  font-display: swap;
  src: url(../fonts/fraunces-normal-latin.48282a41.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-italic-cyrillic-ext.2fa7a5ea.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-italic-cyrillic.32af9304.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-italic-greek-ext.60fb5d47.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-italic-greek.4cff4df4.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-italic-vietnamese.06c53666.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-italic-latin-ext.ad993632.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-italic-latin.b9b0f6fe.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-cyrillic-ext.7e462c0c.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-cyrillic.44aa5fb3.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-greek-ext.1877869f.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-greek.2c02dd66.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-vietnamese.091552f9.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-latin-ext.ed3571ea.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-latin.587435ca.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-cyrillic-ext.7e462c0c.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-cyrillic.44aa5fb3.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-greek-ext.1877869f.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-greek.2c02dd66.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-vietnamese.091552f9.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-latin-ext.ed3571ea.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-latin.587435ca.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-cyrillic-ext.7e462c0c.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-cyrillic.44aa5fb3.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-greek-ext.1877869f.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-greek.2c02dd66.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-vietnamese.091552f9.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-latin-ext.ed3571ea.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/source-sans-3-normal-latin.587435ca.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* HTML to EPUB Converter — local demo */

:root {
  --paper: #f3eee4;
  --paper-2: #e8dfd0;
  --card: #fffcf7;
  --ink: #1a1714;
  --ink-soft: #5c5348;
  --line: #d9cfc0;
  --accent: #215544;
  --accent-2: #16382d;
  --accent-soft: #dce8e2;
  --gold: #c9a14a;
  --danger: #8f2d1c;
  --danger-bg: #f8ebe7;
  --ok: #1b5a3c;
  --ok-bg: #e4f2ea;
  --shadow: 0 18px 40px rgba(40, 28, 16, 0.08);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -120px, #fff8ee 0%, transparent 70%),
    var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
}

img { max-width: 100%; }

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover { color: var(--accent-2); }

.wrap {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 0.5rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span { color: var(--accent); font-weight: 500; }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
  font-size: 0.95rem;
}

.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-header nav a:hover { color: var(--ink); }

.site-header nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
}

.cross-tool {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.cross-tool a { color: var(--accent-2); }

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
  margin: 0.65rem 0 0;
}

.site-footer .footer-links a {
  color: var(--ink-soft);
}

.hero {
  padding: 2.4rem 0 1.5rem;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 650;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero h1::before {
  content: "";
  display: block;
  width: 3.2rem;
  height: 3px;
  margin-bottom: 1rem;
  background: var(--gold);
}

.lede {
  max-width: 40rem;
  margin: 0 0 1.8rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.direct-answer {
  max-width: 42rem;
  margin: 0 0 1.8rem;
  color: var(--ink);
  font-size: 1.12rem;
}


.converter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.4rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  margin: 0 0 1.1rem;
  background: var(--paper-2);
  border-radius: 12px;
}

.tabs button {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.6rem;
  border-radius: 9px;
  cursor: pointer;
}

.tabs button.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(26, 23, 20, 0.04);
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 10rem;
  padding: 1.4rem;
  border: 1.5px dashed #cbbfae;
  border-radius: 14px;
  background: #faf7f1;
  text-align: center;
  cursor: pointer;
  color: var(--ink-soft);
}

.dropzone:hover, .dropzone.is-over, .dropzone:focus {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.dropzone strong { color: var(--ink); display: block; font-weight: 650; margin-bottom: 0.2rem; }

.file-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

textarea, input[type="text"], input[type="url"], input[type="file"], select {
  width: 100%;
  font: inherit;
}

textarea, input[type="text"], input[type="url"], select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 0.65rem 0.75rem;
}

textarea:focus, input[type="text"]:focus, input[type="url"]:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

textarea {
  min-height: 11rem;
  resize: vertical;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}

.row-url {
  display: flex;
  gap: 0.5rem;
}

.row-url input { flex: 1; }

.url-note, .hint {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.url-preview {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.85rem;
  background: var(--ok-bg);
  color: var(--ok);
  border-radius: 10px;
  font-size: 0.95rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  margin: 1.15rem 0 0.4rem;
}

.meta-grid label, .cover-field, .check {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.cover-field { margin-top: 0.85rem; }

.check {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.check input { width: auto; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.15rem;
}

.btn {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #f7f4ee;
  font: inherit;
  font-weight: 650;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
}

.btn:hover { background: var(--accent-2); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.btn-secondary, .linkish {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.linkish {
  border: 0;
  padding: 0;
  color: var(--accent);
  font-size: 0.9rem;
  border-radius: 0;
}

.file-size {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.88em;
}

.file-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.file-actions .linkish:disabled {
  color: var(--ink-soft);
  opacity: 0.35;
  cursor: default;
}

.file-order {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.file-list li.file-images {
  display: block;
}

.file-images summary {
  cursor: pointer;
}

.file-images .file-list {
  margin: 0.3rem 0 0 1.1rem;
}

.progress {
  margin: 0.9rem 0 0;
}

.progress-track {
  height: 8px;
  background: var(--paper-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.18s ease;
}

.progress-label {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.status {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.95rem;
}

.status[data-kind="error"] { background: var(--danger-bg); color: var(--danger); }
.status[data-kind="ok"] { background: var(--ok-bg); color: var(--ok); }

.section {
  padding: 2.6rem 0 0.4rem;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 650;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.2rem;
}

.steps .num {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 650;
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.steps p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.limits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.limits li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1.05rem 0.95rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.limits li strong {
  display: block;
  color: var(--ink);
  font-weight: 650;
  margin-bottom: 0.2rem;
}

.faq {
  display: grid;
  gap: 0.7rem;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  float: right;
  color: var(--ink-soft);
  font-weight: 500;
}

.faq details[open] summary::after { content: "–"; }

.faq p {
  margin: 0.55rem 0 0.25rem;
  color: var(--ink-soft);
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .site-header { flex-direction: column; }
  .meta-grid, .steps { grid-template-columns: 1fr; }
  .row-url { flex-direction: column; }
  .hero { padding-top: 1.4rem; }
}


.error-page {
  padding: 4rem 0 3.5rem;
}

.error-page .error-code {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.error-page h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 650;
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.error-page p {
  max-width: 34rem;
  color: var(--ink-soft);
}

.error-page .actions { margin-top: 1.6rem; }


.sample-link { margin-top: 0.85rem; }
.sample-link a { color: var(--accent-2); }

.sample-map {
  width: 100%;
  border-collapse: collapse;
  margin: 0.85rem 0 0;
  font-size: 0.98rem;
}

.sample-map th,
.sample-map td {
  text-align: left;
  padding: 0.55rem 0.85rem 0.55rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.sample-map th {
  color: var(--ink-soft);
  font-weight: 650;
  font-size: 0.88rem;
}

.toc-tree {
  margin: 0;
  padding-left: 1.2rem;
}

.toc-tree li { margin: 0.15rem 0; }

.proof-figure {
  margin: 1.15rem 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1rem 0.9rem;
}

.proof-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.proof-figure figcaption {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.validation {
  margin: 1.15rem 0 0;
  background: var(--paper-2);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
}

.validation dl {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 0.5rem 1.1rem;
  margin: 0;
}

.validation dt {
  color: var(--ink-soft);
  font-weight: 650;
}

.validation dd { margin: 0; }

.validation .hash {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

.validation .pass {
  color: var(--ok);
  font-weight: 650;
}

.download-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.download-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.download-list a { color: var(--accent-2); }

.download-list .meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.cta-panel {
  margin: 2rem 0 0;
  padding: 1.2rem 1.25rem 1.3rem;
  background: var(--accent-soft);
  border-radius: 14px;
}

.cta-panel p { margin: 0 0 1rem; }

@media (max-width: 640px) {
  .validation dl { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .validation dt { margin-top: 0.35rem; }
}

/* TXT to EPUB: options and preview */
.option-grid { margin-top: 1rem; }

.txt-preview {
  margin-top: 1rem;
  padding: 0.85rem 1rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 0.92rem;
}

.txt-preview h2 {
  margin: 0 0 0.25rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.txt-preview .preview-meta,
.txt-preview .preview-hint {
  margin: 0;
  color: var(--ink-soft);
}

.txt-preview pre {
  margin: 0.6rem 0;
  max-height: 11.5em;
  overflow: auto;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.txt-preview .preview-chapters-label { margin: 0.2rem 0 0.15rem; }

.txt-preview ol {
  margin: 0 0 0.5rem;
  padding-left: 1.4rem;
}

.txt-preview ol li.more {
  list-style: none;
  color: var(--ink-soft);
}

.lang-switch { font-weight: 600; }

/* Chinese pages: CJK fonts after the Latin web fonts, no fake italics or wide tracking. */
html:lang(zh) {
  --serif: "Fraunces", "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
}
html:lang(zh) h1, html:lang(zh) h2 { letter-spacing: 0; }
html:lang(zh) em, html:lang(zh) i { font-style: normal; }
