/* Icons: Phosphor (MIT). Inherit text colour; size via the size prop (16 / 20 / 24). */
.pt-icon { display: inline-block; flex: none; vertical-align: -0.2em; }
/* Pointa components. Every value comes from tokens.css. */
body { margin: 0; font-family: var(--font-sans); background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; }
.pt-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-4); }
.pt-stack { display: grid; gap: var(--space-3); padding: var(--space-4); }

/* Button */
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font: inherit; font-weight: 700; font-size: 15px; line-height: 20px; border: 0; border-radius: var(--radius-full); padding: 14px var(--space-6); cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.pt-btn:hover { transform: translateY(-2px); }
.pt-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-btn:disabled, .pt-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.pt-btn-sm { font-size: 14px; font-weight: 600; padding: 10px var(--space-4); }
.pt-btn-primary { background: var(--accent); color: var(--on-accent); }
.pt-btn-primary:hover { background: var(--accent-strong); }
.pt-btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.pt-btn-secondary:hover { background: var(--surface-sunken); }
.pt-btn-quiet { background: transparent; color: var(--accent-deep); padding-inline: var(--space-3); }
.pt-btn-quiet:hover { background: var(--accent-tint); }
.pt-card-black .pt-btn-quiet, .pt-alert-offline .pt-btn-quiet { color: var(--accent); }
.pt-card-black .pt-btn-quiet:hover, .pt-alert-offline .pt-btn-quiet:hover { background: rgba(255,255,255,.08); }
/* Inline link inside running text. */
.pt-link { color: var(--accent-deep); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pt-link:hover { text-decoration-thickness: 2px; }
.pt-card-black .pt-link { color: var(--accent); }
.pt-btn-quiet:hover { transform: none; }
.pt-btn-accent { background: var(--marigold); color: var(--on-marigold); }
.pt-btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.pt-btn-arrow { display: inline-flex; transition: transform .2s; margin-right: -4px; }
.pt-btn:hover .pt-btn-arrow { transform: translateX(4px); }

/* TextField */
.pt-field { display: grid; gap: var(--space-2); min-width: 0; }
.pt-field-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.pt-input { font: inherit; font-size: 16px; line-height: 24px; color: var(--ink); background: var(--surface-raised); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 14px; width: 100%; box-sizing: border-box; }
.pt-input::placeholder { color: var(--ink-subtle); }
.pt-input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
.pt-input:disabled { background: var(--surface-sunken); color: var(--ink-subtle); }
.pt-field-msg { margin: 0; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--ink-muted); display: flex; align-items: flex-start; gap: var(--space-1); }
.pt-field-msg .pt-icon { flex: none; margin-top: 1px; }
.pt-field-error .pt-input { border-color: var(--danger); }
.pt-field-error .pt-field-msg { color: var(--danger); }

/* Card */
.pt-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); display: grid; gap: var(--space-4); align-content: start; color: var(--ink); }
.pt-card-website { border-radius: var(--radius-xl); padding: var(--space-8); gap: var(--space-3); transition: transform .2s, box-shadow .2s; }
.pt-card-website:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.pt-card-black { background: var(--black); color: var(--on-black); border-color: var(--black); border-radius: var(--radius-xl); padding: var(--space-8); }
.pt-card-azure { background: var(--azure); color: var(--on-azure); border-color: var(--azure); border-radius: var(--radius-2xl); padding: var(--space-12); }
.pt-card h3, .pt-card h4 { margin: 0; }
.pt-card p { margin: 0; }
.pt-card > .pt-btn { justify-self: start; }

