/* Base, typography, forms, buttons, tables, notices — shared by site and app. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--vt-font);
	font-size: var(--vt-text-base);
	line-height: 1.55;
	color: var(--vt-charcoal);
	background: var(--vt-white);
	font-feature-settings: "tnum" 0, "ss01" 1;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--vt-violet); text-underline-offset: 3px; }
a:hover { color: var(--vt-violet-hover); }
h1, h2, h3, h4 { color: var(--vt-ink); line-height: 1.15; margin: 0 0 var(--vt-3); font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: var(--vt-text-2xl); }
h2 { font-size: var(--vt-text-xl); }
h3 { font-size: var(--vt-text-md); letter-spacing: -0.005em; }
p { margin: 0 0 var(--vt-4); }
small, .vt-small { font-size: var(--vt-text-sm); }
.vt-muted { color: var(--vt-muted); }
.vt-num { font-variant-numeric: tabular-nums; }
.vt-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vt-skip { position: absolute; left: -999px; top: 8px; background: var(--vt-ink); color: #fff; padding: 8px 12px; border-radius: var(--vt-radius-sm); z-index: 100; }
.vt-skip:focus { left: 8px; }
:focus-visible { outline: none; box-shadow: var(--vt-focus); border-radius: var(--vt-radius-sm); }

/* Buttons */
.vt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--vt-2);
	min-height: 40px; padding: 0 var(--vt-4);
	font: 600 var(--vt-text-base)/1 var(--vt-font);
	border-radius: var(--vt-radius-sm); border: 1px solid transparent;
	text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.vt-btn--primary { background: var(--vt-violet); color: #fff; }
.vt-btn--primary:hover { background: var(--vt-violet-hover); color: #fff; }
.vt-btn--secondary { background: var(--vt-white); color: var(--vt-ink); border-color: var(--vt-line-strong); }
.vt-btn--secondary:hover { border-color: var(--vt-violet); color: var(--vt-violet); }
.vt-btn--ghost { background: transparent; color: var(--vt-violet); padding: 0 var(--vt-2); }
.vt-btn--ghost:hover { background: var(--vt-violet-soft); }
.vt-btn--danger { background: var(--vt-white); color: var(--vt-danger); border-color: #e3c3ca; }
.vt-btn--danger:hover { background: var(--vt-danger-bg); color: var(--vt-danger); }
.vt-btn--sm { min-height: 32px; padding: 0 var(--vt-3); font-size: var(--vt-text-sm); }
.vt-btn--block { width: 100%; }
.vt-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Forms */
.vt-field { display: grid; gap: 6px; margin-bottom: var(--vt-4); }
.vt-field > label, .vt-label { font-weight: 600; font-size: var(--vt-text-sm); color: var(--vt-ink); }
.vt-help { font-size: var(--vt-text-sm); color: var(--vt-muted); margin: 0; }
.vt-input, .vt-select, .vt-textarea {
	width: 100%; min-height: 40px; padding: 9px 12px;
	font: 400 var(--vt-text-base)/1.4 var(--vt-font); color: var(--vt-charcoal);
	background: var(--vt-white); border: 1px solid var(--vt-line-strong); border-radius: var(--vt-radius-sm);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.vt-textarea { min-height: 96px; resize: vertical; }
.vt-input:focus, .vt-select:focus, .vt-textarea:focus { outline: none; border-color: var(--vt-violet); box-shadow: var(--vt-focus); }
.vt-input::placeholder, .vt-textarea::placeholder { color: var(--vt-faint); }
.vt-check { display: flex; gap: var(--vt-2); align-items: flex-start; font-size: var(--vt-text-sm); }
.vt-check input { margin-top: 3px; accent-color: var(--vt-violet); }
.vt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vt-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--vt-5); }
.vt-form-grid .vt-field--full { grid-column: 1 / -1; }
@media (max-width: 720px) { .vt-form-grid { grid-template-columns: minmax(0, 1fr); } }

/* Notices */
.vt-notice { display: flex; gap: var(--vt-3); align-items: flex-start; padding: var(--vt-3) var(--vt-4); border-radius: var(--vt-radius-sm); border: 1px solid; font-size: var(--vt-text-sm); margin-bottom: var(--vt-5); }
.vt-notice--success { background: var(--vt-success-bg); border-color: #c6e2d4; color: #1f5a40; }
.vt-notice--error { background: var(--vt-danger-bg); border-color: #ecc9d0; color: #7c2333; }
.vt-notice--info { background: var(--vt-info-bg); border-color: #cfdbec; color: #2c4468; }
.vt-notice--warning { background: var(--vt-warning-bg); border-color: #ecdab8; color: #6b4a0e; }

/* Badges */
.vt-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: var(--vt-text-xs); font-weight: 600; background: var(--vt-lavender-50); color: var(--vt-violet); border: 1px solid var(--vt-line); white-space: nowrap; }
.vt-badge--success { background: var(--vt-success-bg); color: var(--vt-success); border-color: #c6e2d4; }
.vt-badge--warning { background: var(--vt-warning-bg); color: var(--vt-warning); border-color: #ecdab8; }
.vt-badge--danger { background: var(--vt-danger-bg); color: var(--vt-danger); border-color: #ecc9d0; }
.vt-badge--neutral { background: #f3f2f5; color: var(--vt-muted); border-color: var(--vt-line); }

/* Tables */
.vt-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--vt-line); border-radius: var(--vt-radius); background: var(--vt-white); }
.vt-table { width: 100%; border-collapse: collapse; font-size: var(--vt-text-sm); }
.vt-table th { text-align: left; font-weight: 600; color: var(--vt-muted); background: #faf9fc; padding: 10px 14px; border-bottom: 1px solid var(--vt-line); white-space: nowrap; }
.vt-table td { padding: 12px 14px; border-bottom: 1px solid var(--vt-line); vertical-align: middle; }
.vt-table tr:last-child td { border-bottom: 0; }
.vt-table tbody tr:hover { background: #fcfbfe; }
.vt-table .vt-actions { text-align: right; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
