/* Hallmark · v2.0.0 · theme: Kiln (by request, ember) · genre: atmospheric · redesign: full · built: the project */
/* shape: Workbench · hero: Stage · nav: edge-aligned · footer: none, the page never had one · job: check in */
/* Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V4 · weakest: R, the garden panel carried four tints; cut to one */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
    font-size: 100%;
    color-scheme: dark;
    scrollbar-color: var(--color-paper-3) var(--color-paper);
}

body {
    overflow-x: clip;
    margin: 0;
    background-color: var(--color-paper);
    color: var(--color-ink-2);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.55;
    caret-color: var(--color-accent);
    -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas,
iframe {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--color-ink);
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    letter-spacing: var(--tracking-display);
    line-height: 1.04;
    text-wrap: balance;
    overflow-wrap: break-word;
    min-width: 0;
}

h1 {
    font-size: var(--text-display);
    line-height: 1.02;
}

h2 {
    font-size: var(--text-section);
}

h3 {
    font-size: var(--text-title);
    line-height: 1.12;
}

p,
ul,
ol {
    margin: 0;
}

p {
    max-width: 65ch;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    padding-left: 1.1rem;
}

li {
    max-width: 65ch;
}

::selection {
    background-color: color-mix(in oklab, var(--color-accent) 42%, transparent);
    color: var(--color-ink);
}

:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Layout */
.wrap {
    width: 100%;
    max-width: 90rem;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 6.25vw, 7.5rem);
}

.section {
    padding-block: var(--section-gap);
}

.section--ruled {
    border-top: var(--rule-hair) solid var(--color-rule);
}

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.section__head h2 {
    max-width: 20ch;
}

.label {
    color: var(--color-muted);
    font-size: var(--text-xs);
    font-weight: 500;
}

.figure {
    font-family: var(--font-display);
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: -0.03em;
    color: var(--color-ink);
}

/* Controls */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    min-height: 50px;
    padding: 0 var(--space-lg);
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color var(--dur-short) var(--ease-out),
        box-shadow var(--dur-short) var(--ease-out),
        color var(--dur-short) var(--ease-out);
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-accent-ink);
}

.btn--primary:hover {
    background-color: color-mix(in oklab, var(--color-accent) 88%, var(--color-ink));
}

.btn--ghost {
    box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule);
    color: var(--color-ink);
}

.btn--ghost:hover {
    box-shadow: inset 0 0 0 var(--rule-hair) var(--color-muted);
}

.btn--quiet {
    padding-inline: var(--space-2xs);
    color: var(--color-ink-2);
    text-decoration: underline;
    text-decoration-color: var(--color-rule);
    text-underline-offset: 0.25em;
}

.btn--quiet:hover {
    text-decoration-color: var(--color-accent);
    color: var(--color-ink);
}

.btn--icon {
    width: 50px;
    min-width: 50px;
    padding: 0;
}

.btn--sm {
    min-height: 40px;
    padding-inline: var(--space-md);
    font-size: var(--text-xs);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.42;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background-color: var(--color-paper-3);
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: var(--rule-hair) solid var(--color-rule);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-ink-2);
    cursor: pointer;
    transition:
        color var(--dur-short) var(--ease-out),
        border-color var(--dur-short) var(--ease-out);
}

.icon-btn:hover {
    color: var(--color-ink);
    border-color: var(--color-muted);
}

.icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.field {
    width: 100%;
    min-height: 52px;
    padding: 0 var(--space-md);
    border: var(--rule-hair) solid var(--color-rule);
    border-radius: var(--radius-well);
    background-color: var(--color-paper-2);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    line-height: 1.4;
    transition:
        border-color var(--dur-short) var(--ease-out),
        background-color var(--dur-short) var(--ease-out);
}

.field::placeholder {
    color: var(--color-muted);
}

.field:hover {
    border-color: var(--color-muted);
}

.field:focus {
    outline: 2px solid var(--color-focus);
    outline-offset: 1px;
    background-color: var(--color-paper-3);
}

textarea.field {
    min-height: 7rem;
    padding-block: 0.8rem;
    resize: vertical;
}

.field-label {
    display: block;
    margin-bottom: var(--space-2xs);
    color: var(--color-ink-2);
    font-size: var(--text-sm);
    font-weight: 500;
}

input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--color-accent);
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--color-accent);
    cursor: pointer;
}

/* Surfaces */
.well {
    padding: var(--space-lg);
    border: var(--rule-hair) solid var(--color-rule);
    border-radius: var(--radius-card);
    background-color: var(--color-paper-2);
}

.rule {
    height: var(--rule-hair);
    border: 0;
    margin: 0;
    background-color: var(--color-rule);
}

.empty {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: var(--space-2xs);
    height: 100%;
    text-align: center;
    color: var(--color-muted);
}

.empty p {
    color: var(--color-ink-2);
    font-weight: 500;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: var(--space-md);
    background-color: var(--color-scrim);
}

.modal.hidden {
    display: none;
}

.modal__panel {
    width: 100%;
    max-width: 32rem;
    max-height: 88dvh;
    overflow-y: auto;
    padding: var(--space-xl);
    border: 0;
    border-radius: var(--radius-card);
    background-color: var(--color-paper-2);
    box-shadow: var(--shadow-card);
}

.modal__panel--wide {
    max-width: 40rem;
}

.modal__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
}

.modal--relative {
    position: relative;
}

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