/* Eyebrow */
.pt-eyebrow { display: inline-flex; align-items: center; justify-self: start; width: fit-content; background: var(--azure-tint); color: var(--ink); border-radius: var(--radius-full); padding: 6px var(--space-3); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pt-eyebrow-marigold { background: var(--marigold); color: var(--on-marigold); }

/* StatusTag */
.pt-tag { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 13px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.pt-tag-icon { margin-left: -1px; }
.pt-slot-compact .pt-tag-icon { width: 14px; height: 14px; }
.pt-tag-success { color: var(--success); }
.pt-tag-warning { color: var(--warning); }
.pt-tag-danger { color: var(--danger); }
.pt-tag-info { color: var(--info); }
.pt-tag-neutral { color: var(--ink-muted); }

/* ClassSlot */
.pt-slot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-1) var(--space-3); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3); min-width: 0; }
.pt-slot[role="button"] { cursor: pointer; }
.pt-slot[role="button"]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-slot-today { background: var(--accent-tint); border-color: transparent; }
.pt-slot-selected { box-shadow: inset 0 0 0 2px var(--accent-deep); border-color: transparent; }
.pt-slot-cancelled .pt-slot-name { text-decoration: line-through; color: var(--ink-muted); }
.pt-slot-main { display: grid; min-width: 0; flex: 1 1 120px; }
.pt-slot-name { font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.pt-slot-label { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .06em; color: var(--accent-deep); overflow-wrap: anywhere; }
.pt-slot-meta { font-size: 12px; line-height: 18px; color: var(--ink-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ClassSlot, compact density for full-week views */
.pt-slot-compact { display: grid; gap: 2px; padding: var(--space-2); border-radius: var(--radius-sm); }
.pt-slot-compact .pt-slot-main { flex: none; }
.pt-slot-compact .pt-slot-name { font-size: 13px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.pt-slot-compact .pt-slot-label { font-size: 11px; line-height: 14px; }
.pt-slot-compact .pt-slot-meta { font-size: 12px; line-height: 16px; overflow-wrap: normal; }
.pt-nowrap { white-space: nowrap; }
.pt-slot-compact .pt-tag { font-size: 12px; line-height: 16px; }

/* StatCard */
.pt-stat { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); display: grid; gap: var(--space-1); min-width: 0; }
.pt-stat-label { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.pt-stat-value { font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pt-stat-change { font-size: 12px; line-height: 18px; font-weight: 600; color: var(--ink-muted); }
.pt-up { color: var(--success); }
.pt-down { color: var(--danger); }

/* Logo */
/* The Pointa logo drawn from live text: Bold name + marigold point (0.6 x-height, on the baseline, gap 0.1em). */
.pt-logo { font-weight: 700; font-size: 22px; letter-spacing: -.022em; display: inline-flex; align-items: baseline; }
.pt-logo i { width: .326em; height: .326em; border-radius: 50%; background: var(--marigold); display: inline-block; margin-left: .1em; flex: none; transform: translateY(.008em); }

/* SiteNav */
.pt-sitenav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); background: var(--black); color: var(--on-black); padding: var(--space-4) var(--space-6); }
.pt-sitenav a:not(.pt-btn) { color: inherit; }
.pt-sitenav-home { text-decoration: none; }
.pt-sitenav-links { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; font-size: 15px; font-weight: 500; }
.pt-sitenav-links a { text-decoration: none; opacity: .88; }
.pt-sitenav-links a:hover { opacity: 1; }
.pt-sitenav-right { display: flex; align-items: center; gap: var(--space-4); font-size: 14px; font-weight: 600; }
.pt-sitenav-login { text-decoration: none; }
.pt-sitenav-login:hover { color: var(--azure); }
.pt-sitenav a:focus-visible { outline: 2px solid var(--azure); outline-offset: 2px; border-radius: var(--radius-xs); }
@media (max-width: 760px) { .pt-sitenav-links, .pt-sitenav-lang { display: none; } .pt-sitenav { padding-inline: var(--space-4); } }

/* AppSidebar */
.pt-sidebar { width: 200px; background: var(--surface-raised); border-right: 1px solid var(--border); padding: var(--space-5) var(--space-3); display: grid; align-content: start; gap: var(--space-4); box-sizing: border-box; }
.pt-sidebar-logo { margin: 0 var(--space-3); font-size: 20px; }
.pt-sidebar nav { display: grid; gap: var(--space-1); }
.pt-sidebar-item { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-3); border-radius: var(--radius-sm); color: var(--ink-muted); text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 500; }
.pt-sidebar-item:hover { background: var(--surface-sunken); color: var(--ink); }
.pt-sidebar-active { background: var(--accent-tint); color: var(--ink); font-weight: 600; }
.pt-sidebar-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) { .pt-btn, .pt-btn-arrow, .pt-card-website { transition: none; } .pt-btn:hover, .pt-card-website:hover { transform: none; } }

/* Utility */
.pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Avatar */
.pt-avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--accent-tint); color: var(--ink); font-weight: 700; letter-spacing: .01em; }
.pt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pt-avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.pt-avatar-md { width: 32px; height: 32px; font-size: 12px; }
.pt-avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.pt-avatar-neutral { background: var(--surface-sunken); }
.pt-avatar-marigold { background: var(--marigold-tint); }

/* Checkbox */
.pt-checkbox { display: inline-flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; position: relative; font-size: 15px; line-height: 22px; color: var(--ink); }
.pt-checkbox-input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.pt-checkbox-box { width: 22px; height: 22px; flex: none; border-radius: var(--radius-xs); box-shadow: inset 0 0 0 1.5px var(--border-strong); background: var(--surface-raised); display: grid; place-items: center; transition: background .12s; }
.pt-checkbox-input:checked + .pt-checkbox-box, .pt-checkbox-input:indeterminate + .pt-checkbox-box { background: var(--accent-deep); box-shadow: none; }
.pt-checkbox-input:checked + .pt-checkbox-box::after { content: ""; width: 6px; height: 11px; border: solid var(--on-accent-deep, #FFFFFF); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.pt-checkbox-input:indeterminate + .pt-checkbox-box::after { content: ""; width: 10px; height: 2.5px; border-radius: 2px; background: var(--on-accent-deep, #FFFFFF); }
.pt-checkbox-input:focus-visible + .pt-checkbox-box { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-checkbox-text small { display: block; font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.pt-checkbox-disabled { opacity: .5; cursor: not-allowed; }

/* Toggle */
.pt-toggle { width: 44px; height: 26px; flex: none; border: 0; border-radius: var(--radius-full); background: var(--border-strong); position: relative; cursor: pointer; padding: 0; transition: background .15s; }
.pt-toggle-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-raised); box-shadow: 0 1px 3px rgba(22, 19, 15, .35); transition: transform .15s; display: grid; place-items: center; }
.pt-toggle-on { background: var(--accent); }
.pt-toggle-on .pt-toggle-knob { transform: translateX(18px); }
[data-theme="dark"] .pt-toggle-knob { background: var(--on-black); }
.pt-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-toggle:disabled { opacity: .45; cursor: not-allowed; }
.pt-toggle-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); font-size: 15px; line-height: 22px; color: var(--ink); }
.pt-toggle-text small { display: block; font-size: 12px; line-height: 18px; color: var(--ink-muted); }

