﻿/* ---------- visual foundations ---------- */
:root {
  --bg: #faf9f6; --panel: #fff; --ink: #252a3a; --ink-2: #626776;
  --ink-3: #767b87; --line: #e6e6e9; --line-2: #f0f0f3;
  --accent: #3b55d9; --accent-ink: #fff; --accent-soft: #f0f2ff;
  --danger: #a32e3a; --radius: 16px;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button, a, select, input, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #8294ee; outline-offset: 4px; }
::selection { background: #dce2ff; color: #202e77; }
.wrap { width: min(1120px, 100% - 64px); margin-inline: auto; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 20px; background: white; border-radius: 8px; }
/* ---------- header and introduction ---------- */
.topbar { border-bottom: 1px solid #eae9e5; }
.header-inner { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; font-size: 20px; font-weight: 600; letter-spacing: -.7px; }
.brand strong { font-weight: 700; }
.brand-2 { color: var(--accent); font-weight: 700; }
.logo { display: grid; place-items: center; width: 37px; height: 40px; border-radius: 11px; color: white; background: var(--accent); box-shadow: 0 3px 5px #3b55d91a; transform: rotate(-5deg); }
.logo .icon { width: 24px; height: 24px; transform: rotate(5deg); }
.header-nav { display: flex; align-items: center; gap: 32px; font-size: 13px; font-weight: 500; }
.header-nav a { text-decoration: none; color: var(--ink-2); padding: 10px 0; }
.header-nav a:hover { color: var(--accent); }
.privacy-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid #dce6dd; border-radius: 6px; background: #f2f6f0; color: #53705a; font-size: 11px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #629775; flex: none; }
.hero { text-align: center; padding: 51px 0 38px; }
.eyebrow { margin: 0; font-size: 10px; font-weight: 650; letter-spacing: 1.7px; color: var(--ink-3); }
.hero .eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; }
.hero .eyebrow > span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin: 14px 0 14px; font-size: clamp(30px, 3.5vw, 46px); font-weight: 620; line-height: 1.16; letter-spacing: -1.9px; }
.hero h1 > span { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -1.7px; }
.hero-description { margin: 0; font-size: 15px; line-height: 1.8; color: var(--ink-2); }
/* ---------- upload workspace ---------- */
.converter { background: var(--panel); border: 1px solid #dedfe5; border-radius: var(--radius); box-shadow: 0 4px 8px #292e4303, 0 18px 45px -30px #29315e26; overflow: hidden; }
.converter-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 27px; border-bottom: 1px solid var(--line); }
.converter-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 13px; font-weight: 600; }
.converter-heading h2 .icon { color: #747d9a; width: 17px; height: 17px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 13px; font-size: 10px; color: #858a97; }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li > span { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #e5e6eb; border-radius: 50%; font-size: 9px; }
.steps .active { color: var(--accent); font-weight: 600; }
.steps .active > span { color: white; background: var(--accent); border-color: var(--accent); }
.converter-body { display: grid; grid-template-columns: 1.15fr 1fr; }
.upload-panel { padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 305px; padding: 24px 18px; border: 1.5px dashed #cdd3e7; border-radius: 10px; background: #fdfdff; text-align: center; transition: background .2s, border-color .2s; }
.drop:hover, .drop:focus-within { border-color: #8392df; background: #fafbff; }
.drop.over { background: #eef1ff; border-color: var(--accent); }
.upload-art { position: relative; width: 86px; height: 78px; margin-bottom: 20px; }
.file-back { position: absolute; top: 6px; left: 12px; width: 45px; height: 57px; border: 1px solid #cfd7f4; border-radius: 6px; background: #eef1fd; transform: rotate(-15deg); }
.file-front { position: absolute; top: 2px; left: 24px; width: 47px; height: 61px; border: 1px solid #c2ccef; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: #fff; color: #657bd3; box-shadow: 0 3px 5px #33418108; transform: rotate(8deg); }
.file-front > span { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; }
.file-front .icon { width: 25px; height: 25px; }
.upload-bubble { position: absolute; right: 0; bottom: 2px; width: 30px; height: 30px; border: 3px solid #fdfdff; border-radius: 50%; background: var(--accent); color: white; display: grid; place-items: center; }
.upload-bubble .icon { width: 15px; height: 15px; }
.drop h3 { font-size: 22px; font-weight: 600; letter-spacing: -.5px; margin: 0 0 7px; }
.drop-sub { margin: 0; font-size: 12px; color: var(--ink-2); }
.drop-sub code { padding: 2px 4px; border-radius: 3px; background: #f0f1f7; font-family: var(--mono); font-size: 11px; color: #606980; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; transition: background .18s, box-shadow .18s, transform .18s; }
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: #f6f7fb; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 2px 3px #223aa41a; }
.btn.primary:hover { background: #2e46c0; box-shadow: 0 3px 8px #223aa42b; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.choose-btn { margin-top: 23px; padding: 12px 17px; font-size: 13px; }
.choose-btn .icon:last-child { margin-left: 12px; }
.drop-hint { margin: 11px 0 0; font-size: 11px; color: var(--ink-3); }
.sample-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; padding-top: 22px; font-size: 11px; color: var(--ink-3); }
.text-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; padding: 5px 2px; background: none; color: var(--accent); font-size: inherit; font-weight: 600; }
.text-btn:hover { color: #233ba7; text-decoration: underline; text-underline-offset: 4px; }
.text-btn .icon { width: 13px; height: 13px; }
.local-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 18px 0 0; font-size: 10px; color: var(--ink-3); }
.local-note .icon { width: 12px; height: 12px; }
/* ---------- miniature document illustration ---------- */
.preview-panel { position: relative; display: flex; align-items: center; flex-direction: column; padding: 23px 40px 22px; background-color: #f0f2f8; background-image: radial-gradient(#b5bfd14d .7px, transparent .7px); background-size: 14px 14px; border-left: 1px solid #e4e7ef; overflow: hidden; }
.preview-caption { align-self: stretch; display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.preview-caption .eyebrow { font-size: 8px; letter-spacing: 1.5px; color: #7b8399; }
.pdf-chip { padding: 2px 6px; background: #f7f8fc; border: 1px solid #dce0eb; color: #7b849b; border-radius: 4px; font-family: var(--mono); font-size: 8px; }
.sample-paper { position: relative; width: 273px; max-width: 100%; background: #fff; padding: 23px 25px 14px; border: 1px solid #e5e8f0; border-radius: 2px; box-shadow: 0 3px 6px #46507508, 0 13px 24px #46507514; transform: rotate(-3deg); }
.paper-topline { display: flex; justify-content: space-between; color: #858a9a; font-size: 5.5px; letter-spacing: 1px; }
.sample-paper h3 { margin: 16px 0 7px; font-family: Georgia, serif; font-size: 25px; line-height: 1.13; letter-spacing: -.6px; font-weight: 400; color: #292e40; }
.paper-subtitle { margin: 0; font-size: 7px; color: #7f8492; }
.paper-rule { height: 1px; background: #e9eaf0; margin-top: 16px; }
.sample-paper h4 { margin: 14px 0 6px; font-size: 8px; font-weight: 600; }
.paper-copy { font-size: 6.5px; line-height: 1.7; color: #7d8493; margin: 0 0 11px; }
.paper-code { padding: 9px; border: 1px solid #e8eaf2; border-left: 2px solid #778ada; border-radius: 3px; font-family: var(--mono); font-size: 6.5px; line-height: 1.8; background: #f6f7fb; color: #5a637a; }
.code-comment { color: #8d94a7; }
.code-purple { color: #8c5bab; }
.code-green { color: #4d8b74; }
.paper-chart { padding: 11px 6px 0; }
.chart-label { font-size: 6.5px; color: #697286; }
.chart-bars { display: flex; align-items: flex-end; justify-content: space-around; height: 54px; margin-top: 6px; border-bottom: 1px solid #e5e8f0; background: repeating-linear-gradient(to top, transparent 0px, transparent 17px, #f0f2f7 18px); }
.chart-bars i { display: block; width: 18px; height: var(--bar); background: #b6c2ee; border-radius: 2px 2px 0 0; }
.chart-bars i:nth-last-child(2) { background: #8da0e4; }
.chart-bars i:last-child { background: #536ed1; }
.chart-months { display: flex; justify-content: space-around; margin-top: 4px; font-size: 5px; color: #7a8395; }
.paper-footer { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 8px; border-top: 1px solid #eef0f5; font-size: 5px; color: #969aaa; }
.preview-note { display: flex; align-items: center; gap: 7px; margin-top: 20px; font-size: 10px; color: #727c94; }
.check-circle { display: grid; place-items: center; width: 14px; height: 14px; border: 1px solid #a5b9ad; border-radius: 50%; color: #628974; }
.check-circle .icon { width: 9px; height: 9px; stroke-width: 2; }
/* ---------- benefits, guide, and footer ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px; padding: 32px 22px 33px; }
.feature { display: flex; align-items: center; gap: 12px; }
.feature-icon { display: grid; place-items: center; width: 37px; height: 37px; background: #f0efeb; border: 1px solid #e9e8e3; border-radius: 9px; color: #7c8190; flex: none; }
.feature-icon .icon { width: 17px; height: 17px; }
.feature h3 { margin: 0 0 3px; font-size: 12px; font-weight: 600; }
.feature p { margin: 0; color: var(--ink-3); font-size: 11px; }
.how-it-works { border-top: 1px solid #e7e6e2; border-bottom: 1px solid #e7e6e2; scroll-margin-top: 24px; }
.how-it-works summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 0; font-size: 12px; font-weight: 500; cursor: pointer; list-style: none; }
.how-it-works summary::-webkit-details-marker { display: none; }
.how-it-works summary > span { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 400; color: var(--ink-3); }
.how-it-works summary .icon { width: 12px; height: 12px; transition: transform .2s; }
.how-it-works[open] summary .icon { transform: rotate(90deg); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 45px; padding: 9px 0 28px; }
.how-grid > div > span { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.how-grid h3 { font-size: 13px; font-weight: 600; margin: 9px 0 5px; }
.how-grid p { font-size: 12px; color: var(--ink-2); margin: 0; line-height: 1.8; }
.faq { display: grid; grid-template-columns: 1fr 1.45fr; gap: 65px; padding: 42px 0; border-bottom: 1px solid #e7e6e2; }
.faq-heading h2 { margin: 10px 0; font-size: 25px; font-weight: 600; line-height: 1.3; letter-spacing: -.7px; }
.faq-heading > p:last-child { font-size: 12px; color: var(--ink-2); }
.faq-items details { border-bottom: 1px solid #e7e6e2; }
.faq-items details:first-child { border-top: 1px solid #e7e6e2; }
.faq-items summary { position: relative; padding: 17px 25px 17px 0; font-size: 13px; font-weight: 500; list-style: none; cursor: pointer; }
.faq-items summary::-webkit-details-marker { display: none; }
.faq-items summary::after { content: '+'; position: absolute; right: 2px; top: 15px; font-size: 17px; color: var(--ink-3); }
.faq-items details[open] summary::after { content: '−'; }
.faq-items details p { font-size: 12px; line-height: 1.85; color: var(--ink-2); margin: 0; padding: 0 20px 18px 0; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; font-size: 10px; color: #848791; }
.foot p { margin: 0; }
.foot > div { display: flex; align-items: center; gap: 12px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }
.footer-dot { color: #b0b2b9; }
/* ---------- notebook settings and live preview ---------- */
.has-notebook .hero, .has-notebook .features, .has-notebook .faq { display: none; }
.workspace { padding: 34px 0 36px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.workspace-heading .eyebrow { font-size: 9px; color: var(--accent); }
.workspace-heading h2 { margin: 7px 0 3px; font-size: 30px; letter-spacing: -1px; font-weight: 600; }
.workspace-heading p:last-child { color: var(--ink-2); font-size: 12px; margin: 0; }
.ready-badge { display: inline-flex; align-items: center; gap: 7px; color: #587661; background: #edf3eb; border: 1px solid #dce6d9; padding: 6px 10px; font-size: 10px; border-radius: 5px; }
.workspace-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.bar { position: sticky; top: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.file-summary { display: flex; align-items: center; gap: 10px; padding: 18px; background: #fcfcfe; border-bottom: 1px solid var(--line); }
.file-icon { display: grid; place-items: center; width: 34px; height: 40px; flex: none; color: var(--accent); background: var(--accent-soft); border-radius: 6px; }
.file { min-width: 0; }
.file-name { display: block; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.5; }
.file-meta { display: block; margin-top: 4px; font-size: 10px; color: var(--ink-3); }
.bar-opts { padding: 22px 18px 0; }
.bar-opts h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; }
.bar-opts h2 .icon { width: 16px; height: 16px; color: #7680a0; }
.settings-description { font-size: 10px; color: var(--ink-3); margin: 5px 0 15px; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; cursor: pointer; font-size: 12px; font-weight: 500; }
.opt small { display: block; font-size: 10px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.opt input { appearance: none; width: 29px; height: 17px; margin: 0; border: 1px solid #b9bfce; border-radius: 12px; background: #e1e4ec; flex: none; position: relative; cursor: pointer; transition: background .2s, border-color .2s; }
.opt input::before { content: ''; position: absolute; width: 11px; height: 11px; top: 2px; left: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px #1112; transition: transform .2s; }
.opt input:checked { background: var(--accent); border-color: var(--accent); }
.opt input:checked::before { transform: translateX(12px); }
.page-option { display: flex; justify-content: space-between; align-items: center; padding-block: 17px; margin-top: 8px; border-top: 1px solid var(--line-2); font-size: 11px; }
.page-option select { width: 105px; padding: 7px 9px; border: 1px solid #dce0e9; border-radius: 5px; background: #fff; color: var(--ink-2); font-size: 11px; }
.export-actions { border-top: 1px solid var(--line); padding: 19px 18px 16px; text-align: center; }
.export-actions .btn { width: 100%; }
.export-actions .primary .icon:last-child { margin-left: auto; }
.export-actions .export-tip { margin: 9px 0 15px; color: var(--ink-3); font-size: 9px; line-height: 1.7; }
.export-actions .secondary { font-size: 11px; padding: 9px; }
.direct-tip { margin: 6px 0 13px; color: var(--ink-3); font-size: 9px; }
.export-actions .text-btn { font-size: 10px; font-weight: 500; color: var(--ink-2); }
.sidebar-privacy { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 11px; margin: 0; background: #f9faf8; border-top: 1px solid var(--line-2); font-size: 9px; color: #7c8a7d; }
.sidebar-privacy .icon { width: 11px; height: 11px; }
.viewer { min-width: 0; padding: 0 20px 16px; border: 1px solid #e0e3eb; border-radius: 12px; background: #eff1f6; }
.viewer-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 46px; font-size: 10px; color: #7b8395; }
.viewer-heading > span:first-child { display: inline-flex; gap: 7px; align-items: center; font-size: 8px; letter-spacing: 1.2px; font-weight: 600; }
.viewer-heading .status-dot { width: 5px; height: 5px; }
.viewer-note { text-align: center; color: #7b8395; font-size: 10px; margin: 17px 0 0; }
.toast { margin-top: 16px; padding: 13px 17px; border: 1px solid #edc6c9; border-radius: 8px; background: #fff1f2; color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }
.doc { overflow-wrap: anywhere; }
/* ---------- rendered notebook ---------- */
.doc {
  background: #fff; color: #17181c; max-width: 820px; margin-inline: auto;
  padding: 46px 52px 60px; border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 20, 28, .05), 0 22px 60px -34px rgba(16, 20, 28, .5);
  font-size: 15px; line-height: 1.6;
}
.doc-title { margin: 0 0 30px; padding-bottom: 14px; border-bottom: 2px solid #17181c; }
.doc-title h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.doc-title .sub { margin: 4px 0 0; font-size: 12.5px; color: #767d8a; }

.cell { margin: 0 0 18px; }
.cell:last-child { margin-bottom: 0; }
.row { display: flex; gap: 10px; align-items: flex-start; }
.prompt {
  flex: none; width: 66px; padding-top: 9px; text-align: right;
  font-family: var(--mono); font-size: 11.5px; color: #8b93a1; user-select: none;
}
.prompt.outp { color: #b0483a; }
.doc.no-prompt .prompt { display: none; }
.area { flex: 1 1 auto; min-width: 0; }

pre.src {
  margin: 0; padding: 11px 13px; overflow-x: auto;
  background: #f7f8fa; border: 1px solid #e6e8ec; border-left: 3px solid #4f46e5;
  border-radius: 6px;
}
pre.src code { font-family: var(--mono); font-size: 12.6px; line-height: 1.5; background: none; padding: 0; }

.outs { margin-top: 6px; }
.out { margin: 0 0 6px; }
.out:last-child { margin-bottom: 0; }
pre.out {
  padding: 9px 13px; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  font-family: var(--mono); font-size: 12.4px; line-height: 1.45;
  background: #fff; border: 1px solid #edeff2; border-radius: 6px; color: #23262c;
}
pre.out.stderr { background: #fff6f5; border-color: #f6d9d5; }
pre.out.error { background: #fff6f5; border-color: #f0c9c4; color: #7a2119; }
.out img, .out svg { max-width: 100%; height: auto; }
.out-html { overflow-x: auto; }
.out-note { font-size: 12.5px; color: #8b93a1; font-style: italic; }

/* markdown body */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4, .md h5 { line-height: 1.25; letter-spacing: -0.015em; margin: 1.5em 0 .5em; }
.md h1 { font-size: 24px; } .md h2 { font-size: 20px; } .md h3 { font-size: 17px; }
.md h4 { font-size: 15px; } .md h5 { font-size: 14px; color: #4a5160; }
.md p { margin: .7em 0; }
.md a { color: #3b3ac9; }
.md ul, .md ol { padding-left: 1.4em; margin: .7em 0; }
.md li { margin: .25em 0; }
.md blockquote { margin: .9em 0; padding: 2px 0 2px 14px; border-left: 3px solid #dfe2e7; color: #4a5160; }
.md code { font-family: var(--mono); font-size: .88em; background: #f2f3f6; padding: 1.5px 5px; border-radius: 5px; }
.md pre { background: #f7f8fa; border: 1px solid #e6e8ec; border-radius: 6px; padding: 11px 13px; overflow-x: auto; }
.md pre code { background: none; padding: 0; font-size: 12.6px; line-height: 1.5; }
.md hr { border: 0; border-top: 1px solid #e6e8ec; margin: 1.6em 0; }
.md img { max-width: 100%; height: auto; }

.md table, .out table {
  border-collapse: collapse; margin: .8em 0; font-size: 13px; max-width: 100%;
}
.md th, .md td, .out th, .out td { border: 1px solid #e3e6ea; padding: 5px 10px; text-align: left; }
.md th, .out th { background: #f5f6f8; font-weight: 600; }
.out tr:nth-child(even) td { background: #fafbfc; }

.raw { font-family: var(--mono); font-size: 12.4px; white-space: pre-wrap; color: #6b7280; }

/* ---------- off-screen export clone ---------- */
#export-holder { position: fixed; left: -20000px; top: 0; width: 820px; background: #fff; }
.doc.export { box-shadow: none; border: 0; border-radius: 0; padding: 0; max-width: none; width: 820px; }


/* ---------- responsive layout ---------- */
@media (min-width: 1000px) { .viewer .doc { padding: 35px 30px 45px; font-size: 14px; } .viewer .prompt { width: 54px; font-size: 10px; } }
@media (max-width: 1000px) {
  .upload-panel { padding: 24px; } .preview-panel { padding-inline: 25px; }
  .features { padding-inline: 0; gap: 20px; } .feature { gap: 9px; }
  .workspace-grid { grid-template-columns: 245px minmax(0, 1fr); gap: 16px; }
  .viewer { padding-inline: 12px; } .viewer .doc { padding: 25px 20px; font-size: 13px; }
  .viewer .prompt { width: 40px; font-size: 9px; }
}
@media (max-width: 760px) {
  .wrap { width: min(600px, 100% - 36px); } .header-inner { height: 70px; }
  .hero { padding: 38px 0 28px; } .hero h1 { font-size: 37px; } .hero h1 > span { display: block; margin-top: 5px; }
  .hero-description { font-size: 12px; } .header-nav { gap: 18px; }
  .converter-heading { padding: 17px 20px; } .converter-heading h2 { font-size: 12px; }
  .steps { gap: 8px; } .steps li { font-size: 0; gap: 0; } .steps li[aria-hidden] { font-size: 12px; }
  .converter-body { grid-template-columns: 1fr; } .upload-panel { padding: 24px; }
  .preview-panel { border-left: 0; border-top: 1px solid #e4e7ef; padding: 20px 28px 23px; }
  .preview-caption { margin-bottom: 15px; } .sample-paper { width: 273px; }
  .features { gap: 20px; padding-block: 28px; grid-template-columns: 1fr; } .feature { gap: 12px; } .feature h3 { font-size: 12px; } .feature p { font-size: 11px; }
  .how-grid { gap: 24px; grid-template-columns: 1fr; } .foot { align-items: flex-start; flex-direction: column; gap: 9px; }
  .faq { grid-template-columns: 1fr; gap: 14px; padding-block: 30px; }
  .faq-heading h2 { font-size: 23px; }
  .workspace { padding-top: 24px; } .workspace-heading h2 { font-size: 26px; } .workspace-heading p:last-child { font-size: 11px; }
  .ready-badge { font-size: 0; gap: 0; padding: 8px; } .ready-badge .status-dot { width: 7px; height: 7px; }
  .workspace-grid { grid-template-columns: 1fr; } .bar { position: static; }
  .bar-opts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .bar-opts h2, .settings-description, .page-option { grid-column: 1 / -1; } .settings-description { margin-bottom: 5px; }
  .export-actions { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .export-actions .btn { grid-row: 1; } .export-actions .export-tip, .export-actions .direct-tip { grid-row: 2; margin: 8px 0 12px; align-self: start; }
  .export-actions .primary { gap: 8px; padding-inline: 10px; font-size: 11px; white-space: nowrap; }
  .export-actions .primary .icon:last-child { display: none; }
  .export-actions .text-btn { grid-column: 1 / -1; justify-self: center; }
  .viewer .prompt { display: none; } .viewer .doc { padding: 26px 20px; border-radius: 2px; } .doc-title h1 { font-size: 22px; }
}
@media (max-width: 400px) {
  .header-nav > a { display: none; } .privacy-badge { font-size: 9px; } .brand { font-size: 18px; }
  .hero h1 { font-size: 33px; } .hero-description br { display: none; }
  .upload-panel { padding: 16px; } .drop { padding-inline: 12px; } .drop h3 { font-size: 19px; }
  .sample-row { gap: 0; flex-direction: column; } .local-note { font-size: 9px; }
  .bar-opts { column-gap: 14px; } .opt { font-size: 11px; } .opt small { font-size: 9px; }
  .how-it-works summary { font-size: 11px; } .how-it-works summary > span { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
@media (forced-colors: active) { .opt input { appearance: auto; } .opt input::before { display: none; } .btn, .logo { border: 1px solid ButtonText; } }
/* ---------- print: only the notebook ---------- */
@media print {
  .topbar, .hero, .converter, .bar, .foot, .toast, .features, .how-it-works, .faq, noscript, .workspace-heading, .viewer-heading, .viewer-note, .skip-link, #announcement, #export-holder { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .wrap { width: auto; margin: 0; }
  .workspace { padding: 0; } .workspace-grid { display: block; }
  .viewer { margin: 0; padding: 0; background: #fff; border: 0; border-radius: 0; }
  .viewer .doc { max-width: none; width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; font-size: 10.5pt; line-height: 1.5; }
  pre.src, pre.out { font-size: 8.8pt; }
  pre.src, pre.out, .md pre { background: #f7f8fa !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .viewer .prompt { font-size: 7.6pt; }
  .md h1, .md h2, .md h3, .md h4 { break-after: avoid-page; page-break-after: avoid; }
  img, svg, table, .out { break-inside: avoid; page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .doc-title { break-after: avoid-page; }
}
