:root {
  --bg: #faf6ee;
  --card: #ffffff;
  --ink: #1b2420;
  --muted: #5b6a62;
  --line: #e4ddcf;
  --chip: #f1ebdc;
  --accent: #0e6b4f;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ea;
  --warn: #b3400c;
  --warn-soft: #fdeee3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 36, 32, 0.06), 0 8px 24px rgba(27, 36, 32, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}
img, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; }
.top nav { display: flex; gap: 18px; font-size: 0.95rem; }
.brand, .top nav a { white-space: nowrap; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

/* hero */
.hero { padding: 36px 0 20px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.law-chip {
  display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--warn-soft); color: var(--warn); border: 1px solid #f3cfb4;
  border-radius: 999px; padding: 6px 14px; font-size: 0.92rem; font-weight: 600; text-decoration: none; margin-bottom: 16px;
}
.law-chip:hover { background: #fbe3d1; }

/* tool */
.tool {
  display: grid; gap: 20px; grid-template-columns: 1fr;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin: 8px 0 8px;
}
@media (min-width: 900px) { .tool { grid-template-columns: 1.05fr 0.95fr; padding: 26px; gap: 30px; } }
.field { margin-bottom: 14px; }
.field > label, .field > .lab { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
input[type="text"], input[type="date"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #cfc7b5; border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #7cc4a8; outline-offset: 1px; border-color: var(--accent);
}
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.seg { display: inline-flex; border: 1px solid #cfc7b5; border-radius: 10px; overflow: hidden; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 14px; font-size: 0.92rem; cursor: pointer; background: #fff; min-height: 40px; }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid #7cc4a8; outline-offset: -3px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid #cfc7b5; background: #fff; cursor: pointer; font-size: 0.92rem; min-height: 40px;
}
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid #7cc4a8; outline-offset: 2px; }
.chip .auto { font-size: 0.72rem; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.chip input:checked + span .auto { background: #ffffff26; color: #fff; }

.notes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.notes li { font-size: 0.87rem; background: var(--warn-soft); border-left: 3px solid var(--warn); padding: 7px 10px; border-radius: 0 8px 8px 0; }
.notes li.ok { background: var(--accent-soft); border-color: var(--accent); }

details.more { margin: 6px 0 14px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.checks { display: grid; gap: 8px; margin: 10px 0; }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 0.92rem; }
.checks input { width: 20px; height: 20px; margin-top: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700;
  padding: 12px 20px; min-height: 48px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #0b5b43; }
.btn-ghost { background: #fff; color: var(--ink); border-color: #cfc7b5; }
.btn-ghost:hover { background: var(--chip); }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.counter { font-size: 0.87rem; color: var(--muted); }

/* preview */
.preview-col { min-width: 0; }
.preview-stage {
  background: repeating-linear-gradient(45deg, #efe9da, #efe9da 10px, #f4efe2 10px, #f4efe2 20px);
  border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; justify-content: center; align-items: flex-start;
  min-height: 190px; overflow: hidden;
}
.scale-box { position: relative; }
.scale-box .label { position: absolute; left: 0; top: 0; transform-origin: top left; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
.preview-cap { font-size: 0.82rem; color: var(--muted); margin: 8px 2px 0; }

/* the label itself: true physical size, printer-safe */
.label {
  background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; overflow: hidden;
  display: block; border: 0; padding: 0;
}
.label-inner { padding: 0.07in 0.09in; height: 100%; overflow: hidden; line-height: 1.15; word-break: break-word; }
.label .l-name { font-weight: 800; text-transform: uppercase; margin-bottom: 0.03in; }
.label .l-ing { margin-bottom: 0.03in; }
.label .l-contains { font-weight: 800; border: 1.2px solid #000; padding: 0.02in 0.05in; margin: 0.04in 0; display: inline-block; text-transform: uppercase; }
.label .l-dates, .label .l-biz { font-size: 0.85em; margin-top: 0.02in; }
.label .l-empty { color: #777; font-style: italic; }
.label b { font-weight: 800; }

#print-root { position: fixed; left: -99999px; top: 0; }

/* sections */
section.block { padding: 44px 0 8px; }
.grid3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-bottom: 0.3em; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan.feat { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.price { font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.price small { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.was { text-decoration: line-through; color: var(--muted); font-size: 1rem; margin-right: 6px; }
.plan ul { margin: 0; padding-left: 1.1em; }
.plan li { margin-bottom: 4px; }
.plan .soon { font-size: 0.72rem; background: var(--chip); border-radius: 6px; padding: 1px 6px; margin-left: 4px; color: var(--muted); }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 8px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--muted); }

.disclaimer { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 40px; }

/* article pages */
.article { padding: 34px 0 20px; }
.article h2 { margin-top: 1.6em; }
.article ul, .article ol { padding-left: 1.2em; }
.article li { margin-bottom: 6px; }
.facts { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px; margin: 18px 0; }
.facts dl { margin: 0; display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) { .facts dl { grid-template-columns: 190px 1fr; } }
.facts dt { font-weight: 700; padding: 12px 0 0; }
.facts dd { margin: 0; padding: 2px 0 12px; border-bottom: 1px solid var(--line); }
.facts dd:last-child { border-bottom: 0; }
@media (min-width: 640px) { .facts dt { padding: 12px 0; border-bottom: 1px solid var(--line); } .facts dt:last-of-type { border-bottom: 0; } .facts dd { padding: 12px 0; } }
.sample-labels { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0; }
.sample-labels .label { border: 1px solid #000; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px; margin: 28px 0; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h3 { color: #fff; margin: 0; }
.cta-band p { margin: 0; color: #cdd6d1; }
.cta-band .btn-primary { background: #fff; color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--chip); }

/* modal */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
dialog::backdrop { background: rgba(27, 36, 32, 0.55); }
.modal { padding: 24px; }
.modal h2 { font-size: 1.5rem; }
.modal .x { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); min-width: 44px; min-height: 44px; }
.radios { display: grid; gap: 8px; margin-bottom: 14px; }
.radios label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #cfc7b5; border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 0.95rem; }
.radios input { margin-top: 3px; }
.radios label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.fine { font-size: 0.8rem; color: var(--muted); }
.err { color: #a11; font-size: 0.9rem; min-height: 1.2em; }
.success { text-align: center; padding: 12px 0; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 0.92rem; z-index: 50; }
[hidden] { display: none !important; }

@media (max-width: 520px) { .row { grid-template-columns: 1fr; } .top nav { gap: 12px; font-size: 0.88rem; } .top nav a[href$="#faq"] { display: none; } }

/* print: only the label pages */
@media print {
  html, body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { position: static; left: auto; display: block; }
  .print-page { page-break-after: always; break-after: page; position: relative; overflow: hidden; }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
  .print-page .label { box-shadow: none; }
  .print-page.sheet .label { position: absolute; }
}
