/* The pages anybody can open without signing in: the start page, sign-in,
 * registration from an invite and the session-expired page.
 *
 * A copy of the few rules of growbro.css they use, and nothing else. Those
 * pages must not say what the app records until somebody has signed in,
 * and growbro.css, whose comments and class names are about the records,
 * is not linked from them. The tokens are held equal to growbro.css's by a
 * test (app/tests/test_public_pages.py); a rule changed there for these
 * pages is changed here too.
 */

:root {
    --paper: #F2F0E9;
    --surface: #FBFAF6;
    --surface-alt: #F5F3EB;
    --head: #EFEDE4;

    --ink: #1A211C;
    --ink-2: #4A5750;
    --ink-3: #656E67;      
    --ink-label: #56635B;  

    --rule: #D9D5C8;
    --rule-soft: #EAE7DC;

    --green: #14432A;
    --green-dark: #0C2C1B;
    --green-pale: #E7EFE8;
    --green-line: #3C6A50;

    --cut: #6E5F3C;        
    --cut-fill: #A8996F;   
    --danger: #8C2F1D;
    --flag: #A8471E;

    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

    --rail-w: 186px;
    --row-h: 35px;
}

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

[hidden] { display: none !important;
}

html, body { margin: 0; padding: 0;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none;
}

a:hover { color: var(--green-dark); text-decoration: underline;
}

p, ul { margin: 0;
}

ul { list-style: none; padding: 0;
}

:focus-visible { outline: 2px solid var(--green); outline-offset: 1px;
}

.gb-messages { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px;
}

.gb-message {
    padding: 9px 12px;
    border-left: 3px solid var(--ink-3);
    background: var(--surface);
    font-size: 13px;
}

.gb-message--success { border-left-color: var(--green); background: var(--green-pale); color: var(--green-dark);
}

.gb-message--error { border-left-color: var(--danger); background: #F7EBE7; color: #6E2416;
}

.gb-message--warning { border-left-color: var(--flag); background: #F8EFE6; color: #6B2E11;
}

.gb-message--info { border-left-color: var(--ink-3);
}

.gb-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border: 1px solid var(--green);
    background: var(--green);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.gb-btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--paper); text-decoration: none;
}

.gb-btn--ghost { background: transparent; border-color: var(--rule); color: var(--ink-2);
}

.gb-btn--ghost:hover { background: var(--surface-alt); border-color: var(--ink-3); color: var(--ink);
}

.gb-btn--danger { background: var(--danger); border-color: var(--danger);
}

.gb-btn--danger:hover { background: #6E2416; border-color: #6E2416;
}

.gb-btn[disabled], .gb-btn.is-disabled {
    opacity: 0.45; cursor: not-allowed; pointer-events: none;
}

.gb-field { display: flex; flex-direction: column; position: relative;
}

.gb-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-label);
    margin-bottom: 6px;
}

.gb-label__req { color: var(--danger);
}

.gb-input, input[type="text"].gb-input, input[type="url"].gb-input, input[type="number"].gb-input, input[type="date"].gb-input, input[type="search"].gb-input, input[type="password"].gb-input, select.gb-input, textarea.gb-input {
    width: 100%;
    padding: 7px 9px;
    background: var(--surface);
    border: 1px solid var(--rule);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
}

select.gb-input { height: 33px;
}

textarea.gb-input { line-height: 1.5; resize: vertical;
}

.gb-input:focus { outline: none; border-color: var(--green); box-shadow: inset 0 -2px 0 var(--green);
}

.gb-input:disabled, input.gb-input:disabled, select.gb-input:disabled, textarea.gb-input:disabled, .gb-input[readonly], input.gb-input[readonly], textarea.gb-input[readonly] {
    background: var(--head);
    color: var(--ink-3);
    cursor: not-allowed;
}

.gb-error { margin-top: 5px; font-size: 12px; color: var(--danger);
}

.gb-formerror {
    padding: 10px 12px;
    margin-bottom: 18px;
    border-left: 3px solid var(--danger);
    background: #F7EBE7;
    color: #6E2416;
    font-size: 13px;
}

.gb-formerror ul { margin: 6px 0 0; padding-left: 16px; list-style: disc;
}

.gb-note {
    padding: 10px 12px;
    border-left: 3px solid var(--green-line);
    background: var(--green-pale);
    color: var(--green-dark);
    font-size: 12px;
}

.gb-publicbar {
    background: var(--green);
    color: #F2F0E9;
    font-size: 12px;
    line-height: 1.5;
    padding: 9px 22px;
    border-bottom: 1px solid var(--green-dark);
}

.gb-publicbar strong { font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; font-size: 10px;
}