/* Select */
.pt-select { position: relative; }
.pt-select-input { appearance: none; -webkit-appearance: none; font: inherit; font-size: 16px; line-height: 24px; color: var(--ink); background: var(--surface-raised); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 40px 10px 14px; width: 100%; cursor: pointer; }
.pt-select-input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
.pt-select-chev { position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border: solid var(--ink-muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.pt-select-sm .pt-select-input { font-size: 14px; line-height: 20px; padding: 8px 36px 8px 12px; border-radius: var(--radius-full); }
.pt-select-sm .pt-select-chev { right: 14px; width: 7px; height: 7px; }

/* Tabs */
.pt-tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.pt-tab { font: inherit; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-muted); background: none; border: 0; padding: var(--space-3) 0; margin-bottom: -1px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; gap: var(--space-2); align-items: center; }
.pt-tab:hover { color: var(--ink); }
.pt-tab-on { color: var(--ink); border-bottom-color: var(--accent); }
.pt-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-xs); }
.pt-tab-count { font-size: 12px; line-height: 16px; padding: 1px 7px; border-radius: var(--radius-full); background: var(--surface-sunken); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.pt-tab-on .pt-tab-count { background: var(--accent-tint); color: var(--ink); }
.pt-tabs-pill { border-bottom: 0; gap: var(--space-1); background: var(--surface-sunken); padding: 4px; border-radius: var(--radius-full); width: fit-content; max-width: 100%; }
.pt-tabs-pill .pt-tab { padding: 7px var(--space-4); border: 0; margin: 0; border-radius: var(--radius-full); }
.pt-tabs-pill .pt-tab-on { background: var(--surface-raised); box-shadow: 0 1px 2px rgba(22, 19, 15, .12); }
.pt-swipetabs { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.pt-swipetabs-bar { flex: none; }
.pt-swipetabs-tabs { position: relative; padding: 0 var(--space-2) 0 var(--space-4); scroll-padding: 0 var(--space-4); }
.pt-swipetabs-pager { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.pt-swipetabs-pager::-webkit-scrollbar { display: none; }
.pt-swipetabs-panel { flex: 0 0 100%; min-width: 0; box-sizing: border-box; overflow-y: auto; scroll-snap-align: start; scroll-snap-stop: always; padding: var(--space-4); display: grid; align-content: start; gap: var(--space-5); }
.pt-swipetabs-panel:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }

/* Table */
.pt-table-wrap { overflow-x: auto; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; color: var(--ink); }
.pt-table th { position: sticky; top: 0; background: var(--surface-sunken); color: var(--ink-muted); font-weight: 600; font-size: 13px; text-align: left; padding: 10px var(--space-4); white-space: nowrap; }
.pt-table td { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); vertical-align: middle; overflow-wrap: break-word; }
.pt-td-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-td-nowrap { white-space: nowrap; }
.pt-td-sel { width: 44px; padding-right: 0 !important; }
.pt-td-sel .pt-checkbox { vertical-align: middle; }
.pt-th-sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.pt-th-sort:hover { color: var(--ink); }
.pt-th-sort:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-xs); }
.pt-th-arrow { display: inline-flex; vertical-align: -2px; margin-left: 2px; opacity: .7; }
.pt-tr-click { cursor: pointer; }
.pt-tr-click:hover td { background: var(--surface-sunken); }
.pt-tr-selected td { background: var(--accent-tint); }
.pt-td-empty { text-align: center; color: var(--ink-muted); padding: var(--space-12) var(--space-4) !important; }

/* Modal */
.pt-modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--space-4); }
.pt-modal-scrim { position: absolute; inset: 0; background: rgba(22, 19, 15, .45); }
.pt-modal { position: relative; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); display: grid; }
.pt-modal-lg { width: min(720px, 100%); }
.pt-modal:focus { outline: none; }
.pt-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding: var(--space-6) var(--space-6) 0; }
.pt-modal-head h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.pt-modal-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-sunken); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.pt-modal-x:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-modal-body { padding: var(--space-4) var(--space-6) var(--space-6); display: grid; gap: var(--space-4); font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.pt-modal-body strong { color: var(--ink); }
.pt-modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); }
@media (max-width: 640px) { .pt-modal-layer { place-items: end stretch; padding: 0; } .pt-modal { width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; } .pt-modal-actions { flex-direction: column-reverse; } .pt-modal-actions .pt-btn { width: 100%; } }

