/* =========================================================
   Training Card Maker: the screen around the paper.
   A form on the left, the printed pieces on a steel-gray canvas on the right.
   Tokens (colors, fonts) come from site.css.
   ========================================================= */
[data-build="file"] .artifact-only, [data-build="artifact"] .file-only,
[data-build="web"] .artifact-only, [data-build="web"] .file-only, [data-build="web"] .full-only,
[data-build="file"] .web-only, [data-build="artifact"] .web-only { display: none !important; }

.app { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-frame);
  font-size: 15px; line-height: 1.45; color: var(--ink); text-align: left; }
.app button, .app input, .app select, .app textarea { font: inherit; color: inherit; }
.app-panes { display: none; }
.main { display: grid; grid-template-columns: minmax(330px, 430px) minmax(0, 1fr); align-items: stretch; }

/* ---------- left: the form ---------- */
.form { min-width: 0; padding: 6px 26px 26px; border-right: 1px solid var(--line); }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin: 18px 0 2px;
  padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--yel-soft); border: 1px solid var(--yel-line); }
.notice p { margin: 0; font-size: 14px; color: var(--ink); flex: 1 1 220px; }
.step-sec { display: grid; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.notice + .step-sec, .file-actions + .notice[hidden] + .step-sec, .form > .step-sec:first-of-type { border-top: 0; }
.sec-head { display: flex; gap: 12px; align-items: flex-start; }
.step { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; background: var(--ink); color: var(--surface);
  display: grid; place-items: center; font: 700 14px/1 var(--f-cond); }
.sec-head h2 { margin: 0; font: 700 21px/1.15 var(--f-cond); letter-spacing: .005em; color: var(--ink); }
.sec-head p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.count { font: 600 12.5px/1 var(--f-ui); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px;
  padding: 3px 8px; vertical-align: 3px; }
.count:empty { display: none; }

.app .field { display: grid; gap: 6px; min-width: 0; }
.app .lbl { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.app .lbl em { font-style: normal; font-weight: 400; color: var(--soft); margin-left: 3px; }
.app .hint { margin: 0; color: var(--muted); font-size: 13px; }
.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .app select, .app textarea {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-size: 15px; }
.app select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%237b878e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.app textarea { min-height: 96px; resize: vertical; }
.app input::placeholder, .app textarea::placeholder { color: var(--soft); opacity: 1; }
.app input:hover, .app select:hover, .app textarea:hover { border-color: var(--soft); }
.app input:focus, .app select:focus, .app textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.app input[type="date"] { font-variant-numeric: tabular-nums; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
@media (max-width: 400px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: center; font-size: 14.5px; cursor: pointer; }
.check input, .topic input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); flex: none; margin: 0; }

/* buttons */
.app .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--surface); font-weight: 600; font-size: 14.5px; cursor: pointer;
  text-decoration: none; white-space: nowrap; }
