:root {
    --bg: #f6f4ef;
    --paper: #ffffff;
    --ink: #202124;
    --muted: #5f6368;
    --line: #d8d3c7;
    --accent: #0f6b5f;
    --accent-dark: #0a5148;
    --danger: #9f1d20;
    --focus: #1d73d4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

a {
    color: var(--accent-dark);
}

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.wrap {
    width: min(960px, calc(100% - 32px));
    margin: 0 auto;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    color: var(--muted);
    padding: 24px 0;
}

.header-grid,
.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.site-header {
    padding: 16px 0;
}

.brand {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.top-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.main {
    padding: 48px 0;
}

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.1;
}

h2 {
    margin: 28px 0 12px;
    font-size: 1.3rem;
}

.lead {
    color: var(--muted);
    font-size: 1.15rem;
    max-width: 700px;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    padding: 12px 18px;
    text-decoration: none;
    cursor: pointer;
}

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

.button.secondary {
    background: #ffffff;
    color: var(--accent-dark);
    border: 1px solid var(--accent);
}

.form-grid {
    display: grid;
    gap: 20px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    padding: 12px;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.hint {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 6px 0 0;
}

.errors {
    border-left: 4px solid var(--danger);
    background: #fff7f7;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.errors h2 {
    margin-top: 0;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.meta-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 16px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    font-size: 0.9rem;
    color: var(--muted);
}

@media (max-width: 720px) {
    .header-grid,
    .footer-grid,
    .meta-list {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 20px;
    }
}