/* Toast */
.pt-toast-region { position: fixed; left: 50%; bottom: var(--space-6); transform: translateX(-50%); z-index: 110; display: grid; gap: var(--space-2); width: min(440px, calc(100vw - 32px)); }
.pt-toast { display: flex; align-items: center; gap: var(--space-3); background: var(--black); color: var(--on-black); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-float); font-size: 14px; line-height: 20px; border: 1px solid var(--border); }
.pt-toast-icon { flex: none; color: var(--accent); }
.pt-toast-warning .pt-toast-icon { color: #F29A5C; }
.pt-toast-danger .pt-toast-icon { color: #FF8A9C; }
.pt-toast-text { flex: 1; min-width: 0; }
.pt-toast-action { font: inherit; font-weight: 700; background: none; border: 0; color: inherit; cursor: pointer; color: var(--accent); padding: 4px 8px; border-radius: var(--radius-xs); }
.pt-toast-action:hover { background: rgba(255,255,255,.08); }
.pt-toast-x { font: inherit; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 4px; display: inline-flex; border-radius: var(--radius-xs); }
.pt-toast button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
/* Toast, dark theme: inverted to cream with warm-black text. `black` is only one step above dark surfaces (1.02:1 against cards),
   so a black toast disappears over content. Icon and action colours are the light-theme values, which read on cream (5:1 or better). */
[data-theme="dark"] .pt-toast { background: var(--ink); color: var(--surface); border-color: var(--ink); }
[data-theme="dark"] .pt-toast-icon, [data-theme="dark"] .pt-toast-action { color: #006D94; }
[data-theme="dark"] .pt-toast-warning .pt-toast-icon { color: #A44A14; }
[data-theme="dark"] .pt-toast-danger .pt-toast-icon { color: #B3263E; }
[data-theme="dark"] .pt-toast-action:hover { background: rgba(22, 19, 15, .08); }
[data-theme="dark"] .pt-toast button:focus-visible { outline-color: #006D94; }
@media (prefers-reduced-motion: reduce) { .pt-toggle, .pt-toggle-knob, .pt-checkbox-box { transition: none; } }


/* ---- States: spinner, skeleton, empty / error panels, alerts */
.pt-spinner { display: inline-block; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pt-spin .7s linear infinite; opacity: .9; }
@keyframes pt-spin { to { transform: rotate(360deg); } }
.pt-btn-loading { cursor: progress; }
.pt-btn-loading[disabled] { opacity: 1; }
.pt-skel { display: block; background: var(--border); border-radius: var(--radius-xs); height: 12px; width: 100%; position: relative; overflow: hidden; }
.pt-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: pt-shimmer 1.4s ease-in-out infinite; }
[data-theme="dark"] .pt-skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes pt-shimmer { to { transform: translateX(100%); } }
.pt-skel-sm { height: 10px; }
.pt-skel-circle { border-radius: 50%; flex: none; }
.pt-skel-block { border-radius: var(--radius-md); height: 72px; }
.pt-skel-list { display: grid; }
.pt-skel-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.pt-skel-row:last-child { border-bottom: 0; }
.pt-skel-lines { flex: 1; display: grid; gap: var(--space-2); min-width: 0; }
@media (prefers-reduced-motion: reduce) { .pt-skel::after, .pt-spinner { animation: none; } .pt-spinner { border-right-color: currentColor; opacity: .5; } }

.pt-state { display: grid; justify-items: center; text-align: center; gap: var(--space-4); padding: var(--space-12) var(--space-6); color: var(--ink); max-width: 440px; margin-inline: auto; }
.pt-state-sm { gap: var(--space-3); padding: var(--space-8) var(--space-4); }
.pt-state-text { display: grid; gap: var(--space-1); }
.pt-state-title { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.pt-state-sm .pt-state-title { font-size: 15px; line-height: 22px; }
.pt-state-body { margin: 0; font-size: 14px; line-height: 21px; color: var(--ink-muted); text-wrap: pretty; }
.pt-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-3); }
.pt-state-detail { margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.pt-state-art { width: 120px; height: 80px; }
.pt-art-arch { fill: var(--accent); } .pt-art-sun { fill: var(--marigold); } .pt-art-hill { fill: var(--black); }
/* Studio-branded screens never show marigold: the sun takes the studio's deep shade. */
.pt-studio .pt-art-sun { fill: var(--accent-deep); }
[data-theme="dark"] .pt-art-hill { fill: var(--border-strong); }
.pt-state-icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--surface-sunken); color: var(--ink-muted); }
.pt-state-sm .pt-state-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); }
.pt-state-done .pt-state-icon { background: var(--accent-tint); color: var(--ink); }
.pt-state-error .pt-state-icon { color: var(--danger); }
.pt-td-empty .pt-state { padding-block: var(--space-6); }

.pt-alert { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-raised); border: 1px solid var(--border); color: var(--ink); font-size: 14px; line-height: 20px; }
.pt-alert-icon { margin-top: 0; }
.pt-alert-info .pt-alert-icon { color: var(--info); }
.pt-alert-success .pt-alert-icon { color: var(--success); }
.pt-alert-warning { background: var(--warning-tint); border-color: transparent; }
.pt-alert-warning .pt-alert-icon { color: var(--warning); }
.pt-alert-danger { border-color: var(--danger); }
.pt-alert-danger .pt-alert-icon { color: var(--danger); }
.pt-alert-offline { background: var(--black); color: var(--on-black); border-color: var(--black); }
[data-theme="dark"] .pt-alert-offline { border-color: var(--border); }
.pt-alert-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pt-alert-title { margin: 0; font-weight: 600; }
.pt-alert-body { margin: 0; color: inherit; opacity: .86; }
.pt-alert-action { flex: none; align-self: center; }
.pt-alert-action .pt-btn-quiet { margin-block: -6px; margin-right: -8px; }
.pt-alert-x { flex: none; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 2px; display: inline-flex; border-radius: var(--radius-xs); }
.pt-alert-x:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---- Dates and times */
.pt-datefield { position: relative; display: flex; align-items: stretch; }
.pt-datefield .pt-input { padding-right: 48px; }
.pt-datefield-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); display: grid; place-items: center; cursor: pointer; }
.pt-datefield-btn:hover { background: var(--surface-sunken); color: var(--ink); }
.pt-datefield-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 0; }
.pt-datefield-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; display: inline-flex; }
.pt-range-btn { display: flex; align-items: center; gap: var(--space-2); text-align: left; cursor: pointer; padding-right: 14px !important; }
.pt-range-btn .pt-icon { color: var(--ink-muted); }
.pt-range-btn span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pt-range-btn small { flex: none; font-size: 13px; font-weight: 600; color: var(--ink-muted); background: var(--surface-sunken); padding: 2px 8px; border-radius: var(--radius-full); }
.pt-range-ph { color: var(--ink-subtle); }
.pt-pop { position: fixed; z-index: 140; background: var(--surface-raised); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); padding: var(--space-3); font-family: var(--font-sans); }
.pt-pop-range { display: flex; gap: var(--space-3); }
.pt-pop-time { padding: var(--space-1); }
.pt-pop-layer { position: fixed; inset: 0; z-index: 140; display: flex; align-items: flex-end; }
.pt-pop-scrim { position: absolute; inset: 0; background: rgba(22, 19, 15, .45); }
.pt-pop-sheet { position: relative; width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-2) var(--space-4) calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); max-height: 85vh; overflow: auto; display: block; }
.pt-pop-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 0 auto var(--space-3); }
.pt-pop-sheet.pt-pop-range .pt-presets { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; border-right: 0; padding: 0 0 var(--space-3); margin-bottom: var(--space-2); border-bottom: 1px solid var(--border); }
.pt-pop-sheet.pt-pop-range .pt-preset { white-space: nowrap; flex: none; background: var(--surface-sunken); border-radius: var(--radius-full); }

