/* Technical details: the technical view of the Farm. Graphite, mono, one wheat accent. */
:root {
    --bg: #0f1011; --bg-2: #141516; --card: #18191b; --line: rgba(239, 229, 207, .09); --line-2: rgba(239, 229, 207, .16);
    --text: #ece6d8; --muted: #9b968b; --dim: #6d6961; --wheat: #e2c27a; --moss: #8fb47f; --rust: #e07a5a; --sky: #7fb8d6;
    --sans: "Inter", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, Menlo, monospace; --serif: "IM Fell English", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
code { font: .9em var(--mono); color: var(--wheat); }
.ewrap { width: min(1180px, 100% - 3rem); margin-inline: auto; }

/* nav */
.enav { position: sticky; top: 0; z-index: 10; background: rgba(15, 16, 17, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.enav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 1.15rem var(--serif); }
.views, .views-farm { display: flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .03); }
.views a { padding: .3rem .95rem; border-radius: 999px; text-decoration: none; font: 500 .9rem var(--sans); color: var(--muted); }
.views a[aria-current] { background: var(--text); color: var(--bg); }
.ebtn { display: inline-block; padding: .7rem 1.3rem; border-radius: 8px; background: var(--wheat); color: #1b1a17; font: 600 .95rem var(--sans); text-decoration: none; border: 1px solid var(--wheat); }
.ebtn.small { padding: .4rem .9rem; font-size: .88rem; }
.ebtn.ghost { background: none; color: var(--text); border-color: var(--line-2); }
.ebtn:hover { filter: brightness(1.06); }

/* type */
.eyebrow { font: 500 .78rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--wheat); margin-bottom: .9rem; }
h1, h2 { font-family: var(--sans); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; }
h1 em, h2 em { font: italic 400 1.04em var(--serif); letter-spacing: 0; color: var(--wheat); }
h1 { font-size: clamp(2.4rem, 4.6vw, 3.7rem); margin-bottom: 1.3rem; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 1rem; }
.elede { font-size: 1.15rem; color: var(--muted); max-width: 540px; }
.esub { color: var(--muted); max-width: 640px; font-size: 1.08rem; margin-bottom: 2.6rem; }

/* hero */
.ehero { padding: 5rem 0 5.5rem; background: radial-gradient(900px 500px at 85% 20%, rgba(226, 194, 122, .08), transparent 60%), radial-gradient(700px 400px at 10% 90%, rgba(143, 180, 127, .06), transparent 60%); border-bottom: 1px solid var(--line); }
.ehero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: center; }
.ehero-meta { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2rem; font-size: .92rem; color: var(--muted); }
.ehero-meta b { font: 600 1.5rem var(--mono); color: var(--text); margin-right: .35rem; }

