:root {
    color-scheme: light;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f4;
    color: #172c2f;
    line-height: 1.55;
    --muted: #4b6466;
    --accent: #00635a;
    --accent-hover: #004d46;
    --line: #c5d4d2;
}

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

body {
    display: flex;
    min-height: 100vh;
    margin: 0;
    flex-direction: column;
}

[hidden] {
    display: none !important;
}

.site-header, .site-footer {
    padding: 1.15rem max(1.25rem, calc((100vw - 64rem) / 2));
}

.site-header {
    border-bottom: 1px solid #dce7e5;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: .55rem;
    color: #172c2f;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -.035em;
    text-decoration: none;
}

.brand span {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 600;
    letter-spacing: 0;
}

.page {
    width: min(100% - 2rem, 42rem);
    margin: clamp(1.75rem, 7vw, 4rem) auto;
    flex: 1;
}

.panel {
    padding: clamp(1.35rem, 5vw, 2.75rem);
    border: 1px solid #d7e3e1;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 14px 36px #18352c0a;
}

h1 {
    max-width: 22ch;
    margin: 0;
    font-size: clamp(1.75rem, 5vw, 2.4rem);
    line-height: 1.12;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.intro {
    max-width: 55ch;
    margin: .8rem 0 1.6rem;
    color: var(--muted);
}

.stack, .field, .field-grid {
    display: grid;
}

.stack, .field-grid {
    gap: 1.2rem;
}

.field-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
}

.field {
    min-width: 0;
    gap: .4rem;
}

label {
    font-size: .9rem;
    font-weight: 700;
}

.optional, small {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 400;
}

.optional {
    margin-left: .3rem;
}

.count {
    justify-self: end;
}

textarea, select, input[type="email"], input[type="password"] {
    width: 100%;
    padding: .7rem .85rem;
    border: 1px solid var(--line);
    border-radius: .65rem;
    background: #fbfcfc;
    color: inherit;
    font: inherit;
}

textarea {
    resize: vertical;
}

.share-link, #revealed-secret {
    font: .94rem/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

:focus-visible {
    outline: 3px solid #008c7e;
    outline-offset: 3px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1.15rem;
    margin-top: 1rem;
}

.stack .actions {
    margin-top: 0;
}

.button, .text-button {
    min-height: 2.75rem;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.button {
    padding: .6rem 1.05rem;
    border: 1px solid transparent;
    border-radius: .65rem;
    background: var(--accent);
    color: #fff;
}

.button:hover {
    background: var(--accent-hover);
}

.button:disabled {
    opacity: .7;
    cursor: wait;
}

.text-link, .text-button, .site-footer a {
    color: var(--accent);
    text-underline-offset: .2em;
}

.text-link, .site-footer a {
    font-weight: 600;
}

.text-button {
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: underline;
}

.session-actions {
    padding-top: .65rem;
    text-align: right;
}

.feedback {
    margin: .65rem 0 0;
    color: var(--muted);
    font-size: .88rem;
}

.feedback:empty {
    margin: 0;
}

.status-error {
    color: #a52a32;
    font-weight: 700;
}

.site-footer {
    font-size: .85rem;
}

@media (max-width: 34rem) {
    .field-grid {
        grid-template-columns: 1fr;
    }
}
