/* Cutline. One main color (cutting mat green #284f45), one accent (mustard #e3a33b), paper neutrals. */
/* The fonts the cards use. The preview draws with the same files the PDF embeds. */
@font-face { font-family: "Inter"; src: url("fonts/Inter-400.ttf") format("truetype"); font-weight: 400; font-display: block; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-700.ttf") format("truetype"); font-weight: 700; font-display: block; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-800.ttf") format("truetype"); font-weight: 800; font-display: block; }
@font-face { font-family: "Lora"; src: url("fonts/Lora-600.ttf") format("truetype"); font-weight: 600; font-display: block; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #f6f4ee;
  color: #1c2230;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: #284f45; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font: 0.92em ui-monospace, Menlo, Consolas, monospace; background: #ece8dd; padding: 1px 4px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 16px 24px 10px;
}
.mark { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; color: #1c2230; text-decoration: none; letter-spacing: -0.01em; }
.markbox { width: 18px; height: 18px; background: linear-gradient(#f2ead8, #f2ead8) 4px 3px / 10px 12px no-repeat, #284f45; border-radius: 3px; }
.topnav { display: flex; gap: 18px; align-items: center; font-size: 15px; }
.topnav a { text-decoration: none; }
.topnav a:hover { text-decoration: underline; }

.hero { max-width: 1180px; margin: 0 auto; padding: 18px 24px 6px; }
.hero h1 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -0.015em; max-width: 720px; }
.hero .sub { margin: 8px 0 0; color: #5b6270; font-size: 17px; }

.tool {
  display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; align-items: start;
  max-width: 1180px; margin: 0 auto; padding: 18px 24px 28px;
}
.panel { background: #fff; border: 1px solid #d8d2c4; border-radius: 6px; padding: 18px; }
fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
legend, .field { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; padding: 0; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.kinds legend { width: 100%; }
.kinds label { position: relative; }
.kinds input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kinds span { display: inline-block; padding: 5px 10px; border: 1px solid #d8d2c4; border-radius: 4px; font-size: 14px; background: #fff; cursor: pointer; }
.kinds input:checked + span { background: #284f45; border-color: #284f45; color: #fff; }
.kinds input:focus-visible + span { outline: 2px solid #284f45; outline-offset: 2px; }
.tag { font-style: normal; font-size: 11px; font-weight: 700; background: #e3a33b; color: #1c2230; padding: 0 4px; border-radius: 2px; margin-left: 3px; vertical-align: 1px; }

input[type="text"], textarea, select {
  width: 100%; border: 1px solid #c9c2b2; border-radius: 4px; background: #fff; padding: 7px 9px; font-size: 15px;
}
input[type="text"]:focus, textarea:focus, select:focus { outline: 2px solid #284f45; outline-offset: -1px; border-color: #284f45; }
#title { margin-bottom: 14px; }
textarea { resize: vertical; line-height: 1.45; font-size: 14.5px; }
.wordshead { display: flex; justify-content: space-between; align-items: baseline; }
.count { font-size: 13px; color: #5b6270; }
.count.over { color: #8a4b00; font-weight: 600; }
.hint { margin: 6px 0 14px; font-size: 13px; color: #5b6270; }
.hint code { white-space: nowrap; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.selects label { font-size: 14px; font-weight: 600; }
.selects select { margin-top: 4px; font-weight: 400; }
.notes { margin: 12px 0 0; font-size: 14px; color: #6b3d00; min-height: 0; }
.notes:empty { display: none; }
.notes b { font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actions button { font-size: 14.5px; padding: 8px 11px; }
button { cursor: pointer; border: 1px solid #bdb5a3; background: #fff; border-radius: 4px; padding: 8px 13px; font-size: 15px; }
button:hover { border-color: #284f45; }
button:disabled { opacity: 0.55; cursor: default; }
button.primary { background: #284f45; border-color: #284f45; color: #fff; font-weight: 600; }
button.primary:hover { background: #1d3b33; }
button.link { border: 0; background: none; padding: 0; color: #284f45; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.topnav button.link { text-decoration: none; font-weight: 600; background: #e3a33b; color: #1c2230; padding: 4px 10px; border-radius: 4px; }
.seedline { margin: 10px 0 0; font-size: 12.5px; color: #5b6270; }

.prox { margin-top: 16px; border-top: 1px solid #d8d2c4; padding-top: 12px; }
.prox summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.prox .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.prox .row > * { flex: 0 1 auto; }
.prox label { font-size: 14px; }
.prox .full { width: 100%; }
.prox p { font-size: 14px; margin: 10px 0 0; }

.preview { min-width: 0; }
.tabs { display: flex; gap: 4px; align-items: center; margin-bottom: 10px; }
.tabs button { border-radius: 4px; padding: 5px 12px; font-size: 14px; }
.tabs button[aria-selected="true"] { background: #1c2230; color: #fff; border-color: #1c2230; }
.pageinfo { margin-left: auto; font-size: 13px; color: #5b6270; }
.pages { display: grid; gap: 18px; }
.pages svg { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 1px 2px rgba(28, 34, 48, 0.18), 0 8px 24px -14px rgba(28, 34, 48, 0.45); }
.wide { display: none; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 12px 24px 8px; }
.plan { border: 1px solid #d8d2c4; border-radius: 6px; padding: 18px 20px; background: #fff; }
.plan.pro { border-color: #284f45; }
.plan h2 { margin: 0 0 8px; font-size: 20px; }
.plan ul { margin: 0 0 14px; padding-left: 20px; }
.plan li { margin: 3px 0; }
.small { font-size: 13px; color: #5b6270; margin: 8px 0 0; }
.allline { margin: 8px 0 0; }

.checked { max-width: 1180px; margin: 0 auto; padding: 18px 24px 6px; }
.checked h2 { font-size: 20px; margin: 0 0 6px; }
.checked p { margin: 0 0 8px; max-width: 720px; }
.checked details { max-width: 720px; }
.checked summary { cursor: pointer; color: #284f45; }

.more { max-width: 1180px; margin: 0 auto; padding: 10px 24px; font-size: 15px; }
.more p { margin: 4px 0; }
.more b { margin-right: 8px; }
.foot { max-width: 1180px; margin: 0 auto; padding: 18px 24px 30px; font-size: 13px; color: #5b6270; border-top: 1px solid #d8d2c4; }

/* The Pro panel */
dialog.pro { border: 0; border-radius: 8px; padding: 22px; max-width: 520px; width: calc(100% - 32px); color: #1c2230; }
dialog.pro::backdrop { background: rgba(28, 34, 48, 0.5); }
.pro-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pro-head h2 { margin: 0; font-size: 21px; }
dialog.pro ul { padding-left: 20px; margin: 10px 0; }
dialog.pro .why { background: #fbefd8; border-left: 3px solid #e3a33b; padding: 8px 10px; margin: 12px 0; }
dialog.pro form { display: flex; gap: 6px; margin-top: 6px; }
dialog.pro form input { flex: 1; min-width: 0; }
.pro-code { font: 600 18px ui-monospace, Menlo, monospace; letter-spacing: 0.04em; }

/* Long pages (privacy, terms, thanks, connect) */
.doc { max-width: 720px; margin: 0 auto; padding: 10px 24px 30px; }
.doc h1 { font-size: 28px; margin: 12px 0 6px; }
.doc h2 { font-size: 19px; margin: 24px 0 6px; }
.doc p, .doc li { max-width: 680px; overflow-wrap: anywhere; }
.bigcode { font: 600 26px/1.3 ui-monospace, Menlo, monospace; letter-spacing: 0.05em; margin: 6px 0 10px; }

/* Packs */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; max-width: 1180px; margin: 0 auto; padding: 10px 24px 20px; }
.pack { background: #fff; border: 1px solid #d8d2c4; border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pack .thumb svg { display: block; width: 100%; height: auto; border: 1px solid #d8d2c4; }
.pack h2 { font-size: 18px; margin: 4px 0 0; }
.pack p { margin: 0; font-size: 14px; color: #5b6270; }
.pack .btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.pack .btns button { font-size: 14px; padding: 6px 10px; }
.pack label.pick { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.cart { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #d8d2c4; padding: 12px 24px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }

@media (max-width: 860px) {
  .tool { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 12px 16px 24px; }
  .top, .hero, .plans, .checked, .more, .foot, .packs { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: 25px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .wide { display: block; width: 100%; margin-top: 14px; padding: 11px; }
  .topnav { gap: 12px; font-size: 14px; }
}
@media (max-width: 420px) {
  .topnav a { display: none; }
  .selects { grid-template-columns: 1fr 1fr; }
}
@media print { body { background: #fff; } }
.hero label select { width: auto; margin-left: 6px; }

/* Cutline additions */
.datahead { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; }
#data { font: 12.5px/1.45 ui-monospace, Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; }
.filerow { display: flex; gap: 14px; align-items: center; margin: 8px 0 4px; font-size: 14px; flex-wrap: wrap; }
.filebtn { position: relative; overflow: hidden; display: inline-block; border: 1px solid #bdb5a3; border-radius: 4px; padding: 5px 10px; background: #fff; cursor: pointer; }
.filebtn:hover { border-color: #284f45; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
details.hint { margin: 4px 0 12px; font-size: 13px; color: #5b6270; }
details.hint summary { cursor: pointer; color: #284f45; }
details.hint p { margin: 6px 0; }
details.hint code { font-size: 11.5px; }
.selects label input[type="text"], .selects label input[type="number"] { margin-top: 4px; font-weight: 400; width: 100%; border: 1px solid #c9c2b2; border-radius: 4px; padding: 7px 9px; font-size: 15px; }
.selects { margin-bottom: 4px; }
details.more { margin-top: 12px; border-top: 1px solid #d8d2c4; padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; margin: 10px 0; }
.sublabel { font-size: 13px; color: #5b6270; margin: 10px 0 4px; }
#testpdf { margin-top: 10px; font-size: 14px; }
.layoutline { margin: 10px 0 0; font-size: 12.5px; color: #5b6270; }
.notes { max-height: 160px; overflow: auto; }
.notes span { display: block; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cardgrid svg { display: block; width: 100%; height: auto; border-radius: 4.5%/3.2%; box-shadow: 0 1px 2px rgba(28, 34, 48, 0.25), 0 6px 16px -10px rgba(28, 34, 48, 0.5); background: #fff; }
.cardgrid .more-cards { align-self: center; font-size: 14px; color: #5b6270; }
.pages svg { margin: 0 auto; max-width: 720px; }
.prox .row button { font-size: 14px; padding: 6px 10px; }
.prox .filebtn { font-size: 14px; padding: 6px 10px; }
.prox .list { font-size: 13px; color: #5b6270; margin: 6px 0 0; }
.prox select { width: auto; max-width: 100%; }
.prox input[type="text"] { width: 9em; }
.pro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.more-links { max-width: 1180px; margin: 0 auto; padding: 10px 24px; font-size: 15px; }
.more-links p { margin: 4px 0; }
.more-links b { margin-right: 8px; }
@media (max-width: 860px) {
  .more-links { padding-left: 16px; padding-right: 16px; }
  .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.kinds legend.sr { width: 1px; }
.cardgrid figure { margin: 0; position: relative; }
.cardgrid figcaption { position: absolute; right: 6px; bottom: 6px; background: rgba(28, 34, 48, 0.82); color: #fff; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 9px; }
.restore { display: flex; gap: 6px; max-width: 460px; margin-top: 8px; }
.restore input { flex: 1; min-width: 0; }
.hero label { font-size: 14px; font-weight: 600; margin-right: 14px; display: inline-block; margin-bottom: 6px; }
.notes .dim { color: #5b6270; }
