:root {
  --bg: #08090a;
  --surface: #0e1012;
  --line: #1f2327;
  --text: #f2f3f4;
  --muted: #8b9299;
  --accent: #c9f24d;
  --danger: #ff6b5e;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
[hidden] { display: none !important; }

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(55% 38% at 50% -8%, rgba(201, 242, 77, .10), transparent 70%),
    linear-gradient(to right, rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 100% 100%, 72px 72px, 72px 72px;
}

main, .top, footer { position: relative; z-index: 1; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 9, 10, .82);
  backdrop-filter: blur(14px) saturate(1.2);
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  letter-spacing: -0.04em;
  background: var(--accent);
  color: #08090a;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.brandname {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brandname small { font-size: 9px; font-weight: 500; letter-spacing: .18em; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 16px; }
.stamp {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 64px) 40px;
}

.ghost {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(201, 242, 77, .06); }
.ghost:focus-visible, .primary:focus-visible, input:focus-visible, .filter:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.gate {
  width: min(100%, 490px);
  margin: clamp(34px, 10vh, 100px) auto 0;
}
.kicker { color: var(--muted); font: 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(201,242,77,.45); }
h1 { font-size: clamp(42px, 8vw, 72px); font-weight: 540; line-height: .99; letter-spacing: -.065em; margin: 28px 0 20px; }
h1 em { font-family: var(--serif); font-weight: 400; color: var(--accent); }
.lede { color: var(--muted); font-size: 15px; max-width: 500px; margin: 0 0 32px; }
.card-form { display: flex; flex-direction: column; gap: 11px; border: 1px solid var(--line); background: linear-gradient(145deg,rgba(255,255,255,.04),rgba(255,255,255,.01)); border-radius: 16px; padding: 24px; }
label { font: 10px var(--mono); color: var(--muted); letter-spacing: .12em; margin-top: 4px; }
input { width: 100%; border: 1px solid #292e33; border-radius: 9px; color: var(--text); background: #090a0b; padding: 13px 14px; font: 14px var(--sans); }
input::placeholder { color: #525a60; }
input:focus { border-color: rgba(201,242,77,.7); outline: none; }
.primary { width: 100%; border: 0; border-radius: 9px; padding: 14px 16px; margin-top: 7px; background: var(--accent); color: #11130d; font: 700 13px var(--sans); cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: transform .18s ease,filter .18s ease; }
.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary:disabled { opacity: .55; cursor: wait; transform: none; }
.error { min-height: 18px; color: var(--danger); font-size: 12px; margin: 0; }
.foot-note { margin-top: 20px; color: #626a70; font: 9px var(--mono); letter-spacing: .15em; }
.foot-note span { color: var(--accent); padding: 0 7px; }

.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 12px 0 64px; border-bottom: 1px solid var(--line); }
.intro h1 { font-size: clamp(48px,8vw,86px); }
.intro .lede { margin-bottom: 0; }
.tally { flex: 0 0 240px; border: 1px solid #30382a; background: linear-gradient(135deg,rgba(201,242,77,.08),rgba(201,242,77,.015)); border-radius: 14px; padding: 23px; display: flex; flex-direction: column; }
.tally strong { font: 400 64px var(--serif); letter-spacing: -.06em; color: var(--accent); line-height: 1.1; }
.tally span, .tally small { font: 10px var(--mono); letter-spacing: .1em; color: var(--muted); }
.tally small { margin-top: 18px; font-size: 9px; letter-spacing: 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 55px 0 27px; }
h2 { font-size: 30px; font-weight: 560; letter-spacing: -.045em; line-height: 1; margin: 11px 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; border-bottom: 1px solid var(--line); padding-bottom: 23px; }
.filter { padding: 8px 13px; background: transparent; border: 1px solid #292e33; border-radius: 6px; color: var(--muted); font: 11px var(--sans); cursor: pointer; }
.filter:hover { color: var(--text); border-color: #5b635b; }
.filter.active { background: var(--accent); color: #171a10; border-color: var(--accent); font-weight: 700; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 21px 0 17px; }
.toolbar span { font: 10px var(--mono); letter-spacing: .12em; color: var(--muted); }
.toolbar input { max-width: 280px; padding: 10px 13px; font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.project { display: flex; flex-direction: column; min-width: 0; min-height: 270px; padding: 19px; background: rgba(17,20,21,.92); border: 1px solid #252a2e; border-radius: 10px; transition: transform .2s ease,border-color .2s ease; }
.project:hover { transform: translateY(-3px); border-color: #788f42; }
.project-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.project-index { font: 9px var(--mono); letter-spacing: .1em; color: #7f878c; }
.category { border: 1px solid #3a4631; background: rgba(201,242,77,.07); color: var(--accent); border-radius: 20px; padding: 4px 9px; font: 10px var(--mono); white-space: nowrap; }
.project-icon { margin: 22px 0 10px; width: 32px; height: 32px; border: 1px solid #353f31; display: grid; place-items: center; color: var(--accent); border-radius: 8px; }
h3 { font-size: 19px; letter-spacing: -.04em; margin: 0 0 5px; overflow-wrap: anywhere; }
.description { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0 0 17px; overflow-wrap: anywhere; }
.project-path { border-top: 1px solid #24292b; padding-top: 13px; margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.project-path span { color: #737d82; font: 9px var(--mono); letter-spacing: .12em; }
.project-path code { color: #c1c6c4; font: 10px var(--mono); word-break: break-all; }
.empty { color: var(--muted); padding: 40px; border: 1px dashed var(--line); grid-column: 1/-1; text-align: center; }
footer { max-width: 1180px; margin: 25px auto 0; padding: 25px clamp(20px,5vw,64px) 35px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: #737c81; font: 9px var(--mono); letter-spacing: .1em; }
footer .dot { width: 5px; height: 5px; margin-left: 5px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }

.editor { width: min(92vw,560px); max-height: 90vh; overflow: auto; padding: 0; color: var(--text); background: #101314; border: 1px solid #343a3d; border-radius: 14px; box-shadow: 0 22px 90px rgba(0,0,0,.7); }
.editor::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.editor form { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.editor-head h2 { margin-top: 8px; }
.editor-path { color: #86908f; font: 10px var(--mono); overflow-wrap: anywhere; padding: 10px; background: #090a0b; border: 1px solid var(--line); border-radius: 6px; }
.editor select, .editor textarea { width: 100%; border: 1px solid #292e33; border-radius: 9px; color: var(--text); background: #090a0b; padding: 12px 14px; font: 14px var(--sans); }
.editor textarea { resize: vertical; }
.editor-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 6px; }
.editor-actions .primary { width: auto; min-width: 190px; }
.project-url { color: var(--accent); font: 11px var(--mono); overflow-wrap: anywhere; margin: -6px 0 12px; }
.project-actions { display: flex; gap: 8px; border-top: 1px solid #24292b; padding-top: 11px; margin-top: 11px; }
.mini { border: 1px solid #303638; background: transparent; color: var(--text); border-radius: 6px; padding: 6px 10px; font: 10px var(--sans); cursor: pointer; }
.mini:hover { border-color: var(--accent); color: var(--accent); }
.mini.danger { color: var(--danger); }
.is-hidden { opacity: .6; }

@media (max-width: 850px) { .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .intro { align-items: flex-start; } .tally { flex-basis: 190px; } }
@media (max-width: 620px) { .top { padding: 16px 20px; } .stamp { display: none; } .grid { grid-template-columns: 1fr; } .intro { flex-direction: column; gap: 30px; padding-bottom: 40px; } .tally { align-self: stretch; flex-basis: auto; } .section-head { margin-top: 38px; align-items: flex-start; flex-direction: column; } .actions { justify-content: flex-start; } .toolbar { align-items: stretch; flex-direction: column; } .toolbar input { max-width: none; } footer { flex-direction: column; } .editor-actions { flex-direction: column; align-items: stretch; } .editor-actions .primary { width: 100%; } }

