/* PorchLite admin.
 *
 * Deliberately plain — this is a workbench, not a shopfront. The one thing it
 * optimises for is the review queue, which is the only screen anyone spends
 * real time in: the summary must be readable at a glance, the decision must be
 * one obvious button, and editing must be available without being in the way.
 */

:root {
    --ink: #1a1a1a;
    --ink-soft: #4a4a4a;
    --ink-mute: #767676;
    --paper: #ffffff;
    --paper-deep: #f4f3f0;
    --rule: #d8d5cf;
    --civic: #1c4b7d;
    --go: #1f6b3a;
    --warn: #8a5a00;
    --warn-bg: #fdf6e3;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--paper-deep);
}

header.admin-bar {
    background: var(--ink);
    color: var(--paper);
    padding: 0.7rem 1.25rem;
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
}
header.admin-bar a { color: var(--paper); text-decoration: none; opacity: 0.85; }
header.admin-bar a:hover { opacity: 1; text-decoration: underline; }
header.admin-bar strong { letter-spacing: 0.02em; }

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

h1 { font-size: 1.4rem; margin: 0 0 0.25rem; }
h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-mute); margin: 0 0 0.6rem; }

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

/* Queue -------------------------------------------------------------- */

.queue-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.queue-count { font-size: 0.9rem; color: var(--ink-mute); }

table.queue { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.9rem; }
table.queue th {
    text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--ink-mute); border-bottom: 1px solid var(--rule); padding: 0.5rem 0.7rem;
}
table.queue td { border-bottom: 1px solid var(--rule); padding: 0.55rem 0.7rem; vertical-align: top; }
table.queue tr:hover td { background: var(--paper-deep); }
table.queue td.num { white-space: nowrap; color: var(--ink-mute); }

/* Review item -------------------------------------------------------- */

.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .review-grid { grid-template-columns: 1fr; } }

.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 1.1rem 1.25rem; }

.source-title { font-weight: 600; margin: 0 0 0.5rem; }
.source-meta { font-size: 0.85rem; color: var(--ink-mute); margin: 0 0 0.9rem; }
.source-body { font-size: 0.9rem; color: var(--ink-soft); white-space: pre-wrap; max-height: 22rem; overflow-y: auto; }

/* The summary as the reviewer reads it, not as a form to fill in. */
.summary-read p { margin: 0 0 0.9rem; }
.summary-read .lede { font-size: 1.05rem; }
.summary-read .label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--ink-mute); display: block; margin-bottom: 0.15rem;
}
.summary-read .empty { color: var(--ink-mute); font-style: italic; }

.flag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.flag {
    font-size: 0.72rem; letter-spacing: 0.03em; padding: 0.15rem 0.5rem;
    background: var(--warn-bg); color: var(--warn); border: 1px solid #e8d9ae; border-radius: 2px;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.2rem; }
.btn {
    font: inherit; font-weight: 600; padding: 0.6rem 1.1rem; border-radius: 3px;
    border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer;
}
.btn:hover { background: var(--paper-deep); }
.btn-go { background: var(--go); border-color: var(--go); color: var(--paper); }
.btn-go:hover { background: #185730; }
.btn-quiet { color: var(--ink-mute); }
.kbd {
    font: 0.72rem/1 ui-monospace, Menlo, monospace; padding: 0.2rem 0.35rem; margin-left: 0.35rem;
    border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 3px; color: var(--ink-mute);
}
.hint { font-size: 0.8rem; color: var(--ink-mute); margin-top: 0.9rem; }

/* Editing is available on demand rather than always on screen: most items are
   read and approved unchanged, and five open textareas make that look like
   work it isn't. */
details.editor { margin-top: 1.1rem; border-top: 1px solid var(--rule); padding-top: 0.9rem; }
details.editor > summary { cursor: pointer; font-size: 0.85rem; color: var(--civic); }
details.editor label { display: block; margin: 0.8rem 0 0; font-size: 0.85rem; }
details.editor textarea, details.editor input[type=text] {
    width: 100%; font: inherit; font-size: 0.9rem; padding: 0.5rem;
    border: 1px solid var(--rule); border-radius: 3px; margin-top: 0.25rem;
}
details.editor fieldset { margin-top: 0.9rem; border: 1px solid var(--rule); border-radius: 3px; padding: 0.6rem 0.8rem; }
details.editor legend { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-mute); }
details.editor fieldset label { display: inline-block; margin: 0.2rem 0.9rem 0.2rem 0; }

.done { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 2rem; text-align: center; }
