:root {
  --ink: #11120f;
  --muted: #696a62;
  --line: #deddd3;
  --paper: #f2f0e8;
  --card: #f8f7f1;
  --acid: #d9ff3f;
  --orange: #ff6542;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-geist-sans), Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.account-bar { display: flex; align-items: center; gap: 13px; }
.account-name { color: #a7a89f; font-family: var(--font-geist-mono), ui-monospace, monospace; font-size: 10px; }
.logout-button { min-height: 34px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; padding: 0 11px; font: 700 9px ui-monospace, monospace; letter-spacing: .08em; cursor: pointer; }
.logout-button:hover { color: var(--ink); background: var(--acid); border-color: var(--acid); }

.auth-page { min-height: 100vh; background: var(--ink); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.2fr .8fr; }
.auth-brand-panel { padding: clamp(30px, 5vw, 74px); color: #fff; display: flex; flex-direction: column; justify-content: space-between; background-color: var(--ink); background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 54px 54px; }
.auth-brand { align-self: flex-start; }
.auth-brand-panel .eyebrow { margin: 0 0 26px; }
.auth-brand-panel h1 { max-width: 800px; margin: 0; font-size: clamp(55px, 8vw, 110px); line-height: .9; letter-spacing: -.075em; }
.auth-brand-panel h1 em { color: var(--acid); font-family: Georgia, serif; font-weight: 400; }
.auth-brand-panel > div > p:last-child { max-width: 520px; color: #aaa; font-size: 17px; line-height: 1.6; }
.auth-footnote { margin: 0; color: #686960; font: 700 9px ui-monospace, monospace; letter-spacing: .14em; }
.auth-form-panel { padding: clamp(28px, 6vw, 88px); background: var(--paper); display: grid; place-items: center; }
.auth-form { width: min(100%, 430px); }
.auth-form h2 { margin: 8px 0 9px; font-size: clamp(40px, 5vw, 62px); letter-spacing: -.06em; }
.form-copy { margin: 0 0 32px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-form label { display: grid; gap: 8px; margin: 0 0 19px; color: var(--muted); font: 700 9px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.auth-form input { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 0; outline: none; background: var(--card); color: var(--ink); padding: 0 13px; font-size: 16px; }
.auth-form input:focus { border-color: var(--ink); box-shadow: 3px 3px 0 var(--acid); }
.auth-submit { width: 100%; min-height: 52px; margin-top: 7px; border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; font: 700 10px ui-monospace, monospace; letter-spacing: .1em; cursor: pointer; }
.auth-submit span { color: var(--acid); font-size: 18px; }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.form-error { margin: 0 0 12px; border-left: 3px solid var(--orange); background: rgba(255,101,66,.1); color: #9d2c18; padding: 11px 13px; font-size: 12px; line-height: 1.5; }
.setup-note { margin: 18px 0 0; color: var(--muted); font: 10px/1.6 ui-monospace, monospace; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  height: 76px;
  padding: 0 clamp(22px, 5vw, 80px);
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .15em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  border: 1px solid currentColor;
  padding: 5px;
  transform: rotate(-2deg);
}
.brand-mark i { display: block; width: 4px; background: currentColor; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 11px; }

.network-pill {
  border: 1px solid rgba(255,255,255,.28);
  padding: 9px 12px;
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  letter-spacing: .13em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.pulse, .online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(217,255,63,.12);
}

.hero {
  position: relative;
  min-height: 560px;
  padding: 76px clamp(22px, 7vw, 112px) 62px;
  overflow: hidden;
  color: white;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255,255,255,.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.052) 1px, transparent 1px);
  background-size: 54px 54px;
}
.hero::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -80px;
  top: 20px;
  border: 1px solid rgba(217,255,63,.22);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(217,255,63,.02), 0 0 0 160px rgba(217,255,63,.02);
}
.hero::after {
  content: "192.168.1.0/24";
  position: absolute;
  right: clamp(20px, 6vw, 94px);
  bottom: 40px;
  color: rgba(255,255,255,.18);
  font-family: var(--font-geist-mono), monospace;
  font-size: clamp(44px, 8vw, 112px);
  font-weight: 800;
  letter-spacing: -.08em;
  white-space: nowrap;
}
.hero > * { position: relative; z-index: 1; }

.eyebrow, .section-kicker {
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 700;
}
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--acid); }
.eyebrow span {
  border: 1px solid currentColor;
  width: 27px;
  height: 23px;
  display: grid;
  place-items: center;
}

.hero h1 {
  max-width: 940px;
  margin: 30px 0 26px;
  font-size: clamp(54px, 8.5vw, 122px);
  line-height: .87;
  letter-spacing: -.075em;
  font-weight: 730;
}
.hero h1 em { color: var(--acid); font-family: Georgia, serif; font-weight: 400; }
.hero-copy {
  max-width: 590px;
  margin: 0;
  color: #b7b8b0;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
}

.network-note {
  max-width: 590px;
  margin-top: 36px;
  padding: 14px 16px;
  border-left: 3px solid var(--acid);
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 13px;
}
.network-note > span { font-size: 24px; color: var(--acid); }
.network-note p { margin: 0; color: #aaaba4; font-family: var(--font-geist-mono), monospace; font-size: 10px; line-height: 1.6; letter-spacing: .04em; }
.network-note strong { color: white; margin-right: 6px; }

.directory { padding: 86px clamp(22px, 5vw, 80px) 100px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.section-kicker { color: var(--muted); margin: 0 0 8px; }
.section-heading h2 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -.06em;
  margin: 0;
}
.section-heading h2 span {
  display: inline-block;
  vertical-align: top;
  margin: 4px 0 0 8px;
  color: var(--muted);
  font-family: var(--font-geist-mono), monospace;
  font-size: 13px;
  letter-spacing: 0;
}
.result-count { color: var(--muted); font-family: var(--font-geist-mono), monospace; font-size: 11px; text-transform: uppercase; }

.controls {
  display: grid;
  grid-template-columns: minmax(300px, .75fr) 1.25fr;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.search-box {
  height: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
}
.search-box > span { font-size: 22px; line-height: 1; transform: rotate(-15deg); }
.search-box input { flex: 1; min-width: 0; outline: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: #92938b; }
.search-box button { border: 0; background: transparent; cursor: pointer; font-size: 20px; color: var(--muted); }

.filters { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.filters button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 13px;
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  transition: .18s ease;
}
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button.active { color: var(--ink); border-color: var(--ink); background: var(--acid); box-shadow: 3px 3px 0 var(--ink); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service-card {
  min-height: 390px;
  padding: 26px;
  background: var(--card);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  animation: card-in .38s both;
  animation-delay: var(--delay);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  right: -75px;
  top: -75px;
  background: var(--acid);
  transform: rotate(45deg);
  transition: .25s ease;
}
.service-card:hover { background: #fff; transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); z-index: 2; }
.service-card:hover::before { right: -55px; top: -55px; }

@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.card-topline { display: flex; align-items: center; margin-bottom: 25px; }
.service-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: white;
  background: #3a65db;
  font-family: var(--font-geist-mono), monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.04em;
  box-shadow: 3px 3px 0 var(--ink);
}
.service-icon.red { background: #e64f45; }
.service-icon.green { background: #249e73; }
.service-icon.cyan { background: #138ca4; }
.service-icon.purple { background: #7653cf; }
.service-icon.orange { background: #e56c36; }
.category-label { margin-left: 15px; color: var(--muted); font-family: var(--font-geist-mono), monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.online-dot { margin-left: auto; width: 6px; height: 6px; box-shadow: none; background: #61ae75; }
.service-card h3 { margin: 0 0 10px; font-size: 25px; letter-spacing: -.045em; }
.service-card > p { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.host-row { margin-top: auto; border-top: 1px solid var(--line); padding: 13px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.host-row span { color: #999a92; font-family: var(--font-geist-mono), monospace; font-size: 8px; letter-spacing: .14em; }
.host-row strong { font-family: var(--font-geist-mono), monospace; font-size: 10px; font-weight: 600; }
.address-row { min-height: 38px; background: #e8e6dc; display: flex; align-items: center; justify-content: space-between; padding-left: 10px; gap: 8px; }
.address-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-geist-mono), monospace; font-size: 10px; }
.address-row button { align-self: stretch; border: 0; border-left: 1px solid var(--line); background: transparent; padding: 0 10px; font-family: var(--font-geist-mono), monospace; font-size: 8px; font-weight: 700; cursor: pointer; }
.address-row button:hover { background: var(--acid); }
.launch-link { margin-top: 10px; min-height: 42px; display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: white; text-decoration: none; padding: 0 13px; font-family: var(--font-geist-mono), monospace; font-size: 9px; font-weight: 700; letter-spacing: .09em; }
.launch-link span { font-size: 16px; color: var(--acid); transition: transform .2s; }
.launch-link:hover span { transform: translate(3px, -3px); }

.empty-state { min-height: 360px; border: 1px solid var(--line); display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; }
.empty-state > span { font: 700 60px/1 var(--font-geist-mono), monospace; color: var(--line); }
.empty-state h3 { margin: 12px 0 5px; font-size: 23px; }
.empty-state p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.empty-state button { border: 1px solid var(--ink); background: var(--acid); min-height: 40px; padding: 0 16px; font: 700 10px var(--font-geist-mono), monospace; text-transform: uppercase; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }

footer {
  min-height: 150px;
  padding: 36px clamp(22px, 5vw, 80px);
  background: var(--ink);
  color: white;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.footer-brand { justify-self: start; }
footer p { color: #777870; font-family: var(--font-geist-mono), monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
footer > a { justify-self: end; color: var(--acid); font-family: var(--font-geist-mono), monospace; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-decoration: none; }

@media (max-width: 980px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
  footer { grid-template-columns: 1fr 1fr; }
  footer p { display: none; }
}

@media (max-width: 620px) {
  .topbar { height: 64px; }
  .network-pill { border: 0; padding: 0; font-size: 8px; }
  .account-name { display: none; }
  .logout-button { min-height: 30px; padding: 0 8px; }
  .hero { min-height: 540px; padding-top: 66px; }
  .hero::before { width: 300px; height: 300px; right: -170px; }
  .hero::after { right: 20px; bottom: 25px; font-size: 48px; }
  .hero h1 { font-size: clamp(52px, 16vw, 76px); margin-top: 28px; }
  .hero-copy { max-width: 96%; }
  .network-note { align-items: flex-start; }
  .directory { padding-top: 64px; }
  .section-heading { align-items: flex-start; }
  .result-count { display: none; }
  .controls { border-top-color: var(--line); }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-right: -22px; padding: 4px 22px 8px 0; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: 0 0 auto; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 375px; padding: 24px; }
  .service-card:hover { transform: none; box-shadow: none; }
  footer { min-height: 130px; }
  .footer-brand .brand-mark { display: none; }
}

@media (max-width: 800px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 42vh; gap: 50px; }
  .auth-brand-panel h1 { font-size: clamp(48px, 14vw, 78px); }
  .auth-footnote { display: none; }
  .auth-form-panel { min-height: 58vh; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
