/* Filetaki — one stylesheet, mobile first. */

@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-greek-wght-normal.woff2) format('woff2');
  unicode-range: U+0370-03FF, U+1F00-1FFF; }

:root {
  --brand: #0b5d6b;          /* deep Aegean teal */
  --brand-dark: #084651;
  --brand-soft: #e3f0f1;
  --accent: #b9532b;         /* terracotta */
  --accent-soft: #fbeee6;
  --sand: #f3ebdf;
  --bg: #faf8f4;
  --card: #ffffff;
  --ink: #15242a;
  --ink-2: #44565d;
  --line: #e2ddd3;
  --ok: #1d6b45;
  --ok-soft: #e4f3ea;
  --danger: #a3321f;
  --danger-soft: #fbe9e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(21, 36, 42, .05), 0 6px 20px rgba(21, 36, 42, .06);
  --font: Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); overflow-wrap: break-word; }
img, canvas, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
small { font-size: .875rem; }
code { background: var(--sand); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.icon { flex: none; vertical-align: -0.18em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted, .hint { color: var(--ink-2); }
.hint { font-size: .875rem; margin: .4em 0 0; }
.accent { color: var(--brand); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.demo-bar { background: var(--accent); color: #fff; text-align: center; font-size: .875rem; font-weight: 600; padding: 6px 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1.5px solid transparent;
  border-radius: 11px; font: 650 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: var(--card); color: var(--brand-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-quiet { background: transparent; color: var(--ink-2); padding-inline: 10px; }
.btn-quiet:hover { color: var(--ink); background: var(--sand); }
.btn-danger { background: var(--card); color: var(--danger); border-color: #e3b9b0; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-lg { min-height: 52px; padding: 13px 24px; font-size: 1.0625rem; }
.btn-sm { min-height: 38px; padding: 7px 12px; font-size: .9375rem; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: flex-start; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--sand); color: var(--ink); }

/* ---------- header ---------- */
.site-header { background: rgba(250, 248, 244, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo-light { color: #fff; }
.main-nav { display: none; gap: 4px; margin-left: 20px; }
.main-nav a { padding: 10px 12px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.main-nav a:hover { color: var(--ink); background: var(--sand); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.menu { position: relative; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ink); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--sand); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; z-index: 40; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: none; border-radius: 8px; font: 600 1rem var(--font); color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--sand); }
.menu-panel form { margin: 0; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .9375rem; }
.user-label { display: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 800px) {
  .main-nav { display: flex; }
  .nav-menu { display: none; }
  .user-label { display: inline; }
}

/* ---------- sections ---------- */
.hero { padding: 40px 0 28px; text-align: center; }
.hero .lead, .page-head .lead, .tool-hero .lead { font-size: 1.125rem; color: var(--ink-2); max-width: 640px; }
.hero .lead { margin-inline: auto; }
.page-head { padding: 36px 0 8px; }
.page-head .center .lead, .center .section-lead { margin-inline: auto; }
.section { padding: 44px 0; }
.section-tight { padding: 20px 0 36px; }
.section-alt { background: var(--sand); }
.section-lead { color: var(--ink-2); max-width: 640px; margin-bottom: 1.4em; }
.big-icon.ok { color: var(--ok); }

.tool-grid { display: grid; grid-template-columns: 1fr; gap: 12px; text-align: left; margin-top: 28px; }
.tool-tile { display: flex; align-items: flex-start; gap: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); transform: translateY(-1px); }
.tool-tile strong { display: block; font-weight: 700; }
.tool-tile small { display: block; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.tile-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
@media (min-width: 620px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } .tool-grid-4 { grid-template-columns: repeat(4, 1fr); } }
.section-tight .tool-grid, .tool-grid-3, .tool-grid-4 { margin-top: 12px; }

.badges { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; text-align: left; }
.badges li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.badges .icon { color: var(--accent); margin-top: 2px; }
.badges strong { color: var(--ink); margin-right: 4px; }
@media (min-width: 800px) { .badges { grid-template-columns: repeat(3, 1fr); justify-items: center; } }

.privacy-banner { background: var(--brand); color: #fff; padding: 22px 0; }
.privacy-banner .wrap { display: flex; gap: 16px; align-items: flex-start; }
.privacy-banner p { margin: 0; max-width: 820px; }
.privacy-banner .icon { margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }

.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps p { margin: 0; color: var(--ink-2); }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 10px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card, .app-main > * + * { margin-top: 16px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h1, .card-head h2 { margin: 0; }
.card-head h1 { font-size: 1.5rem; }
.benefits { display: grid; gap: 14px; margin-top: 20px; }
.benefits .card + .card { margin-top: 0; }
.benefit p { color: var(--ink-2); margin-bottom: .6em; }
.benefit p:last-child { margin-bottom: 0; }
.benefit-icon, .feature-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; }
@media (min-width: 700px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .benefits { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); } }
.coming { margin-top: 22px; color: var(--ink-2); font-size: .9375rem; }

.feature-rows { display: grid; gap: 22px; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon { flex: none; background: var(--card); margin: 0; }
.feature p { margin: 0; color: var(--ink-2); }
@media (min-width: 800px) { .feature-rows { grid-template-columns: repeat(2, 1fr); gap: 30px 40px; } }

.mini-benefits { display: grid; gap: 22px; margin-top: 20px; }
.mini-benefits .icon { color: var(--accent); }
.mini-benefits h3 { margin: 8px 0 4px; }
.mini-benefits p { margin: 0; color: var(--ink-2); }
@media (min-width: 620px) { .mini-benefits { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .mini-benefits { grid-template-columns: repeat(3, 1fr); } }

.format-dir { display: grid; gap: 14px; }
.format-dir .card + .card { margin-top: 0; }
.format-dir h3 small, .format-cards h3 small { display: block; font-weight: 500; color: var(--ink-2); margin-top: 2px; }
.format-dir ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.format-dir a { display: block; padding: 6px 0; }
@media (min-width: 620px) { .format-dir { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .format-dir { grid-template-columns: repeat(3, 1fr); } }
.format-cards { display: grid; gap: 14px; margin: 1.2em 0; }
.format-cards .card + .card { margin-top: 0; }
.format-cards p { margin: 0; }
@media (min-width: 700px) { .format-cards { grid-template-columns: 1fr 1fr; } }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; }
.faq summary { cursor: pointer; padding: 15px 44px 15px 18px; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; translate: 0 -50%; font-size: 1.4rem; font-weight: 500; color: var(--brand); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--ink-2); }

.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.prose > p, .prose > ul { color: #2b3d44; }
.plain-table { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.plain-table th, .plain-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.plain-table th { font-weight: 700; white-space: nowrap; }
.legal .plain-table th { white-space: normal; }
.legal .plain-table { font-size: .9375rem; }

.notice { background: var(--accent-soft); border: 1px solid #efcdb9; color: #6f2f14; border-radius: 12px; padding: 12px 16px; }
.notice-ok { background: var(--ok-soft); border-color: #b8dcc6; color: #14502f; }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-weight: 700; font-size: .875rem; background: var(--sand); color: var(--ink); }
.pill-trialing, .pill-active { background: var(--ok-soft); color: #14502f; }
.pill-past_due { background: var(--danger-soft); color: var(--danger); }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label, fieldset legend { display: block; font-weight: 700; font-size: .9375rem; margin-bottom: 6px; }
.field output { font-weight: 800; color: var(--brand); }
input[type=text], input[type=email], input[type=number], input[type=search], select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid #c9c2b5; border-radius: 10px; background: var(--card); font: 500 1rem var(--font); color: var(--ink); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--brand-soft); border-color: var(--brand); outline-offset: 0; }
input[disabled] { background: var(--sand); color: var(--ink-2); }
input[type=range] { width: 100%; accent-color: var(--brand); min-height: 32px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.check, .keep { display: flex; align-items: center; gap: 10px; font-size: .9375rem; cursor: pointer; }
.form-card { max-width: 520px; display: grid; gap: 10px; }
.form-card form { display: grid; }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 10px 14px; font-weight: 600; margin: 10px 0 0; }
.form-ok { color: #14502f; background: var(--ok-soft); border-radius: 10px; padding: 10px 14px; font-weight: 600; margin: 10px 0 0; }
.inline-form { display: grid; gap: 4px 12px; align-items: end; }
.inline-form .btn { margin-bottom: 14px; }
@media (min-width: 700px) { .inline-form { grid-template-columns: 1fr 1fr auto; } }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented legend { width: 100%; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.segmented span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid #c9c2b5; border-radius: 10px; font-weight: 650; background: var(--card); }
.segmented input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
details.confirm > summary { list-style: none; }
details.confirm > summary::-webkit-details-marker { display: none; }
.confirm-box { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); max-width: 460px; }

/* ---------- tool area ---------- */
.tool-hero { padding: 26px 0 36px; }
.crumbs { font-size: .875rem; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.tool-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; margin-top: 22px; min-height: 250px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 250px; padding: 26px 16px; border: 2px dashed #b9cfd2; border-radius: 13px; background: #f4f9f9; transition: background .15s, border-color .15s; }
.drag-hover .dropzone, .tool-card.drag-hover { border-color: var(--brand); }
.drag-hover .dropzone { background: var(--brand-soft); }
.dz-icon { color: var(--brand); }
.dz-title { font-size: 1.2rem; font-weight: 750; margin: 4px 0 0; }
.dz-or { color: var(--ink-2); margin: 0 0 6px; font-size: .9375rem; }
.dz-hint { color: var(--ink-2); font-size: .875rem; margin: 10px 0 0; }
.is-reading .dropzone, .is-reading #tool-work { opacity: .55; pointer-events: none; }
.privacy-line { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--ok); font-weight: 650; margin: 16px 0 4px; }
.price-line { text-align: center; color: var(--ink-2); font-size: .9375rem; margin: 0; }
.price-note { opacity: .85; }

#tool-work { padding: 6px; }
.tool-options { display: grid; gap: 0 16px; margin-top: 16px; }
@media (min-width: 640px) { .tool-options { grid-template-columns: repeat(2, 1fr); } .tool-options > fieldset, .tool-options > div:has(> .check) { grid-column: 1 / -1; } }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.tool-actions-left { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-actions > .btn-primary { flex: 1 1 200px; }
@media (min-width: 640px) { .tool-actions > .btn-primary { flex: 0 0 auto; min-width: 220px; } }

.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: grab; }
.file-row.dragging, .page-card.dragging { opacity: .45; }
.file-row.drag-over, .page-card.drag-over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.file-thumb { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-name { flex: 1; min-width: 0; }
.file-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.file-name small { color: var(--ink-2); }
.file-btns { display: flex; flex: none; }

.tool-busy { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; gap: 12px; background: rgba(255, 255, 255, .9); border-radius: 18px; text-align: center; padding: 24px; }
.progress { width: min(320px, 70vw); height: 10px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 3%; background: var(--brand); border-radius: 999px; transition: width .2s; }
.progress-label { margin: 0; font-weight: 650; color: var(--ink-2); }

.result { display: grid; gap: 18px; padding: 8px; }
.result-preview { position: relative; display: grid; place-items: center; min-height: 170px; max-height: 320px; background: repeating-conic-gradient(#f1eee8 0% 25%, #fff 0% 50%) 50% / 20px 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--brand); }
.result-preview img, .result-preview canvas { max-width: 100%; max-height: 318px; object-fit: contain; display: block; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.result-preview > svg { width: 56px; height: 56px; }
.result-count { position: absolute; right: 10px; bottom: 10px; background: var(--ink); color: #fff; font-weight: 700; font-size: .875rem; padding: 3px 10px; border-radius: 999px; }
.result-info h2 { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; color: var(--ok); }
.result-name { font-weight: 650; margin-bottom: .5em; }
.result-name span { color: var(--ink-2); font-weight: 500; }
.result-summary { list-style: none; padding: 0; margin: 0 0 1em; color: var(--ink-2); font-size: .9375rem; }
.result-summary li:first-child { color: var(--ink); font-weight: 650; }
.keep { margin-top: 12px; color: var(--ink-2); }
.result-more { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.result-more select { flex: 1 1 220px; width: auto; }
@media (min-width: 700px) { .result { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; } }

.page-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 12px; }
.page-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.page-counter { margin: 0; color: var(--ink-2); font-weight: 600; }
.page-bar-btns { margin-left: auto; display: flex; gap: 4px; }
.page-grid { list-style: none; margin: 0; padding: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; max-height: 62vh; overflow-y: auto; }
.page-card { position: relative; display: grid; gap: 6px; justify-items: center; padding: 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); }
.page-frame { display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; }
.page-thumb { display: grid; place-items: center; max-width: 100%; max-height: 100%; min-width: 60%; min-height: 70%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); transition: transform .2s; }
.page-thumb canvas { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.page-frame .page-thumb canvas { max-height: 116px; }
.page-num { font-size: .8125rem; font-weight: 650; color: var(--ink-2); }
.page-btns { display: flex; justify-content: center; }
.page-btns .icon-btn { width: 32px; height: 36px; }
.mode-organize .page-card { cursor: grab; }
.page-toggle { position: absolute; inset: 0; border: 0; background: transparent; border-radius: 10px; cursor: pointer; }
.page-flag { display: none; position: absolute; top: 34%; left: 6px; right: 6px; text-align: center; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 4px; border-radius: 6px; pointer-events: none; }
.mode-extract .page-card.selected { border-color: var(--brand); background: var(--brand-soft); }
.mode-delete .page-card.selected { border-color: var(--danger); background: var(--danger-soft); }
.mode-delete .page-card.selected .page-frame { opacity: .35; }
.mode-delete .page-card.selected .page-flag { display: block; }

/* ---------- paywall and offer ---------- */
.paywall { width: min(440px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); border: 0; border-radius: 18px; padding: 22px 20px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); color: var(--ink); }
.paywall::backdrop { background: rgba(15, 30, 35, .6); }
.paywall h2 { font-size: 1.25rem; margin: 0 36px 14px 0; }
.paywall-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--ink-2); }
.paywall-close:hover { background: var(--sand); }
.offer { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; background: var(--bg); text-align: left; }
.offer p { margin: 0; }
.offer-label { font-size: .875rem; font-weight: 650; color: var(--ink-2); }
.offer-price { font-size: 2.5rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.offer-after { font-size: .8125rem; color: var(--ink-2); margin-top: 12px !important; }
/* The renewal line: dark text directly under the trial price. Owner chose 14px (the brief asked for 16px);
   do not go smaller, it must stay as readable as the text around it. */
.offer-sub { font-size: .875rem; font-weight: 600; color: var(--ink); }
.offer-renew { font-size: .875rem; color: #2f4249; margin-top: 2px !important; }
.offer-features { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: .875rem; }
.offer-features li { display: flex; gap: 6px; align-items: flex-start; }
.offer-features .icon { color: var(--ok); margin-top: 3px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; line-height: 1.45; margin: 4px 0 14px; cursor: pointer; }
.consent input { margin-top: 1px; }
/* Small phones: keep the Pay button close, without shrinking the price lines below the legal minimum. */
@media (max-width: 480px), (max-height: 760px) {
  .paywall { padding: 16px 14px 14px; }
  .paywall h2 { font-size: 1.125rem; margin-bottom: 10px; }
  .paywall .offer { padding: 12px 14px; margin-bottom: 12px; }
  .paywall .offer-price { font-size: 2rem; }
  .paywall .offer-after { margin-top: 6px !important; }
  .paywall .offer-sub { line-height: 1.3; }
  .paywall .offer-features { margin-top: 10px; gap: 3px 8px; font-size: .8125rem; line-height: 1.35; }
  .paywall .field { margin-bottom: 10px; }
  .paywall #pw-email-hint { display: none; }
  .paywall .consent { font-size: .8125rem; margin-bottom: 10px; }
}
.pricing-card { max-width: 440px; margin: 0 auto 28px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; }
.center .pricing-card .hint { margin-top: 12px; }

/* ---------- workspace ---------- */
body.app main { padding: 20px 0 48px; }
.app-shell { display: grid; gap: 20px; }
.app-main { min-width: 0; }
.app-main > h1 { font-size: 1.6rem; }
.sidebar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; align-self: start; }
.sidebar h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 14px 8px 6px; }
.sidebar h2:first-child { margin-top: 2px; }
.sidebar ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.sidebar a:hover { background: var(--sand); }
.sidebar a[aria-current] { background: var(--brand-soft); color: var(--brand-dark); }
@media (min-width: 900px) { .app-shell { grid-template-columns: 250px 1fr; } .sidebar ul { grid-template-columns: 1fr; } .sidebar { position: sticky; top: 80px; } }
.greeting { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: linear-gradient(120deg, #fff 40%, var(--brand-soft)); }
.greeting h1 { font-size: clamp(1.3rem, 3.5vw, 1.7rem); margin: 0; }
.used-counter { display: grid; text-align: center; padding: 8px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.used-n { font-size: 1.5rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.used-label { font-size: .8125rem; color: var(--ink-2); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { padding: 10px 14px; min-height: 44px; border: 0; background: none; font: 650 1rem var(--font); color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs button[aria-selected=true] { color: var(--brand-dark); border-bottom-color: var(--brand); }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.history-name { min-width: 0; flex: 1 1 220px; }
.history-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-name small { color: var(--ink-2); }
.history-btns { display: flex; align-items: center; gap: 6px; }
.contact-card { text-align: center; }
.contact-card .icon { color: var(--brand); }
.contact-email { font-size: 1.35rem; font-weight: 750; margin: 6px 0 10px; }

/* ---------- admin ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-grid .card + .card { margin-top: 0; }
.stat { display: grid; }
.stat-n { font-size: 1.7rem; font-weight: 800; color: var(--brand); }
.stat-label { color: var(--ink-2); font-size: .875rem; font-weight: 600; }
.stat-warn { border-color: var(--danger); background: var(--danger-soft); }
.stat-warn .stat-n { color: var(--danger); }
@media (min-width: 800px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.customer { border-top: 1px solid var(--line); padding: 16px 0 4px; }
.mail-log { border-top: 1px solid var(--line); padding: 8px 0; }
.mail-log summary { cursor: pointer; font-weight: 600; }
.mail-log pre { white-space: pre-wrap; font-size: .8125rem; background: var(--bg); padding: 12px; border-radius: 8px; overflow-wrap: anywhere; }

/* ---------- footer ---------- */
.site-footer { background: #0e2a31; color: #c9d9dc; padding: 40px 0 24px; margin-top: 0; font-size: .9375rem; }
.site-footer a { color: #e6f1f2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: repeat(2, 1fr); }
.footer-brand { grid-column: 1 / -1; }
.site-footer h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; color: #8fb0b6; margin: 0 0 10px; }
.site-footer ul + h2 { margin-top: 20px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-block; padding: 5px 0; }
.footer-support strong { color: #fff; }
.footer-bottom { border-top: 1px solid #24454d; margin-top: 28px; padding-top: 18px; color: #9fbcc1; font-size: .875rem; }
.footer-bottom p { margin: 0 0 6px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.5fr repeat(4, 1fr); } .footer-brand { grid-column: auto; } }

.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 720px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .22); padding: 16px; display: grid; gap: 12px; }
.cookie-banner p { margin: 0; font-size: .9375rem; }
/* both choices look the same, so neither is pushed */
.cookie-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 700px) { .cookie-banner { grid-template-columns: 1fr auto; align-items: center; } }
.link-btn { background: none; border: 0; padding: 5px 0; font: inherit; color: #e6f1f2; cursor: pointer; }
.link-btn:hover { color: #fff; text-decoration: underline; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--ink-2); font-size: .875rem; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.toast { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 60; width: max-content; max-width: calc(100vw - 24px); background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.toast[data-kind=error] { background: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