.pt-cal { width: 296px; max-width: 100%; display: grid; gap: var(--space-2); }
.pt-pop-sheet .pt-cal { width: 100%; }
.pt-cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.pt-cal-title { margin: 0; font-size: 15px; font-weight: 600; }
.pt-cal-nav { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pt-cal-nav:hover { background: var(--surface-sunken); }
.pt-cal-nav:disabled { color: var(--ink-subtle); opacity: .5; cursor: default; background: transparent; }
.pt-cal-grid { border-collapse: collapse; width: 100%; table-layout: fixed; }
.pt-cal-grid th { font-size: 12px; font-weight: 600; color: var(--ink-subtle); padding: 4px 0 6px; text-align: center; }
.pt-cal-td { padding: 1px 0; text-align: center; }
.pt-cal-day { position: relative; width: 40px; max-width: 100%; margin: 0 auto; height: 40px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; }
.pt-cal-day > span { width: 40px; height: 40px; max-width: 100%; border-radius: 50%; display: grid; place-items: center; flex: none; }
.pt-cal-day:hover > span { background: var(--surface-sunken); }
.pt-cal-day:focus-visible { outline: none; }
.pt-cal-day:focus-visible > span { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.pt-cal-out { color: var(--ink-subtle); font-weight: 400; }
.pt-cal-today { color: var(--accent-deep); font-weight: 700; }
.pt-cal-day:disabled { color: var(--ink-subtle); opacity: .45; cursor: default; }
.pt-cal-day:disabled:hover > span { background: transparent; }
.pt-cal-on > span, .pt-cal-on:hover > span { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.pt-cal-mid { background: var(--accent-tint); }
.pt-cal-s { background: linear-gradient(90deg, transparent 50%, var(--accent-tint) 50%); }
.pt-cal-e { background: linear-gradient(90deg, var(--accent-tint) 50%, transparent 50%); }
.pt-cal-mid .pt-cal-day:hover > span { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent-deep); }
.pt-cal-mark { position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent-deep); }
.pt-cal-on .pt-cal-mark { display: none; }
.pt-cal-legend { margin: 0; display: flex; align-items: center; gap: var(--space-2); font-size: 13px; color: var(--ink-muted); padding: var(--space-1) var(--space-2) 0; border-top: 1px solid var(--border); padding-top: var(--space-2); }
.pt-cal-legend .pt-cal-mark { position: static; margin: 0; width: 5px; height: 5px; }
.pt-cal-hint { margin: 0; font-size: 13px; color: var(--ink-muted); text-align: center; }
.pt-presets { display: flex; flex-direction: column; gap: 2px; padding-right: var(--space-3); border-right: 1px solid var(--border); min-width: 140px; }
.pt-preset { font: inherit; font-size: 14px; font-weight: 500; text-align: left; padding: 8px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); cursor: pointer; }
.pt-preset:hover { background: var(--surface-sunken); }
.pt-preset-on { background: var(--accent-tint); font-weight: 600; }
.pt-preset:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

.pt-timelist { list-style: none; margin: 0; padding: 0; max-height: 264px; overflow-y: auto; min-width: 160px; }
.pt-pop-sheet .pt-timelist { max-height: 50vh; }
.pt-timeopt { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: 9px 12px; border-radius: var(--radius-sm); font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; }
.pt-timeopt small { font-size: 12px; color: var(--ink-muted); }
.pt-timeopt-active { background: var(--surface-sunken); }
.pt-timeopt-on { background: var(--accent-tint); font-weight: 600; }

.pt-repeat { display: grid; gap: var(--space-4); }
.pt-seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--radius-full); background: var(--surface-sunken); width: fit-content; max-width: 100%; }
.pt-seg-btn { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--ink-muted); cursor: pointer; }
.pt-seg-btn:hover { color: var(--ink); }
.pt-seg-on, .pt-seg-on:hover { background: var(--surface-raised); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 19, 15, .12), inset 0 0 0 1px var(--border); }
.pt-seg-btn:focus-visible, .pt-daychip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-daychips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pt-daychip { min-width: 48px; height: 40px; padding: 0 10px; border-radius: var(--radius-full); border: 1.5px solid var(--border-strong); background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pt-daychip:hover { background: var(--surface-sunken); }
.pt-daychip-on, .pt-daychip-on:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pt-repeat-ends { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); align-items: start; }
.pt-repeat-sum { margin: 0; display: flex; gap: var(--space-2); align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--ink); background: var(--surface-sunken); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-variant-numeric: tabular-nums; }
.pt-repeat-sum .pt-icon { color: var(--ink-muted); margin-top: 0; }

