/* Little Forms — paper-on-grid look. Olive accent, warm white surface,
   subtle dot grid background, tidy ops feel. Persona 6 (ops/workflow). */
/* Design review: Pieter Halverson-Yang. Brief: warm the foreground, breathe the rows, demote
   the monospace to identifier-only, keyboard-focus on rows, refactor !important. */

:root[data-site="littleforms"] {
    --lf-bg: #fafaf6;
    --lf-surface: #ffffff;
    /* Pieter: warmer slate. Cold blue was incongruent with the cream surface. */
    --lf-fg: #1c1917;
    --lf-muted: #6b6b66;
    --lf-accent: #65a30d;
    --lf-accent-deep: #4d7c0f;
    --lf-accent-soft: #ecfccb;
    --lf-amber: #d97706;
    --lf-rule: #e7e5e0;
    --lf-rule-strong: #d6d3ce;
    --lf-mono: "IBM Plex Mono", ui-monospace, monospace;
    --lf-sans: "IBM Plex Sans", "Inter", system-ui, sans-serif;
}
html[data-site="littleforms"], body { background: var(--lf-bg); color: var(--lf-fg); }
body {
    font-family: var(--lf-sans); margin: 0; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle, rgba(101,163,13,.12) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: -1px -1px;
}

.lf-container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

.lf-header { background: var(--lf-surface); padding: 1rem 0; border-bottom: 1px solid var(--lf-rule); }
.lf-header .lf-container { display: flex; justify-content: space-between; align-items: center; }
.lf-brand {
    display: inline-flex; align-items: center; gap: .55rem;
    text-decoration: none; color: var(--lf-fg); font-weight: 600;
}
.lf-brand-grid {
    width: 22px; height: 22px;
    background:
        repeating-linear-gradient(0deg,  var(--lf-accent) 0 1px, transparent 1px 6px),
        repeating-linear-gradient(90deg, var(--lf-accent) 0 1px, transparent 1px 6px);
    border-radius: 4px;
}
.lf-brand-strong { color: var(--lf-accent); font-weight: 700; }
.lf-nav { display: flex; align-items: center; gap: .25rem; }
.lf-nav a {
    color: var(--lf-muted); text-decoration: none; margin-left: 1rem; font-weight: 500;
    padding: .35rem .25rem;
    transition: color .12s ease;
}
.lf-nav a:hover { color: var(--lf-fg); }
.lf-nav a:focus-visible { outline: 2px solid var(--lf-accent); outline-offset: 4px; border-radius: 4px; }

/* Pieter: refactor !important via specificity. */
.lf-nav a.lf-cta {
    background: var(--lf-accent); color: #fff;
    padding: .5rem 1.1rem; border-radius: 4px; font-weight: 600;
}
.lf-nav a.lf-cta:hover { background: var(--lf-accent-deep); color: #fff; }

.lf-main { padding: 0; }
.lf-hero { padding: 4rem 0; }
.lf-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 760px) { .lf-hero-grid { grid-template-columns: 1fr; } }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 1rem; line-height: 1.08; letter-spacing: -.02em; }
h1 em { font-style: italic; color: var(--lf-accent); }
h2, h3 { letter-spacing: -.005em; }
.lf-lede { color: var(--lf-muted); max-width: 50ch; font-size: 1.1rem; }

.lf-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.lf-btn {
    display: inline-block; padding: .8rem 1.5rem;
    border-radius: 4px; text-decoration: none; font-weight: 600;
    border: 1.5px solid transparent;
    transition: background-color .12s ease, border-color .12s ease, transform .08s ease;
}
.lf-btn-primary { background: var(--lf-accent); color: #fff; border-color: var(--lf-accent); }
.lf-btn-primary:hover { background: var(--lf-accent-deep); border-color: var(--lf-accent-deep); }
.lf-btn-primary:active { transform: translateY(1px); }
.lf-btn-ghost { background: var(--lf-surface); color: var(--lf-fg); border-color: var(--lf-rule-strong); }
.lf-btn-ghost:hover { border-color: var(--lf-fg); }
.lf-btn:focus-visible { outline: 3px solid var(--lf-accent); outline-offset: 3px; }

/* Card — Pieter: breathe the rows, demote mono to identifier-only. */
.lf-card {
    background: var(--lf-surface); border: 1px solid var(--lf-rule);
    border-radius: 6px; padding: 0;
    box-shadow:
        0 1px 2px rgba(31,41,55,.04),
        0 8px 24px rgba(31,41,55,.05);
    /* Default to sans inside the card. Mono is opt-in via .lf-mono. */
    font-family: var(--lf-sans); font-size: .95rem;
}
.lf-card-head {
    padding: .85rem 1.1rem; background: var(--lf-bg);
    border-bottom: 1px solid var(--lf-rule);
    color: var(--lf-muted); font-weight: 600;
    font-family: var(--lf-mono); font-size: .85rem;
    letter-spacing: .02em;
}
.lf-row {
    display: flex; justify-content: space-between; align-items: center;
    /* Pieter: 12 px / 16 px. Rows in ops have to breathe. */
    padding: .85rem 1.1rem;
    border-bottom: 1px dashed var(--lf-rule);
    cursor: pointer;
    transition: background-color .12s ease;
}
.lf-row:last-child { border-bottom: none; }
.lf-row:hover { background: var(--lf-accent-soft); }
.lf-row:focus-visible { outline: 2px solid var(--lf-accent); outline-offset: -2px; background: var(--lf-accent-soft); }
.lf-row label { color: var(--lf-muted); }
.lf-row .lf-mono { font-family: var(--lf-mono); font-size: .85rem; font-variant-numeric: tabular-nums; }
.lf-ok { color: var(--lf-accent); font-weight: 600; }
.lf-pending { color: var(--lf-amber); font-weight: 600; }
.lf-card-foot {
    padding: .85rem 1.1rem; color: var(--lf-muted);
    font-size: .85rem;
    border-top: 1px solid var(--lf-rule);
}
.lf-card-foot code {
    background: var(--lf-bg); padding: 1px 5px; border-radius: 3px;
    font-family: var(--lf-mono); font-size: .85em;
}

.lf-three {
    background: var(--lf-surface); padding: 4rem 0;
    border-top: 1px solid var(--lf-rule); border-bottom: 1px solid var(--lf-rule);
}
.lf-three-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lf-three-grid h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
.lf-three-grid p { color: var(--lf-muted); margin: 0; }

::selection { background: var(--lf-accent-soft); color: var(--lf-fg); }

.lf-footer { padding: 3rem 0; color: var(--lf-muted); font-size: .9rem; }
.lf-footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.lf-footer a { color: var(--lf-muted); text-decoration: none; }
.lf-footer a:hover { color: var(--lf-accent); }

.skip-to-content {
    position: absolute; left: -9999px;
    background: var(--lf-accent); color: #fff;
    padding: .55rem 1.1rem; border-radius: 4px; font-weight: 600; z-index: 1000;
}
.skip-to-content:focus { left: 1rem; top: 1rem; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