.app .btn:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.app .btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.app .btn.ghost:hover { border-color: var(--ink); background: var(--surface); }
.app .btn.small { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.app .btn.icon { width: 36px; min-height: 36px; padding: 0; font-size: 22px; line-height: 1; }
.app .btn.print { background: var(--yel); color: var(--on-yel); border-color: var(--yel); min-height: 44px; padding: 0 20px; font-size: 15px; }
.app .btn.print:hover { background: var(--yel-hover); border-color: var(--yel-hover); }
.app .btn:disabled { opacity: .45; cursor: not-allowed; }
.app .btn.x { width: 34px; padding: 0; font-size: 18px; }
.file-btn { cursor: pointer; }
.app :focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.app input:focus-visible, .app select:focus-visible, .app textarea:focus-visible { outline: none; }

/* chips for classes and types */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.chip { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--surface); cursor: pointer; text-align: left; min-height: 44px; min-width: 0; }
.chip:hover { border-color: var(--soft); }
.chip b { font: 700 14.5px/1.15 var(--f-cond); }
.chip span { font-size: 12px; color: var(--muted); line-height: 1.25; margin-top: 1px; }
.chip[aria-pressed="true"] { background: var(--yel-soft); border-color: var(--yel); box-shadow: inset 0 0 0 1px var(--yel); }
.chip[aria-pressed="true"] b::before { content: "\2713\00a0"; }
.chips-empty { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13.5px; }
.add-type { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 6px; }
/* adding a custom type is rare, so it waits behind a small link */
.add-type-box summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.add-type-box summary::-webkit-details-marker { display: none; }
.add-type-box summary::before { content: "+"; font-size: 16px; line-height: 1; }
.add-type-box summary:hover { color: var(--ink); }
.add-type-box[open] summary { margin-bottom: 8px; }
.add-type-box[open] summary::before { content: "\2212"; }
/* the first-visit offer of an example */
.ex-try { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-2); cursor: pointer; }
.link-btn:hover { text-decoration-color: var(--ink); }
/* More details: the optional fields, closed by default */
.more-in { justify-items: stretch; gap: 16px; padding-top: 4px; }
.more-in > details.topics { background: var(--surface-2); }
@media (max-width: 400px) { .add-type { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .add-type .btn { grid-column: 1 / -1; } }

/* topics */
details.topics { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
details.topics summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; border-radius: 10px; }
details.topics summary::-webkit-details-marker { display: none; }
details.topics summary:hover { background: var(--surface-2); }
.topics-meta { display: inline-flex; align-items: center; gap: 8px; }
.chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
details.topics[open] .chev { transform: rotate(180deg); }
.topics-in { padding: 0 14px 14px; display: grid; gap: 10px; justify-items: start; }
.topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.topic { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.app .topic input:not([type="checkbox"]) { min-height: 36px; padding: 6px 9px; font-size: 14px; }
@media (max-width: 480px) { .topic { grid-template-columns: auto minmax(0, 1fr) auto; } .topic .t-es-in { grid-column: 2 / 3; } }

.logo-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.logo-prev, .photo-prev { width: 44px; height: 44px; border-radius: 8px; border: 1px dashed var(--line-2); background: var(--surface-2) center / contain no-repeat; }
.photo-prev { width: 36px; height: 46px; border-style: solid; background-size: cover; }
.logo-prev.has { border-style: solid; background-color: #fff; }

/* segmented controls */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--seg-track); }
.seg button { border: 0; background: transparent; padding: 0 12px; min-height: 32px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13.5px;
  color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-seg); }
.seg-wide { display: flex; }
.seg-wide button { flex: 1; min-width: 0; white-space: normal; justify-content: center; text-align: center; line-height: 1.2; padding-block: 6px; }
.lock { width: 12px; height: 12px; opacity: .7; }

