/* Crea con BitPull: the project's tools (projecttools.js). Same tokens as create.css, light and dark. */
.pt-sheet .s-head h3 { flex: 1; min-width: 0; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
.pt-sheet .s-head .icon-btn + h3 { margin-inline-start: 2px; }
@media (min-width: 700px) { .pt-sheet.pt-wide { width: min(760px, 94vw); } }
.pt-sheet > .muted { margin: 10px 2px 4px; }
.pt-field { display: grid; gap: 6px; margin-top: 14px; }
.pt-field > span { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.pt-sheet input:not([type=checkbox]):not([type=file]), .pt-sheet textarea, .pt-sheet select, .pt-plan-edit {
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line2);
  background: var(--surface2); color: var(--ink); font: inherit; font-size: 16px; transition: border-color 150ms, box-shadow 150ms;
}
.pt-sheet textarea, .pt-plan-edit { resize: vertical; line-height: 1.45; }
.pt-sheet > textarea { margin-top: 12px; }
.pt-sheet input:focus, .pt-sheet textarea:focus, .pt-sheet select:focus, .pt-plan-edit:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint); }
.pt-go { margin-top: 18px; }
.pt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.pt-note { margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--tint); color: var(--ink); font-size: 14px; }
.pt-bad { margin: 6px 2px 0; color: var(--bad); font-size: 13.5px; }
.pt-warn { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--bad-bg); border: 1px solid var(--bad-line); font-size: 14px; }
.pt-warn svg.ic { color: var(--bad); margin-top: 1px; }
.pt-pickrow { display: flex; gap: 8px; align-items: center; }
.pt-pickrow select { flex: 1; min-width: 0; }
.pt-pick { flex: none; }

/* versions */
.pt-vrow { border-radius: 16px; padding-bottom: 4px; }
.pt-vrow + .pt-vrow { border-top: 1px solid var(--line); }
.pt-vrow .s-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-vact { display: flex; gap: 16px; padding: 0 10px 0 64px; }
.pt-star.on { color: #e7a400; }
.pt-star.on svg.ic { fill: currentColor; }
.pt-diff { margin: 6px 10px 8px 64px; display: grid; gap: 4px; }
.pt-dfile { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface2); font-size: 13px; min-width: 0; }
.pt-dfile svg.ic { width: 16px; height: 16px; color: var(--faint); }
.pt-dfile code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.pt-dn { display: flex; gap: 8px; font-variant-numeric: tabular-nums; }
.pt-dn i { font-style: normal; color: var(--muted); }
.pt-dn .add { color: var(--ok); font-weight: 600; }
.pt-dn .del { color: var(--bad); font-weight: 600; }

/* search and sharing previews */
.pt-google { padding: 14px 16px; border-radius: 16px; background: var(--surface2); }
.pt-g-site { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pt-g-site img, .pt-g-site i { width: 18px; height: 18px; border-radius: 50%; background: var(--surface3); object-fit: cover; }
.pt-google b { display: block; margin-top: 6px; color: #1a4fd6; font-size: 18px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme=dark] .pt-google b { color: #8ab4f8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .pt-google b { color: #8ab4f8; } }
.pt-google p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); background: var(--surface); }
.pt-card img, .pt-card-empty { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: var(--surface2); }
.pt-card-empty { display: grid; place-items: center; color: var(--faint); }
.pt-card > div { padding: 10px 14px 12px; display: grid; gap: 2px; }
.pt-card small { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.pt-card b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-card p { margin: 0; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* visits */
.pt-switch { cursor: pointer; }
.pt-switch input { width: 22px; height: 22px; flex: none; }
.pt-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-kpis > div { padding: 14px 16px; border-radius: 16px; background: var(--surface2); display: grid; gap: 2px; }
.pt-kpis b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pt-kpis span { color: var(--muted); font-size: 13px; }
.pt-bars { display: flex; align-items: flex-end; gap: 2px; height: 110px; margin-top: 14px; padding: 8px; border-radius: 16px; background: var(--surface2); }
.pt-bars i { flex: 1; min-width: 2px; border-radius: 3px 3px 1px 1px; background: var(--grad, var(--accent)); opacity: .9; }
.pt-barlabels { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin: 4px 4px 0; }
.pt-toprow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.pt-toprow:nth-child(odd) { background: var(--surface2); }
.pt-toprow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-toprow b { font-variant-numeric: tabular-nums; }

/* the app's data */
.pt-dhead { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; }
.pt-scroll { overflow: auto; max-height: 52dvh; border-radius: 14px; border: 1px solid var(--line2); }
.pt-table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 13.5px; }
.pt-table th { position: sticky; top: 0; background: var(--surface2); text-align: start; font-weight: 600; padding: 8px 10px; color: var(--muted); white-space: nowrap; }
.pt-table td { padding: 6px 10px; border-top: 1px solid var(--line); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-table td.ed { cursor: text; }
.pt-table td.ed:hover, .pt-table td.ed:focus { background: var(--tint); outline: 0; }
.pt-table td.pk { color: var(--faint); font-family: var(--mono); font-size: 12.5px; }
.pt-table td.nul { color: var(--faint); font-style: italic; }
.pt-table td.act { padding: 0 2px; width: 1%; }
.pt-table td input { min-height: 32px !important; padding: 4px 8px !important; font-size: 14px !important; border-radius: 8px !important; min-width: 140px; }
.pt-pager { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pt-pager .fine { margin: 0; }
.pt-next svg.ic { transform: rotate(90deg); }
[dir=rtl] .pt-next svg.ic { transform: rotate(-90deg); }
[dir=rtl] .pt-pager > .icon-btn:first-child svg.ic { transform: scaleX(-1); }

/* a stranger's template, before its pages run */
.pt-gate { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; background: var(--surface); }
.pt-gate > svg.ic { width: 34px; height: 34px; color: var(--accent2); padding: 12px; border-radius: 16px; background: var(--tint); box-sizing: content-box; }
.pt-gate b { font-size: 17px; max-width: 34ch; }
.pt-gate p { margin: 0; color: var(--muted); font-size: 14px; max-width: 42ch; }
.pt-gate small { color: var(--faint); }
.pt-gate .btn { margin-top: 8px; }

/* plan first */
.chip-btn.pt-plan { max-width: none; }
.chip-btn.pt-plan.on { background: var(--tint2); color: var(--accent2); }
@media (max-width: 520px) { .chip-btn.pt-plan { padding: 0 11px; } .chip-btn.pt-plan span { display: none; } }
.pt-plan-card { margin: 0 12px 10px; padding: 14px 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--card-shadow); border: 1px solid var(--line2); max-height: 50dvh; overflow-y: auto; animation: up 240ms var(--enter); }
.pt-plan-head { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.pt-plan-head svg.ic { color: var(--accent2); }
.pt-plan-card .fine { margin-top: 4px; }
.pt-brief { margin: 10px 0 0; white-space: pre-wrap; font-size: 14.5px; line-height: 1.5; }
.pt-plan-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pt-plan-body li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.pt-plan-body li svg.ic { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }
.pt-plan-edit { margin-top: 8px; font-size: 14.5px; }
.pt-plan-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.pt-fix { margin-top: 10px; }
