:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
  font-weight: 400;
  color: #202521;
  background: #eef1ef;
  --surface: #fbfcfa;
  --surface-soft: #f3f5f1;
  --border: #cbd4ce;
  --border-strong: #8d9b94;
  --text-muted: #58635d;
  --teal: #0f766e;
  --blue: #315b9c;
  --rust: #a04f16;
  --rose: #a43f5f;
  --shadow: 0 14px 34px rgb(30 38 33 / 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgb(49 91 156 / 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgb(15 118 110 / 0.07) 0 1px, transparent 1px 100%),
    #eef1ef;
  background-size: 42px 42px;
}

a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  padding: 1rem clamp(1rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--border);
  background: rgb(251 252 250 / 0.94);
  backdrop-filter: blur(10px);
}

.brand-lockup {
  width: min(1180px, 100%);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  margin: 0 auto;
}

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  color: #f7fbf8;
  fill: var(--teal);
  stroke: #173b36;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 14px rgb(15 118 110 / 0.22));
}

.brand-lockup p,
.brand-lockup h1,
.intro h2,
.intro p,
.empty-state {
  margin: 0;
}

.brand-lockup p {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-lockup h1 {
  font-size: clamp(1.35rem, 2.8vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.directory-shell {
  width: min(760px, calc(100% - 2rem));
  display: grid;
  gap: 1rem;
  margin: 0 auto;
  padding: 1.15rem 0 2.5rem;
}

.intro {
  display: grid;
  gap: 0.18rem;
}

.intro h2 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.intro p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

.site-card {
  min-width: 0;
  min-height: 8.5rem;
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr) 1.75rem;
  gap: 0.72rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.site-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.site-card:focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(15 118 110 / 0.18);
}

.site-icon {
  width: 2.55rem;
  height: 2.55rem;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 850;
}

.site-card[data-accent="blue"] .site-icon {
  background: var(--blue);
}

.site-card[data-accent="rust"] .site-icon {
  background: var(--rust);
}

.site-card[data-accent="rose"] .site-icon {
  background: var(--rose);
}

.site-body {
  min-width: 0;
  display: grid;
  gap: 0.38rem;
}

.site-name {
  min-width: 0;
  color: #151a17;
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.site-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.site-url {
  color: #315b9c;
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.site-arrow {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #173b36;
}

.site-arrow svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .directory-shell {
    width: min(100% - 1rem, 1180px);
  }

  .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
  }

  .site-card {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .site-arrow {
    display: none;
  }
}