.pt-daystrip { display: flex; gap: var(--space-2); overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px var(--space-1); scrollbar-width: none; }
.pt-daystrip::-webkit-scrollbar { display: none; }
.pt-daystrip-day { flex: none; scroll-snap-align: center; width: 52px; display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border: 0; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--ink); font: inherit; cursor: pointer; }
.pt-daystrip-wd { font-size: 12px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.pt-daystrip-n { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-daystrip-dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.pt-daystrip-dot-on { background: var(--accent-deep); }
.pt-daystrip-on { background: var(--black); color: var(--on-black); }
.pt-daystrip-on .pt-daystrip-wd { color: var(--on-black); opacity: .8; }
.pt-daystrip-on .pt-daystrip-dot-on { background: transparent; }
[data-theme="dark"] .pt-daystrip-on { background: var(--ink); color: var(--surface); }
[data-theme="dark"] .pt-daystrip-on .pt-daystrip-wd { color: var(--surface); }
.pt-daystrip-today:not(.pt-daystrip-on) .pt-daystrip-wd, .pt-daystrip-today:not(.pt-daystrip-on) .pt-daystrip-n { color: var(--accent-deep); }
.pt-daystrip-empty { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.pt-daystrip-empty .pt-daystrip-n, .pt-daystrip-empty .pt-daystrip-wd { color: var(--ink-subtle); }
.pt-daystrip-day:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 480px) { .pt-repeat-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; border-radius: var(--radius-md); } .pt-repeat-seg .pt-seg-btn { padding: 8px 6px; font-size: 13px; line-height: 18px; border-radius: var(--radius-sm); } }
@media (max-width: 480px) { .pt-daychips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; } .pt-daychip { min-width: 0; padding: 0; font-size: 13px; } }

.pt-field-warn .pt-field-msg { color: var(--warning); }

/* ---- Studio branding */
.pt-btn-primary, .pt-cal-on > span, .pt-daychip-on { box-shadow: inset 0 0 0 1.5px var(--accent-edge, transparent); }
.pt-studiomark { display: inline-block; flex: none; object-fit: contain; border-radius: var(--radius-sm); }
.pt-studiomark-tile { display: inline-grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; letter-spacing: -.02em; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1.5px var(--accent-edge, transparent); }
.pt-poweredby { margin: 0; display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--ink-subtle); }
.pt-poweredby .pt-logo { font-size: 13px; color: var(--ink-muted); }

