/* FileFlip — original theme */
:root {
  --brand: #0e7c74;
  --brand-d: #0a5f59;
  --brand-2: #f59e5b;
  --brand-soft: #e6f4f2;
  --ink: #14212b;
  --ink-2: #44535f;
  --muted: #6b7a86;
  --line: #e3e8ec;
  --bg: #f6f8f9;
  --card: #ffffff;
  --ok: #15803d;
  --err: #c2410c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 33, 43, .06), 0 8px 24px rgba(16, 33, 43, .06);
  --shadow-lg: 0 20px 50px rgba(16, 33, 43, .16);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 15.5px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 900px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.ic { flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font: 600 14.5px var(--font); cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none !important; white-space: nowrap; color: inherit; background: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-d); }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: #eef2f4; }
.btn-success { background: var(--ok); color: #fff; }
.btn-success:hover { background: #116632; }
.btn-lg { padding: 14px 24px; font-size: 17px; border-radius: 12px; }
.btn-sm { padding: 7px 12px; font-size: 13.5px; }
.btn small { font-weight: 500; opacity: .85; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 20px; line-height: 1; }
.icon-btn:hover { background: #eef2f4; color: var(--ink); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 28px; height: 66px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 21px; color: var(--ink); letter-spacing: -.02em; text-decoration: none !important; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; padding: 9px 12px; border-radius: 9px; border: 0; background: none; font: 500 15px var(--font); color: var(--ink-2); cursor: pointer; text-decoration: none !important; }
.nav-link:hover, .nav-item.open > .nav-link { color: var(--brand); background: var(--brand-soft); }
.nav-item.open > .nav-link .ic { transform: rotate(180deg); }
.nav-link .ic { transition: transform .2s; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-auth-mobile, .show-sm { display: none; }

.mega { position: absolute; left: 20px; right: 20px; top: calc(100% - 2px); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s, transform .16s, visibility .16s; z-index: 60; }
.nav-item.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); padding: 8px; }
.mega-col { padding: 14px 18px 12px; border-right: 1px solid var(--line); }
.mega-col:last-child { border-right: 0; }
.mega-col.wide { grid-column: span 2; }
.mega-col.wide ul { columns: 2; column-gap: 24px; }
.mega-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--ink); }
.mega-head .ic { color: var(--brand); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li { break-inside: avoid; }
.mega li a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; text-decoration: none; }
.mega li a:hover { background: var(--brand-soft); color: var(--brand); }
.has-mega.small { position: relative; }
.mega-small { left: 0; right: auto; width: 250px; top: calc(100% + 12px); }
.mega-small .mega-inner { grid-template-columns: 1fr; }

