:root {
  --ink: #101717;
  --muted: #667070;
  --paper: #f4f1e9;
  --panel: #fffdf7;
  --line: #d8d5cb;
  --orange: #f36d32;
  --teal: #146f70;
  --lime: #c7dc5d;
  --danger: #b43b31;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; border-bottom: 1px solid var(--line); background: rgba(244,241,233,.94); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; font-size: 1.05rem; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: white; border-radius: 50%; font-weight: 900; }
nav { display: flex; align-items: center; gap: 24px; font-size: .9rem; }
nav a, .nav-button { text-decoration: none; color: var(--muted); border: 0; background: none; padding: 0; cursor: pointer; }
nav a:hover, .nav-button:hover { color: var(--ink); }
.inline { display: inline; }
main { min-height: calc(100vh - 160px); }
.hero { min-height: 570px; padding: 9vw 7vw 7vw; display: grid; grid-template-columns: 1.5fr .7fr; gap: 8vw; align-items: end; background: var(--teal); color: white; position: relative; overflow: hidden; }
.hero:after { content: ""; position: absolute; width: 360px; height: 360px; border: 70px solid rgba(199,220,93,.13); border-radius: 50%; right: -80px; top: -100px; }
.eyebrow { text-transform: uppercase; font-size: .72rem; letter-spacing: .18em; font-weight: 800; color: var(--orange); margin: 0 0 14px; }
.hero .eyebrow { color: var(--lime); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3.2rem, 7vw, 7rem); line-height: .92; letter-spacing: -.07em; margin-bottom: 28px; }
.hero h1 span { color: var(--lime); }
.hero-copy { max-width: 650px; color: #d7e7e1; font-size: 1.15rem; line-height: 1.65; }
.hero-button { margin-top: 14px; }
.signal-card { border: 1px solid rgba(255,255,255,.25); padding: 28px; background: rgba(0,0,0,.12); }
.signal-card p { font-size: .68rem; letter-spacing: .15em; opacity: .7; margin-bottom: 28px; }
.signal-card strong { font-size: 1.3rem; }
.signal-dot { width: 10px; height: 10px; background: var(--lime); display: block; border-radius: 50%; margin-bottom: 14px; box-shadow: 0 0 18px var(--lime); }
.section { padding: 90px 7vw; }
.section-heading, .admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 38px; }
.section-heading h2, .admin-heading h1 { font-size: clamp(2rem, 4vw, 3.8rem); letter-spacing: -.05em; margin: 0; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project-card { background: var(--panel); padding: 34px; text-decoration: none; min-height: 310px; display: flex; flex-direction: column; transition: transform .15s, background .15s; }
.project-card:hover { background: white; transform: translateY(-4px); }
.project-number { color: var(--orange); font-family: monospace; margin-bottom: auto; }
.project-card h3 { font-size: 1.75rem; letter-spacing: -.04em; margin: 35px 0 10px; }
.project-card p { color: var(--muted); line-height: 1.6; }
.card-meta { margin-top: auto; padding-top: 25px; display: flex; gap: 18px; font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.panel-section { background: #e7e3d8; }
.file-list { border-top: 1px solid #bbb8af; }
.file-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid #bbb8af; }
.file-icon { width: 52px; height: 52px; border-radius: 4px; background: var(--ink); color: var(--lime); display: grid; place-items: center; font: 700 .7rem monospace; }
.file-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.file-info strong { overflow-wrap: anywhere; }
.file-info span, .file-info p { color: var(--muted); font-size: .85rem; margin: 0; }
.button { border: 0; display: inline-block; background: var(--orange); color: white; padding: 13px 20px; text-decoration: none; font-weight: 800; cursor: pointer; border-radius: 2px; }
.button:hover { filter: brightness(.93); }
.button.small { padding: 9px 14px; font-size: .8rem; }
.button.wide { width: 100%; }
.page-hero { padding: 100px 7vw 70px; background: var(--teal); color: white; }
.page-hero h1 { max-width: 900px; }
.page-hero > p:last-child { max-width: 760px; color: #d7e7e1; line-height: 1.7; font-size: 1.08rem; }
.page-hero .project-link { margin-top: 12px; }
.repository-hero h1 { margin-bottom: 18px; }
.repository-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 34px; color: #d7e7e1; }
.repository-stats strong { color: var(--lime); font-size: 1.35rem; margin-right: 5px; }
.repository-search { max-width: 760px; margin-bottom: 60px; }
.repository-search > label { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.repository-search > div { display: flex; align-items: center; gap: 12px; }
.repository-search input { margin: 0; }
.repository-heading { margin-bottom: 20px; }
.repository-list .file-info a { color: var(--teal); }
.back-link { display: inline-block; color: #d7e7e1; margin-bottom: 70px; text-decoration: none; }
.auth-wrap { min-height: 75vh; display: grid; place-items: center; padding: 70px 20px; background: var(--teal); }
.form-card { background: var(--panel); padding: 32px; border: 1px solid var(--line); }
.auth-card { width: min(460px, 100%); box-shadow: 12px 12px 0 rgba(0,0,0,.12); }
.auth-card h1 { font-size: 2.7rem; }
.form-card h2 { margin-bottom: 8px; }
.form-card > p { color: var(--muted); line-height: 1.55; }
label { display: block; font-size: .78rem; font-weight: 800; margin: 20px 0; }
.optional { color: var(--muted); font-weight: 500; }
input, textarea, select { display: block; width: 100%; margin-top: 7px; padding: 12px; border: 1px solid #c9c5ba; background: white; color: var(--ink); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; margin: 0; }
.flash-stack { position: fixed; top: 90px; right: 20px; z-index: 20; display: grid; gap: 8px; width: min(380px, calc(100vw - 40px)); }
.flash { background: var(--ink); color: white; padding: 15px 18px; box-shadow: 0 5px 20px rgba(0,0,0,.15); }
.flash.error { background: var(--danger); }
.flash.success { border-left: 5px solid var(--lime); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 76px); }
.admin-nav { background: var(--ink); color: white; padding: 45px 30px; }
.admin-nav h2 { font-size: 2rem; margin-bottom: 35px; }
.admin-nav a { display: block; color: #abb2b0; text-decoration: none; padding: 12px 0; border-bottom: 1px solid #2e3736; font-size: .9rem; }
.admin-nav a:hover { color: var(--lime); }
.admin-content { padding: 55px 4vw 90px; min-width: 0; }
.admin-heading h1 { font-size: 3.6rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 35px; }
.stats-grid > div { background: var(--panel); padding: 25px; }
.stats-grid span { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 18px; }
.stats-grid strong { font-size: 1.8rem; letter-spacing: -.05em; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.admin-section { margin-top: 50px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; background: var(--panel); font-size: .85rem; }
th { text-align: left; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; }
th, td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
td small { display: block; color: var(--muted); margin-top: 5px; }
.badge { display: inline-block; padding: 5px 8px; font-size: .65rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.badge.public { background: #e4efad; color: #475313; }
.badge.private { background: #e1dfd7; color: #64645d; }
.actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.actions form { display: inline; }
.link-button { border: 0; padding: 0; background: none; color: var(--teal); text-decoration: underline; cursor: pointer; }
.danger, .danger-button { color: var(--danger); }
.danger-button { background: transparent; border: 1px solid var(--danger); margin-top: 30px; }
.narrow { max-width: 600px; }
.agent { max-width: 380px; overflow-wrap: anywhere; color: var(--muted); }
.pagination { display: flex; justify-content: space-between; padding: 20px 0; }
.empty-state { text-align: center; padding: 80px 20px; background: var(--panel); border: 1px dashed #bbb8af; }
.empty-state h1 { font-size: 3rem; }
.prose { max-width: 760px; font-size: 1.05rem; line-height: 1.75; }
.prose h2 { font-size: 1.8rem; letter-spacing: -.035em; margin-top: 40px; }
.prose p { color: var(--muted); }
footer { padding: 32px 5vw; display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; }
  .project-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { padding: 25px; }
  .admin-nav a { display: inline-block; margin-right: 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-header { padding: 0 18px; }
  nav { gap: 12px; font-size: .78rem; }
  .brand > span:last-child { display: none; }
  .hero { min-height: 520px; padding: 100px 25px 60px; }
  .section, .page-hero { padding-left: 24px; padding-right: 24px; }
  .file-row { grid-template-columns: 48px 1fr; }
  .file-row .button { grid-column: 2; justify-self: start; }
  .stats-grid { grid-template-columns: 1fr; }
  .admin-content { padding: 40px 20px 70px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
}