/* ---- Choices */
.pt-radios { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-2); min-width: 0; }
.pt-radios legend { padding: 0; margin-bottom: var(--space-2); }
.pt-radios-list { display: grid; gap: var(--space-1); }
.pt-radio { display: flex; align-items: flex-start; gap: var(--space-3); padding: 6px 0; cursor: pointer; font-size: 15px; line-height: 22px; color: var(--ink); }
.pt-radio-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pt-radio-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--border-strong); background: var(--surface-raised); display: grid; place-items: center; margin-top: 0; }
.pt-radio-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-deep); transform: scale(0); transition: transform .12s; }
.pt-radio-input:checked + .pt-radio-dot { background: var(--surface-raised); box-shadow: inset 0 0 0 2px var(--accent-deep); }
.pt-radio-input:checked + .pt-radio-dot::after { transform: scale(1); }
.pt-radio-input:focus-visible + .pt-radio-dot { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-radio-text { display: grid; flex: 1; min-width: 0; }
.pt-radio-text small { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.pt-radio-trailing { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-radio-disabled { opacity: .5; cursor: default; }
.pt-radios-cards .pt-radios-list { gap: var(--space-2); }
.pt-radios-cards .pt-radio { padding: var(--space-4); border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--surface-raised); }
.pt-radios-cards .pt-radio-on { border-color: var(--accent-deep); background: var(--accent-tint); }
.pt-radios-cards .pt-radio-label { font-weight: 600; }
.pt-radios-error { color: var(--danger); }
.pt-seg-full { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
.pt-seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .pt-radio-dot::after { transition: none; } }

/* ---- Search */
.pt-search { position: relative; display: flex; align-items: center; min-width: 0; }
.pt-search-icon { position: absolute; left: 12px; color: var(--ink-muted); display: inline-flex; pointer-events: none; }
.pt-search-input { padding-left: 42px; padding-right: 40px; -webkit-appearance: none; appearance: none; }
.pt-search-input::-webkit-search-cancel-button { display: none; }
.pt-search-clear { position: absolute; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-muted); display: grid; place-items: center; cursor: pointer; }
.pt-search-clear:hover { background: var(--surface-sunken); color: var(--ink); }
.pt-search-clear:focus-visible { outline: 2px solid var(--focus-ring); }
.pt-pop-search { padding: var(--space-2); min-width: 300px; }
.pt-suggest { display: grid; gap: 2px; }
.pt-suggest-head { margin: 0; padding: 6px 10px 4px; font-size: 12px; font-weight: 600; color: var(--ink-subtle); }
.pt-suggest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pt-suggest-item { display: flex; align-items: center; gap: var(--space-3); padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.pt-suggest-active { background: var(--surface-sunken); }
.pt-suggest-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); color: var(--ink-muted); flex: none; }
.pt-suggest-text { flex: 1; min-width: 0; display: grid; font-size: 14px; }
.pt-suggest-text > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.pt-suggest-text small { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pt-suggest-trail { flex: none; }
.pt-mark { background: transparent; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pt-suggest-empty { margin: 0; padding: 14px 10px; font-size: 14px; color: var(--ink-muted); }
.pt-suggest-all { font: inherit; font-size: 14px; font-weight: 700; color: var(--accent-deep); background: transparent; border: 0; border-top: 1px solid var(--border); padding: 10px; text-align: left; cursor: pointer; margin-top: 4px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.pt-suggest-all:hover { background: var(--accent-tint); }

/* ---- Menu */
.pt-menu { display: inline-flex; }
.pt-iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-raised); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pt-iconbtn:hover { background: var(--surface-sunken); }
.pt-iconbtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-menu-btn .pt-icon:last-child { margin-right: -4px; }
.pt-pop-menu { padding: var(--space-1); min-width: 220px; }
.pt-menu-list { display: grid; gap: 1px; }
.pt-menu-item { display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; font: inherit; font-size: 14px; line-height: 20px; color: var(--ink); text-align: left; cursor: pointer; }
.pt-menu-item .pt-icon { color: var(--ink-muted); flex: none; }
.pt-menu-item:hover, .pt-menu-item:focus { background: var(--surface-sunken); outline: none; }
.pt-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.pt-menu-item:disabled { opacity: .45; cursor: default; background: transparent; }
.pt-menu-label { display: grid; }
.pt-menu-label small { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.pt-menu-noicon { width: 20px; flex: none; }
.pt-menu-danger, .pt-menu-danger .pt-icon { color: var(--danger); }
.pt-menu-sep { height: 1px; background: var(--border); margin: 4px 8px; }

/* ---- Tooltip */
.pt-tt-wrap { display: inline-flex; }
.pt-tooltip { position: fixed; z-index: 150; transform: translate(-50%, -100%); max-width: 240px; padding: 6px 10px; border-radius: var(--radius-xs); background: var(--black); color: var(--on-black); font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 500; pointer-events: none; box-shadow: var(--shadow-float); }
[data-theme="dark"] .pt-tooltip { background: var(--ink); color: var(--surface); }

/* ---- Pagination */
.pt-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: 14px; }
.pt-pages-count { margin: 0; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.pt-pages-nav { display: flex; align-items: center; gap: 2px; }
.pt-pagebtn { min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: var(--radius-full); background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.pt-pagebtn:hover { background: var(--surface-sunken); }
.pt-pagebtn:disabled { color: var(--ink-subtle); opacity: .5; cursor: default; background: transparent; }
.pt-pagebtn-on, .pt-pagebtn-on:hover { background: var(--accent-tint); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent-deep); }
.pt-pagebtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.pt-pages-gap { min-width: 24px; text-align: center; color: var(--ink-subtle); }
@media (max-width: 520px) { .pt-pagebtn-num:not(.pt-pagebtn-on), .pt-pages-gap { display: none; } }

/* ---- Badge, CapacityBar, AvatarGroup, Steps */
.pt-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-badge-neutral { background: var(--surface-sunken); color: var(--ink-muted); }
.pt-badge-accent { background: var(--accent-tint); color: var(--ink); }
.pt-badge-new { background: var(--accent); color: var(--on-accent); }
.pt-badge-count, .pt-badge-alert { min-width: 22px; justify-content: center; padding: 0 6px; }
/* Unread counts: warm black, never red. Red only for things someone must act on. */
.pt-badge-count { background: var(--ink); color: var(--surface); }
.pt-badge-alert { background: var(--danger); color: #FFFFFF; }
[data-theme="dark"] .pt-badge-alert { color: #110F0C; }
.pt-badge-outline { background: transparent; color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pt-cap { display: grid; gap: 6px; min-width: 0; }
.pt-cap-top { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 13px; line-height: 18px; }
.pt-cap-text { font-weight: 600; color: var(--ink); }
.pt-cap-detail { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.pt-cap-track { height: 6px; border-radius: var(--radius-full); background: var(--border); overflow: hidden; }
.pt-cap-fill { display: block; height: 100%; border-radius: var(--radius-full); background: var(--ink); }
.pt-cap-low .pt-cap-text { color: var(--warning); }
.pt-cap-full .pt-cap-fill { background: var(--ink-muted); }
.pt-cap-full .pt-cap-text { color: var(--ink-muted); }
.pt-cap-credits.pt-cap-low .pt-cap-fill { background: var(--warning); }
.pt-avgroup { display: inline-flex; align-items: center; }
.pt-avgroup > .pt-avatar { box-shadow: 0 0 0 2px var(--surface-raised); }
.pt-avgroup > .pt-avatar + .pt-avatar { margin-left: -8px; }
.pt-avgroup-more { background: var(--surface-sunken); color: var(--ink-muted); font-weight: 700; }
.pt-steps { display: grid; gap: var(--space-2); }
.pt-steps-short { display: none; margin: 0; font-size: 13px; color: var(--ink-muted); }
.pt-steps-short b { color: var(--ink); }
.pt-steps-list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-2); align-items: center; }
.pt-step { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 600; color: var(--ink-subtle); flex: 1; min-width: 0; }
.pt-step:not(:last-child)::after { content: ""; flex: 1; height: 2px; min-width: 12px; border-radius: 1px; background: var(--border); }
.pt-step-done:not(:last-child)::after { background: var(--accent); }
.pt-step-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.pt-step-label { white-space: nowrap; }
.pt-step-now { color: var(--ink); }
.pt-step-now .pt-step-n { background: var(--ink); color: var(--surface); box-shadow: none; }
.pt-step-done { color: var(--ink-muted); }
.pt-step-done .pt-step-n { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-edge, transparent); }
@media (max-width: 760px) { .pt-steps-short { display: block; } .pt-step-label { display: none; } .pt-step { flex: 1; } }

/* ---- Inputs */
.pt-numfield { display: flex; align-items: stretch; gap: 0; width: fit-content; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-raised); overflow: hidden; }
.pt-numfield:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
.pt-num-btn { width: 44px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pt-num-btn:hover { background: var(--surface-sunken); }
.pt-num-btn:disabled { color: var(--ink-subtle); opacity: .5; cursor: default; background: transparent; }
.pt-num-input { width: 64px; border: 0; border-radius: 0; text-align: center; font-variant-numeric: tabular-nums; padding-inline: 4px; background: transparent; }
.pt-num-input:focus { outline: none; }
.pt-num-suffix { align-self: center; padding-right: 6px; font-size: 14px; color: var(--ink-muted); }
.pt-affix { display: flex; align-items: stretch; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-raised); }
.pt-affix:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
.pt-field-error .pt-affix { border-color: var(--danger); }
.pt-affix .pt-input { border: 0; border-radius: 0; background: transparent; min-width: 0; font-variant-numeric: tabular-nums; }
.pt-affix .pt-input:focus { outline: none; }
.pt-affix-pre, .pt-affix-post { display: grid; place-items: center; padding: 0 12px; font-size: 16px; font-weight: 600; color: var(--ink-muted); background: var(--surface-sunken); flex: none; }
.pt-affix-pre { border-right: 1px solid var(--border); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.pt-affix-post { border-left: 1px solid var(--border); font-size: 14px; font-weight: 500; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.pt-textarea { resize: vertical; min-height: 96px; line-height: 24px; }
.pt-ta-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.pt-ta-count { font-size: 12px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.pt-ta-near { color: var(--warning); font-weight: 600; }
.pt-photo { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3); border-radius: var(--radius-md); border: 1.5px dashed var(--border-strong); }
.pt-photo-drag { border-color: var(--accent-deep); background: var(--accent-tint); }
.pt-photo-frame { width: 72px; height: 72px; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--surface-sunken); color: var(--ink-subtle); }
.pt-photo-circle .pt-photo-frame { border-radius: 50%; }
.pt-photo-square .pt-photo-frame { border-radius: var(--radius-md); }
.pt-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.pt-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.pt-photo-actions label.pt-btn { cursor: pointer; }
.pt-photo-actions input:focus-visible + label { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pt-photo-drop { font-size: 13px; color: var(--ink-muted); }

/* ---- Phone: TabBar, List */
.pt-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--border); background: var(--surface-raised); padding: 6px 4px calc(10px + env(safe-area-inset-bottom, 0px)); }
.pt-tabbar-item { display: grid; justify-items: center; gap: 2px; padding: 4px 0; border: 0; background: transparent; font: inherit; color: var(--ink-subtle); cursor: pointer; border-radius: var(--radius-sm); }
.pt-tabbar-item:focus-visible { outline: 2px solid var(--focus-ring); }
.pt-tabbar-ic { position: relative; display: inline-flex; }
.pt-tabbar-label { font-size: 12px; font-weight: 600; line-height: 16px; }
.pt-tabbar-on { color: var(--ink); }
.pt-tabbar-on .pt-tabbar-ic { color: var(--accent-deep); }
.pt-tabbar-badge { position: absolute; top: -4px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface-raised); }
.pt-tabbar-badge-alert { background: var(--danger); color: #FFFFFF; }
[data-theme="dark"] .pt-tabbar-badge-alert { color: #110F0C; }
.pt-list { display: grid; gap: var(--space-2); min-width: 0; }
.pt-list-title { margin: 0; padding: 0 4px; font-size: 13px; font-weight: 700; color: var(--ink-muted); display: flex; gap: 8px; }
.pt-list-title span { color: var(--ink-subtle); font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-list-ul { list-style: none; margin: 0; padding: 0; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.pt-lrow-li + .pt-lrow-li { border-top: 1px solid var(--border); }
.pt-lrow { box-sizing: border-box; display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 64px; padding: var(--space-3) var(--space-4); border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; text-decoration: none; }
button.pt-lrow, a.pt-lrow { cursor: pointer; }
button.pt-lrow:hover, a.pt-lrow:hover { background: var(--surface-sunken); }
button.pt-lrow:focus-visible, a.pt-lrow:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.pt-lrow-text { flex: 1; min-width: 0; display: grid; }
.pt-lrow-title { font-size: 15px; font-weight: 600; line-height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-lrow-sub { font-size: 13px; line-height: 18px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-lrow-trail { flex: none; display: inline-flex; align-items: center; gap: var(--space-2); }
.pt-lrow-chev { color: var(--ink-subtle); display: inline-flex; flex: none; }

.pt-sidebar-item .pt-badge { margin-left: auto; }

/* Text and ticks on `accent-deep` fills: white in light, warm black in dark (accent-deep is always 4.5:1 against both). */
:root, [data-theme="light"] { --on-accent-deep: #FFFFFF; }
[data-theme="dark"] { --on-accent-deep: #110F0C; }

/* ProgressBar */
.pt-prog { display: grid; gap: 6px; min-width: 0; }
.pt-prog-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); font-size: 13px; line-height: 18px; }
.pt-prog-label { font-weight: 600; color: var(--ink); min-width: 0; }
.pt-prog-count { color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-prog-track { position: relative; height: 6px; border-radius: var(--radius-full); background: var(--border); overflow: hidden; }
.pt-prog-lg .pt-prog-track { height: 10px; }
.pt-prog-lg .pt-prog-top { font-size: 14px; line-height: 20px; }
.pt-prog-fill { display: block; height: 100%; border-radius: var(--radius-full); background: var(--ink); transition: width .3s ease; }
.pt-prog-error .pt-prog-fill { background: var(--danger); }
.pt-prog-hint { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.pt-prog-done .pt-prog-hint { color: var(--ink); font-weight: 600; }
.pt-prog-done .pt-prog-hint .pt-icon, .pt-prog-done .pt-prog-hint svg { color: var(--success); }
.pt-prog-error .pt-prog-hint { color: var(--danger); }
@media (prefers-reduced-motion: reduce) { .pt-prog-fill { transition: none; } }
