
:root {
  --page-bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f8fa;
  --text: #24292f;
  --muted: #57606a;
  --line: #d8dee4;
  --line-strong: #d0d7de;
  --blue: #0969da;
  --blue-deep: #0550ae;
  --blue-soft: #edf4ff;
  --green: #16a36a;
  --orange: #f59e0b;
  --purple: #7c3aed;
  --shadow: 0 3px 12px rgba(27, 31, 36, .06);
  --radius: 6px;
  --container: 1280px;
}

* { box-sizing: border-box; }

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }

.page-shell {
  width: 100%;
  overflow: hidden;
  background: var(--surface);
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(calc(100% - 32px), var(--container));
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  margin: 0 auto;
  padding: 0 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.brand-mark i {
  display: block;
  border-radius: 4px;
  background: linear-gradient(145deg, #2f6df6, #173f9e);
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand-text small {
  display: none;
  color: var(--muted);
  font-size: 13px;
}

.search-box {
  display: none;
  height: 36px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
}

.search-box:focus-within {
  border-color: #a9c2ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(9,105,218,.12);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.search-box svg {
  width: 19px;
  fill: none;
  stroke: #38445a;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.header-actions {
  display: none;
}

.header-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  justify-self: end;
}

.mobile-menu {
  display: none;
  justify-self: end;
  position: relative;
}

.mobile-menu summary {
  cursor: pointer;
  list-style: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu[open] summary {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.mobile-nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  min-width: 190px;
  display: grid;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-nav a {
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible,
.mobile-nav a.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.header-nav a {
  padding: 7px 0 6px;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
}

.header-nav a:hover,
.header-nav a:focus-visible,
.header-nav a.active {
  color: var(--blue);
  border-bottom-color: currentColor;
}

.action-icon,
.avatar {
  display: grid;
  place-items: center;
}

.action-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #3b4760;
  background: #f7f9fc;
  border: 1px solid var(--line);
  font-size: 18px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #eef2f8, #d9e0eb);
  color: #647087;
  font-size: 11px;
  font-weight: 800;
}

.hero {
  position: relative;
  width: min(calc(100% - 32px), var(--container));
  min-height: 152px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  margin: 0 auto;
  padding: 30px 32px 32px;
  background: var(--surface);
}

.hero::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: 0;
  left: 32px;
  height: 1px;
  background: var(--line);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-copy > p:last-child {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-illustration {
  display: none;
  position: relative;
  height: 200px;
  min-width: 320px;
}

.monitor {
  position: absolute;
  left: 50%;
  bottom: 25px;
  width: 190px;
  transform: translateX(-50%);
}

.monitor-screen {
  height: 126px;
  padding: 18px;
  border: 8px solid rgba(255,255,255,.72);
  border-radius: 20px;
  background: rgba(143,181,247,.28);
  box-shadow: 0 18px 30px rgba(66,105,175,.16);
  backdrop-filter: blur(2px);
}

.screen-line {
  width: 66px;
  height: 8px;
  border-radius: 999px;
  background: rgba(55,109,220,.35);
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 9px;
  margin-top: 18px;
}

.screen-grid i {
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,.72);
}

.monitor-stand {
  width: 78px;
  height: 10px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: rgba(104,139,198,.28);
  box-shadow: 0 13px 0 -2px rgba(104,139,198,.18);
}

.cup {
  position: absolute;
  right: 40px;
  bottom: 23px;
  width: 42px;
  height: 48px;
  border-radius: 5px 5px 14px 14px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 20px rgba(62,96,155,.11);
}

.cup::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 10px;
  width: 19px;
  height: 22px;
  border: 5px solid rgba(255,255,255,.75);
  border-left: 0;
  border-radius: 0 13px 13px 0;
}

.plant {
  position: absolute;
  bottom: 18px;
  width: 70px;
  height: 86px;
}

.plant::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: 0;
  width: 44px;
  height: 35px;
  border-radius: 8px 8px 14px 14px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 18px rgba(70,105,160,.10);
}

.plant span {
  position: absolute;
  left: 35px;
  bottom: 31px;
  width: 16px;
  height: 48px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(180deg,#8bb2f8,#4c80e0);
  transform-origin: bottom center;
}

.plant span:nth-child(1) { transform: rotate(-32deg); }
.plant span:nth-child(2) { transform: rotate(4deg) scale(1.1); }
.plant span:nth-child(3) { transform: rotate(35deg); }

.plant-left { left: 2px; }
.plant-right { right: 2px; transform: scale(.92); }

.hub-sections {
  display: grid;
  counter-reset: hub-section;
}

.hub-section {
  position: relative;
  counter-increment: hub-section;
  width: min(calc(100% - 32px), var(--container));
  scroll-margin-top: 78px;
  margin: 0 auto;
  padding: 32px 32px 34px;
  background: var(--surface);
}

.hub-section::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: 0;
  left: 32px;
  height: 1px;
  background: var(--line);
}

.hub-section:nth-child(even) {
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading h2 {
  position: relative;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}

.section-heading h2::before {
  content: counter(hub-section) ". ";
  color: #1f2328;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.section-count {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
}

.section-count::after {
  content: "  →";
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: 18px;
}

.hub-card {
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.hub-card:hover {
  border-color: #c2cad3;
  box-shadow: var(--shadow);
}

.hub-card:focus-visible {
  outline: 3px solid rgba(9,105,218,.2);
  outline-offset: 2px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.card-description {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f4f8;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.badge.active {
  background: #ecfdf3;
  color: #15803d;
}

.badge.development {
  background: #fff7ed;
  color: #b45309;
}

.external-mark {
  margin-left: auto;
  color: #98a2b3;
  font-size: 13px;
}

/* Apps: icon left */
.style-icon-horizontal .hub-card {
  min-height: 104px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  border-radius: 6px;
}

#utilities .hub-card {
  min-height: auto;
  align-items: center;
  padding: 14px 16px;
}

#utilities .card-description {
  -webkit-line-clamp: 1;
}

.card-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 11px;
  border-radius: 10px;
  background: var(--icon-bg, var(--blue));
  color: #fff;
}

.card-content {
  min-width: 0;
  width: 100%;
}

/* Tools: icon top */
.style-icon-vertical .hub-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 6px;
}

.style-icon-vertical .card-icon {
  margin-bottom: 18px;
}

.style-icon-vertical .card-meta {
  margin-top: auto;
  padding-top: 12px;
}

/* Social: thumb top / title bottom */
.style-thumbnail-card .hub-card {
  overflow: hidden;
  border-radius: 6px;
}

.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--blue-soft);
}

