:root {
    color-scheme: light;
    --ink: #172d28;
    --muted: #49625a;
    --green: #115643;
    --line: #cedbd3;
    --surface: #fff;
    --paper: #f4f7f4;
    --gold: #9a6119;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.5 system-ui, sans-serif;
}

.container {
    width: min(100% - 2rem, 63rem);
    margin-inline: auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-content, nav, .actions, .dialog-header, footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
}

.header-content, .dialog-header, footer { justify-content: space-between; }
.header-content { padding-block: .75rem; }
.brand img { display: block; width: 116px; height: 48px; object-fit: contain; }

a { color: var(--green); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.intro { padding-block: 2.25rem 1.5rem; }
.eyebrow { color: var(--green); font-weight: 700; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2.5rem; line-height: 1.13; margin-block: .25rem .75rem; }
h2 { font-size: 1.25rem; line-height: 1.25; }
h3 { font-size: 1.15rem; }
.intro > p:last-child { max-width: 62ch; color: var(--muted); }

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
    gap: 2.5rem;
    align-items: start;
}

.request-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--green);
    border-radius: 8px;
    padding: 1.5rem;
}

#request, #receipt { display: grid; gap: .45rem; margin-top: .75rem; }
#form-unavailable, #receipt > p { margin-top: .5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
label { display: block; font-weight: 650; font-size: .9rem; margin-top: .45rem; }
.field-row label { margin-bottom: .45rem; }
label span { color: var(--muted); font-weight: 400; }

input, textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #9cafaa;
    background: #fcfdfc;
    border-radius: 6px;
    min-height: 44px;
    padding: .55rem .7rem;
    color: inherit;
    font: inherit;
}

textarea { resize: vertical; }
.form-hint, .privacy, aside p, dialog p { color: var(--muted); font-size: .9rem; }
.privacy, .actions { margin-block: .5rem; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .5rem .85rem;
    font: inherit;
    font-weight: 650;
    border: 1px solid var(--line);
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.primary { background: var(--green); color: #fff; border-color: var(--green); }
.primary:hover { background: #0e4435; }
.secondary { background: white; color: var(--green); }
.secondary:hover { background: var(--paper); }
#request .button { justify-self: start; }
.protocol { font: 700 1.15rem/1.5 ui-monospace, monospace; overflow-wrap: anywhere; color: var(--green); }
#storage-warning { color: #77490e; }

aside { border-top: 3px solid #c49751; padding: 1rem 0; }
aside ol { padding-inline-start: 1.4rem; margin-block: .8rem 1rem; }
aside li { padding-inline-start: .25rem; margin-bottom: .7rem; }
aside li::marker { color: var(--green); font-weight: 700; }

footer { padding-block: 1rem 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
dialog { width: min(32rem, 100% - 2rem); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; }
dialog::backdrop { background: #1629239c; }
dialog p { margin-top: .5rem; }
#records { max-height: 40vh; overflow: auto; padding-inline-start: 1.4rem; overflow-wrap: anywhere; }

@media (max-width: 45rem) {
    .workspace { grid-template-columns: 1fr; gap: 1.25rem; }
    .intro { padding-top: 1.5rem; }
    h1 { font-size: 2rem; }
}

@media (max-width: 31rem) {
    .field-row { grid-template-columns: 1fr; gap: .45rem; }
    .request-panel { padding: 1rem; }
    .header-content { align-items: flex-start; }
}
