/* offlinepix.com — one stylesheet, no framework.
   A dark graphite band holds the headline; the converter card sits across
   its bottom edge and is the only elevated surface on the page. Everything
   else is flat, left-aligned and quiet. */

@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #15181d;          /* graphite: band, header, footer, headings */
  --ink-2: #2d3340;
  --text: #1f242c;
  --muted: #677082;
  --line: #e3e6ea;
  --line-2: #d4d8de;
  --paper: #fafbfc;
  --card: #ffffff;
  --tint: #f0f2f4;
  --mint: #10b981;         /* the single accent */
  --mint-ink: #08754f;      /* 4.5:1+ on --tint, the darkest surface links sit on */
  --mint-tint: #e6f7f0;
  --on-ink: #e9ecef;
  --on-ink-muted: #9aa3b2;
  --warn: #b45309; --warn-bg: #fff7e6;
  --danger: #b42318; --danger-bg: #fef1ef;
  --r-card: 16px; --r-ui: 10px; --r-chip: 6px;
  --max: 1080px;
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(21, 24, 29, .06), 0 12px 32px -12px rgba(21, 24, 29, .28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--text); background: var(--paper); }
a { color: var(--mint-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Links inside running text are underlined so they are not told apart by
   colour alone (WCAG 1.4.1); nav, buttons and cards stay bare. */
main p a, .note a, .site-footer p a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 .5rem; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem); }
h2 { font-size: 1.45rem; margin-top: 2.75rem; }
h3 { font-size: 1.05rem; margin-top: 1.5rem; }
p { margin: 0 0 1rem; max-width: 64ch; }
button { font: inherit; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mono { font-family: var(--mono); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ── header (on the graphite band) ───────────────────────────── */
.site-header { background: var(--ink); color: var(--on-ink); border-bottom: 1px solid rgba(255,255,255,.07); }
.site-header .wrap { display: flex; align-items: center; gap: 16px 28px; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; color: #fff; }
.brand:hover { text-decoration: none; }
.brand .lockup { height: 30px; width: auto; display: block; }
.nav { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06); font-size: .92rem; }
.nav a { color: var(--on-ink-muted); padding: 6px 13px; border-radius: 999px; font-weight: 500; transition: color .15s, background .15s; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: #fff; }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.offline-pill { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 500; padding: 5px 11px 5px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: var(--on-ink); white-space: nowrap; }
.offline-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(16,185,129,.22); }
.btn.install { padding: 7px 13px; font-size: .88rem; background: var(--mint); color: var(--ink); }
.btn.install:hover { background: #0ea371; }
.btn.install[hidden] { display: none; }

/* ── graphite band + overlapping card ─────────────────────────── */
.band { background: var(--ink); color: var(--on-ink); padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(5rem, 9vw, 7rem); }
.band h1 { color: #fff; max-width: 20ch; }
.band .lede { font-size: 1.1rem; color: var(--on-ink-muted); max-width: 56ch; margin: .75rem 0 1.25rem; }
.band .crumbs { margin: 0 0 1.25rem; }
.band .crumbs a, .band .crumbs li { color: var(--on-ink-muted); }
.proof { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; font-size: .95rem; color: #fff; }
.proof::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--mint); flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center/70% no-repeat, linear-gradient(#000,#000); -webkit-mask-composite: xor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center/70% no-repeat, linear-gradient(#000,#000); mask-composite: exclude; }
.lift { margin-top: clamp(-5.5rem, -7vw, -4rem); position: relative; }

.crumbs { font-size: .9rem; color: var(--muted); margin: 1.25rem 0 .25rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { color: var(--ink-2); }

/* ── converter card ───────────────────────────────────────────── */
.converter { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; margin: 0 0 2rem; }
.drop {
  position: relative; display: grid; place-items: center; text-align: center; gap: 4px;
  padding: clamp(2rem, 5vw, 3.25rem) 1.25rem; margin: 10px; border: 1.5px dashed var(--line-2); border-radius: 12px;
  background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-within { border-color: var(--mint); }
.drop.over { border-color: var(--mint); background: var(--mint-tint); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop .big { font-size: 1.2rem; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.drop .sub { color: var(--muted); font-size: .92rem; max-width: 42ch; }
.drop .btn { pointer-events: none; margin-top: 10px; }
.btn { font-weight: 600; padding: 11px 18px; border-radius: 999px; border: 0; cursor: pointer; background: var(--ink); color: #fff; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: background .15s; }
.btn:hover { background: var(--ink-2); text-decoration: none; }
.btn.primary { background: var(--mint); color: var(--ink); }
.btn.primary:hover { background: #0ea371; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); }
.btn.secondary:hover { background: var(--tint); }
.btn.small { padding: 7px 13px; font-size: .9rem; }
.options { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; padding: 10px 16px 12px; border-top: 1px solid var(--line); font-size: .92rem; }
.options label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.options select, .options input[type="number"] { font: inherit; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); color: var(--ink); font-weight: 500; }
.options input[type="number"] { width: 6.5em; }
.options input[type="range"] { width: 130px; accent-color: var(--mint); }
.options output { min-width: 2.2em; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.options .spacer { flex: 1; }
.options .hint { color: var(--muted); font-weight: 400; }
.queue { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 8px; }
.queue:empty { display: none; }
.job { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.job img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--tint); }
.job .thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--tint); display: grid; place-items: center; font-size: .66rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.job .name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .meta { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.job .meta .saved { color: var(--mint-ink); font-weight: 600; }
.job .meta .err { color: var(--danger); }
.job progress { width: 100%; height: 4px; margin-top: 6px; appearance: none; border: 0; background: var(--line); border-radius: 2px; overflow: hidden; }
.job progress::-webkit-progress-bar { background: var(--line); }
.job progress::-webkit-progress-value { background: var(--mint); }
.job progress::-moz-progress-bar { background: var(--mint); }
.job progress:indeterminate::-webkit-progress-bar { background: linear-gradient(90deg, var(--line) 0 40%, var(--mint) 50%, var(--line) 60% 100%) 0 0/200% 100%; animation: slide 1.1s linear infinite; }
@keyframes slide { to { background-position: -200% 0; } }
.job .act { display: flex; gap: 6px; }
.summary { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--tint); font-size: .92rem; }
.summary[hidden] { display: none; }
.summary .tot { font-weight: 600; color: var(--ink); }

/* ── content blocks ───────────────────────────────────────────── */
.reasons { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: 10px; max-width: 64ch; }
.reasons li { padding-left: 30px; position: relative; }
.reasons li::before { content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 50%; background: var(--mint-tint); border: 1.5px solid var(--mint); }
.prose { max-width: 64ch; }
.faq h3 { margin-top: 1.5rem; }
.faq p { color: var(--ink-2); }
.note { border-left: 3px solid var(--mint); background: var(--tint); border-radius: 0 var(--r-ui) var(--r-ui) 0; padding: 12px 16px; font-size: .92rem; color: var(--ink-2); max-width: 70ch; }
.note p { margin: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; background: var(--card); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1rem 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 18px 20px 18px 56px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 600; font-size: .85rem; }
.ad-slot { min-height: 0; margin: 1.5rem 0; }
.tbl-wrap { overflow-x: auto; margin: .5rem 0 1rem; border: 1px solid var(--line); border-radius: var(--r-ui); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--ink); background: var(--tint); }

/* tool directory: a format pair, not a card kit */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 0; margin: .75rem 0 1.5rem; list-style: none; }
.tool-grid a { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 600; font-size: .98rem; transition: border-color .15s; }
.tool-grid a:hover { border-color: var(--mint); text-decoration: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; letter-spacing: .01em; padding: 3px 8px; border-radius: var(--r-chip); background: var(--tint); color: var(--ink-2); font-family: var(--mono); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--muted)); }
.chip.heic { --c: #6366f1; } .chip.jpg { --c: #f59e0b; } .chip.png { --c: #3b82f6; } .chip.webp { --c: #10b981; } .chip.avif { --c: #ec4899; } .chip.same { --c: var(--ink-2); }
.pair { display: inline-flex; align-items: center; gap: 6px; }
.pair .to { color: var(--muted); font-size: .9rem; }
.tool-grid .sub { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.tool-grid .pair { order: 2; }
.groups h3 { margin-top: 1.75rem; color: var(--ink-2); font-weight: 500; font-size: 1rem; }

/* ── footer ───────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--on-ink-muted); margin-top: 5rem; padding: 2.5rem 0 3rem; font-size: .9rem; }
.site-footer .wrap { display: grid; gap: 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--on-ink); }
.site-footer p { max-width: 80ch; }

@media (max-width: 640px) {
  .job { grid-template-columns: 40px 1fr; }
  .job .act { grid-column: 1 / -1; }
  .site-header .wrap { gap: 8px 12px; }
  .nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .header-end { margin-left: auto; }
  .offline-pill { font-size: .74rem; }
}
@media (max-width: 480px) {
  /* The band's proof line already says it; keep the header to lockup + install. */
  .offline-pill { display: none; }
  .options .hint { display: none; }
}
