/* FileConvertFast — design system
   Monochrome black/white, gold accent, Plus Jakarta Sans, pill buttons,
   uppercase letter-spaced labels. */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("/vendor/fonts/plus-jakarta-sans-300.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/vendor/fonts/plus-jakarta-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/vendor/fonts/plus-jakarta-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/vendor/fonts/plus-jakarta-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/vendor/fonts/plus-jakarta-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("/vendor/fonts/plus-jakarta-sans-800.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #eef1f6;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #e2e2e2;
  --border-soft: #f0f0f0;
  --accent: #111111;
  --gold: #b6952b;
  --gold-text: #8a6f1c; /* AA contrast on white for text */
  --gold-soft: #f6f1e2;
  --ok: #1f7a3d;
  --ok-soft: #e7f5ec;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(17, 17, 17, .08);

  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-primary: var(--accent);
  --bs-primary-rgb: 17, 17, 17;
  --bs-link-color: var(--text);
  --bs-link-hover-color: var(--gold-text);
  --bs-border-color: var(--border);
  --bs-border-radius: var(--radius-sm);
}

html, body { height: 100%; }
body { display: flex; flex-direction: column; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; }
a { text-decoration: none; }
a:hover { text-decoration: none; }

.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 2000; }
.skip-link:focus { left: 0; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, .h1, .h2, .h3 { font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.display-title { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; text-transform: uppercase; }
.display-title .light { font-weight: 300; text-transform: none; display: block; letter-spacing: -.02em; }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.eyebrow.gold { color: var(--gold-text); }
.lead { color: var(--muted); font-weight: 400; font-size: 1.05rem; }
.text-muted, .text-secondary { color: var(--muted) !important; }

/* ── Buttons ────────────────────────────────────────────── */
.btn { --bs-btn-border-radius: 999px; --bs-btn-font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; padding: 11px 24px; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-color: #fff; --bs-btn-hover-bg: #000; --bs-btn-hover-border-color: #000; --bs-btn-active-bg: #000; --bs-btn-active-border-color: #000; --bs-btn-disabled-bg: #c9c9c9; --bs-btn-disabled-border-color: #c9c9c9; --bs-btn-disabled-color: #fff; }
.btn-outline-secondary, .btn-outline-primary { --bs-btn-color: var(--text); --bs-btn-border-color: var(--text); --bs-btn-hover-bg: var(--text); --bs-btn-hover-border-color: var(--text); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--text); --bs-btn-active-border-color: var(--text); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--border); --bs-btn-color: var(--text); --bs-btn-hover-bg: var(--surface-3); --bs-btn-hover-border-color: var(--text); }
.btn-sm { font-size: 10px; padding: 6px 16px; letter-spacing: .16em; }
.btn-lg { font-size: 13px; padding: 15px 28px; }
.btn-xl { font-size: 14px; padding: 18px 40px; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #9d7f22; border-color: #9d7f22; color: #fff; }
.btn:focus { box-shadow: none; }
.btn:focus-visible { box-shadow: 0 0 0 .25rem rgba(182, 149, 43, .35); }
#result-title:focus { outline: none; }

/* ── Forms ──────────────────────────────────────────────── */
.form-control, .form-select { border-color: var(--border); border-radius: var(--radius-sm); padding: .6rem .85rem; font-size: .92rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--text); box-shadow: 0 0 0 .2rem rgba(17, 17, 17, .08); }
.form-check-input:checked { background-color: var(--text); border-color: var(--text); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.form-range::-webkit-slider-thumb { background: var(--text); }
.form-range::-moz-range-thumb { background: var(--text); }
.form-range::-webkit-slider-runnable-track { background: var(--surface-3); }
.form-range::-moz-range-track { background: var(--surface-3); }
.progress { background: var(--surface-3); border-radius: 999px; }
.progress-bar { background-color: var(--text); }
.alert { border-radius: var(--radius-sm); font-size: .9rem; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.alert-warning { background: var(--gold-soft); color: #6d5813; border-color: transparent; }

/* ── Header (iLovePDF-style layout, FileConvertFast styling) ── */
.site-header { border-bottom: 1px solid var(--border-soft); background: #fff; position: sticky; top: 0; z-index: 1030; }
.site-header .navbar { min-height: 64px; padding: 0; }
.brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); text-transform: uppercase; line-height: 1; }
.brand-name .gold { color: var(--gold-text); }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--text); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-logo { height: 36px; width: auto; max-width: 200px; object-fit: contain; display: block; }
@media (max-width: 767.98px) { .brand-logo { height: 30px; } }
.navbar-nav .nav-link { color: var(--text); font-weight: 800; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 1.4rem .8rem; position: relative; white-space: nowrap; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link:focus-visible, .navbar-nav .show > .nav-link { color: var(--gold-text); }
.navbar-nav .nav-link.active::after { content: ""; position: absolute; left: .95rem; right: .95rem; bottom: 0; height: 3px; background: var(--text); border-radius: 3px 3px 0 0; }
.navbar-nav .dropdown-toggle::after { border: 0; width: .55em; height: .55em; margin-left: .45em; vertical-align: .05em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.dropdown-menu { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem; min-width: 17rem; margin-top: 0 !important; }
.dropdown-item { border-radius: 8px; font-size: .9rem; font-weight: 600; padding: .55rem .75rem; color: var(--text); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-3); color: var(--text); }
.mega-menu { left: 0 !important; right: 0 !important; width: 100%; border-radius: 0 0 var(--radius) var(--radius); border-top: 0; padding: 1.5rem 2rem 1.75rem; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.5rem 2rem; max-width: 1240px; margin: 0 auto; }
.mega-grid-images { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.mega-grid-convert { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
@media (min-width: 1100px) { .mega-grid:not(.mega-grid-images):not(.mega-grid-convert) { grid-template-columns: repeat(5, 1fr); } .mega-grid-images, .mega-grid-convert { grid-template-columns: repeat(3, 1fr); } }
.mega-col .eyebrow { display: block; margin-bottom: .6rem; padding-left: .5rem; }
.mega-link { display: flex; align-items: flex-start; gap: .65rem; padding: .5rem; border-radius: 8px; color: var(--text); font-weight: 700; font-size: .88rem; line-height: 1.2; }
.mega-link small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; margin-top: 2px; line-height: 1.3; }
.mega-link:hover, .mega-link:focus-visible { background: var(--surface-3); color: var(--text); }
.mega-link .ico-sm { flex: 0 0 auto; }
.nav-right .btn { white-space: nowrap; }
.nav-grid { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--text); background: transparent; border: 0; padding: 0; appearance: none; box-shadow: none; }
.nav-grid:focus { outline: none; box-shadow: none; }
.nav-grid:hover, .nav-grid:focus-visible, .nav-grid[aria-expanded="true"] { background: transparent; color: var(--gold-text); }
.nav-grid:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* Grid (⋮⋮⋮) panel */
.grid-menu { width: min(1040px, calc(100vw - 2rem)); padding: 1.75rem 1.5rem; display: none; grid-template-columns: 1.1fr 1.1fr .8fr; gap: 0; border-radius: var(--radius); margin-top: .35rem !important; }
.grid-menu.show { display: grid; }
.grid-menu-col { padding: 0 1.5rem; border-left: 1px solid var(--border-soft); }
.grid-menu-col:first-child { border-left: 0; padding-left: .25rem; }
.grid-menu .eyebrow { display: block; margin-bottom: 1rem; }
.product-link { display: flex; align-items: center; gap: .9rem; padding: .5rem .5rem; border-radius: 10px; color: var(--text); }
.product-link:hover, .product-link:focus-visible { background: var(--surface-3); color: var(--text); }
.product-link strong { display: block; font-size: .92rem; font-weight: 700; }
.product-link small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.product-ico { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px; background: var(--surface-3); color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.product-ico svg { width: 22px; height: 22px; }
.product-box { display: flex; align-items: center; gap: .75rem; margin: .75rem .5rem 0; padding: .75rem .85rem; border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.product-box:hover { border-color: var(--text); color: var(--text); }
.product-box strong { display: block; font-size: .85rem; }
.product-box small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.grid-link { display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem; border-radius: 8px; color: var(--text); font-weight: 700; font-size: .9rem; }
.grid-link:hover, .grid-link:focus-visible { background: var(--surface-3); color: var(--text); }
.grid-menu-links hr { border-color: var(--border); margin: .75rem .5rem; opacity: 1; }
@media (max-width: 767.98px) { .grid-menu { grid-template-columns: 1fr; gap: 1rem; } .grid-menu-col { border-left: 0; padding: 0 .25rem; } }
.navbar-toggler { border: 0; padding: .4rem; display: flex; flex-direction: column; gap: 5px; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(17,17,17,.15); }
.toggler-bar { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
@media (max-width: 767.98px) {
  .navbar-collapse { padding: .5rem 0 1rem; }
  .navbar-nav .nav-link { padding: .75rem .25rem; border-bottom: 1px solid var(--border-soft); }
  .navbar-nav .nav-link.active::after { display: none; }
  .dropdown-menu, .mega-menu { box-shadow: none; border: 0; padding: .25rem 0 .5rem; width: auto; }
  .mega-menu { padding: .25rem 0 .5rem; }
  .mega-grid { grid-template-columns: 1fr; gap: 1rem; }
  .nav-right { padding-top: .75rem; }
}
.site-footer { border-top: 1px solid var(--border-soft); background: #fff; }
.site-footer .eyebrow { font-size: 10px; }

/* ── Icons ──────────────────────────────────────────────── */
.ico { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--surface-3); color: var(--text); }
.ico svg { width: 24px; height: 24px; }
.ico-sm { width: 28px; height: 28px; border-radius: 8px; }
.ico-sm svg { width: 15px; height: 15px; }
.ico-lg { width: 64px; height: 64px; border-radius: 14px; }
.tool-img { width: 100%; height: 100%; object-fit: contain; padding: 8px; display: block; }
.ico-sm .tool-img { padding: 3px; }
.product-ico .tool-img { padding: 6px; }
.ico:has(.tool-img), .product-ico:has(.tool-img) { background: #fff; border: 1px solid var(--border-soft); }

/* ── Landing ────────────────────────────────────────────── */
.hero { padding: 4.5rem 0 3rem; }
.hero .lead { max-width: 620px; margin: 0 auto; }
.tool-search { max-width: 560px; position: relative; }
.tool-search .form-control { border-radius: 999px; padding: .9rem 1.4rem .9rem 3rem; border-color: var(--border); font-size: 1rem; }
.tool-search svg { position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.tool-group { margin-top: 2.5rem; }
.tool-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-soft); padding-bottom: .75rem; }
.tool-group-head h2 { font-size: 1.35rem; margin: 0; text-transform: uppercase; }
.tool-card { display: block; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); padding: 1.25rem; height: 100%; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tool-card:hover, .tool-card:focus-visible { border-color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); outline: none; }
.tool-card .eyebrow { display: block; font-size: 10px; margin-bottom: .9rem; }
.tool-card h3 { font-size: 1.02rem; margin: .9rem 0 .35rem; }
.tool-card p { color: var(--muted); font-size: .85rem; margin: 0; line-height: 1.45; }
.tool-card .arrow { position: absolute; right: 1.1rem; top: 1.1rem; color: var(--muted); transition: color .15s, transform .15s; }
.tool-card:hover .arrow { color: var(--text); transform: translate(2px, -2px); }
.tool-col > .tool-card { position: relative; }

/* ── Tool page: select ──────────────────────────────────── */
.tool-intro { padding-top: 3.5rem; }
.tool-intro h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); text-transform: uppercase; line-height: 1.05; }
.dropzone { max-width: 760px; margin: 0 auto; padding: 3.25rem 1.5rem; border: 1.5px dashed var(--border); border-radius: 20px; background: var(--surface-2); transition: border-color .15s, background .15s; outline: none; }
.dropzone:focus-within { border-color: var(--text); }
.dropzone { cursor: pointer; }
.dropzone.is-dragover { border-color: var(--gold); background: var(--gold-soft); }
.dz-hint { color: var(--muted); font-size: .95rem; }
.dz-limits { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#select-error, #result-error { max-width: 760px; }

/* ── Tool page: work ────────────────────────────────────── */
.work-layout { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 69px); }
@media (min-width: 992px) { .work-layout { grid-template-columns: 1fr 360px; } }
.work-main { padding: 1.25rem 1rem 2rem; background: var(--surface-2); }
@media (min-width: 992px) { .work-main { padding: 1.75rem 2.25rem; } }
.work-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.work-toolbar h1 { font-size: 1.15rem; text-transform: uppercase; margin: 0; }
.work-summary { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.work-sidebar { background: #fff; border-left: 1px solid var(--border-soft); display: flex; flex-direction: column; }
.sidebar-inner { padding: 1.5rem; flex: 1 1 auto; }
.sidebar-inner h2 { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; }
.sidebar-cta { position: sticky; bottom: 0; padding: 1rem 1.5rem 1.25rem; background: #fff; border-top: 1px solid var(--border-soft); }
@media (max-width: 991.98px) { .work-sidebar { border-left: 0; border-top: 1px solid var(--border-soft); } }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.file-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem; text-align: center; user-select: none; transition: box-shadow .12s, opacity .12s, border-color .12s; }
.file-card:hover { border-color: #c9c9c9; }
.file-card.is-sortable { cursor: grab; }
.file-card.is-dragging { opacity: .4; }
.file-card.is-drop-target { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.file-card:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.file-thumb { height: 150px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.file-thumb img, .file-thumb canvas { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 1px 4px rgba(0,0,0,.12); background: #fff; }
.file-thumb .thumb-ph { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.file-name { font-size: .78rem; font-weight: 600; margin-top: .55rem; word-break: break-word; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; min-height: 2.5em; }
.file-size { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.file-remove { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(17,17,17,.75); color: #fff; line-height: 1; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.file-remove:hover, .file-remove:focus-visible { background: var(--gold); }
.file-index { position: absolute; top: 6px; left: 6px; background: rgba(17,17,17,.75); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; }
.file-move { position: absolute; bottom: 62px; left: 6px; right: 6px; display: none; justify-content: space-between; }
.file-card:focus-within .file-move, .file-card:hover .file-move { display: flex; }
.file-move button { border: 0; background: rgba(17,17,17,.75); color: #fff; width: 24px; height: 24px; border-radius: 50%; font-size: .8rem; line-height: 1; }
.file-move button:hover { background: var(--gold); }

/* Page grid (reorder / remove pages) */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; }
.page-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .4rem; text-align: center; cursor: grab; }
.page-card.is-dragging { opacity: .4; }
.page-card.is-drop-target { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.page-card.is-removed .page-thumb { opacity: .25; }
.page-card.is-removed { border-color: var(--danger); background: var(--danger-soft); }
.page-card.is-selectable { cursor: pointer; }
.page-card.is-static { cursor: default; }
.page-card.is-dimmed { opacity: .35; }
.page-card:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.page-thumb { height: 150px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.page-thumb canvas, .page-thumb img { max-width: 100%; max-height: 100%; box-shadow: 0 1px 4px rgba(0,0,0,.12); background: #fff; }
.page-num { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: .35rem; }
.page-toggle { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(17,17,17,.75); color: #fff; font-size: .95rem; line-height: 1; }
.page-card.is-removed .page-toggle { background: var(--danger); }

/* Rotate: file column + large live preview */
.work-main.has-preview .file-card { cursor: pointer; }
.file-card.is-previewing { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.rotate-frame { position: relative; height: min(60vh, 520px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-top: 1rem; }
.rotate-img { position: absolute; left: 50%; top: 50%; max-width: none; box-shadow: 0 2px 12px rgba(0,0,0,.12); background: repeating-conic-gradient(#f1f1f1 0 25%, #fff 0 50%) 0 0 / 16px 16px; transition: transform .3s ease, width .3s ease, height .3s ease; }
.rotate-img.no-anim { transition: none; }
.rotate-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 2rem; text-align: center; color: var(--muted); font-size: .9rem; }
.rotate-caption { font-size: .8rem; color: var(--muted); margin-top: .6rem; text-align: center; }
@media (min-width: 768px) {
  .work-main.has-preview { display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: 1.5rem; align-content: start; }
  .work-main.has-preview > :not(#file-grid):not(#work-canvas) { grid-column: 1 / -1; }
  .work-main.has-preview #file-grid { grid-template-columns: 1fr; align-content: start; max-height: calc(100vh - 190px); overflow-y: auto; padding: 3px; }
  .work-main.has-preview .rotate-frame { height: calc(100vh - 240px); min-height: 360px; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .rotate-img { transition: none; } }

/* Crop */
.tool-page[data-ui="crop"] #work-canvas, .tool-page[data-ui="crop"] #work-hint { text-align: center; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; border-radius: var(--radius-sm); overflow: hidden; }
.crop-stage img { display: block; max-width: 100%; max-height: 70vh; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(17,17,17,.55); cursor: move; box-sizing: border-box; }
.crop-handle { position: absolute; width: 14px; height: 14px; background: #fff; border: 1px solid #111; border-radius: 3px; }
.crop-handle.nw { left: -7px; top: -7px; cursor: nwse-resize; }
.crop-handle.ne { right: -7px; top: -7px; cursor: nesw-resize; }
.crop-handle.sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.crop-handle.se { right: -7px; bottom: -7px; cursor: nwse-resize; }

/* Options */
.opt-field + .opt-field { margin-top: 1.15rem; }
.opt-field .form-label { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text); margin-bottom: .4rem; }
.opt-help { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.opt-radio .btn { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .85rem; padding: .5rem .6rem; border-color: var(--border); color: var(--text); border-radius: var(--radius-sm) !important; }
.opt-radio { gap: 6px; }
.opt-radio .btn-check:checked + .btn { background: var(--text); border-color: var(--text); color: #fff; }
.opt-radio .btn:hover { border-color: var(--text); }
.opt-range-val { font-variant-numeric: tabular-nums; font-size: 11px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.opt-empty { color: var(--muted); font-size: .9rem; }
.form-check-label { font-size: .9rem; font-weight: 600; }
.form-switch .form-check-label { text-transform: none; letter-spacing: 0; }

/* Processing */
.stage-processing .spinner { width: 56px; height: 56px; border: 3px solid var(--surface-3); border-top-color: var(--text); border-radius: 50%; animation: spin .9s linear infinite; margin: 0 auto 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
#proc-progress { max-width: 480px; height: 8px; }
.proc-files { max-width: 480px; }
.proc-files li { display: flex; justify-content: space-between; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--border-soft); font-size: .85rem; }
.proc-files li.is-done { color: var(--ok); }
.proc-files li.is-active { font-weight: 700; }

/* Result */
.result-check { width: 76px; height: 76px; border-radius: 50%; background: var(--text); color: #fff; font-size: 2rem; line-height: 76px; margin: 0 auto; font-weight: 800; }
.result-files li { font-size: .82rem; color: var(--muted); }
.related-link { border: 1px solid var(--border); text-transform: none; letter-spacing: 0; font-weight: 700; font-size: .85rem; padding: 9px 16px; }
.size-delta { font-weight: 800; }
.size-delta.good { color: var(--ok); }

/* SEO block */
.tool-seo { background: var(--surface-2); border-top: 1px solid var(--border-soft); }
.tool-seo h2 { font-size: 1.1rem; text-transform: uppercase; }
.tool-seo ol, .tool-seo p { color: var(--muted); font-size: .93rem; }
.tool-seo ol li + li { margin-top: .35rem; }

/* Custom scrollbar hint from the brand */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c4c4c4; border-radius: 999px; border: 2px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

@media (prefers-reduced-motion: reduce) { .tool-card, .dropzone, .file-card, .btn { transition: none; } .spinner { animation: none; } }
.brand-name .gold { color: var(--gold-text); }

/* About page */
.about-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; height: 100%; background: #fff; }
.about-card ol, .about-card p { color: var(--muted); font-size: .93rem; }
.about-card ol li + li { margin-top: .35rem; }
.limits-list { list-style: none; padding: 0; margin: 0; }
.limits-list li { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--border-soft); font-size: .92rem; color: var(--muted); }
.limits-list li strong { color: var(--text); }
.about-page h3.h6 { font-weight: 800; margin-top: .25rem; }

/* Brand images in section headers / about */
.group-img { width: 40px; height: 40px; object-fit: contain; }
.about-img { width: 120px; height: 120px; object-fit: contain; display: block; margin: 0 auto 1rem; }
.card-img { width: 56px; height: 56px; object-fit: contain; display: block; margin-bottom: .75rem; }

/* Auth pages */
.auth-layout { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 64px); }
@media (min-width: 992px) { .auth-layout { grid-template-columns: 3fr 2fr; } }
.auth-form-col { display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; }
.auth-form { width: 100%; max-width: 420px; }
.auth-brand { display: block; text-align: center; margin-bottom: 2rem; font-weight: 800; font-size: 1.4rem; text-transform: uppercase; color: var(--text); }
.auth-brand img { height: 44px; width: auto; }
.auth-brand .gold { color: var(--gold-text); }
.auth-link { font-weight: 700; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.auth-link:hover { color: var(--gold-text); }
.auth-panel { background: var(--surface-2); border-left: 1px solid var(--border-soft); align-items: center; justify-content: center; padding: 3rem 2.5rem; }
.auth-panel-inner { max-width: 420px; }
.auth-art { display: flex; gap: 1.5rem; margin-bottom: 2.5rem; }
.auth-art img { width: 120px; height: 120px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.nav-login { font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text); padding: .5rem .6rem; white-space: nowrap; }
.nav-login:hover { color: var(--gold-text); }
.user-btn { display: inline-flex; align-items: center; gap: .5rem; text-transform: none; letter-spacing: 0; font-size: .85rem; padding: 5px 14px 5px 5px; }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; }
.dropdown-item[type="submit"] { width: 100%; text-align: left; background: none; border: 0; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { display: flex; align-items: center; gap: .85rem; padding: .7rem 0; border-bottom: 1px solid var(--border-soft); }
.history-main { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: .92rem; }
.history-main a { color: var(--text); }
.history-main small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-time { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.btn-danger-outline { --bs-btn-color: var(--danger); --bs-btn-border-color: var(--danger); --bs-btn-hover-bg: var(--danger); --bs-btn-hover-border-color: var(--danger); }
details summary.eyebrow { cursor: pointer; }

/* Auth: iLovePDF-style login in the FileConvertFast look */
.auth-title { font-size: 1.6rem; font-weight: 800; text-align: center; margin-bottom: 1.5rem; }
.social-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1.75rem; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .5rem .75rem; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; color: var(--text); font-weight: 700; font-size: .92rem; text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.btn-social svg { width: 20px; height: 20px; flex: none; }
.btn-social:hover { border-color: var(--text); color: var(--text); transform: translateY(-1px); }
.btn-social:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.btn-social-facebook { background: #1877F2; border-color: #1877F2; color: #fff; }
.btn-social-facebook:hover { background: #0f63d1; border-color: #0f63d1; color: #fff; }
.btn-social-sso svg { color: #444; }
@media (max-width: 380px) { .social-row { grid-template-columns: 1fr; } }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #8a8a8a; pointer-events: none; }
.input-icon .form-control { padding: .8rem 1rem .8rem 2.75rem; border-radius: var(--radius-sm); border-color: var(--border); font-size: 1rem; }
.input-icon .form-control:focus { border-color: var(--text); box-shadow: 0 0 0 3px var(--gold-soft); }
.input-icon .form-control:focus + svg, .input-icon:focus-within svg { color: var(--text); }
.auth-form .opt-field + .opt-field { margin-top: .75rem; }
.auth-link-gold { color: var(--gold-text); }
.auth-link-gold:hover { color: var(--text); }
.auth-submit { min-width: 200px; }
.auth-legal { text-align: center; font-size: .78rem; color: var(--muted); margin: 1rem auto 0; max-width: 360px; }
.auth-legal a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 2px; }
.legal-page { max-width: 760px; }
.legal-page h2 { margin-top: 1.75rem; }
.legal-page p, .legal-page li { color: #333; line-height: 1.65; }
.legal-page a { text-decoration: underline; text-underline-offset: 2px; }