.guard { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.guard q { color: var(--ink-2); }

/* person / crew */
.crew-actions, .paste-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.paste { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface-2); }
.crew { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.crew-solo { display: grid; gap: 14px; }
.crew-empty { color: var(--muted); font-size: 14px; padding: 8px 2px; }
.crew-row { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.crew-row.sel { border-color: var(--ink); }
.crew-pick { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px;
  background: none; border: 0; cursor: pointer; text-align: left; border-radius: 10px; }
.av { width: 34px; height: 34px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
  font: 700 13px var(--f-cond); color: var(--muted); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.cn { min-width: 0; }
.cn b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn span { display: block; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill.current { color: var(--good); background: var(--good-bg); }
.pill.soon { color: var(--warn); background: var(--warn-bg); }
.pill.overdue { color: var(--bad); background: var(--bad-bg); }
.pill.none { color: var(--muted); background: var(--surface-2); }
.crew-edit { display: grid; gap: 12px; padding: 12px; border-top: 1px solid var(--line); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.link-bad { background: none; border: 0; padding: 0; color: var(--bad); font-weight: 600; cursor: pointer; text-decoration: underline; font-size: 13.5px; }
.app .to-preview { display: none; }

/* ---------- right: the preview ---------- */
.preview { min-width: 0; background: var(--canvas); border-radius: 0 15px 15px 0; }
.preview .seg { background: var(--seg-track-canvas); }
.pv-inner { position: sticky; top: calc(var(--head-h) + 16px); display: flex; flex-direction: column; max-height: calc(100vh - var(--head-h) - 32px);
  padding: 18px 22px 0; }
.pv-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; }
.pv-lang { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-lang .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
/* Sheet style (version 31): the print themes, beside Card language, in both versions (the menu itself is in hub.css) */
.pv-style .pt-field { display: flex; align-items: center; gap: 10px; }
.pv-style .tk-l { font-size: 13px; font-weight: 600; color: var(--muted); }
.pv-who { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.pv-who select { flex: 1; min-width: 0; max-width: 360px; }
.warn { margin: 12px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; }
.warn.todo { padding: 0; background: none; color: var(--muted); }
.pv-body { flex: 1 1 auto; min-height: 0; overflow: auto; margin: 14px -22px 0; padding: 4px 22px 20px; display: grid; align-content: start; gap: 18px;
  scrollbar-width: thin; scrollbar-gutter: stable; }
.pv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1180px) and (min-width: 921px) { .pv-cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }
@media (max-width: 560px) { .pv-cards { grid-template-columns: minmax(0, 1fr); } }
.pv-cards figure, .pv-fig { margin: 0; display: grid; gap: 7px; min-width: 0; }
.cap { font-size: 13px; font-weight: 600; color: var(--muted); }
.scaler { position: relative; max-width: 100%; }
.scaler > .sc-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.paperish { box-shadow: var(--shadow); }
.pv-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
/* closed until someone wants it: one line that says which layout is set */
.pv-sheet-sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; }
.pv-sheet-sum::-webkit-details-marker { display: none; }
.pv-sheet-sum:hover { background: var(--surface-2); }
.pv-sheet-sum .cap { margin: 0; }
.pv-sheet-val { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.pv-sheet-sum .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.pv-sheet[open] .pv-sheet-sum .chev { transform: rotate(180deg); }
.pv-sheet-in { padding: 4px 16px 16px; display: grid; gap: 12px 20px;
  grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "pages head" "pages note"; align-items: start; }
.pv-sheet .seg { background: var(--seg-track); }
.pv-sheet-head { grid-area: head; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.pv-sheet .pv-note { grid-area: note; }
.pv-pages { grid-area: pages; display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px; }
.pv-pages .cap { font-size: 12px; }
@media (max-width: 560px) { .pv-sheet-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "pages" "note"; } .pv-pages { grid-auto-columns: minmax(0, 150px); } }
.pv-note { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 70ch; }
.pv-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sortby { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app .sortby select { width: auto; min-height: 32px; padding: 4px 30px 4px 8px; }
.pv-foot { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 -22px; padding: 14px 22px 18px; border-top: 1px solid var(--line);
  background: var(--canvas); border-radius: 0 0 15px 0; }
.pv-foot p { margin: 0; color: var(--muted); font-size: 13.5px; flex: 1 1 240px; max-width: 62ch; }

.upsell { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: grid; gap: 12px; justify-items: start; }
.upsell h3 { margin: 0; font: 700 24px/1.12 var(--f-cond); }
.upsell .badge { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--yel-soft); color: var(--yel-ink); border: 1px solid var(--yel-line); }
.up-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.up-ticks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; font-size: 14.5px; }
.up-ticks svg { width: 18px; height: 18px; color: var(--good); margin-top: 1px; }
.upsell-img { display: block; width: 100%; height: auto; margin-top: 6px; border-radius: 4px; box-shadow: var(--shadow); }

/* toast */
.msg { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; margin: 0;
  width: max-content; max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 10px; background: var(--ink); color: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28); font-size: 14.5px; }
.msg.bad { background: var(--bad-strong); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .app .btn, .chip, .seg button { transition: background-color .12s, border-color .12s, box-shadow .12s, color .12s; }
}

/* ---------- phones and narrow windows: one pane at a time ---------- */
@media (max-width: 920px) {
  .app { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; margin-inline: calc(-1 * var(--gutter)); }
  .app-panes { display: flex; position: sticky; top: var(--head-h); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
  .app-panes button { flex: 1; height: 44px; border: 0; background: none; font-weight: 600; font-size: 14.5px; color: var(--muted); cursor: pointer;
    box-shadow: inset 0 -3px 0 transparent; }
  .app-panes button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
  .main { display: block; }
  .app[data-pane="form"] .preview, .app[data-pane="preview"] .form { display: none; }
  .form { border-right: 0; padding: 2px var(--gutter) 24px; }
  .preview { border-radius: 0; }
  .pv-inner { position: static; max-height: none; padding: 16px var(--gutter) 0; }
  .pv-body { overflow: visible; margin: 14px 0 0; padding: 0 0 18px; }
  .pv-foot { margin: 0 calc(-1 * var(--gutter)); padding: 14px var(--gutter) 20px; border-radius: 0; }
  .pv-foot .btn.print { width: 100%; }
  .app .to-preview { display: flex; width: 100%; min-height: 48px; margin-top: 4px; font-size: 15.5px; }
  .app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .app select, .app textarea { font-size: 16px; min-height: 44px; }
  .pv-bar { align-items: stretch; }
  .pv-bar > .seg { display: flex; width: 100%; }
  .pv-bar > .seg button { flex: 1; justify-content: center; }
}

/* =========================================================
   PAPER: wallet card (CR80, 3.375 x 2.125 in = 324 x 204 px)
   CSS px are 1/96 in, so these sizes print true.
   ========================================================= */
.card { width: 324px; height: 204px; position: relative; overflow: hidden; background: var(--paper); color: var(--pk);
  font-family: var(--f-cond); line-height: 1.15; border-radius: 12px; }
.paperish.card { box-shadow: 0 0 0 1px rgba(27,33,37,.16), var(--shadow); }
.t-en, .t-es, .t-es1 { display: block; }
.t-es { font-weight: 500; opacity: .82; }
.inl .t-en, .inl .t-es, .inl .t-es1 { display: inline; }
.inl .t-es::before { content: " \00B7  "; }

.cf-head { position: absolute; left: 0; right: 0; top: 0; height: 46px; background: var(--c-head, var(--pk)); color: var(--c-head-t, #fff); display: flex; align-items: center; gap: 8px; padding: 0 11px; }
.cf-logo { width: 32px; height: 32px; border-radius: 4px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; padding: 2px; }
.cf-logo img { width: 100%; height: 100%; object-fit: contain; }
.cf-co { flex: 1; min-width: 0; }
.cf-coname { font-weight: 700; font-size: 10.5pt; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; line-height: 1.05; }
.cf-coname.wrapped { white-space: normal; line-height: 1.04; max-height: 27px; }
.cf-site { font-size: 6.5pt; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.cf-title { flex: none; max-width: 112px; text-align: right; font-weight: 700; font-size: 7pt; letter-spacing: .07em; text-transform: uppercase; color: var(--acc-h); line-height: 1.12; }
.cf-title .t-es { font-size: 5.6pt; letter-spacing: .05em; color: var(--c-head-t, #fff); opacity: .8; }
.cf-stripe { position: absolute; left: 0; right: 0; top: 46px; height: 5px; background: var(--acc); }
.cf-body { position: absolute; left: 11px; right: 11px; top: 59px; height: 92px; display: flex; gap: 9px; }
.cf-photo { width: 69px; height: 90px; flex: none; border-radius: 3px; overflow: hidden; background: var(--ps); box-shadow: inset 0 0 0 1px var(--pr); }
.cf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cf-name { font-weight: 700; font-size: 15pt; line-height: 1.02; white-space: nowrap; overflow: hidden; }
.cf-name.empty, .cf-coname.empty, .ct-name.empty { opacity: .35; }
.cf-id { font-size: 7.5pt; color: var(--pm); margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cf-auth { margin-top: auto; min-width: 0; }
.cf-lbl { font-size: 5.6pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pm); white-space: nowrap; overflow: hidden; }
.cf-equip { display: flex; align-items: center; gap: 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; font-size: 10pt; }
.cf-chip { background: var(--acc); color: var(--acc-t); font-weight: 700; font-size: 1em; line-height: 1.25; padding: 0 5px; border-radius: 2px; text-transform: uppercase; letter-spacing: .02em; flex: none; }
.cf-equip-es { font-weight: 600; font-size: .78em; color: var(--pm); text-transform: uppercase; letter-spacing: .02em; }
.cf-types { font-size: 7pt; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; }
.cf-types .t-es { font-weight: 500; }
.cf-dates { position: absolute; left: 11px; right: 11px; bottom: 8px; height: 40px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--pr); }
.cf-d { padding-top: 4px; min-width: 0; }
.cf-d + .cf-d { padding-left: 7px; border-left: 1px solid var(--ps); }
.cf-dl { font-size: 5.4pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pm); line-height: 1.1; white-space: nowrap; overflow: hidden; }
.cf-dl .t-es { font-size: 5pt; }
.cf-dv { font-size: 8.6pt; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 1px; white-space: nowrap; letter-spacing: .01em; }
.cf-d.renew .cf-dv { box-shadow: inset 0 -3px 0 var(--acc); display: inline-block; padding: 0 1px; }

/* back */
.cb-head { position: absolute; left: 0; right: 0; top: 0; height: 22px; background: var(--c-head, var(--pk)); color: var(--c-head-t, #fff); display: flex; align-items: center; padding: 0 11px; }
.cb-head > div { font-size: 6.4pt; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; overflow: hidden; width: 100%; }
.cb-head .t-es { opacity: .8; }
.cb-stripe { position: absolute; left: 0; right: 0; top: 22px; height: 3px; background: var(--acc); }
.cb-rows { position: absolute; left: 11px; right: 11px; top: 30px; }
.cb-row { display: flex; align-items: center; gap: 6px; min-height: 17px; padding: 2px 0; border-bottom: 1px solid var(--ps); }
.cb-k { width: 76px; flex: none; font-size: 5.4pt; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--pm); line-height: 1.1; }
.cb-k .t-es { font-size: 5pt; }
.cb-v { flex: 1; min-width: 0; font-size: 8pt; font-weight: 600; white-space: nowrap; overflow: hidden; }
.cb-v small { font-weight: 500; color: var(--pm); font-size: .86em; }
.cb-pair { display: flex; gap: 6px; }
.cb-pair > .cb-row { flex: 1; min-width: 0; }
.cb-sigs { position: absolute; left: 11px; right: 11px; top: 124px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cb-sig { border-top: 1px solid var(--pk); padding-top: 2px; font-size: 5.2pt; color: var(--pm); line-height: 1.15; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.cb-valid { position: absolute; left: 11px; right: 11px; bottom: 21px; font-size: 5.6pt; line-height: 1.2; }
.cb-valid .t-en { font-weight: 700; }
.cb-valid .t-es1 { font-weight: 700; }
.cb-valid .t-es { margin-top: 1px; }
.cb-no { position: absolute; left: 11px; right: 11px; bottom: 7px; display: flex; justify-content: space-between; align-items: baseline; font-size: 6pt; color: var(--pm); }
.cb-no b { color: var(--pk); font-size: 7.4pt; letter-spacing: .03em; font-variant-numeric: tabular-nums; }

/* =========================================================
   PAPER: certificate, Letter landscape (11 x 8.5 in = 1056 x 816 px)
   ========================================================= */
.cert { width: 1056px; height: 816px; position: relative; overflow: hidden; background: var(--paper); color: var(--pk); font-family: var(--f-cond); line-height: 1.2; }
.ct-frame { position: absolute; inset: 34px; border: 3px solid var(--c-line, var(--pk)); }
.ct-frame::after { content: ""; position: absolute; inset: 6px; border: 1px solid var(--pr); }
.ct-band { position: absolute; left: 34px; top: 34px; bottom: 34px; width: 16px; background: var(--acc); }
.ct-band::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(27,33,37,.9) 10px 20px); opacity: .9; }
.ct-in { position: absolute; left: 92px; right: 64px; top: 58px; bottom: 50px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ct-in > * { flex-shrink: 0; }
.ct-typeline { margin-top: 10px; font-size: 13pt; font-weight: 700; letter-spacing: .02em; }
.ct-typeline .t-es { font-size: 11pt; }
.ct-in.tight .ct-title { font-size: 28pt; margin-top: 10px; }
.ct-in.tight .ct-title .t-es { font-size: 14pt; margin-top: 4px; }
.ct-in.tight .ct-rule { margin: 10px 0 8px; }
.ct-in.tight .ct-lead { font-size: 11pt; }
.ct-in.tight .ct-lead .t-es { font-size: 9.5pt; }
.ct-in.tight .ct-name { margin: 2px 0 4px; padding-bottom: 4px; }
.ct-in.tight .ct-types, .ct-in.tight .ct-typeline { margin-top: 6px; }
.ct-in.tight .ct-topics { margin-top: 8px; }
.ct-in.tight .ct-topics li { font-size: 8.6pt; }
.ct-in.tight .ct-topics li .t-es { font-size: 7.6pt; }
.ct-in.tight .ct-sigs { margin-top: 28px; }
.ct-in.tighter .ct-title { font-size: 24pt; margin-top: 6px; }
.ct-in.tighter .ct-topics ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 14px; }
.ct-in.tighter .ct-sigs { margin-top: 20px; }
.ct-in.tighter .ct-d { padding: 5px 10px 6px; }
.ct-in.tighter .ct-dv { font-size: 12pt; }
.ct-top { align-self: stretch; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.ct-co { display: flex; align-items: center; gap: 12px; text-align: left; min-width: 0; }
.ct-co img { height: 46px; width: auto; max-width: 120px; object-fit: contain; }
.ct-coname { font-weight: 700; font-size: 15pt; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.ct-site { font-size: 10pt; color: var(--pm); }
.ct-no { text-align: right; font-size: 9pt; color: var(--pm); text-transform: uppercase; letter-spacing: .06em; }
.ct-no b { display: block; font-size: 12pt; color: var(--pk); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.ct-title { margin-top: 18px; font-weight: 700; font-size: 34pt; letter-spacing: .06em; text-transform: uppercase; line-height: 1; color: var(--c-line, var(--pk)); }
.ct-title .t-es { font-size: 17pt; letter-spacing: .08em; margin-top: 6px; opacity: .72; }
.ct-rule { width: 84px; height: 6px; background: var(--acc); margin: 16px 0 14px; }
.ct-lead { font-family: var(--f-ui); font-size: 12.5pt; color: var(--pm); line-height: 1.3; }
.ct-lead .t-es { font-size: 11pt; margin-top: 1px; }
.ct-name { font-weight: 700; font-size: 40pt; line-height: 1.05; margin: 6px 0 8px; white-space: nowrap; overflow: hidden; max-width: 100%; padding: 0 0 6px; border-bottom: 1.5px solid var(--pr); min-width: 60%; }
.ct-equip { margin-top: 8px; display: inline-flex; align-items: baseline; gap: 12px; flex-wrap: nowrap; white-space: nowrap; max-width: 100%; overflow: hidden; font-size: 22pt; }
.ct-equip b { background: var(--acc); color: var(--acc-t); padding: 1px 12px; text-transform: uppercase; letter-spacing: .03em; font-size: 1em; }
.ct-equip span { font-weight: 600; color: var(--pm); text-transform: uppercase; font-size: .7em; letter-spacing: .03em; }
.ct-types { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; max-width: 860px; }
.ct-type { border: 1px solid var(--pr); border-radius: 3px; padding: 3px 9px; font-size: 10pt; font-weight: 600; text-align: left; line-height: 1.15; }
.ct-type .t-es { font-size: 8.6pt; font-weight: 500; }
.ct-topics { margin-top: 12px; max-width: 820px; }
.ct-sub { font-size: 8.5pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pm); margin-bottom: 5px; }
.ct-topics ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 22px; text-align: left; }
.ct-topics li { font-family: var(--f-ui); font-size: 9.5pt; line-height: 1.2; padding-left: 15px; position: relative; }
.ct-topics li::before { content: "\2713"; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--pk); }
.ct-topics li .t-es { font-size: 8.2pt; }
.ct-dates { margin-top: auto; align-self: stretch; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1.5px solid var(--pk); border-bottom: 1px solid var(--pr); }
.ct-d { padding: 8px 10px 9px; text-align: left; min-width: 0; }
.ct-d + .ct-d { border-left: 1px solid var(--pr); }
.ct-dl { font-size: 8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pm); line-height: 1.15; }
.ct-dl .t-es { font-size: 7.4pt; }
.ct-dv { font-size: 14pt; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-d.renew .ct-dv { box-shadow: inset 0 -5px 0 var(--acc); display: inline-block; padding: 0 2px; }
.ct-sigs { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 40px; }
.ct-sig { border-top: 1.5px solid var(--pk); padding-top: 5px; text-align: left; }
.ct-sig b { display: block; font-size: 12pt; }
.ct-sig span { display: block; font-size: 8.5pt; color: var(--pm); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.ct-sig span .t-es { font-weight: 500; }
.ct-foot { align-self: stretch; margin-top: 14px; display: flex; justify-content: space-between; gap: 24px; font-family: var(--f-ui); font-size: 8.2pt; color: var(--pm); text-align: left; }
.ct-foot .t-en, .ct-foot .t-es1 { font-weight: 600; color: var(--pk); }

/* =========================================================
   PAPER: training record, Letter landscape
   ========================================================= */
.rec { width: 1056px; height: 816px; position: relative; overflow: hidden; background: var(--paper); color: var(--pk); font-family: var(--f-cond); }
.rc-in { position: absolute; inset: 44px 48px 40px; display: flex; flex-direction: column; }
.rc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: end; border-bottom: 3px solid var(--c-line, var(--pk)); padding-bottom: 10px; }
.rc-title { font-weight: 700; font-size: 22pt; text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; color: var(--c-line, var(--pk)); }
.rc-title .t-es { font-size: 12pt; letter-spacing: .05em; margin-top: 3px; }
.rc-tag { background: var(--acc); color: var(--acc-t); font-weight: 700; font-size: 13pt; text-transform: uppercase; padding: 8px 14px; text-align: center; line-height: 1.1; }
.rc-tag .t-es { font-size: 9pt; }
.rc-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--pr); }
.rc-m { padding: 6px 10px 7px 0; min-width: 0; }
.rc-m + .rc-m { padding-left: 10px; border-left: 1px solid var(--ps); }
.rc-ml { font-size: 7pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pm); }
.rc-ml .t-es { font-size: 6.6pt; }
.rc-mv { font-size: 10.5pt; font-weight: 600; line-height: 1.15; max-height: 2.35em; overflow: hidden; }
.rc-table { width: 100%; border-collapse: collapse; margin-top: 12px; table-layout: fixed; }
.rc-table th { background: var(--c-head, var(--pk)); color: var(--c-head-t, #fff); text-align: left; font-size: 7.6pt; letter-spacing: .07em; text-transform: uppercase; padding: 5px 8px; font-weight: 700; line-height: 1.1; vertical-align: bottom; }
.rc-table th .t-es { font-size: 6.8pt; }
.rc-table td { border-bottom: 1px solid var(--pr); padding: 0 8px; height: 29px; font-size: 10.5pt; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-table tr:nth-child(even) td { background: #f6f7f6; }
.rc-table td.nm { font-weight: 700; }
.rc-st { font-weight: 700; font-size: 9pt; text-transform: uppercase; letter-spacing: .04em; }
.rc-st.current { color: #1d7340; } .rc-st.soon { color: #8a5a00; } .rc-st.overdue { color: #b02a23; } .rc-st.none { color: var(--pm); }
.rc-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 24px; font-family: var(--f-ui); font-size: 8pt; color: var(--pm); padding-top: 10px; }
.rc-foot p { margin: 0; max-width: 78ch; }

/* =========================================================
   PRINT THEMES on the card maker (version 30 on the website, version 31 in the paid file too). Every paper carries
   its Sheet style as data-pt; the colors come from hub.css "Print themes". Classic is the original look: ink header,
   safety yellow accent. --c-head is a filled block (card headers, record column titles), --c-line the frame, rules and
   titles drawn in the head color. The old Card color swatches are gone: a project saved with one opens in the closest style.
   ========================================================= */
.card[data-pt], .cert[data-pt], .rec[data-pt] { --acc: var(--pt-accent); --acc-t: #1b2125; --acc-h: var(--pt-on-head); --c-head: var(--pt-head); --c-head-t: #fff; --c-line: var(--pt-head); }
/* Ink saver: no filled blocks. White headers with ink lines, outlined chips and tags, a lighter hazard band */
.card[data-pt="ink"], .cert[data-pt="ink"], .rec[data-pt="ink"] { --c-head: #fff; --c-head-t: #1b2125; }
.card[data-pt="ink"] .cf-head, .card[data-pt="ink"] .cb-head { box-shadow: inset 0 0 0 1.5px #1b2125; }
.card[data-pt="ink"] .cf-chip, .cert[data-pt="ink"] .ct-equip b, .rec[data-pt="ink"] .rc-tag { background: #fff; color: #1b2125; box-shadow: inset 0 0 0 1.5px #1b2125; }
/* the certificate's hazard band takes the head color for its stripes (Classic keeps its original ink) */
.cert[data-pt]:not([data-pt="classic"]) .ct-band::after { background: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--c-line) 90%, transparent) 10px 20px); }
.cert[data-pt="ink"] .ct-band { background: #fff; box-shadow: inset 0 0 0 1.5px #1b2125; }
.cert[data-pt="ink"] .ct-band::after { opacity: .35; }
.cert[data-pt="ink"] .ct-rule { height: 0; border-top: 6px double #1b2125; }
.rec[data-pt="ink"] .rc-table th { box-shadow: inset 0 -2px 0 #1b2125; }

/* =========================================================
   PAPER: print sheets, Letter portrait (816 x 1056 px)
   ========================================================= */
.sheet { width: 816px; height: 1056px; position: relative; overflow: hidden; background: var(--paper); font-family: var(--f-cond); }
.sheet .slot { position: absolute; }
.sheet .card { border-radius: 0; }
.sheet .slot-empty { border: 1px dashed #d6dbdc; }
.mark { position: absolute; background: #444; }
.mark.v { width: .6px; height: 24px; }
.mark.h { height: .6px; width: 24px; }
.fold { position: absolute; width: 0; border-left: 1px dashed #777; }
.sheet-label { position: absolute; left: 72px; right: 72px; bottom: 30px; display: flex; justify-content: space-between; gap: 16px; font-family: var(--f-ui); font-size: 7.5pt; color: #555; }
.sheet-label b { color: #222; }
.sheet .fold-lbl { position: absolute; font-family: var(--f-ui); font-size: 6.5pt; color: #666; transform: translateX(-50%); }

/* ---------- print ---------- */
#print-root { position: absolute; left: -20000px; top: 0; visibility: hidden; }
#print-root .card { border-radius: 0; }
@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  /* only while the card maker prints its sheets; any other time the open tool prints (hub.css) */
  html.tc-printing body > *:not(#print-root) { display: none !important; }
  #print-root { position: static; visibility: visible; left: auto; }
  .pg { position: relative; overflow: hidden; break-after: page; page-break-after: always; }
  .pg:last-child { break-after: auto; page-break-after: auto; }
  .pg.port { width: 816px; height: 1055px; }
  .pg.land { width: 1056px; height: 815px; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}