/* ---------- search ---------- */
.search-modal { position: fixed; inset: 0; z-index: 100; background: rgba(16, 33, 43, .45); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.search-box { width: 100%; max-width: 620px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-input { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-input input { flex: 1; border: 0; outline: 0; font: 500 17px var(--font); padding: 10px 0; color: var(--ink); background: none; }
#searchResults { list-style: none; margin: 0; padding: 8px; max-height: 55vh; overflow: auto; }
#searchResults a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; }
#searchResults a small { color: var(--muted); }
#searchResults a.active, #searchResults a:hover { background: var(--brand-soft); }
#searchResults .none { padding: 14px; color: var(--muted); }

/* ---------- hero + uploader ---------- */
.hero { padding: 54px 0 34px; text-align: center; background: radial-gradient(1100px 380px at 50% -120px, #d6efeb, transparent 70%); }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; letter-spacing: -.03em; }
.hero .lead { font-size: 17.5px; color: var(--ink-2); margin: 0 auto 28px; max-width: 640px; }
.hero-tool { padding-top: 30px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

.uploader { text-align: left; }
.dropzone { position: relative; background: var(--card); border: 2px dashed #b9d9d4; border-radius: 20px; padding: 46px 24px; text-align: center; transition: border-color .15s, background .15s; box-shadow: var(--shadow); }
.uploader.has-files .dropzone { padding: 24px; }
.uploader.has-files .drop-icon, .uploader.has-files .drop-formats { display: none; }
.dropzone.over { border-color: var(--brand); background: #f1faf8; }
.drop-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.drop-hint { margin: 16px 0 0; color: var(--ink-2); font-size: 14px; }
.drop-formats { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; letter-spacing: .02em; }
.drop-overlay { position: absolute; inset: 0; border-radius: 18px; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: var(--brand); background: rgba(230, 244, 242, .92); opacity: 0; pointer-events: none; transition: opacity .15s; }
.dropzone.over .drop-overlay { opacity: 1; }
.choose-wrap { position: relative; display: inline-flex; }
.choose-wrap > .btn:first-child { border-radius: 12px 0 0 12px; min-width: 210px; }
.btn-split { border-radius: 0 12px 12px 0 !important; border-left: 1px solid rgba(255, 255, 255, .3); padding-left: 14px; padding-right: 14px; }
.btn-split .ic { transition: transform .2s; }
.btn-split[aria-expanded="true"] .ic { transform: rotate(180deg); } /* arrow flips while the upload menu is open, like the top menu */
.choose-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; z-index: 5; text-align: left; }
.choose-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: none; font: 500 15px var(--font); color: var(--ink); cursor: pointer; }
.choose-menu button:hover { background: var(--brand-soft); color: var(--brand); }
.url-form { display: flex; gap: 8px; margin-top: 12px; }
.url-form input { flex: 1; }
.legal { font-size: 12.5px; text-align: center; margin-top: 14px; }

input[type=text], input[type=number], input[type=url], input[type=email], input[type=password], input[type=datetime-local], select, textarea {
  font: 500 15px var(--font); color: var(--ink); padding: 10px 12px; border: 1px solid #cfd8de; border-radius: 10px; background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(14, 124, 116, .25); border-color: var(--brand); }
select.need { border-color: var(--err); outline: 2px solid rgba(194, 65, 12, .2); }

.file-panel { margin-top: 16px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.file-list { list-style: none; margin: 0; padding: 0; }
.fi { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto minmax(0, auto) auto; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.fi.dragging { opacity: .4; }
/* Pin each part to its own column, so rows without a drag handle don't shift and squeeze the format menu */
.fi .handle { grid-column: 1; } .fi .badge { grid-column: 2; } .fi .nm { grid-column: 3; }
.fi .to { grid-column: 4; } .fi .stat { grid-column: 5; } .fi .rm { grid-column: 6; }
.handle { cursor: grab; color: var(--muted); letter-spacing: -3px; user-select: none; }
.badge { font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 5px 8px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); }
.nm { display: flex; flex-direction: column; min-width: 0; }
.nm span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm small { color: var(--muted); }
.to { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.to select { width: auto; min-width: 96px; padding: 7px 10px; }
.stat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.st { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.st.err { color: var(--err); white-space: normal; max-width: 420px; }
.saved { font-size: 13px; font-weight: 700; color: var(--ok); }
.bar { width: 120px; height: 6px; background: #e7eef0; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; transition: width .2s; }
.bar.indet i { width: 40%; animation: indet 1.1s infinite ease-in-out; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.file-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.convert-all { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.convert-all select { width: auto; }
.options { border-top: 1px solid var(--line); }
.options summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink-2); list-style: none; }
.options summary::-webkit-details-marker { display: none; }
.options summary::after { content: '+'; margin-left: auto; font-size: 20px; color: var(--muted); }
.options[open] summary::after { content: '−'; }
.options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; padding: 4px 18px 20px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field-checkbox { display: flex; align-items: flex-end; }
.check { display: inline-flex !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 500 !important; margin: 0 0 10px !important; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.range { display: flex; align-items: center; gap: 12px; }
.range input { flex: 1; accent-color: var(--brand); }
.range output { min-width: 32px; font-weight: 700; color: var(--brand); }
.go-row { display: flex; justify-content: flex-end; padding: 16px 18px; background: #fafcfc; border-top: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: .2s; z-index: 200; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sections ---------- */
.section { padding: 34px 20px; }
.section-title { font-size: 24px; font-weight: 800; margin-bottom: 18px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tool-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-card:hover { border-color: #b9d9d4; box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-card strong { display: block; font-size: 15.5px; margin-bottom: 2px; }
.tool-card small { color: var(--muted); font-size: 13.5px; line-height: 1.45; display: block; }
.tool-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tool-ic.tc-compress { background: #fff1e6; color: #c9631a; }
.tool-ic.tc-tools { background: #eef0ff; color: #4b55c8; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature h3 { font-size: 18px; margin-top: 12px; }
.feature p { color: var(--ink-2); margin: 0; }
.feature-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), #14a598); }
.all-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px 20px; }
.all-col h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.all-col h3 .ic { color: var(--brand); }
.tag { font-size: 11px; font-weight: 700; color: var(--muted); background: #eef2f4; padding: 2px 7px; border-radius: 6px; margin-left: auto; }
.all-col ul { list-style: none; padding: 0; margin: 0; }
.all-col li a { display: block; padding: 4px 0; color: var(--ink-2); font-size: 14.5px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps li > span { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; }
.steps p { margin: 2px 0 0; color: var(--ink-2); }

/* ---------- cards / forms / pages ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 24px; text-align: left; }
.auth-card { max-width: 440px; margin: 40px auto; }
.auth-card h1 { font-size: 28px; text-align: center; }
.auth-card > p.muted:first-of-type { text-align: center; }
.auth-card form { display: grid; gap: 14px; margin-top: 16px; }
.auth-card form[hidden] { display: none; }
.auth-options { display: grid; gap: 14px; margin-top: 22px; }
.g-signin { display: flex; justify-content: center; min-height: 44px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-auth { width: 100%; padding: 11px 16px; border: 1px solid #dadce0; border-radius: 6px; background: #fff; color: #1f1f1f; font-weight: 500; font-size: 15px; }
.btn-auth:hover { background: #f7f8f8; border-color: #c6c9cc; }
.btn-auth[hidden] { display: none; }
.auth-links { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14.5px; }
.auth-links p { margin: 6px 0; }
.auth-links a { font-weight: 600; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14.5px; }
.alert-err { background: #fff1ea; color: var(--err); border: 1px solid #fbd5bf; }
.alert-ok { background: #eaf7ef; color: var(--ok); border: 1px solid #bfe5cc; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; font-size: 22px; }
.prose p, .prose li { color: var(--ink-2); }
pre, code { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 13.5px; }
pre { background: #0f1d26; color: #dcebf0; padding: 16px 18px; border-radius: 12px; overflow: auto; line-height: 1.5; }
:not(pre) > code { background: #eef2f4; padding: 2px 6px; border-radius: 6px; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.tbl th { background: #f3f6f7; font-weight: 700; }
.ok-dot, .no-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.ok-dot { background: var(--ok); }
.no-dot { background: #d6dde2; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 26px; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; text-align: left; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); position: relative; }
.plan.featured::before { content: 'Most popular'; position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan .price { font-size: 38px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 9px; flex: 1; }
.plan li { display: flex; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.plan li .ic { color: var(--ok); margin-top: 2px; }

/* ---------- client tools ---------- */
.client-tool h3.sub { margin-top: 28px; font-size: 17px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 7px 13px; border-radius: 999px; font: 600 13.5px var(--font); color: var(--ink-2); cursor: pointer; }
.chip.active, .chip:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.unit-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.unit-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.unit-side { display: grid; gap: 8px; }
.unit-side input { font-size: 22px; font-weight: 700; }
.swap { font-size: 22px; background: var(--brand-soft); color: var(--brand); }
.unit-formula { margin: 14px 0; }
.unit-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.unit-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.unit-table td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.time-src, .time-add { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.time-src .field { flex: 1; min-width: 200px; }
.time-src .out { padding: 10px 0; font-weight: 600; }
.time-add select { flex: 1; min-width: 200px; width: auto; }
.time-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.time-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.time-list li:last-child { border-bottom: 0; }
.time-list li div { flex: 1; display: flex; flex-direction: column; }
.time-list small { color: var(--muted); }
.time-list span { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.color-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
.color-stage { position: relative; min-height: 300px; border-radius: 14px; background: #f3f6f7; display: grid; place-items: center; overflow: hidden; }
.color-stage.over { outline: 2px dashed var(--brand); }
.color-stage canvas { max-width: 100%; max-height: 70vh; cursor: crosshair; display: block; }
.color-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px; cursor: pointer; text-align: center; color: var(--ink-2); border: 2px dashed #b9d9d4; border-radius: 16px; width: 100%; }
.color-drop .ic { color: var(--brand); }
.color-drop.over { border-color: var(--brand); background: #f1faf8; }
.loupe { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); pointer-events: none; transform: translate(14px, -58px); }
.swatch { height: 110px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 14px; }
.color-side .field input[type=color] { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: #fff; }
.codes { display: grid; gap: 8px; margin: 14px 0; }
.code { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px 12px; cursor: pointer; font: inherit; }
.code span { font-size: 12px; font-weight: 800; color: var(--muted); width: 32px; }
.code code { flex: 1; background: none; padding: 0; }
.code em { font-style: normal; font-size: 12px; color: var(--brand); font-weight: 700; }
.history { display: flex; flex-wrap: wrap; gap: 6px; }
.history button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .1); cursor: pointer; }

/* PDF editor */
.pdfed { padding: 16px; }
.pdfed-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 66px; background: #fff; z-index: 5; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 12px; font: 600 13.5px var(--font); color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--brand); color: #fff; }
.mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.mini input[type=number] { width: 64px; padding: 6px 8px; }
.mini input[type=color] { width: 34px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pdfed-help { font-size: 13.5px; margin: 10px 0; }
.pdfed-pages { display: flex; flex-direction: column; align-items: center; gap: 18px; background: #e9eef1; border-radius: 12px; padding: 18px; overflow: auto; max-height: 78vh; }
.pdfed-page { position: relative; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); flex: none; }
.pdfed-page canvas { display: block; }
.pdfed-layer { position: absolute; inset: 0; }
.pdfed.placing .pdfed-layer { cursor: crosshair; }
.pnum { position: absolute; bottom: -1px; right: 6px; transform: translateY(100%); font-size: 11px; color: var(--muted); }
.pdfed-item { position: absolute; outline: 1px dashed rgba(14, 124, 116, .55); }
.pdfed-item:hover, .pdfed-item:focus-within { outline: 1.5px solid var(--brand); }
.it-del { position: absolute; top: -11px; right: -11px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--err); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: none; z-index: 2; }
.pdfed-item:hover .it-del, .pdfed-item:focus-within .it-del { display: block; }
.it-grip { position: absolute; left: -9px; top: -9px; width: 14px; height: 14px; border-radius: 4px; background: var(--brand); cursor: move; display: none; }
.pdfed-item:hover .it-grip { display: block; }
.it-text { min-width: 40px; min-height: 1.2em; padding: 2px; font-family: Helvetica, Arial, sans-serif; line-height: 1.2; white-space: pre; outline: 0; cursor: text; }
.it-whiteout, .it-highlight, .it-box, .it-field, .it-signature, .it-image { resize: both; overflow: hidden; cursor: move; }
.it-whiteout { background: #fff; }
.it-highlight { background: color-mix(in srgb, var(--c) 40%, transparent); }
.it-box { border: 1.5px solid var(--c); }
.it-field { background: rgba(75, 85, 200, .12); border: 1px solid #8c93d9; }
.it-checkbox { background: rgba(75, 85, 200, .12); border: 1px solid #8c93d9; cursor: move; }
.it-label { font-size: 10px; color: #4b55c8; padding: 2px 4px; pointer-events: none; }
.it-signature img, .it-image img { width: 100%; height: 100%; display: block; pointer-events: none; }
.sig-dialog { border: 0; border-radius: 16px; padding: 22px; box-shadow: var(--shadow-lg); width: min(620px, 94vw); }
.sig-dialog::backdrop { background: rgba(16, 33, 43, .45); }
#sigPad { width: 100%; height: auto; border: 1px dashed #b9c4cc; border-radius: 12px; touch-action: none; background: #fff; cursor: crosshair; }
.sig-row { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 50px; background: #0f1d26; color: #c8d5dc; padding: 46px 0 22px; }
.site-footer .brand { color: #fff; }
.site-footer .muted { color: #8a9ca7; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 26px; }
.site-footer h4 { color: #fff; font-size: 14.5px; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.site-footer a { color: #b8c7cf; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid #22323d; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .show-sm { display: inline-grid; }
  .hide-sm { display: none !important; }
  .nav-row { gap: 12px; }
  /* The blur effect would trap the slide-out menu inside the header bar, so phones use a plain white header */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .main-nav { position: fixed; top: 66px; left: 0; right: 0; bottom: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 16px 40px; overflow: auto; transform: translateX(100%); transition: transform .2s; gap: 2px; }
  body.nav-open .main-nav { transform: none; }
  body.nav-open { overflow: hidden; }
  .nav-actions { margin-left: auto; }
  .nav-link { width: 100%; justify-content: space-between; padding: 14px 12px; font-size: 16px; }
  .mega, .mega-small { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; display: none; width: auto; }
  .nav-item.open .mega { display: block; }
  .mega-inner { grid-template-columns: 1fr; padding: 0 0 8px; }
  .mega-col { border-right: 0; padding: 8px 10px; }
  .mega-col.wide { grid-column: auto; }
  .nav-auth-mobile { display: grid; gap: 10px; order: -1; border-bottom: 1px solid var(--line); margin-bottom: 8px; padding: 4px 0 16px; }
  .nav-auth-mobile .btn { width: 100%; justify-content: center; padding: 12px; font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .color-layout { grid-template-columns: 1fr; }
  .pdfed-bar { top: 66px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .section { padding: 26px 16px; }
  .hero { padding: 34px 0 24px; }
  .dropzone { padding: 32px 16px; }
  .choose-wrap > .btn:first-child { min-width: 0; }
  .fi { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "b n r" "t t t" "s s s"; row-gap: 10px; padding: 14px; }
  .fi .handle { display: none; }
  .fi .badge { grid-area: b; } .fi .nm { grid-area: n; } .fi .rm { grid-area: r; } .fi .to { grid-area: t; } .fi .stat { grid-area: s; justify-content: flex-start; }
  .bar { flex: 1; }
  .btn small { max-width: 160px; }
  .unit-row { grid-template-columns: 1fr; }
  .swap { justify-self: center; transform: rotate(90deg); }
  .go-row .btn { width: 100%; }
  .url-form { flex-wrap: wrap; }
}

/* ---------- tool page About + FAQ ---------- */
.tool-about .about-text { font-size: 16.5px; color: var(--ink-2); margin: 0 0 30px; line-height: 1.7; }
.faq { display: grid; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.faq-item h3 { font-size: 16px; margin: 0 0 6px; }
.faq-item p { margin: 0; color: var(--ink-2); }

/* ---------- admin dashboard ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-head h1 { margin: 0; }
.admin-tabs { display: flex; gap: 4px; background: #eef2f4; padding: 4px; border-radius: 12px; }
.admin-tabs a { padding: 8px 16px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.admin-tabs a.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.admin .card { margin-bottom: 18px; }
.admin .card h3 { font-size: 16px; margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-grid .stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-grid .stat strong { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat-grid .stat span { font-size: 13.5px; font-weight: 600; }
.admin-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar-v { width: 100%; max-width: 34px; min-height: 2px; background: var(--brand); border-radius: 6px 6px 2px 2px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.bar-v i { display: block; background: var(--brand-2); }
.bar-n { font-size: 11px; color: var(--muted); font-weight: 600; min-height: 14px; }
.bar-d { font-size: 11px; color: var(--muted); }
.small { font-size: 13px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.bad { color: var(--err); font-weight: 700; }
.table-wrap { padding: 0; overflow-x: auto; }
.table-wrap .tbl { border: 0; border-radius: 0; }
.admin-search { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.admin-search input { max-width: 340px; }
.admin-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.admin-filter .chip { text-decoration: none; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pill.ok { background: #e3f5ea; color: var(--ok); }
.pill.off { background: #fdecea; color: var(--err); }
.tbl.users tr.is-disabled td { color: var(--muted); }
.actions details { position: relative; }
.actions summary { cursor: pointer; color: var(--brand); font-weight: 600; list-style: none; font-size: 14px; }
.actions summary::-webkit-details-marker { display: none; }
.actions .menu { position: absolute; right: 0; top: 26px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px; width: 260px; display: grid; gap: 12px; }
.actions .menu form { display: grid; gap: 8px; }
.actions .menu label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.actions .menu form:last-child { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.btn-danger { background: #fff1ea; color: var(--err); border-color: #fbd5bf; }
.btn-danger:hover { background: var(--err); color: #fff; }
@media (max-width: 860px) { .admin-cols { grid-template-columns: 1fr; } }

/* ---------- Pro plan / billing ---------- */
.pill.warn { background: #fff4e0; color: #a35d00; }
.plan-buttons { display: grid; gap: 8px; }
.btn.is-disabled { opacity: .55; cursor: default; pointer-events: none; text-align: center; }
.plan-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.plan-card h3 { margin: 0 0 4px; }
.plan-card p { margin: 0; }
.plan-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Admin "Manage" menu: let it show outside the table box on wide screens; open in place on phones */
@media (min-width: 900px) { .table-wrap { overflow: visible; } }
.tbl.users { overflow: visible; }
@media (max-width: 899px) { .actions .menu { position: static; width: 240px; margin-top: 8px; box-shadow: none; } }
.actions .menu form.plan-form { display: grid; border-top: 0; padding-top: 0; }

/* Login: "Forgot password?" link and reCAPTCHA box */
.field-link { float: right; font-weight: 500; font-size: 13px; }
.captcha { min-height: 78px; display: flex; justify-content: center; }
@media (max-width: 360px) { .captcha .g-recaptcha { transform: scale(.9); transform-origin: center top; } }
/* Eye icon to show / hide passwords */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.pw-toggle:hover { color: var(--brand); background: #eef5f4; }

/* ---------- Security box (home) and /security page ---------- */
.trust-box { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; }
.trust-text h2 { font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.trust-text p { color: var(--ink-2); margin: 0 0 20px; line-height: 1.6; }
.trust-text .btn { display: inline-flex; gap: 8px; align-items: center; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.trust-list li { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 16px; }
.trust-ic { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; color: var(--brand); background: #e8f4f2; }
.narrow-wide { max-width: 1040px; }
.security-page h1 { font-size: 38px; margin: 10px 0 12px; }
.security-page .lead { max-width: 820px; color: var(--ink-2); font-size: 17px; line-height: 1.6; margin-bottom: 34px; }
.security-page .section-title { margin-top: 18px; }
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 30px; margin-bottom: 34px; }
.sec-item h3 { font-size: 17px; margin: 14px 0 6px; }
.sec-item p { color: var(--ink-2); margin: 0; font-size: 14.5px; line-height: 1.6; }
.sec-cta { grid-template-columns: 1fr; margin-top: 10px; }
.sec-cta p { margin: 0; }
@media (max-width: 900px) { .trust-box { grid-template-columns: 1fr; padding: 24px 20px; } .sec-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sec-grid { grid-template-columns: 1fr; } .security-page h1 { font-size: 30px; } }
/* Invisible bridge over the small gap so the hover menu doesn't close while moving the mouse down */
.choose-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.fi .stat:empty { display: none; }

/* ---------- /results page ---------- */
.results-page { max-width: 860px; }
.results-page h1 { text-align: center; font-size: 36px; margin: 8px 0 22px; }
.results-card { padding: 0; overflow: hidden; }
.res-list { list-style: none; margin: 0; padding: 0; }
.res-item { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.res-main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; }
.res-name { display: flex; flex-direction: column; min-width: 0; }
.res-name span { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-name small { color: var(--muted); }
.res-done { color: var(--ok); border: 1px solid #bfe5cc; background: #eaf7ef; border-radius: 8px; padding: 6px 14px; font-weight: 700; font-size: 14px; }
.res-dl { min-width: 170px; justify-content: center; padding: 12px 22px; font-size: 16px; }
.res-extra { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.res-sub { font-size: 13px; background: #f3f6f7; border-radius: 8px; padding: 5px 10px; color: var(--ink-2); }
.res-sub small { color: var(--muted); }
.res-empty { padding: 30px 22px; text-align: center; color: var(--muted); }
.res-actions { padding: 16px 22px 0; }
.res-note { padding: 10px 22px 18px; margin: 0; display: flex; gap: 6px; align-items: center; }
.ad-slot:empty { display: none; }
.ad-slot { margin: 26px 0; min-height: 90px; }
.happy { margin-top: 26px; padding: 0; overflow: hidden; }
.happy h2 { font-size: 20px; margin: 0; padding: 18px 22px; background: #f3f6f7; border-bottom: 1px solid var(--line); }
.happy-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.happy-row:last-child { border-bottom: 0; }
.happy-row > span { font-weight: 600; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-box { display: flex; max-width: 460px; }
.copy-box input { flex: 1; min-width: 0; border-radius: 10px 0 0 10px; padding: 8px 12px; }
.copy-box .btn { border-radius: 0 10px 10px 0; }
kbd { background: #eef2f4; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 12px; }
@media (max-width: 640px) {
  .results-page h1 { font-size: 28px; }
  .res-main { grid-template-columns: 1fr auto; }
  .res-dl { grid-column: 1 / -1; width: 100%; }
  .happy-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Pricing: monthly / yearly switch ---------- */
.bill-toggle { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px; margin-top: 22px; box-shadow: var(--shadow); }
/* The green pill that slides behind the selected option */
.bill-toggle::before { content: ''; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--brand); box-shadow: 0 4px 12px rgba(14, 124, 116, .35); transition: transform .35s cubic-bezier(.65, 0, .35, 1); }
.pricing-page.bill-yearly .bill-toggle::before { transform: translateX(100%); }
.bill-toggle button { position: relative; z-index: 1; min-width: 112px; border: 0; background: none; padding: 10px 24px; border-radius: 999px; font: 700 15px var(--font); color: var(--muted); cursor: pointer; transition: color .3s; }
.bill-toggle button.active { color: #fff; }
.bill-toggle button:not(.active):hover { color: var(--ink); }
/* Prices fade and rise slightly when switching */
@keyframes priceIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pricing-page .plan .price > span, .pricing-page .plan .muted > span { animation: priceIn .35s ease; }
.bill-hint { color: var(--brand); font-weight: 600; font-size: 14px; margin: 10px 0 0; min-height: 20px; }
.pricing-page .pricing { max-width: 1040px; margin-left: auto; margin-right: auto; }
.pricing-page .plan .price { margin-top: 14px; }
.pricing-page .plan-cta { width: 100%; justify-content: center; margin: 20px 0 6px; padding: 13px; font-size: 16px; }
.pricing-page .plan ul { margin: 14px 0 0; gap: 0; }
.pricing-page .plan li { padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.pricing-page .plan li.no { color: var(--muted); }
.pricing-page .plan li.no .ic { color: var(--muted); }
.pricing-page .plan.featured::before { display: none; }
.popular { display: inline-block; vertical-align: middle; margin-left: 8px; font-size: 12px; font-weight: 700; color: #d6336c; border: 1px solid #f6c3d3; background: #fff0f5; border-radius: 6px; padding: 3px 8px; }
.pricing-page .y { display: none; }
.pricing-page .price .m { display: inline-block; }
.pricing-page.bill-yearly .y { display: inline-block; }
.pricing-page.bill-yearly a.y, .pricing-page a.m { display: flex; }
.pricing-page.bill-yearly .m { display: none; }

/* Phones: tool cards in 2 columns (icon above the name, description hidden) */
@media (max-width: 600px) {
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-card { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 16px 10px; }
  .tool-card strong { font-size: 14.5px; line-height: 1.3; }
  .tool-card small { display: none; }
}
/* Phones: feature cards — icon and title centered, description justified */
@media (max-width: 600px) {
  .feature { text-align: center; }
  .feature .feature-ic { margin: 0 auto; }
  .feature p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
}

/* Pricing: keep the three cards lined up (title, price, note and button at the same height) */
.pricing-page .plan h3 { display: flex; align-items: center; gap: 8px; min-height: 30px; margin: 0; }
@media (min-width: 760px) {
  .pricing-page .plan > .muted { min-height: 3.1em; }
}

/* Home: "All tools" with Convert / Compress / Tools tabs */
.at-section { overflow-x: clip; } /* the sliding cards never cause sideways scrolling */
.at-head { display: flex; align-items: center; justify-content: space-between; gap: 14px 16px; flex-wrap: wrap; margin-bottom: 22px; }
.at-head .section-title { margin: 0; }
.at-tabs { position: relative; display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.at-tabs .ind { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: var(--brand); box-shadow: 0 4px 12px rgba(14, 124, 116, .25); transition: left .35s cubic-bezier(.4, 0, .2, 1), width .35s cubic-bezier(.4, 0, .2, 1); }
.at-tabs button { position: relative; z-index: 1; }
.at-tabs.js button.on { background: transparent; }
.at-tabs button { border: 0; background: none; font: 600 14.5px var(--font); padding: 9px 18px; border-radius: 999px; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .15s, color .15s; }
.at-tabs button:hover { color: var(--ink); }
.at-tabs button.on { background: var(--brand); color: #fff; }
.at-tabs .n { font-size: 12px; background: rgba(0, 0, 0, .07); border-radius: 999px; padding: 1px 7px; }
.at-tabs button.on .n { background: rgba(255, 255, 255, .25); }
.at-grid { columns: 4 240px; column-gap: 18px; }
.at-grid[hidden] { display: none; }
.at-grid.at-in-right { animation: atInRight .4s cubic-bezier(.2, .7, .2, 1); }
.at-grid.at-in-left { animation: atInLeft .4s cubic-bezier(.2, .7, .2, 1); }
@keyframes atInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes atInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .at-grid.at-in-right, .at-grid.at-in-left { animation: none; } .at-tabs .ind { transition: none; } }
.at-card { break-inside: avoid; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 10px; margin: 0 0 18px; transition: box-shadow .15s, border-color .15s; }
.at-card:hover { box-shadow: 0 8px 24px rgba(16, 40, 50, .08); border-color: #d3dde3; }
.at-card h3 { display: flex; align-items: center; gap: 10px; font-size: 15.5px; margin: 0 0 8px; }
.at-card h3 .tool-ic { width: 34px; height: 34px; border-radius: 10px; }
.at-card h3 small { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.at-card ul { list-style: none; margin: 0; padding: 0; }
.at-card li a { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; text-decoration: none; }
.at-card li a:hover { background: var(--brand-soft); color: var(--brand); }
.at-card li a::after { content: '→'; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.at-card li a:hover::after { opacity: 1; transform: none; }
@media (max-width: 560px) {
  .at-tabs { width: 100%; }
  .at-tabs button { flex: 1; justify-content: center; padding: 9px 8px; }
}

/* ===== Blog ===== */
.lead-sm { font-size: 17px; margin-top: -6px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 26px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: inherit; text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: 0 12px 30px rgba(16, 40, 50, .1); transform: translateY(-2px); }
.post-card img { width: 100%; height: auto; display: block; aspect-ratio: 1200 / 630; object-fit: cover; }
.post-card > div { padding: 18px 20px 20px; }
.post-card h2 { font-size: 19px; line-height: 1.35; margin: 0 0 8px; }
.post-card p { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.post-more { color: var(--brand); font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }

.post { padding-top: 26px; padding-bottom: 50px; }
.post-head { max-width: 860px; margin: 0 auto; text-align: center; }
.post-head h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.15; letter-spacing: -.02em; margin: 8px 0 12px; }
.post-meta { color: var(--muted); font-size: 14.5px; }
.post-hero { max-width: 1040px; margin: 22px auto 34px; }
.post-hero img { width: 100%; height: auto; border-radius: 20px; display: block; box-shadow: 0 10px 34px rgba(16, 40, 50, .1); }
.post-layout { display: grid; grid-template-columns: 250px minmax(0, 720px); gap: 48px; justify-content: center; align-items: start; }
.post-toc { position: sticky; top: 88px; display: grid; gap: 16px; font-size: 14px; }
.post-toc details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.post-toc summary { font-weight: 700; cursor: pointer; list-style: none; }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary { display: flex; justify-content: space-between; align-items: center; }
.post-toc summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.post-toc details[open] summary::after { transform: rotate(225deg); }
.post-fig a { display: block; cursor: zoom-in; }
.fig-zoom { white-space: nowrap; opacity: .75; }
.post-toc ol { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 7px; }
.post-toc a { color: var(--ink-2); }
.post-toc a:hover { color: var(--brand); }
.post-toc .post-cta { flex-direction: column; align-items: stretch; text-align: left; padding: 16px; }
.post-toc .post-cta .btn { width: 100%; }
.post-body { font-size: 17.5px; line-height: 1.75; color: var(--ink-2); }
.post-body > p:first-of-type { font-size: 19px; color: var(--ink); }
.post-body h2 { font-size: 27px; line-height: 1.25; color: var(--ink); margin: 46px 0 14px; letter-spacing: -.01em; scroll-margin-top: 90px; }
.post-body h3 { font-size: 20px; color: var(--ink); margin: 28px 0 8px; }
.post-body p { margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; display: grid; gap: 8px; }
.post-body li::marker { color: var(--brand); font-weight: 700; }
.post-body a { color: var(--brand); font-weight: 600; }
.post-body strong { color: var(--ink); }
.post-body code { background: #eef3f4; border-radius: 6px; padding: 2px 6px; font-size: .9em; }
.post-fig { margin: 26px 0 30px; }
.post-fig img { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.post-fig figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 10px; line-height: 1.5; }
.post-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(135deg, #e8f5f3, #f3faf9); border: 1px solid #cfe7e3; border-radius: 16px; padding: 20px 22px; margin: 28px 0; }
.post-cta strong { font-size: 17px; }
.post-cta p { margin: 4px 0 0; font-size: 15px; color: var(--muted); line-height: 1.5; }
.post-cta .btn { flex: none; color: #fff !important; }
.post-tip { border-left: 4px solid var(--brand); background: #fff; border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 22px 0; font-size: 16px; }
.post-tip.warn { border-left-color: #e8a33d; }
.post-table { overflow-x: auto; margin: 22px 0 26px; }
.post-table table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 15px; line-height: 1.5; }
.post-table th, .post-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-table th { background: #f3f7f8; color: var(--ink); font-weight: 700; }
.post-table tr:last-child td { border-bottom: 0; }
.post-steps { list-style: none; padding: 0 !important; counter-reset: st; }
.post-steps > li { counter-increment: st; position: relative; padding-left: 48px; }
.post-steps > li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.post-body .faq-item h3 { margin-top: 0; font-size: 18px; }
@media (max-width: 980px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .post-toc { position: static; margin-bottom: 18px; }
  .post-toc details { }
  .post-toc .post-cta { display: none; }
}
@media (max-width: 600px) {
  .post-body { font-size: 16.5px; }
  .post-body > p:first-of-type { font-size: 17.5px; }
  .post-body h2 { font-size: 23px; }
  .post-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .post-hero img { border-radius: 14px; }
}

/* Admin → Blog */
.blog-tbl td { vertical-align: middle; }
.blog-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.blog-actions form { margin: 0; }
.alert-warn { background: #fff7e6; color: #8a5300; border: 1px solid #f5d9a8; }
.draft-bar { margin-top: 18px; }

/* Tool page: link to the blog guide */
.guide-card { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; color: inherit; text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.guide-card:hover { box-shadow: 0 12px 30px rgba(16, 40, 50, .1); transform: translateY(-2px); }
.guide-card img { width: 100%; height: auto; border-radius: 12px; display: block; }
.guide-card small { display: block; color: var(--brand); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.guide-card strong { display: block; font-size: 19px; line-height: 1.35; margin-bottom: 6px; }
.guide-card em { display: block; font-style: normal; color: var(--muted); font-size: 15px; line-height: 1.5; margin-bottom: 10px; }
.guide-card b { color: var(--brand); font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .guide-card { grid-template-columns: 1fr; } }

/* Contact page */
.contact-page h1 { margin-bottom: 6px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-top: 22px; align-items: start; }
.contact-card { padding: 26px; }
.contact-form { display: grid; gap: 14px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form textarea { width: 100%; min-height: 160px; resize: vertical; font: inherit; }
.contact-form .btn-lg { justify-self: start; }
.contact-side { display: grid; gap: 14px; }
.contact-side .card { padding: 18px; }
.contact-side h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 6px; }
.contact-side h3 .ic { color: var(--brand); }
.contact-side p { margin: 4px 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { text-align: center; padding: 20px 10px; }
.contact-ok { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .contact-row { grid-template-columns: 1fr; } .contact-form .btn-lg { justify-self: stretch; } }
/* Admin → Messages */
.msg-list { display: grid; gap: 14px; }
.msg { padding: 18px 20px; }
.msg.is-new { border-left: 4px solid var(--brand); }
.msg-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.msg-head .tag { margin-left: 0; }
.msg-actions { display: flex; gap: 8px; align-items: center; }
.msg-actions form { margin: 0; }
.msg-body { margin: 12px 0 0; white-space: normal; line-height: 1.6; }
.contact-form .captcha { justify-content: flex-start; }
@media (max-width: 360px) { .contact-form .captcha .g-recaptcha { transform-origin: left top; } }
/* Admin → Payments */
.pay-switch { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.pay-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 210px; cursor: pointer; background: #fff; }
.pay-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(14, 124, 116, .15); }
.pay-opt.is-off { opacity: .55; cursor: not-allowed; }
.pay-opt input { margin-top: 3px; }
.pay-opt span { display: grid; gap: 2px; }
.pay-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-head h3 { margin: 0; }
.pay-mode { display: flex; gap: 6px; margin: 0; }
.pay-mode .chip { cursor: pointer; font: inherit; }
.pay-form { display: grid; gap: 12px; max-width: 560px; margin-bottom: 8px; }
.pay-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.pay-form .btn { justify-self: start; }
.card h4 { margin: 22px 0 6px; display: flex; gap: 8px; align-items: center; }
.copy-code { display: inline-block; padding: 8px 12px; background: var(--bg-soft, #f3f5f7); border-radius: 8px; user-select: all; word-break: break-all; }
.next-pay { margin: 6px 0 2px; }
.tag-credit { background: var(--brand-soft); color: var(--brand); margin-left: 0; }
.sync-form { display: flex; justify-content: flex-end; margin: -6px 0 8px; }
/* Checkout */
.co-page { max-width: 1080px; }
.co-page h1 { margin: 0 0 18px; }
.co-back { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.co-back .ic { transform: rotate(180deg); }
.co-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }
.co-card { padding: 26px; margin: 0; }
.co-plan { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.co-plan h2 { margin: 0 0 4px; font-size: 24px; }
.co-plan p { margin: 0; }
.co-badge { display: inline-flex; align-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.co-period { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.co-opt { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; display: grid; gap: 2px; text-align: left; background: #fff; font: inherit; color: inherit; }
.co-opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 124, 116, .12); }
.co-opt strong { font-size: 15px; }
.co-opt span { font-size: 13px; color: var(--ink-2); }
.co-opt .save { color: var(--brand); }
.co-feat { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; font-size: 14.5px; }
.co-feat li { display: flex; gap: 8px; align-items: center; }
.co-feat .ic { color: var(--brand); flex: none; }
.co-lines { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; display: grid; gap: 9px; font-size: 15px; }
.co-lines[hidden] { display: none; }
.co-line { display: flex; justify-content: space-between; gap: 12px; }
.co-line.credit { color: var(--brand); }
.co-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.co-total strong { font-size: 26px; }
.co-then { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
.co-pay h3 { margin: 0 0 4px; }
.co-who { font-size: 14px; color: var(--ink-2); margin: 0 0 18px; word-break: break-all; }
#pp-buttons { min-height: 110px; }
.co-loading { padding: 34px 0; text-align: center; color: var(--ink-2); font-size: 14px; }
.co-safe { display: grid; gap: 10px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.co-safe div { display: flex; gap: 9px; align-items: flex-start; }
.co-safe .ic { color: var(--brand); flex: none; margin-top: 1px; }
.co-terms { font-size: 12.5px; color: var(--ink-2); margin: 16px 0 0; line-height: 1.6; }
@media (max-width: 900px) { .co-wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .co-feat { grid-template-columns: 1fr; } .co-card { padding: 20px; } }
.co-go { width: 100%; justify-content: center; gap: 8px; padding: 15px 18px; font-size: 16.5px; }
.co-go:disabled { opacity: .75; cursor: wait; }
.co-methods { text-align: center; font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
.credit-note { color: var(--brand); }
.co-line.sub { font-size: 14px; color: var(--ink-2); }
.co-line.strong { font-weight: 700; border-top: 1px dashed var(--line); padding-top: 9px; }
.note-box { background: var(--brand-soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.alert-wait { display: flex; align-items: center; gap: 12px; background: #eef6ff; border: 1px solid #cfe2fb; color: #1d4f8f; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #b9d3f3; border-top-color: #1d6fd6; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.tool-guide { color: var(--ink-2); line-height: 1.7; font-size: 16px; margin-bottom: 8px; }
.tool-guide p { margin: 0 0 12px; }
.tool-guide ul { margin: 0 0 12px; padding-left: 20px; }
.tool-guide li { margin-bottom: 8px; }
.tool-guide strong { color: var(--ink); }
