/* Sticker Printer Hub — one stylesheet for every page. */
:root {
  --bg: #fbf7f1;
  --ink: #1e1b2e;
  --muted: #5b566b;
  --accent: #e8572a;
  --accent-strong: #c9431b; /* white text contrast ≈ 4.9:1 */
  --accent-soft: #fde9df;
  --link: #5b4bc4;
  --lavender: #6b5bd2;
  --lavender-soft: #efecfb;
  --card: #ffffff;
  --line: #eae3d8;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, canvas, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.6rem); margin: 0.2em 0 0.35em; }
h2 { font-size: 1.45rem; margin: 1.8em 0 0.5em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }

.container { max-width: 1152px; margin: 0 auto; padding: 0 20px; }
.prose { max-width: 70ch; }
.small { font-size: 0.9rem; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; padding-top: 10px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.1rem; min-height: 44px; }
.brand:hover { color: var(--ink); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.site-nav { flex: 1 1 auto; min-width: 0; position: relative; }
.site-nav ul {
  position: relative; display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
/* Right-edge fade says "this row scrolls"; the inline nav script removes it at the end of the row. */
.site-nav::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 48px; pointer-events: none;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 85%);
  opacity: 0; transition: opacity 0.15s;
}
@media (max-width: 1099px) {
  .site-nav.fade-r::after { opacity: 1; }
  .site-nav ul { padding-right: 40px; }
}
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px;
  white-space: nowrap; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.site-nav a:hover { background: var(--lavender-soft); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: #8a2c10; }
@media (min-width: 1100px) { .site-nav ul { justify-content: flex-end; } }

/* Footer */
.site-footer { margin-top: 64px; background: var(--card); border-top: 1px solid var(--line); font-size: 0.92rem; }
.footer-inner { padding-top: 28px; padding-bottom: 36px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer-disclosure { margin: 8px 0 16px; line-height: 1.5; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0; margin: 0; }
.site-footer nav a { display: inline-block; padding: 8px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #a8360f; color: #fff; }
.btn-primary:disabled { background: #cfc8bd; color: #4a4558; cursor: not-allowed; }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink); min-height: 44px; }
.btn-quiet:hover { background: var(--bg); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin: 8px 0 24px; }
.card h2 { font-size: 1.2rem; margin: 14px 0 6px; }
.card-link { display: block; color: inherit; text-decoration: none; max-width: 360px; }
.card-link:hover h2 { color: var(--link); text-decoration: underline; }
.card-media {
  border-radius: 10px; overflow: hidden; background: var(--lavender-soft);
  display: flex; justify-content: center;
}
.card-media img { display: block; width: 100%; max-width: 260px; }
.template-card .btn { width: 100%; }

/* Content pages */
.page { padding-top: 16px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; color: #a39c90; }
.page-head { margin-bottom: 8px; }
.lede { font-size: 1.15rem; color: #34304a; }
.updated { font-size: 0.88rem; color: var(--muted); }
.cite { font-size: 0.85em; color: var(--muted); white-space: normal; }
.caveat { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; }
.notice-spec { background: var(--lavender-soft); border: 1px solid #dcd6f5; border-radius: 8px; padding: 12px 16px; margin: 16px 0 20px; }
.unknown { font-style: italic; color: var(--muted); }
.sources { margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.sources h2 { font-size: 1.1rem; margin-top: 0.6em; }
.sources a { word-break: break-all; }
.steps li { margin-bottom: 0.5em; }
.faq-entry h3 { font-size: 1.12rem; margin-top: 1.4em; }

/* Tables — scroll inside the wrapper, never widen the page */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.95rem; }
caption { text-align: left; padding: 12px 14px 4px; font-size: 0.85rem; color: var(--muted); }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--line); }
thead th { background: #f6f1e9; font-size: 0.88rem; }
tbody th { font-weight: 700; width: 18%; }
table.compare td { width: 41%; }

/* Home + tool */
.hero { padding: 18px 0 6px; }
.hero h1 { margin-bottom: 0.2em; }
.subtitle { font-size: 1.1rem; color: #34304a; margin-bottom: 14px; max-width: 70ch; }
.tool-grid {
  display: grid; gap: 14px;
  grid-template-areas: "upload" "preview" "settings";
}
.tool-upload { grid-area: upload; }
.tool-preview { grid-area: preview; text-align: center; }
.tool-settings { grid-area: settings; }
@media (min-width: 760px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); grid-template-areas: "upload preview" "settings preview"; align-items: start; }
  .tool-preview { position: sticky; top: 12px; }
}
.dropzone {
  position: relative; border: 2px dashed #cbbfae; border-radius: 12px; background: var(--bg);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.is-dragging { border-color: var(--lavender); background: var(--lavender-soft); }
.dropzone-label { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 18px 14px; cursor: pointer; min-height: 120px; justify-content: center; }
.dropzone-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-strong); color: #fff; font-size: 1.6rem; font-weight: 700; line-height: 1;
}
#file-input:focus-visible + .dropzone-label { outline: 3px solid var(--lavender); outline-offset: 2px; border-radius: 10px; }
@media (hover: none) { .drop-hint { display: none; } }
.privacy-note { font-size: 0.88rem; color: #37324a; margin: 10px 0 8px; }
.privacy-note::before { content: "🔒 "; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 8px 0; }
.thumbs:empty { display: none; }
.thumbs li { position: relative; width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--line); background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 0 0 / 12px 12px; display: grid; place-items: center; }
.thumbs img { max-width: 56px; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.thumb-remove {
  position: absolute; top: -10px; right: -10px; width: 40px; height: 40px; padding: 0;
  border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 0;
}
.thumb-remove::after {
  content: "×"; display: grid; place-items: center; width: 24px; height: 24px; margin: 8px;
  border-radius: 50%; background: var(--ink); color: #fff; font-size: 17px; line-height: 1;
}
.tool-status { font-size: 0.9rem; color: var(--muted); margin: 6px 0 0; min-height: 1.2em; }
.preview-frame {
  margin: 0 auto; max-width: 360px; border-radius: 6px; border: 1px solid var(--line);
  background: repeating-conic-gradient(#e9e4dc 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  line-height: 0;
}
#preview { display: block; width: 100%; height: auto; aspect-ratio: 4 / 7; }
.fit-count { font-weight: 700; margin: 10px 0 10px; min-height: 1.6em; }
.tool-preview .btn { width: 100%; max-width: 360px; }
.tool-preview .small { margin: 10px auto 0; max-width: 360px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 0.86rem; color: var(--muted); margin: 6px 0 0; }
select, input[type="number"] {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid #d6cdbf; border-radius: 10px;
}
input[type="range"] { width: 100%; min-height: 40px; accent-color: var(--accent-strong); }
output { font-weight: 400; color: var(--muted); }
.field-check { display: flex; align-items: center; gap: 10px; }
.field-check input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent-strong); flex: none; }
.field-check label { margin: 0; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.home-copy { margin-top: 20px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.faq-item p { margin: 4px 0 12px; }
.notfound { padding: 40px 0; }

/* Home hub */
.hub-cards { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 0; margin: 18px 0 8px; }
@media (max-width: 800px) {
  .hub-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .hub-cards { grid-template-columns: 1fr; }
}
.hub-card { display: flex; flex-direction: column; gap: 4px; height: 100%; color: inherit; text-decoration: none; padding: 14px 16px; }
.hub-card strong { color: var(--link); line-height: 1.3; }
.hub-card span { font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.hub-card:hover { border-color: var(--lavender); }
.hub-card:hover strong { text-decoration: underline; }
table.glance td { width: 27%; }
/* Promo cards: full-width 2-up on desktop, stacked on mobile; never inside .prose */
.promo-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 8px 0 24px; }
.promo-card { max-width: none; height: 100%; display: flex; gap: 20px; padding: 22px; }
.promo-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.promo-card h2 { margin: 4px 0 0; }
.promo-card p { margin: 0; }
.promo-card .btn { align-self: flex-start; margin-top: auto; max-width: 100%; white-space: nowrap; }
.promo-media .card-media { flex: 0 0 150px; align-self: flex-start; }
.promo-media .card-media img { max-width: 150px; }
.feature-list { margin: 8px 0 24px; }
.feature-card { max-width: 720px; }
.feature-card .card-media { flex-basis: 180px; }
.feature-card .card-media img { max-width: 180px; }
@media (max-width: 720px) {
  .promo-grid { grid-template-columns: 1fr; }
  .promo-media { flex-direction: column; }
  .promo-media .card-media { flex-basis: auto; align-self: stretch; }
  .promo-media .card-media img { max-width: 140px; }
}
@media (max-width: 340px) { .promo-card .btn { white-space: normal; text-align: center; } }

/* Buying guide */
.card-grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.printer-card h3 { margin-top: 0; }
.printer-card ul { padding-left: 1.2em; }
.printer-card .facts { font-size: 0.95rem; }
.fit-label { font-weight: 700; margin: 0.8em 0 0.3em; }

/* Cost calculator */
.calc { margin: 20px 0 8px; max-width: 760px; }
.calc h2 { margin-top: 0; }
.calc-presets ul { display: flex; flex-direction: column; gap: 6px; list-style: none; padding: 0; margin: 0 0 8px; }
.calc-presets .btn { min-height: 44px; padding: 6px 14px; text-align: left; font-weight: 600; }
.calc-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 12px; }
.calc-money { display: grid; grid-template-columns: 76px 1fr; gap: 8px; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 8px; }
.calc-out div { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; }
.calc-out dt { font-size: 0.88rem; color: #5a2a14; }
.calc-out dd { margin: 0; font-size: 1.5rem; font-weight: 800; }
.calc-next { margin: 12px 0 8px; }
.calc-next a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--lavender-soft);
  color: var(--link);
  border: 1px solid #dcd6f5;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.calc-next a:hover {
  background: var(--link);
  color: #fff;
}
#where-to-buy { margin: 16px 0 20px; max-width: 760px; }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .card { padding: 14px; }
  .field-row { grid-template-columns: 1fr; }
}
