:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e7e5e4;
  --text: #18181b;
  --text-muted: #71717a;
  --accent: #4f46e5;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 32px;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tagline {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0;
}

.search-wrap {
  position: relative;
  width: 220px;
  flex-shrink: 0;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

#searchInput::placeholder { color: #a1a1aa; }

#searchInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
  background: var(--surface);
}

/* Hero bar */
.hero-bar {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 32px;
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-mascot {
  width: 170px;
  height: 170px;
  object-fit: cover;
  object-position: 50% 15%;
  flex-shrink: 0;
  background: var(--surface);
}

.hero-text {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  flex: 1;
  min-width: 0;
}

.hero-text h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.hero-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

.status-feedback {
  max-width: 1180px;
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .hero-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Main / columns */
.page-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 56px;
  row-gap: 44px;
  align-items: start;
}

.link-column {
  min-width: 0;
}

.col-heading {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.row-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.link-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: 10px;
  transition: background-color .12s;
}

.link-row:hover {
  background-color: #f2f5f8;
}

.link-row.extra-row { display: none; }
.link-column.expanded .link-row.extra-row { display: flex; }

.row-link {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.row-delete {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s, background-color .12s, color .12s;
}

.link-row:hover .row-delete {
  opacity: 1;
}

.row-delete:hover {
  background: var(--surface);
  color: #dc2626;
}

.row-delete:focus-visible {
  opacity: 1;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.row-logo {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.row-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row-logo svg { opacity: 0.28; }

.row-text {
  min-width: 0;
  padding-top: 1px;
}

.row-title {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 3px;
  transition: color .12s;
}

.link-row:hover .row-title {
  color: var(--accent);
}

.row-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.see-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 18px;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.see-all:hover { color: var(--accent); }
.see-all .arrow { transition: transform .15s; }
.link-column.expanded .see-all .arrow { transform: rotate(90deg); }

.empty-state {
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: center;
  padding: 40px 0;
}

.site-footer {
  text-align: center;
  padding: 24px 24px 48px;
  color: var(--text-muted);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}

.site-footer code {
  background: var(--bg);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11.5px;
}

@media (max-width: 900px) {
  .columns-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .site-header { padding: 16px 20px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .search-wrap { width: 100%; }
  .page-main { padding: 32px 20px 64px; }
  .columns-grid { grid-template-columns: 1fr; column-gap: 0; row-gap: 36px; }
}
