/* App-host styles. Static file because the CSP forbids inline styles (KTD3). */

:root {
    --bg: #f7f7f5;
    --surface: #ffffff;
    --text: #1f2328;
    --muted: #59636e;
    --border: #d8dde3;
    --accent: #1f6feb;
    --accent-text: #ffffff;
    --danger: #b42318;
    --danger-bg: #fdecea;
    --ok-bg: #e6f4ea;
    --ok-text: #14532d;
}

* {
    box-sizing: border-box;
}

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

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

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95em;
    background: #eef0f2;
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.container {
    max-width: 44rem;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2.25rem;
    margin: 0 0 0.5rem;
}

.lead {
    font-size: 1.15rem;
    color: var(--muted);
    margin: 0 0 1.5rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.card h1,
.card h2 {
    margin-top: 0;
}

.muted {
    color: var(--muted);
}

.key {
    display: inline-block;
    font-size: 1rem;
    padding: 0.4em 0.6em;
    word-break: break-all;
    user-select: all;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.inline {
    display: inline-block;
    margin: 0;
}

.button {
    display: inline-block;
    font: inherit;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    border-color: var(--muted);
}

.button-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
}

.button-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.button-link {
    border-color: transparent;
    background: transparent;
    color: var(--accent);
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 0 0 1.25rem;
}

.flash-error {
    background: var(--danger-bg);
    color: var(--danger);
}

.flash-status {
    background: var(--ok-bg);
    color: var(--ok-text);
}

pre {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    background: #1f2328;
    color: #f7f7f5;
    border-radius: 6px;
    line-height: 1.6;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.9rem;
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.section-heading h2 {
    margin-bottom: 0.5rem;
}

.count {
    margin: 0 0 0.5rem;
    font-variant-numeric: tabular-nums;
}

/* Page list */

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

.pages {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.pages th,
.pages td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.5rem;
    border-top: 1px solid var(--border);
}

.pages th {
    border-top: 0;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.pages td:first-child a {
    word-break: break-all;
}

.filename,
.title,
.hint {
    display: block;
    word-break: break-word;
}

.title {
    font-size: 0.9em;
}

.hint {
    margin-top: 0.35rem;
    font-size: 0.85em;
}

.state {
    display: inline-block;
    padding: 0.1em 0.5em;
    border-radius: 999px;
    font-size: 0.85em;
    white-space: nowrap;
}

.state-active {
    background: var(--ok-bg);
    color: var(--ok-text);
}

.state-expired {
    background: var(--danger-bg);
    color: var(--danger);
}

.button-small {
    padding: 0.25rem 0.6rem;
    font-size: 0.9em;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 40rem) {
    .container {
        margin-top: 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .pages th,
    .pages td {
        padding: 0.5rem 0.35rem;
    }
}

/* Report form */

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.textarea {
    display: block;
    width: 100%;
    font: inherit;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    resize: vertical;
}

.textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Honeypot: off-screen for people, present for bots. Class rather than an
   inline style because the CSP forbids style= attributes (KTD3). */
.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