#social .card-thumbnail {
  aspect-ratio: 5 / 4;
}

.thumbnail-body {
  padding: 14px 15px 16px;
}

/* List */
.style-compact-list .section-grid {
  gap: 9px;
}

.style-compact-list .hub-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 6px;
}

.style-compact-list .card-icon {
  width: 38px;
  height: 38px;
  padding: 7px;
}

.style-compact-list .card-description {
  -webkit-line-clamp: 1;
}

/* Folder */
.style-folder-card .hub-card {
  min-height: 145px;
  padding: 18px;
  border-radius: 6px;
}

.style-folder-card .card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
}

.status-message,
.empty-state {
  width: min(calc(100% - 32px), var(--container));
  margin: 24px auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.status-message.error {
  color: #b42318;
  background: #fff7f6;
  border-color: #fecdca;
}

.empty-state h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  background: #fff;
}

.footer-inner {
  width: min(calc(100% - 32px), var(--container));
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 0 32px;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.portal-section {
  position: relative;
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 32px;
  background: var(--surface);
}

.portal-section::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: 0;
  left: 32px;
  height: 1px;
  background: var(--line);
}

.portal-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.portal-heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.portal-heading p,
.page-lead {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.portal-link {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.portal-link:hover,
.portal-link:focus-visible {
  text-decoration: underline;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 4), minmax(0, 1fr));
  gap: 18px;
}

.portal-card {
  min-width: 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.portal-card:hover,
.portal-card:focus-visible {
  border-color: #c2cad3;
  box-shadow: var(--shadow);
}

.portal-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.portal-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.portal-card-large {
  min-height: 150px;
  flex-direction: column;
}

.portal-card-large .card-icon {
  margin-bottom: 4px;
}

.quick-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.quick-card {
  flex-direction: column;
  gap: 12px;
  min-height: 126px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
}

.stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.content-split {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: start;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.info-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.info-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.map-panel,
.note-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(9,105,218,.06) 1px, transparent 1px),
    linear-gradient(rgba(9,105,218,.06) 1px, transparent 1px),
    #f6f8fa;
  background-size: 34px 34px;
  color: var(--muted);
  text-align: center;
}

.project-card {
  min-height: 178px;
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #1a7f37;
  font-size: 13px;
  font-weight: 500;
}

.server-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a7f37;
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .section-grid {
    grid-template-columns: repeat(min(var(--columns,3),3), minmax(0,1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: 100%;
  }

  .header-inner {
    width: 100%;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px 18px;
  }

  .header-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .brand-text small {
    display: block;
  }

  .hero {
    width: 100%;
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 20px 30px;
  }

  .hero::after {
    right: 20px;
    left: 20px;
  }

  .hero-illustration {
    display: none;
  }

  .hub-section {
    width: 100%;
    padding: 24px 20px 26px;
  }

  .hub-section::after {
    right: 20px;
    left: 20px;
  }

  .section-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .style-icon-horizontal .section-grid,
  .style-compact-list .section-grid {
    grid-template-columns: 1fr;
  }

  .portal-section {
    width: 100%;
    padding: 24px 20px 26px;
  }

  .portal-section::after {
    right: 20px;
    left: 20px;
  }

  .portal-heading {
    align-items: flex-start;
  }

  .portal-grid,
  .quick-grid,
  .stat-grid,
  .content-split {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: 32px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    min-height: 70px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
  }
}