/* terminal */
.term { position: relative; background: #0b0c0d; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .5); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: #121314; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3c; }
.term-bar span { margin-left: .6rem; font: .78rem var(--mono); color: var(--dim); }
.term-body { height: 440px; padding: 1rem 1.1rem; font: 13px/1.62 var(--mono); color: #cfcabe; white-space: pre-wrap; overflow: hidden; }
.term-body .u { color: var(--text); }
.term-body .u::before { content: "> "; color: var(--wheat); }
.term-body .a { color: #e8e2d4; }
.term-body .a::before { content: "● "; color: var(--wheat); }
.term-body .tool { color: var(--sky); }
.term-body .tool::before { content: "● "; color: var(--moss); }
.term-body .ok { color: #b9b4a8; }
.term-body .ok b { color: var(--moss); font-weight: 500; }
.term-body .wait b { color: var(--wheat); font-weight: 500; }
.term-body .dim { color: var(--dim); }
.term-body .live { color: var(--text); }
.term-body .live b { color: var(--moss); }
.term-body .cursor { display: inline-block; width: 8px; height: 15px; background: var(--wheat); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.notify { position: absolute; right: 1.1rem; top: 3.3rem; width: 270px; padding: .75rem .9rem; border-radius: 14px; background: rgba(246, 240, 226, .97); color: #2b2722; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .6);
    opacity: 0; transform: translateY(-12px) scale(.98); transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.notify.show { opacity: 1; transform: none; }
.n-app { display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: #6b645a; }
.n-app span { margin-left: auto; }
.n-t { font-weight: 600; font-size: .95rem; margin-top: .2rem; }
.n-b { font-size: .82rem; color: #5a5146; }
.n-a { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .55rem; font-size: .82rem; font-weight: 600; text-align: center; }
.n-a span { padding: .35rem; border-radius: 8px; background: #e6dfcf; }
.n-a .yes { background: #4e6a3d; color: #fff; transition: transform .15s, box-shadow .15s; }
.notify.tap .yes { transform: scale(.94); box-shadow: 0 0 0 4px rgba(78, 106, 61, .35); }

/* sections */
.esec { padding: 6rem 0; border-bottom: 1px solid var(--line); }
.esec.alt { background: var(--bg-2); }

/* architecture */
.arch-wrap { overflow-x: auto; }
.arch { width: 100%; min-width: 900px; display: block; }
.arch .zone { fill: rgba(255, 255, 255, .015); stroke: var(--line-2); stroke-dasharray: 4 5; }
.arch .zl { font: 500 11px var(--mono); letter-spacing: 2px; fill: var(--dim); }
.arch .node rect { fill: url(#card); stroke: rgba(239, 229, 207, .18); }
.arch .node.you rect { stroke: rgba(226, 194, 122, .55); }
.arch .nt { font: 600 16px var(--sans); fill: var(--text); }
.arch .ns { font: 11px var(--mono); fill: var(--muted); }
.arch .flow { fill: none; stroke: #8b8a85; stroke-width: 1.4; }
.arch .flow.gold { stroke: var(--wheat); }
.arch .flow.anim { stroke-dasharray: 5 6; animation: flow 1.6s linear infinite; }
.arch .fl { font: 11px var(--mono); fill: var(--muted); }
.arch .fl.gold { fill: var(--wheat); }
@keyframes flow { to { stroke-dashoffset: -22; } }

/* cli */
.cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cmds article { background: var(--bg-2); padding: 1.3rem 1.3rem 1.2rem; transition: background .15s; }
.cmds article:hover { background: #1a1b1d; }
.cmds code { font-size: .98rem; font-weight: 500; }
.cmds code i { font-style: normal; color: var(--dim); }
.cmds p { margin: .45rem 0 .5rem; color: var(--text); font-size: .98rem; line-height: 1.45; }
.cmds small { font: .75rem var(--mono); color: var(--dim); }

/* contract */
.contract { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.yaml { margin-top: -1rem; background: #0b0c0d; border: 1px solid var(--line-2); border-radius: 12px; padding: 1.2rem 1.4rem; font: 14px/1.7 var(--mono); color: var(--text); overflow-x: auto; }
.yaml .k { color: var(--sky); }
.yaml .s { color: var(--moss); }
.yaml .c { color: var(--dim); }
.derived { list-style: none; border-left: 1px solid var(--line-2); padding-left: 1.6rem; margin-top: 3.2rem; }
.derived li { position: relative; padding: .55rem 0; color: var(--muted); font-size: .95rem; border-bottom: 1px solid var(--line); }
.derived li::before { content: ""; position: absolute; left: calc(-1.6rem - 4px); top: 1.05rem; width: 7px; height: 7px; border-radius: 50%; background: var(--wheat); }
.derived b { display: inline-block; min-width: 9.5rem; color: var(--text); font-weight: 600; }

/* guardrails */
.rails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.rail { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; border-top: 3px solid var(--c); }
.rail.ok { --c: var(--moss); } .rail.you { --c: var(--wheat); } .rail.no { --c: var(--rust); }
.rail h3 { font: 600 1.05rem var(--sans); margin-bottom: .9rem; color: var(--c); }
.rail ul { list-style: none; }
.rail li { padding: .45rem 0 .45rem 1.6rem; position: relative; border-top: 1px solid var(--line); font-size: .96rem; }
.rail li::before { position: absolute; left: 0; font: 600 .9rem var(--mono); color: var(--c); }
.rail.ok li::before { content: "✓"; } .rail.you li::before { content: "◆"; font-size: .7rem; top: .7rem; } .rail.no li::before { content: "×"; }

/* defaults */
.defaults { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.6rem; }
.defaults h3 { font: 500 .78rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--wheat); padding-bottom: .7rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line-2); }
.defaults ul { list-style: none; }
.defaults li { padding: .42rem 0 .42rem 1.4rem; position: relative; font-size: .93rem; color: var(--text); }
.defaults li::before { content: "✓"; position: absolute; left: 0; color: var(--moss); font: 600 .85rem var(--mono); top: .5rem; }
.stack { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 3.4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.stack span { font: .78rem var(--mono); color: var(--dim); letter-spacing: .1em; text-transform: uppercase; margin-right: .6rem; }
.stack b { font: 500 .85rem var(--mono); color: var(--muted); padding: .3rem .7rem; border: 1px solid var(--line-2); border-radius: 6px; }

.cta { text-align: center; border-bottom: 0; background: radial-gradient(700px 300px at 50% 100%, rgba(226, 194, 122, .1), transparent 70%); }
.cta .esub { margin: 0 auto 2rem; }
.cta-row { display: flex; justify-content: center; gap: .8rem; }
.efoot { padding: 1.6rem 0; font-size: .88rem; color: var(--dim); }
.efoot .ewrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.efoot a { color: var(--wheat); }

@media (max-width: 1050px) {
    .ehero-grid, .contract { grid-template-columns: 1fr; }
    .defaults { grid-template-columns: repeat(2, 1fr); }
    .rails { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .brand span { display: none; }
    .term-body { font-size: 11.5px; height: 470px; }
    .notify { width: 230px; }
    .defaults { grid-template-columns: 1fr; }
}
.cmds { grid-template-columns: repeat(5, 1fr); }
.derived li { display: grid; grid-template-columns: 10.5rem 1fr; gap: 1rem; }
.derived b { min-width: 0; }
@media (max-width: 1050px) { .cmds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cmds { grid-template-columns: 1fr; } .derived li { grid-template-columns: 1fr; gap: 0; } }
.shed { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: center; }
.shed-list { list-style: none; margin-top: -1rem; }
.shed-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .97rem; display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; }
.shed-list b { color: var(--text); font-weight: 600; }
.term-body.static { height: auto; }
@media (max-width: 1050px) { .shed { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .shed-list li { grid-template-columns: 1fr; gap: 0; } }
.defaults { grid-template-columns: repeat(6, 1fr); gap: 1.3rem; }
.arch .node.arch-new rect { stroke: rgba(226, 194, 122, .55); }
.rail h3 span { color: var(--dim); font-weight: 400; }
.levels { width: 100%; border-collapse: collapse; font-size: .9rem; }
.levels th { font: 500 .72rem var(--mono); color: var(--dim); text-align: center; padding: 0 0 .4rem; width: 2.2rem; }
.levels td { border-top: 1px solid var(--line); padding: .42rem 0; text-align: center; color: var(--wheat); font-size: .7rem; }
.levels td:first-child { text-align: left; color: var(--text); font-size: .92rem; }
.levels-note { margin-top: .8rem; font-size: .8rem; color: var(--dim); }
@media (max-width: 1050px) { .defaults { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .defaults { grid-template-columns: 1fr; } }
.levels { table-layout: fixed; }
.levels th:first-child { width: auto; }
.levels th:not(:first-child) { width: 2.1rem; }
