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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f9fafb;
    color: #0a0a0b;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

main {
    width: 100%;
    max-width: 480px;
}

h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#send-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

textarea,
input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
}

textarea {
    resize: vertical;
    min-height: 5rem;
}

textarea:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.signin-intro {
    margin-bottom: 1rem;
    color: #545459;
    font-size: 0.875rem;
}

#signin-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

button[type="submit"] {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    min-height: 44px;
}

button[type="submit"]:hover {
    background: #1d4ed8;
}

button[type="submit"]:active {
    background: #1e40af;
}

button[type="submit"]:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.feedback {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.feedback--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.feedback--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Share preview */

.share-preview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-field {
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.preview-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #545459;
    margin-bottom: 0.25rem;
}

.preview-value {
    display: block;
    word-break: break-word;
}

.share-preview button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    min-height: 44px;
}

.share-preview button:hover {
    background: #1d4ed8;
}

.share-preview button:active {
    background: #1e40af;
}

.share-preview button:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* Settings */

.settings-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.settings-toggle label {
    margin: 0;
    cursor: pointer;
}

.settings-toggle input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.signout-form,
.delete-account {
    margin-top: 1rem;
}

.signout-form button,
.delete-account button {
    background: #6b7280;
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    min-height: 44px;
}

.signout-form button:hover,
.delete-account button:hover {
    background: #4b5563;
}

.delete-account button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.admin-link {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
}

.admin-link a {
    color: #545459;
    text-decoration: none;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Page footer link (privacy, etc.) */

.page-footer {
    margin-top: 2rem;
    font-size: 0.875rem;
    color: #545459;
    text-align: center;
}

.page-footer a {
    color: #545459;
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* Long-form content pages (privacy, PWA explainer) */

main.doc {
    max-width: 640px;
    line-height: 1.6;
}

.doc-home,
.doc-footer {
    font-size: 0.875rem;
    color: #545459;
}

.doc-home {
    margin-bottom: 1.5rem;
}

.doc-footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.doc-home a,
.doc-footer a {
    color: #545459;
    text-decoration: none;
}

.doc-home a:hover,
.doc-footer a:hover {
    text-decoration: underline;
}

.doc h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.doc h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.doc h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.doc p {
    margin-bottom: 1rem;
}

.doc ul,
.doc ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.doc li {
    margin-bottom: 0.5rem;
}

.doc a {
    color: #2563eb;
}

.doc code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
    background: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
}

.doc pre {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.doc pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.45;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.doc-table th,
.doc-table td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.doc-table th {
    font-weight: 600;
    background: #f9fafb;
}

.doc-table tr:last-child td {
    border-bottom: none;
}
