:root {
    color-scheme: light;
    --ink: #000000;
    --muted: #444444;
    --accent: #1f6b75;
    --accent-soft: #d7eef1;
    --surface: #ffffff;
    --surface-alt: #f7f5f2;
    --border: #d9dee5;
    --shadow: 0 18px 40px rgba(15, 27, 43, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Libre Franklin", sans-serif;
    color: var(--ink);
    background: #eaf0f2;
    min-height: 100vh;
}

.page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 24px 72px;
}

.hero {
    display: grid;
    gap: 20px;
    justify-items: center;
    text-align: center;
    margin-block: 40px;
}

.hero-text {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.hero-text h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.4rem, 3.2vw, 4.2rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    margin: 0 0 24px;
    text-wrap: balance;
}

.hero-text h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    margin: 0 0 16px;
    text-wrap: balance;
}

.hero-text h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    margin: 0 0 16px;
    text-wrap: balance;
}

.hero-text p {
    margin: 0;
    color: var(--muted);
    max-width: 640px;
    line-height: 1.6;
}

.subhead {
    font-size: 1.1rem;
    color: var(--ink);
}

.content {
    display: grid;
    gap: 32px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    padding: 28px 28px 36px;
    gap: 32px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-title {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
}

.card#legislators {
    padding-bottom: 48px;
}

.assurance {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 12px;
    max-width: 560px;
}

.form {
    display: grid;
    gap: 40px;
}

.field-row {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
    display: grid;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--muted);
}

.field span {
    font-weight: 600;
    color: var(--ink);
}

.field legend {
    display: block;
    font-weight: 600;
    color: var(--ink);
    padding: 0;
    margin-bottom: 12px;
    width: 100%;
}

.role-group {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.role-group legend {
    margin-bottom: 18px;
}

.radio {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 6px;
    font-size: 0.95rem;
    color: var(--ink);
}

.radio input {
    width: 16px;
    height: 16px;
}

.radio span {
    font-weight: 400;
}

.field.narrow {
    max-width: calc((100% - 16px) / 2);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}

gmp-place-autocomplete {
    display: block;
    width: 100%;
}

textarea {
    resize: vertical;
}

.hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

.section-header h2 {
    margin: 0 0 6px;
    font-family: "Space Grotesk", sans-serif;
}

.section-header p {
    margin: 0 0 18px;
    color: var(--muted);
}

.tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

.tab {
    box-sizing: content-box;
    border: 1px solid transparent;
    border-bottom-color: var(--surface);
    border-bottom-width: 3px;
    padding: 12px;
    display: flex;
    gap: 12px;
    background: var(--surface-alt);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
    text-align: left;
    align-items: flex-start;
}

.tab.active {
    border-bottom-color: var(--accent);
    background: var(--accent-soft);
}

.tab .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #dfe6ee;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.tab strong {
    font-size: 0.95rem;
}

.tab span {
    font-size: 0.85rem;
    color: var(--muted);
}

.tab:focus-visible {
    outline: 3px solid rgba(31, 107, 117, 0.4);
    outline-offset: 2px;
}

.tab-text {
    display: grid;
    gap: 4px;
}

.message-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
}

.message-field {
    display: grid;
    gap: 16px;
}

.message-field.full {
    grid-column: 1 / -1;
}

.field-label {
    font-weight: 600;
}

.field-control {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
}

.readonly-field {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface-alt);
    color: var(--muted);
    min-height: 44px;
}

.readonly-field.multiline {
    white-space: pre-wrap;
    margin: 0;
    min-height: 240px;
}

.placeholder-text {
    color: var(--muted);
    padding: 10px 2px;
    font-size: 0.95rem;
    align-self: center;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.copy {
    padding: 12px 18px;
    border-color: transparent;
    color: #fff;
    background: var(--accent);
    cursor: pointer;
    height: 44px;
    align-self: start;
    min-width: 96px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy::before {
    content: "";
    width: 16px;
    height: 16px;
    display: inline-block;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>");
}

.copy:active {
    transform: scale(0.98);
}

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .field.narrow {
        max-width: 100%;
    }

    .field-control {
        grid-template-columns: 1fr;
    }

    .message-grid {
        grid-template-columns: 1fr;
    }
}
