[x-cloak] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body { font-family: Figtree, system-ui, sans-serif; font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
.font-display { letter-spacing: -0.03em; line-height: 1; }
.tabular-nums, td, .badge { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid #1A3760; outline-offset: 2px; border-radius: 8px; }

.pb-safe { padding-bottom: env(safe-area-inset-bottom); }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Lucide icon font: inline-block so icons can rotate and centre in flex rows */
[class^="icon-"], [class*=" icon-"] { display: inline-block; line-height: 1; }

/* 44px minimum touch target */
.tap { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

button, a, select, summary, .field { transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, opacity 150ms ease, transform 150ms ease; }
button:active:not(:disabled), a.pressable:active { opacity: .8; transform: scale(.985); }

/* Form controls: 16px so iOS does not zoom on focus. Filled field, border only appears on focus or error. */
.field { width: 100%; min-height: 48px; padding: 0 14px; font-size: 16px; background: #fff; border: 1.5px solid #DADEE3; border-radius: 12px; color: #000; }
.field::placeholder { color: #8A929B; }
.field:hover:not(:focus):not(:disabled) { border-color: #B8BEC6; }
textarea.field { padding: 12px 14px; min-height: 96px; }
/* Dropdowns: own chevron with proper inset instead of the browser's edge-flush arrow */
select.field {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 44px; text-overflow: ellipsis; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231A3760' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 16px 16px;
}
select.field:disabled { opacity: .5; cursor: not-allowed; }
.field:focus { outline: 3px solid #E3E9F3; outline-offset: 0; border-color: #1A3760; }
.field[aria-invalid="true"] { border-color: #8F2A22; }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.hint { font-size: 13px; color: #69727D; margin-top: 4px; }
.err { font-size: 13px; color: #8F2A22; margin-top: 4px; }

/* Cards: separated from the canvas by tone, not outlines */
.card { background: #fff; border: 0; border-radius: 16px; }
.card-white { background: #fff; border: 0; border-radius: 16px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; border: 0; background: #E8EBEF; color: #000; }
.chip:hover { background: #DDE1E6; }
.card .chip, .card-white .chip { background: #EDF0F3; }
.chip[aria-pressed="true"], .chip.on, .card .chip.on { background: #1A3760; color: #fff; }
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 20px; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.btn-primary { background: #BA8E40; color: #000; }
.btn-primary:hover { background: #A87F36; }
.btn-dark { background: #1A3760; color: #fff; }
.btn-dark:hover { background: #142C4E; }
.btn-ghost { background: #fff; color: #000; border: 0; }
.btn-ghost:hover { background: #E3E9F3; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 13px; }

/* Lists: rows separated by small gaps and alternating tone, never divider lines */
.bands { display: flex; flex-direction: column; gap: 4px; }
.bands > :not(template) { background: #fff; border-radius: 12px; }
.bands > :nth-child(even of :not(template)) { background: #F8F9FA; }
.card .bands > :not(template), .card-white .bands > :not(template), .bg-white .bands > :not(template) { background: #F4F5F7; }
.card .bands > :nth-child(even of :not(template)), .card-white .bands > :nth-child(even of :not(template)) { background: #EDF0F3; }
.zebra > tr:nth-child(even of :not(template)) > * { background-color: #F8F9FA; }

/* Motion: page title rises line by line; section parts enter once. Content stays visible without script. */
.page-title { line-height: 1; }
.page-title .line { display: inline-block; overflow: hidden; padding-bottom: .08em; vertical-align: bottom; }
.page-title .line > span { display: inline-block; }
html.js .page-title .line > span { animation: rise 900ms cubic-bezier(.16, 1, .3, 1) both; }
html.js .page-title .line + .line > span { animation-delay: 110ms; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
html.js .enter { opacity: 0; transform: translateY(20px); transition: opacity 500ms ease, transform 600ms cubic-bezier(.16, 1, .3, 1); }
html.js .enter.in { opacity: 1; transform: none; }
a.pressable:hover, .kb-card:hover { transform: translateY(-1px); }

/* Kanban: swipeable columns on phones, side by side on desktop. Only the board scrolls sideways. */
.kb { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 12px; margin: 0 -16px; scroll-padding-left: 16px; align-items: flex-start; }
.kb-col { flex: 0 0 86%; max-width: 340px; scroll-snap-align: start; border-radius: 16px; padding: 10px; }
.kb-col.drop { outline: 2px dashed #1A3760; outline-offset: -4px; }
@media (min-width: 640px) { .kb-col { flex-basis: 288px; } }
@media (min-width: 768px) { .kb { margin: 0; padding: 0 0 12px; } }
.kb-card { background: #fff; border: 0; border-radius: 12px; transition: transform 150ms ease; }
.kb-card[draggable="true"] { cursor: grab; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; scroll-snap-type: none !important; }
    button:active:not(:disabled), a.pressable:active, a.pressable:hover, .kb-card:hover { transform: none; }
    html.js .enter { opacity: 1; transform: none; }
}
