/* PlopHQ shared styles — mobile-first, outdoorsy creator brand.
   Theme colors/fonts arrive via CSS variables set from Firestore. */
:root {
  --brand: #1e4d2b;
  --brand-dark: #12331b;
  --accent: #e9a13b;
  --bg: #f6f2ea;
  --ink: #1d2620;
  --muted: #5d6a61;
  --card: #ffffff;
  --line: #e3ddd0;
  --font: 'Archivo', system-ui, sans-serif;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(18, 51, 27, .12);
  --shadow-lg: 0 18px 48px rgba(18, 51, 27, .22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }

/* ---------- motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); }
}
@keyframes shimmer {
  from { background-position: -400px 0; } to { background-position: 400px 0; }
}
@keyframes heroShift {
  0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; }
}
.rise { opacity: 0; animation: rise .55s cubic-bezier(.2, .7, .3, 1) forwards; animation-delay: var(--d, 0s); }
.pop { animation: pop .35s ease; }
.pressable { transition: transform .12s ease, box-shadow .2s ease; }
.pressable:active { transform: scale(.97); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  html { scroll-behavior: auto; }
  .rise { opacity: 1; }
  .pcard.pre { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 45%, #2f6b3a 70%, var(--brand-dark));
  background-size: 220% 220%;
  animation: heroShift 16s ease infinite;
  color: #fff;
  text-align: center;
  padding: 44px 20px 38px;
}
.hero .wordmark {
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
}
.hero .wordmark span { color: var(--accent); }
.hero .tagline { opacity: .92; margin: 8px auto 0; max-width: 34em; font-size: 1.02rem; }
.hero .badge {
  display: inline-block; margin-top: 14px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.14); font-size: .8rem; font-weight: 600; letter-spacing: .04em;
}

/* ---------- links page ---------- */
.wrap { max-width: 560px; margin: 0 auto; padding: 22px 16px 40px; }
.link-list { display: grid; gap: 12px; }
.link-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; color: var(--ink);
  box-shadow: 0 2px 10px rgba(18,51,27,.05);
  transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.link-card:active { transform: scale(.98); }
.link-card .ic {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.35rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
}
.link-card .ic.amber { background: linear-gradient(135deg, var(--accent), #c77f1d); }
.link-card b { display: block; font-size: 1.05rem; }
.link-card small { color: var(--muted); }
.link-card .go { margin-left: auto; color: var(--muted); font-size: 1.2rem; transition: transform .2s ease, color .2s ease; }
.link-card:hover .go { transform: translateX(3px); color: var(--accent); }
.section-label {
  margin: 26px 2px 10px; font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 26px 16px 34px; }

/* ---------- shop ---------- */
.shop-head {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 55%, var(--brand-dark));
  background-size: 220% 220%; animation: heroShift 16s ease infinite;
  color: #fff; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.shop-head .home { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.shop-head .home span { color: var(--accent); }
.shop-head .titles { flex: 1; min-width: 0; }
.shop-head .titles b { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-head .titles small { opacity: .85; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-btn {
  position: relative; border: 0; border-radius: 999px; padding: 10px 16px;
  background: var(--accent); color: #23180a; font-weight: 700; font-size: .95rem;
  transition: transform .15s ease, filter .2s ease;
}
.cart-btn:hover { filter: brightness(1.06); }
.cart-btn:active { transform: scale(.95); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px;
  border-radius: 999px; background: #fff; color: var(--brand-dark);
  font-size: .75rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.grid {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  max-width: 660px; margin: 0 auto; padding: 22px 14px 70px;
}
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-align: left; padding: 0; width: 100%;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1), opacity .5s ease, box-shadow .25s ease;
}
.pcard.pre { opacity: 0; transform: translateY(30px); }
.pcard.pre.in { opacity: 1; transform: none; }
.pcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.pcard:active { transform: scale(.985); }
.pcard .ph { aspect-ratio: 4 / 3; overflow: hidden; background: #e9e4d6; display: block; position: relative; }
.soldout-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: #b3261e; color: #fff; font-weight: 800; font-size: .85rem;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; transform: rotate(-4deg);
  box-shadow: var(--shadow);
}
.pcard.soldout .ph img { opacity: .5; filter: grayscale(.45); }
.pcard.soldout .noimg { opacity: .5; }
.pcard.soldout .meta { opacity: .65; }
.lowstock { color: #7a4b00; font-weight: 700; font-size: .95rem; margin: 6px 0 0; }
.lowstock.out { color: #b3261e; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pcard:hover .ph img { transform: scale(1.06); }
.pcard .meta { padding: 16px 18px 18px; display: block; }
.pcard .meta b { display: block; font-size: 1.3rem; margin-bottom: 3px; }
.pcard .price { color: var(--brand); font-weight: 800; font-size: 1.2rem; }
.pcard .noimg {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-size: 3.6rem; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
}
.empty {
  max-width: 520px; margin: 60px auto; text-align: center; padding: 0 20px; color: var(--muted);
}
.empty .big { font-size: 2.6rem; margin-bottom: 10px; }
.skel {
  border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--card);
}
.skel .ph, .skel .ln {
  background: linear-gradient(90deg, #e9e4d6 25%, #f4efe2 50%, #e9e4d6 75%);
  background-size: 800px 100%; animation: shimmer 1.3s infinite linear;
}
.skel .ph { aspect-ratio: 4 / 3; }
.skel .ln { height: 14px; border-radius: 6px; margin: 12px 14px 0; }
.skel .ln.short { width: 45%; margin-bottom: 16px; }

/* overlays: quick view + cart */
.scrim {
  position: fixed; inset: 0; background: rgba(15, 26, 18, .55);
  opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 40;
}
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 50; background: var(--card); overflow: auto;
  transition: transform .38s cubic-bezier(.2, .8, .3, 1);
}
.sheet-qv {
  left: 0; right: 0; bottom: 0; max-height: 92vh; border-radius: 22px 22px 0 0;
  transform: translateY(105%); padding: 18px 18px 28px;
}
@media (min-width: 720px) {
  .sheet-qv { left: 50%; right: auto; bottom: auto; top: 50%; width: 680px;
    transform: translate(-50%, -46%) scale(.96); opacity: 0; border-radius: 22px; }
}
.sheet-qv.on { transform: translateY(0); }
@media (min-width: 720px) { .sheet-qv.on { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.sheet-cart {
  top: 0; right: 0; bottom: 0; width: min(400px, 92vw);
  transform: translateX(105%); padding: 18px; box-shadow: var(--shadow-lg);
}
.sheet-cart.on { transform: translateX(0); }
.sheet .x {
  float: right; border: 0; background: #f0ebdd; width: 36px; height: 36px;
  border-radius: 999px; font-size: 1rem; transition: transform .15s ease;
}
.sheet .x:active { transform: scale(.9); }
.qv-img { border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.qv-img img { width: 100%; max-height: 46vh; object-fit: cover; }
.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { border: 0; background: #f6f2ea; width: 38px; height: 38px; font-size: 1.05rem; }
.qty button:active { background: var(--accent); }
.qty output { min-width: 34px; text-align: center; font-weight: 700; }
.btn {
  display: inline-block; border: 0; border-radius: 999px; padding: 12px 22px;
  font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.96); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { filter: brightness(1.1); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #23180a; }
.btn-accent:hover { filter: brightness(1.06); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none !important; box-shadow: none !important; }
.qty button:disabled { opacity: .45; cursor: not-allowed; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.cart-item .rm { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: .85rem; }
.note { font-size: .85rem; color: var(--muted); }

/* ---------- admin / back area ---------- */
.admin-wrap { max-width: 860px; margin: 0 auto; padding: 20px 16px 60px; }
.gate {
  max-width: 380px; margin: 12vh auto 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); text-align: center;
}
.field { margin-bottom: 14px; text-align: left; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.field input[type="text"], .field input[type="number"], .field input[type="url"],
.field input[type="email"], .field input[type="password"], .field textarea, .field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff;
}
.field input[type="color"] { width: 64px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 3px; }
.field textarea { min-height: 84px; resize: vertical; }
.err { color: #b3261e; font-size: .9rem; min-height: 1.2em; }
.ok { color: var(--brand); font-size: .9rem; min-height: 1.2em; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tab {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 9px 18px; font-weight: 700; transition: all .2s ease;
}
.tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.panel { display: none; }
.panel.on { display: block; animation: rise .35s ease both; }
.admin-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px;
}
.admin-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
.admin-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; background: #e9e4d6; }
.admin-row .grow { flex: 1; min-width: 0; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: .85rem; font-weight: 600; }
.mini.danger { color: #b3261e; border-color: #ecc9c6; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; background: #e9e4d6; color: var(--brand-dark); vertical-align: 2px; }
.pill.shipped { background: #fbe3b8; color: #7a4b00; }
.pill.delivered { background: var(--brand); color: #fff; }
.pill.refunded { background: #f6d2cf; color: #b3261e; }
.pill.pending { background: #e9e4d6; color: var(--brand-dark); }
.pill.paid { background: #dcead9; color: #1e4d2b; }
.pill.pickedup { background: #d9e6f2; color: #17456e; }
.pill.canceled { background: #e3e0da; color: #5a564e; }
.pill.returned { background: #f3ddc8; color: #8a4b12; }
.pill.sale { background: #f6d2cf; color: #b3261e; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; }
/* Books tab: expenses-by-category table */
.books-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.books-table th, .books-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.books-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.books-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.books-table tfoot td { font-weight: 800; border-bottom: 0; }
.stat-row { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 12px; }
.stat-row .stat b { display: block; font-size: 1.2rem; }
.stat-row .stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.top-items { margin: 0; padding-left: 18px; font-size: .92rem; }
.top-items li { margin: 2px 0; }
.swatch { height: 54px; border-radius: 12px; border: 1px solid var(--line); }
.banner {
  background: #fdf3e0; border: 1px solid #ecd9ae; color: #6b5312; border-radius: 12px;
  padding: 12px 14px; font-size: .92rem; margin-bottom: 16px;
}

/* ---------- tools ---------- */
.tool-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--card);
  padding: 34px 18px; text-align: center; transition: border-color .2s ease, background .2s ease;
}
.drop.over { border-color: var(--accent); background: #fdf6e7; }
.checker {
  background-image: conic-gradient(#d8d2c2 0 25%, #f4f0e4 0 50%, #d8d2c2 0 75%, #f4f0e4 0);
  background-size: 22px 22px; border-radius: 14px; overflow: hidden;
}
.progress { height: 10px; background: #e9e4d6; border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 9px 16px; font-weight: 600; }
.seg button.on { background: var(--brand); color: #fff; }

/* ---------- builder pages ---------- */
.page-head {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 55%, var(--brand-dark));
  background-size: 220% 220%; animation: heroShift 16s ease infinite;
  color: #fff; padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.page-head .wordmark { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; }
.page-head .wordmark span { color: var(--accent); }
.page-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.page-nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 7px 12px; border-radius: 999px; transition: background .2s ease;
}
.page-nav a:hover { background: rgba(255,255,255,.16); }
.page-wrap { max-width: 760px; margin: 0 auto; padding: 30px 16px 50px; }
.page-h1 { font-size: clamp(2rem, 6vw, 2.9rem); font-weight: 800; margin: .2em 0 .5em; }
.page-h2 { font-size: 1.55rem; font-weight: 700; margin: 1.1em 0 .45em; }
.page-text { white-space: pre-line; line-height: 1.65; font-size: 1.05rem; margin: 0 0 1em; }
.page-img { width: 100%; border-radius: var(--radius); margin: 16px 0; box-shadow: var(--shadow); }
.page-btn-row { margin: 18px 0; }
.page-video {
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  margin: 18px 0; background: #000; box-shadow: var(--shadow);
}
.page-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.page-divider { border: 0; border-top: 2px solid var(--line); margin: 32px 0; }
.page-shop {
  text-align: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 20px; margin: 22px 0; box-shadow: var(--shadow);
}
.page-shop h2 { margin-top: 0; }
.page-wrap .link-card { margin: 18px 0; }

/* per-page banner (under the header, full width) */
.page-banner {
  position: relative; min-height: 230px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.page-banner-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.page-banner-shade { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.page-banner-text {
  position: relative; z-index: 1; color: #fff; font-weight: 800;
  font-size: clamp(1.7rem, 5.5vw, 2.6rem); line-height: 1.15;
  padding: 52px 18px; text-shadow: 0 2px 14px rgba(0,0,0,.35);
}

/* columns block: side by side on desktop, stacked on phones */
.page-columns { display: flex; gap: 22px; margin: 18px 0; align-items: flex-start; }
.page-col { flex: 1 1 0; min-width: 0; }
.page-col > :first-child { margin-top: 0; }
@media (max-width: 640px) {
  .page-columns { flex-direction: column; }
  .page-col { width: 100%; }
}

/* block editor (back area) */
.block-edit {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px; background: #fffdf6;
}
.block-edit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.block-edit-head b { flex: 1; }
.block-edit.sub { background: #fff; margin-bottom: 10px; }
.block-move-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.block-move-row select { flex: 1; min-width: 140px; }
.col-edit-wrap { display: flex; gap: 12px; flex-wrap: wrap; }
.col-edit {
  flex: 1 1 240px; min-width: 0; border: 1px dashed var(--line);
  border-radius: 10px; padding: 10px; background: rgba(255,255,255,.55);
}
.col-edit > b { display: block; margin-bottom: 8px; font-size: .9rem; }
.col-add-row { display: flex; gap: 8px; align-items: end; }
.col-add-row .field { flex: 1; margin-bottom: 0; }

/* editor: collapsible SEO section + phone-width live preview */
.seo-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 4px; margin: 16px 0; }
.seo-box summary { font-weight: 700; cursor: pointer; padding-bottom: 8px; }
.page-preview-frame {
  width: 390px; max-width: 100%; height: 600px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  margin: 0 auto; box-shadow: var(--shadow);
}

/* ---------- packing slip (print only) ---------- */
.packing-slip { display: none; }
.packing-slip .slip-brand { font-size: 1.55rem; font-weight: 800; }
.packing-slip .slip-title { font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.packing-slip .slip-meta {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 2px solid #000; margin-top: 14px; padding-top: 10px;
  font-size: .95rem;
}
.packing-slip h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 22px 0 6px; }
.packing-slip .slip-shipto { font-size: 1.05rem; line-height: 1.45; }
.packing-slip .slip-shipto .slip-name { font-weight: 700; }
.packing-slip .slip-table { width: 100%; border-collapse: collapse; margin-top: 22px; }
.packing-slip .slip-table th, .packing-slip .slip-table td {
  padding: 8px 6px; border-bottom: 1px solid #bbb; text-align: left; font-size: 1rem;
}
.packing-slip .slip-table th {
  border-bottom: 2px solid #000; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .08em;
}
.packing-slip .slip-table .num { text-align: right; }
.packing-slip .slip-table tfoot td { border-bottom: 0; font-weight: 800; }
.packing-slip .slip-extra { font-size: .95rem; margin-top: 10px; }
.packing-slip .slip-foot {
  margin-top: 36px; border-top: 1px solid #bbb; padding-top: 12px;
  font-size: .95rem; line-height: 1.55;
}
@media print {
  @page { size: letter; margin: 0.7in; }
  html, body { background: #fff !important; }
  body > *:not(.packing-slip) { display: none !important; }
  .packing-slip {
    display: block !important; color: #000; background: #fff;
    font-family: Arial, Helvetica, sans-serif;
  }
}

/* ---------- invoice (print only; shares the slip's inner styling) ---------- */
.invoice-doc { display: none; }
.invoice-doc .slip-brand { font-size: 1.55rem; font-weight: 800; }
.invoice-doc .slip-title { font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.invoice-doc .slip-meta {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 2px solid #000; margin-top: 14px; padding-top: 10px;
  font-size: .95rem;
}
.invoice-doc h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 22px 0 6px; }
.invoice-doc .slip-shipto { font-size: 1.05rem; line-height: 1.45; }
.invoice-doc .slip-shipto .slip-name { font-weight: 700; }
.invoice-doc .slip-table { width: 100%; border-collapse: collapse; margin-top: 22px; }
.invoice-doc .slip-table th, .invoice-doc .slip-table td {
  padding: 8px 6px; border-bottom: 1px solid #bbb; text-align: left; font-size: 1rem;
}
.invoice-doc .slip-table th {
  border-bottom: 2px solid #000; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .08em;
}
.invoice-doc .slip-table .num { text-align: right; }
.invoice-doc .slip-table tfoot td { border-bottom: 0; font-weight: 800; }
.invoice-doc .slip-extra { font-size: .95rem; margin-top: 10px; }
.invoice-doc .slip-foot {
  margin-top: 36px; border-top: 1px solid #bbb; padding-top: 12px;
  font-size: .95rem; line-height: 1.55;
}
@media print {
  /* When printing an invoice, swap which document is visible. These
     selectors outrank the packing-slip rules above on specificity. */
  body.print-invoice > *:not(.invoice-doc) { display: none !important; }
  body.print-invoice .packing-slip { display: none !important; }
  body.print-invoice .invoice-doc {
    display: block !important; color: #000; background: #fff;
    font-family: Arial, Helvetica, sans-serif;
  }
}
