:root {
  --paper: #f3efe6;
  --paper-soft: #f8f5ee;
  --card: #fffdf8;
  --ink: #24241f;
  --muted: #747269;
  --line: #dcd6ca;
  --line-strong: #c8c0b1;
  --accent: #c85a3c;
  --accent-dark: #a7442b;
  --green: #507566;
  --blue: #526f91;
  --gold: #ab7a28;
  --purple: #75648e;
  --danger: #a9483b;
  --shadow: 0 18px 50px rgba(54, 45, 31, .08);
  --radius: 3px;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-frame { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 34px 26px 26px;
  background: #e9e4da;
  border-right: 1px solid rgba(87, 79, 64, .12);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-family: var(--serif); font-size: 25px; font-weight: 600; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper-soft); font-family: var(--serif); font-size: 20px; font-style: italic; }
.brand--large { font-size: 30px; }
.brand--large .brand-mark { width: 42px; height: 42px; font-size: 25px; }

.sidebar nav { display: flex; flex-direction: column; gap: 4px; margin-top: 53px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 13px; min-height: 44px; padding: 10px 11px; border: 0; border-radius: 4px; background: transparent; color: #625f58; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .16s ease, color .16s ease; }
.nav-link:hover { background: rgba(255,255,255,.48); color: var(--ink); }
.nav-link.is-active { background: var(--card); color: var(--ink); box-shadow: 0 2px 12px rgba(61, 53, 42, .05); }
.nav-link.is-active::before { content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 2px; background: var(--accent); }
.nav-link .icon { width: 18px; height: 18px; }
.logout-form { margin-top: auto; }
.logout-form .nav-link { width: 100%; }
.privacy-note { display: flex; align-items: center; gap: 8px; padding: 18px 10px 0; color: #878278; font-size: 11px; border-top: 1px solid rgba(91,83,69,.13); margin-top: 12px; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: #6b8a75; box-shadow: 0 0 0 3px rgba(107,138,117,.13); }

.main { grid-column: 2; min-width: 0; }
.content { max-width: 1120px; margin: 0 auto; padding: 61px 58px 90px; }
.mobile-header, .mobile-nav { display: none; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
.page-heading h1 { max-width: 780px; margin: 2px 0 7px; font-family: var(--serif); font-size: clamp(42px, 5vw, 64px); font-weight: 500; line-height: .98; letter-spacing: -.035em; }
.page-heading h1 br { display: block; }
.page-heading .button { margin-top: 26px; }
.eyebrow { margin: 0 0 13px; color: var(--accent-dark); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 14px; }
.page-subtitle--wide { max-width: 620px; margin-top: 17px; font-size: 16px; line-height: 1.65; }
.back-link { display: inline-block; margin-bottom: 25px; color: var(--muted); font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--accent); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: var(--radius); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button--primary { background: var(--ink); color: #fffdf8; }
.button--primary:hover:not(:disabled) { background: #080908; }
.button--ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.button--ghost:hover { background: var(--card); }
.button--wide { width: 100%; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button .icon { width: 17px; height: 17px; }

.toolbar { display: flex; align-items: center; gap: 18px; padding: 13px 0 18px; border-bottom: 1px solid var(--line-strong); }
.search-field { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; }
.search-field .icon { width: 18px; color: #999488; }
.search-field input { width: 100%; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search-field input::placeholder { color: #999488; }
.filter-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-pill { display: inline-flex; gap: 6px; padding: 7px 11px; border: 1px solid transparent; border-radius: 30px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer; }
.filter-pill span { color: #a39d92; }
.filter-pill:hover { color: var(--ink); }
.filter-pill.is-active { border-color: var(--line); background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(54,45,31,.04); }

.notes-list { border-bottom: 1px solid var(--line-strong); }
.note-card { position: relative; display: grid; grid-template-columns: 3px minmax(0, 1fr); border-top: 1px solid var(--line); background: transparent; transition: background .2s ease; }
.note-card:first-child { border-top: 0; }
.note-card:hover { background: rgba(255, 253, 248, .62); }
.note-rule { margin: 29px 0; border-radius: 3px; background: var(--line-strong); opacity: .85; }
.note-rule.source-web { background: var(--blue); }
.note-rule.source-kobo { background: var(--gold); }
.note-rule.source-ocr { background: var(--purple); }
.note-rule.source-manual { background: var(--green); }
.note-content { min-width: 0; padding: 27px 10px 24px 24px; }
.note-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #8c877c; font-size: 10px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.source-label { color: #67635b; font-weight: 600; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #bcb5a8; }
.note-content h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.2; }
.note-content blockquote { max-width: 850px; margin: 0; color: #30302b; font-family: var(--serif); font-size: clamp(19px, 2.1vw, 23px); line-height: 1.48; white-space: normal; }
.personal-note { max-width: 760px; margin: 17px 0 0; padding: 11px 14px; border-left: 1px solid var(--accent); background: rgba(255,253,248,.65); color: #5d5a53; font-size: 13px; }
.personal-note span { display: block; margin-bottom: 3px; color: var(--accent-dark); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.note-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 34px; margin-top: 16px; }
.source-link { display: inline-flex; align-items: center; gap: 7px; max-width: 70%; color: var(--muted); font-size: 11px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-link:hover { color: var(--accent); }
.source-link .icon { width: 13px; height: 13px; }
.note-actions { display: flex; align-items: center; gap: 5px; opacity: .32; transition: opacity .16s ease; }
.note-card:hover .note-actions, .note-actions:focus-within { opacity: 1; }
.note-actions form { display: flex; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--card); color: var(--ink); }
.icon-button--danger:hover { color: var(--danger); }
.icon-button .icon { width: 16px; height: 16px; }

.empty-state, .empty-search { padding: 90px 30px; text-align: center; }
.empty-symbol { width: 70px; height: 70px; margin: 0 auto 22px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-family: var(--serif); font-size: 58px; line-height: 1.35; }
.empty-state h2, .empty-search h2 { margin: 0; font-family: var(--serif); font-size: 32px; font-weight: 500; }
.empty-state p, .empty-search p { max-width: 470px; margin: 10px auto 24px; color: var(--muted); }
.empty-state > div:last-child { display: flex; justify-content: center; gap: 8px; }

.form-panel { border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.editor-form, .form-stack { display: flex; flex-direction: column; gap: 21px; padding: 33px; }
.editor-form label, .form-stack label { display: flex; flex-direction: column; gap: 7px; color: #5f5b53; font-size: 12px; font-weight: 600; }
.editor-form input, .editor-form textarea, .editor-form select, .form-stack input, .form-stack textarea, .form-stack select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 2px; outline: 0; background: #fffefa; color: var(--ink); font-size: 14px; font-weight: 400; line-height: 1.5; transition: border .15s ease, box-shadow .15s ease;
}
.editor-form textarea, .form-stack textarea { resize: vertical; min-height: 90px; font-family: var(--serif); font-size: 18px; }
.editor-form input:focus, .editor-form textarea:focus, .editor-form select:focus, .form-stack input:focus, .form-stack textarea:focus, .form-stack select:focus { border-color: #8d8679; box-shadow: 0 0 0 3px rgba(77,72,63,.08); }
.editor-form small, .form-stack small { color: #969085; font-weight: 400; }
.field-emphasis textarea { min-height: 190px; padding: 17px; font-size: 22px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; }
.editor-form fieldset { display: flex; flex-direction: column; gap: 20px; padding: 0 0 28px; border: 0; border-bottom: 1px solid var(--line); }
.editor-form fieldset:last-of-type { border-bottom: 0; }
.editor-form legend { margin-bottom: 19px; font-family: var(--serif); font-size: 25px; }
.settings-panel { max-width: 850px; }
.check-label { flex-direction: row !important; align-items: center; font-weight: 400 !important; }
.check-label input { width: auto; }
.key-status { display: flex; align-items: center; gap: 12px; }
.key-status small { color: var(--muted); }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap: 26px; align-items: start; }
.dropzone, .image-dropzone { position: relative; cursor: pointer; }
.dropzone { align-items: center; justify-content: center; min-height: 280px; padding: 35px !important; border: 1px dashed var(--line-strong) !important; background: var(--paper-soft); text-align: center; }
.dropzone:hover { border-color: var(--accent) !important; }
.dropzone .icon { width: 30px; height: 30px; margin-bottom: 8px; color: var(--accent); }
.dropzone strong { color: var(--ink); font-family: var(--serif); font-size: 23px; font-weight: 500; }
.dropzone > span { color: var(--muted); font-weight: 400; }
.dropzone input, .image-dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .file-name { margin-top: 17px; padding: 6px 10px; border-radius: 2px; background: #eae4d9; color: #5a554c; font-size: 11px; }
.dropzone.is-dragging, .image-dropzone.is-dragging .scan-corners { border-color: var(--accent) !important; background: #fff9f2; }
.steps-panel { padding: 34px; border-top: 2px solid var(--ink); background: #e9e3d8; }
.large-steps { display: flex; flex-direction: column; gap: 26px; padding: 4px 0 0; list-style: none; }
.large-steps li { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 13px; }
.large-steps li > span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font-family: var(--serif); }
.large-steps strong { display: block; margin-bottom: 3px; font-family: var(--serif); font-size: 18px; }
.large-steps p { margin: 0; color: var(--muted); font-size: 13px; }
kbd, code { padding: 2px 5px; border-radius: 2px; background: rgba(57,53,47,.08); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.tool-card { position: relative; display: flex; flex-direction: column; min-height: 550px; padding: 34px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.tool-card--accent { background: #ebe5d9; }
.tool-number { position: absolute; top: 16px; right: 24px; color: rgba(43,42,37,.07); font-family: var(--serif); font-size: 100px; line-height: 1; }
.device-label { position: relative; display: inline-block; margin-bottom: 17px; color: var(--accent-dark); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.tool-card h2 { position: relative; max-width: 330px; margin: 0 0 13px; font-family: var(--serif); font-size: 31px; font-weight: 500; line-height: 1.05; }
.tool-card p { position: relative; margin: 0; color: var(--muted); font-size: 13px; }
.bookmarklet-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; margin: 33px 0 27px; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); color: var(--card); font-family: var(--serif); font-size: 18px; text-decoration: none; cursor: grab; }
button.bookmarklet-button { width: 100%; cursor: pointer; }
.bookmarklet-button:hover { background: #11120f; }
.tool-card ol { display: flex; flex-direction: column; gap: 9px; margin: 0; padding-left: 20px; color: #5f5b53; font-size: 12px; }
.tool-card ol li::marker { color: var(--accent); }
.code-details { margin-top: auto; padding-top: 20px; }
.code-details summary, details summary { color: var(--muted); font-size: 11px; cursor: pointer; }
.copy-code { margin-top: 10px; }
.copy-code textarea { width: 100%; padding: 8px; border: 1px solid var(--line); background: var(--paper-soft); color: #666158; font: 10px/1.4 ui-monospace, monospace; resize: none; }
.copy-code button { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 11px; cursor: pointer; }
.copy-code .icon { width: 14px; }
.tip { margin-top: auto !important; padding: 14px; border-left: 2px solid var(--accent); background: rgba(255,253,248,.55); font-size: 11px !important; }
.tip strong { display: block; color: var(--ink); }
.fallback-copy { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; margin-top: 13px; padding: 7px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 11px; font-weight: 600; cursor: pointer; }
.fallback-copy .icon { width: 15px; height: 15px; }
.security-strip { display: flex; gap: 17px; margin-top: 22px; padding: 24px 27px; border: 1px solid var(--line); }
.security-strip > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(80,117,102,.12); color: var(--green); }
.security-strip strong { display: block; margin-bottom: 3px; font-family: var(--serif); font-size: 18px; }
.security-strip p { margin: 0; color: var(--muted); font-size: 12px; }

.status-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 30px; background: var(--card); color: var(--muted); font-size: 10px; white-space: nowrap; }
.status-chip > span { width: 7px; height: 7px; border-radius: 50%; }
.status-chip.is-ready > span { background: var(--green); box-shadow: 0 0 0 3px rgba(80,117,102,.12); }
.status-chip.is-warning > span { background: var(--gold); box-shadow: 0 0 0 3px rgba(171,122,40,.12); }
.notice { display: flex; align-items: center; gap: 16px; margin: -10px 0 22px; padding: 17px 20px; border: 1px solid #d9c8a5; background: #f5ebd6; }
.notice > .icon { color: var(--gold); }
.notice strong { font-family: var(--serif); font-size: 17px; }
.notice p { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.notice a { margin-left: auto; color: var(--accent-dark); font-size: 11px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.split-layout--ocr { grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr); }
.image-dropzone { gap: 0 !important; }
.scan-corners { position: relative; display: grid; place-items: center; min-height: 330px; border: 1px dashed var(--line-strong); background: #eeebe3; overflow: hidden; }
.scan-corners i { position: absolute; width: 25px; height: 25px; border-color: var(--accent); border-style: solid; }
.scan-corners i:nth-child(1) { top: 14px; left: 14px; border-width: 2px 0 0 2px; }
.scan-corners i:nth-child(2) { top: 14px; right: 14px; border-width: 2px 2px 0 0; }
.scan-corners i:nth-child(3) { bottom: 14px; left: 14px; border-width: 0 0 2px 2px; }
.scan-corners i:nth-child(4) { right: 14px; bottom: 14px; border-width: 0 2px 2px 0; }
.preview-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-weight: 400; }
.preview-placeholder .icon { width: 34px; height: 34px; margin-bottom: 7px; color: var(--accent); }
.preview-placeholder strong { color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 500; }
.scan-corners img { width: 100%; max-height: 420px; object-fit: contain; }
.privacy-caption { margin: -7px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.ocr-aside { padding: 36px; border-top: 2px solid var(--ink); background: #272824; color: #f8f5ee; }
.quote-mark { color: #e68363; font-family: var(--serif); font-size: 58px; line-height: 1; }
.ocr-aside h2 { margin: 10px 0 24px; font-family: var(--serif); font-size: 29px; font-weight: 500; }
.ocr-aside ul { display: flex; flex-direction: column; gap: 12px; padding: 0; list-style: none; color: #c7c4ba; font-size: 13px; }
.ocr-aside li { position: relative; padding-left: 18px; }
.ocr-aside li::before { content: '—'; position: absolute; left: 0; color: #e68363; }
.model-row { display: flex; align-items: center; justify-content: space-between; margin-top: 34px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.15); color: #a9a79f; font-size: 10px; }
.model-row code { background: rgba(255,255,255,.08); color: #dedbd2; }
.data-note { display: flex; gap: 18px; max-width: 850px; margin-top: 23px; padding: 23px; border: 1px dashed var(--line-strong); }
.data-note > div:first-child { color: var(--green); }
.data-note strong { font-family: var(--serif); font-size: 18px; }
.data-note p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.toast { position: fixed; z-index: 100; top: 22px; right: 25px; display: flex; align-items: center; gap: 10px; max-width: min(430px, calc(100vw - 30px)); padding: 13px 13px 13px 16px; border: 1px solid var(--line); background: #fffdf8; box-shadow: 0 14px 40px rgba(39,35,28,.16); font-size: 12px; animation: toast-in .25s ease both; }
.toast .icon { width: 17px; color: var(--green); }
.toast--error .icon { color: var(--danger); }
.toast button { margin-left: 5px; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.auth-body { background: #e9e4da; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(520px, .75fr); }
.auth-intro { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 65px clamp(45px, 8vw, 130px); overflow: hidden; }
.auth-intro::after { content: '“'; position: absolute; right: 3vw; bottom: -20vh; color: rgba(57,55,49,.055); font-family: var(--serif); font-size: 55vw; line-height: 1; pointer-events: none; }
.auth-intro .brand { position: absolute; top: 48px; left: clamp(45px, 8vw, 130px); }
.auth-intro .eyebrow { position: relative; z-index: 1; }
.auth-intro h1 { position: relative; z-index: 1; margin: 0; font-family: var(--serif); font-size: clamp(60px, 7vw, 104px); font-weight: 500; line-height: .91; letter-spacing: -.045em; }
.auth-intro h1 em { color: var(--accent); font-weight: 400; }
.lede { position: relative; z-index: 1; max-width: 520px; margin: 28px 0 35px; color: var(--muted); font-size: 16px; }
.auth-features { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 22px; color: #656159; font-size: 11px; }
.auth-features span { display: flex; align-items: center; gap: 7px; }
.auth-features .icon { width: 16px; color: var(--accent); }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: 50px clamp(36px, 5vw, 72px); background: var(--card); box-shadow: -20px 0 60px rgba(54,45,31,.06); }
.auth-card > div:first-child { padding: 0 33px; }
.auth-card h2 { margin: 0; font-family: var(--serif); font-size: 35px; font-weight: 500; }
.auth-card > div p:last-child { color: var(--muted); font-size: 12px; }
.step-label { color: var(--accent-dark) !important; font-size: 10px !important; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.auth-card details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; }
.auth-card summary span { float: right; color: var(--muted); }
.details-fields { display: flex; flex-direction: column; gap: 17px; padding-top: 18px; }
.login-wrap, .capture-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--paper); }
.login-card, .capture-card { width: min(100%, 500px); padding: 38px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.login-card > div { margin: 54px 0 3px; }
.login-card h1 { margin: 0; font-family: var(--serif); font-size: 46px; font-weight: 500; }
.login-card p { margin: 4px 0; color: var(--muted); }
.login-card .form-stack, .capture-card .form-stack { padding: 26px 0 0; }

.capture-card { width: min(100%, 580px); }
.capture-heading { margin: 42px 0 0; }
.capture-heading h1 { margin: 0; font-family: var(--serif); font-size: 40px; font-weight: 500; }
.capture-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.capture-login { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 17px; border: 1px solid #ddcfb5; background: #f5ecdb; }
.capture-login p { grid-column: 1 / -1; margin: 0; color: #6c604a; font-size: 11px; }
.capture-success { display: flex; flex-direction: column; align-items: center; padding: 80px 10px 45px; text-align: center; }
.capture-success > .icon { width: 54px; height: 54px; padding: 13px; border-radius: 50%; background: rgba(80,117,102,.13); color: var(--green); }
.capture-success h1 { margin: 21px 0 0; font-family: var(--serif); font-size: 45px; font-weight: 500; }
.capture-success p { margin: 3px 0 25px; color: var(--muted); }
.capture-success a { margin-top: 14px; color: var(--muted); font-size: 11px; }

@media (max-width: 940px) {
  .app-frame { display: block; }
  .sidebar { display: none; }
  .main { grid-column: 1; }
  .mobile-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 70px; padding: 0 23px; border-bottom: 1px solid var(--line); background: rgba(243,239,230,.94); backdrop-filter: blur(14px); }
  .mobile-header .brand { font-size: 22px; }
  .mobile-header .brand-mark { width: 31px; height: 31px; }
  .menu-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
  .mobile-nav { position: fixed; z-index: 19; inset: 70px 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 12px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: 0 12px 30px rgba(54,45,31,.1); }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav .nav-link { justify-content: center; }
  .content { padding: 45px 30px 75px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-intro { min-height: 580px; }
  .auth-card { padding-block: 70px; }
}

@media (max-width: 700px) {
  .content { padding: 35px 18px 65px; }
  .page-heading { margin-bottom: 28px; }
  .page-heading h1 { font-size: 44px; }
  .page-heading--archive { align-items: flex-end; }
  .page-heading--archive .button { width: 44px; height: 44px; padding: 0; font-size: 0; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 6px; }
  .filter-row { width: calc(100vw - 36px); }
  .note-content { padding-left: 17px; }
  .note-meta { flex-wrap: wrap; }
  .note-content blockquote { font-size: 20px; }
  .note-actions { opacity: .75; }
  .form-grid, .split-layout, .split-layout--ocr, .tool-grid { grid-template-columns: 1fr; }
  .editor-form, .form-stack { padding: 24px 20px; }
  .form-panel .form-actions { flex-direction: column-reverse; }
  .form-panel .form-actions .button { width: 100%; }
  .tool-card { min-height: auto; padding: 28px 22px; }
  .tool-card .tip, .code-details { margin-top: 30px !important; }
  .status-chip { margin-top: 5px; }
  .notice { align-items: flex-start; flex-wrap: wrap; }
  .notice a { margin-left: 36px; }
  .auth-intro { min-height: 530px; padding: 110px 28px 55px; }
  .auth-intro .brand { top: 35px; left: 28px; }
  .auth-intro h1 { font-size: 64px; }
  .auth-card { padding: 55px 8px; }
  .auth-features { gap: 11px; flex-direction: column; }
  .login-wrap, .capture-wrap { padding: 0; align-items: stretch; }
  .login-card, .capture-card { min-height: 100vh; padding: 30px 22px; border: 0; }
  .capture-login { grid-template-columns: 1fr; }
  .mobile-nav { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
