/* HYEHOST mirror homepage — balanced four-distribution layout. */
.hero-grid { min-height: 540px; }
.hero-copy { padding: 68px 0; }
.hero h1 { max-width: 720px; font-size: clamp(46px, 5.4vw, 70px); }

.section-head { align-items: center; margin-bottom: 38px; }
.section-head > p { margin: 0; }

/* Repository cards */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.distro-card {
  --os-accent: var(--brand-600);
  --os-soft: #f7f3ff;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 30px;
  border: 1px solid #e5e0eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(20, 18, 42, .065);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.distro-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--os-accent);
}
.distro-card:hover { transform: translateY(-3px); border-color: #d8cde8; box-shadow: 0 20px 44px rgba(20, 18, 42, .1); }
.debian-card { --os-accent: #a80030; --os-soft: #fff4f7; }
.arch-card { --os-accent: #1793d1; --os-soft: #f1faff; }
.ubuntu-card { --os-accent: #e95420; --os-soft: #fff5f1; }
.rocky-card { --os-accent: #10b981; --os-soft: #effcf7; }

.distro-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.distro-identity { display: flex; align-items: center; min-width: 0; gap: 14px; }
.distro-icon, .endpoint-logo {
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--os-accent, var(--brand-600)) 16%, #e5e5eb);
  border-radius: 13px;
  background: var(--os-soft, #fff);
}
.distro-icon img, .endpoint-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.debian-icon { padding: 6px 10px; }
.arch-icon { padding: 7px; }
.ubuntu-icon { padding: 8px; }
.rocky-icon { padding: 7px; }
.distro-identity > div > span { display: block; margin-bottom: 4px; color: var(--ink-4); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.distro-card .distro-identity h3 { margin: 0; font-size: 25px; line-height: 1.05; letter-spacing: -.025em; }

.distro-state, .service-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: #08783c;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.distro-state { padding: 7px 10px; border-radius: 999px; background: #ecfdf5; }
.distro-state i, .service-state i { width: 6px; height: 6px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .1); }
.distro-state[data-state="syncing"], .service-state[data-state="syncing"] { color: #825300; background: #fff8df; }
.distro-state[data-state="syncing"] i, .service-state[data-state="syncing"] i { background: #e8a009; box-shadow: 0 0 0 3px rgba(232, 160, 9, .12); animation: status-pulse 1.8s infinite; }
.distro-state[data-state="stale"], .service-state[data-state="stale"] { color: #b42318; background: #fff0ee; }
.distro-state[data-state="stale"] i, .service-state[data-state="stale"] i { background: #d92d20; }
.distro-state[data-state="preparing"], .distro-state[data-state="maintenance"], .service-state[data-state="preparing"], .service-state[data-state="maintenance"] { color: var(--brand-700); background: var(--brand-100); }
.distro-state[data-state="preparing"] i, .distro-state[data-state="maintenance"] i, .service-state[data-state="preparing"] i, .service-state[data-state="maintenance"] i { background: var(--brand-500); }
@keyframes status-pulse { 50% { opacity: .35; } }

.distro-description { min-height: 88px; margin: 24px 0 20px; color: var(--ink-4); font-size: 13px; line-height: 1.65; }
.service-list { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 64px; padding: 13px 14px; color: inherit; text-decoration: none; transition: background .16s ease; }
.service-row + .service-row { border-top: 1px solid var(--border); }
.service-row:hover { background: var(--os-soft); }
.service-row > span:first-child { min-width: 0; }
.service-row strong { display: block; margin-bottom: 4px; color: var(--ink-2); font-size: 12px; }
.service-row small { display: block; overflow: hidden; color: var(--ink-4); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; }
.service-state { flex: 0 0 auto; padding: 5px 7px; border-radius: 999px; background: #ecfdf5; }

.repo-facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 24px; }
.repo-facts span { padding: 6px 9px; border-radius: 7px; background: var(--os-soft); color: var(--ink-3); font-size: 10px; font-weight: 700; }
.repo-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--border); }
.repo-footer .button { white-space: nowrap; }
.copy-link { padding: 9px 0; }

/* Balanced download cards */
.iso-downloads { border-top: 1px solid var(--border); background: linear-gradient(180deg, #faf8ff 0%, #fff 100%); }
.iso-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.iso-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 26px; border: 1px solid #e3ddea; border-radius: 17px; background: #fff; box-shadow: 0 10px 28px rgba(20, 18, 42, .055); }
.iso-card::after { content: ""; position: absolute; width: 130px; height: 130px; right: -70px; top: -75px; border-radius: 50%; background: var(--download-soft, var(--brand-100)); }
.debian-download { --download-soft: #ffeef3; }
.arch-download { --download-soft: #e8f7fd; }
.ubuntu-download { --download-soft: #ffede6; }
.iso-card-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.iso-logo { display: grid; place-items: center; width: 44px; height: 44px; padding: 7px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.iso-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.debian-iso { padding: 6px 10px; background: #fff8fa; }
.arch-iso { background: #f5fbfe; }
.ubuntu-iso { background: #fff8f5; }
.iso-badge { padding: 6px 9px; border-radius: 999px; background: #ecfdf5; color: #08783c; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.iso-badge.arch-release { background: #eaf7fc; color: #0876a8; }
.iso-badge.ubuntu-release { background: #fff0ea; color: #b9380c; }
.iso-kicker { color: var(--brand-600); font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.iso-card h3 { margin: 7px 0 10px; font-size: 22px; letter-spacing: -.025em; }
.iso-card p { min-height: 64px; margin: 0; color: var(--ink-4); font-size: 13px; line-height: 1.6; }
.iso-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 21px 0; }
.iso-meta span { padding: 6px 9px; border-radius: 6px; background: var(--subtle); color: var(--ink-3); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.iso-button { width: 100%; margin-top: auto; }
.download-more { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px 18px; margin-top: 22px; color: var(--ink-4); font-size: 12px; }
.download-more span { font-weight: 700; color: var(--ink-3); }
.download-more a { color: var(--brand-700); font-weight: 750; text-decoration: none; }
.download-more a:hover { text-decoration: underline; }

/* One clean configuration panel with OS tabs */
.usage { padding: 82px 0 88px; }
.usage-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 64px; align-items: center; }
.usage-copy h2 { font-size: 40px; }
.config-shell { min-width: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .17); border-radius: 15px; background: #17132d; box-shadow: 0 24px 52px rgba(10, 7, 29, .3); }
.config-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px; gap: 5px; background: #211a3d; border-bottom: 1px solid rgba(255,255,255,.1); }
.config-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: #bfb3d4; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.config-tab img { width: 20px; height: 20px; object-fit: contain; filter: grayscale(1) brightness(1.7); opacity: .75; }
.config-tab.active { background: rgba(255,255,255,.1); color: #fff; }
.config-tab.active img { filter: none; opacity: 1; }
.config-panel .code-head { padding: 14px 17px; background: transparent; }
.config-panel pre { min-height: 190px; margin: 0; padding: 24px; overflow: auto; color: #f2edff; font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Endpoint directory */
.endpoints-section { padding-bottom: 84px; }
.endpoint-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.endpoint-card { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: 0 8px 22px rgba(20,18,42,.045); }
.endpoint-card header { display: flex; align-items: center; gap: 12px; padding: 20px; background: var(--subtle); border-bottom: 1px solid var(--border); }
.endpoint-card header h3 { margin: 0; font-size: 18px; }
.endpoint-logo { flex-basis: 38px; width: 38px; height: 38px; border-radius: 9px; background: #fff; }
.endpoint-card > a, .endpoint-card > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 52px; padding: 11px 17px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.endpoint-card > :last-child { border-bottom: 0; }
.endpoint-card > a:hover { background: #fbf9ff; }
.endpoint-card > a span, .endpoint-card > div span { color: var(--ink-4); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.endpoint-card code { overflow: hidden; color: var(--brand-700); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.community-strip { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 20px; padding: 23px 25px; border: 1px solid #ddd3ee; border-radius: 14px; background: linear-gradient(145deg, #f7f2ff, #fff); }
.community-strip > div { display: flex; flex-direction: column; gap: 5px; }
.community-strip > div:last-child { align-items: flex-end; }
.community-strip strong { font-size: 15px; }
.community-strip span { color: var(--ink-4); font-size: 11px; }
.community-strip a { color: var(--brand-700); font-size: 12px; font-weight: 750; text-decoration: none; }

[hidden] { display: none !important; }

@media (max-width: 1050px) {
  .repo-grid, .iso-grid, .endpoint-grid { grid-template-columns: 1fr; }
  .distro-description, .iso-card p { min-height: 0; }
  .usage-grid { grid-template-columns: 1fr; gap: 36px; }
  .usage-copy { max-width: 700px; }
}

@media (max-width: 650px) {
  .hero-grid { min-height: auto; }
  .hero-copy { padding-top: 58px; }
  .distro-card { padding: 23px; }
  .distro-head { align-items: flex-start; }
  .distro-state { padding: 6px 8px; }
  .distro-description { margin-top: 21px; }
  .repo-footer { align-items: flex-start; flex-direction: column; }
  .repo-footer .button { width: 100%; }
  .iso-card { padding: 23px; }
  .usage { padding: 66px 0; }
  .usage-copy h2 { font-size: 34px; }
  .config-tab { gap: 5px; font-size: 10px; }
  .config-tab img { width: 17px; height: 17px; }
  .config-panel .code-head { align-items: flex-start; gap: 12px; }
  .config-panel .code-head span { max-width: 65%; }
  .config-panel pre { min-height: 230px; padding: 20px; font-size: 11px; }
  .community-strip { align-items: flex-start; flex-direction: column; }
  .community-strip > div:last-child { align-items: flex-start; }
}

.rocky-download { --download-soft: #eaf8ef; }
.rocky-iso { padding: 7px; background: #effaf3; }
.rocky-release { color: #08783e; background: #e8f8ef; }
.quick-download-pending { cursor: not-allowed; opacity: .58; pointer-events: none; }


/* Four-up quick-download showcase */
.iso-downloads { padding-top: 78px; padding-bottom: 78px; }
.iso-downloads .section-head { align-items: center; margin-bottom: 30px; }
.iso-downloads .section-head > p { max-width: 460px; }
.iso-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.iso-card {
  --iso-accent: var(--brand-600);
  --iso-accent-soft: #f4efff;
  min-height: 382px;
  padding: 22px;
  border-color: #ded8e8;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(30, 20, 60, .065);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.iso-card:hover { transform: translateY(-3px); border-color: #d1c6e2; box-shadow: 0 18px 42px rgba(30, 20, 60, .10); }
.iso-card::after { width: 112px; height: 112px; right: -57px; top: -58px; }
.debian-download { --iso-accent: #a80030; --iso-accent-soft: #fff0f4; }
.arch-download { --iso-accent: #087cad; --iso-accent-soft: #edf9fd; }
.ubuntu-download { --iso-accent: #c84416; --iso-accent-soft: #fff2ed; }
.rocky-download { --iso-accent: #087a47; --iso-accent-soft: #edf9f2; }
.iso-card-head { margin-bottom: 18px; }
.iso-logo { width: 42px; height: 42px; border-color: color-mix(in srgb, var(--iso-accent) 17%, white); background: var(--iso-accent-soft); }
.iso-badge { max-width: 132px; overflow: hidden; padding: 6px 8px; text-overflow: ellipsis; white-space: nowrap; }
.iso-kicker { color: var(--iso-accent); }
.iso-card h3 { margin: 7px 0 9px; font-size: 20px; line-height: 1.2; }
.iso-card p { min-height: 83px; font-size: 12.5px; line-height: 1.55; }
.iso-meta { margin: 17px 0; }
.iso-meta span { background: var(--iso-accent-soft); }
.iso-card .iso-button {
  min-height: 46px;
  margin-top: auto;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--iso-accent) 25%, white);
  border-radius: 10px;
  background: var(--iso-accent-soft);
  color: var(--iso-accent);
  box-shadow: none;
}
.iso-card .iso-button:hover {
  transform: translateY(-1px);
  border-color: var(--iso-accent);
  background: var(--iso-accent);
  color: #fff;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--iso-accent) 22%, transparent);
}
.iso-card .quick-download-pending {
  border-style: dashed;
  background: #f6f7f8;
  color: #697178;
  cursor: default;
  opacity: 1;
  pointer-events: none;
}
.iso-card .quick-download-pending::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid #aab0b5;
  border-right-color: transparent;
  border-radius: 50%;
  animation: quick-download-spin .9s linear infinite;
}
@keyframes quick-download-spin { to { transform: rotate(360deg); } }
.download-more {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid #e6e0ed;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}

@media (max-width: 1050px) {
  .iso-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iso-card { min-height: 350px; }
  .iso-card p { min-height: 0; }
}
@media (max-width: 650px) {
  .iso-downloads { padding-top: 62px; padding-bottom: 62px; }
  .iso-downloads .section-head { margin-bottom: 24px; }
  .iso-grid { grid-template-columns: 1fr; gap: 14px; }
  .iso-card { min-height: 0; padding: 21px; }
  .iso-card p { min-height: 0; }
  .download-more { justify-content: flex-start; padding: 14px; }
}


/* Site-wide configuration and endpoint polish */
.usage { padding: 84px 0; }
.usage-grid { grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr); gap: 58px; }
.usage-copy { max-width: 440px; }
.usage-copy h2 { max-width: 430px; font-size: clamp(36px, 4vw, 48px); line-height: 1.08; }
.usage-copy p { max-width: 420px; font-size: 14px; line-height: 1.75; }
.protocols { flex-wrap: wrap; }
.protocols span { min-width: 58px; text-align: center; }
.config-shell { border-color: rgba(255,255,255,.2); border-radius: 17px; box-shadow: 0 28px 60px rgba(10,7,29,.34); }
.config-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px; gap: 6px; }
.config-tab { min-height: 42px; border: 1px solid transparent; border-radius: 9px; }
.config-tab:hover { background: rgba(255,255,255,.06); color: #fff; }
.config-tab:focus-visible { outline: 2px solid var(--brand-300); outline-offset: 1px; }
.config-tab.active { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.12); }
.config-panel .code-head { min-height: 49px; }
.config-panel .code-head button { padding: 7px 0 7px 12px; }
.config-panel pre { min-height: 260px; max-height: 360px; padding: 22px 24px; font-size: 11.5px; line-height: 1.72; }
.config-notice { display: flex; align-items: center; gap: 9px; padding: 10px 17px; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(235,169,36,.10); color: #f1d79e; font-size: 10.5px; line-height: 1.45; }
.config-notice i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #e8a009; box-shadow: 0 0 0 4px rgba(232,160,9,.12); }
.config-notice[hidden] { display: none; }

.endpoint-grid { align-items: stretch; }
.endpoint-card { position: relative; display: flex; flex-direction: column; border-top: 3px solid var(--endpoint-accent, var(--brand-500)); transition: transform .18s ease, box-shadow .18s ease; }
.endpoint-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(20,18,42,.075); }
.endpoint-debian { --endpoint-accent: #a80030; }
.endpoint-arch { --endpoint-accent: #1793d1; }
.endpoint-rocky { --endpoint-accent: #10b76f; }
.endpoint-ubuntu { --endpoint-accent: #e95420; }
.endpoint-card header { min-height: 79px; }
.endpoint-card > a, .endpoint-card > div { flex: 1 0 52px; }
.endpoint-card > div:last-child { margin-top: auto; }
.endpoint-card > a::after { content: "→"; justify-self: end; color: var(--endpoint-accent); font-weight: 800; }
.endpoint-card > a, .endpoint-card > div { grid-template-columns: 70px minmax(0, 1fr) auto; }
.endpoint-card > div code { grid-column: 2 / -1; }
.community-strip { box-shadow: 0 8px 24px rgba(20,18,42,.04); }

@media (max-width: 1050px) {
  .usage-grid { grid-template-columns: 1fr; gap: 34px; }
  .usage-copy { max-width: 720px; }
  .usage-copy h2, .usage-copy p { max-width: 680px; }
}
@media (max-width: 650px) {
  .usage { padding: 64px 0; }
  .config-tabs { grid-template-columns: repeat(2, 1fr); }
  .config-panel .code-head { align-items: center; }
  .config-panel .code-head span { max-width: 62%; }
  .config-panel pre { min-height: 280px; max-height: 420px; padding: 18px; font-size: 10.5px; }
  .config-notice { align-items: flex-start; }
  .endpoint-card > a, .endpoint-card > div { grid-template-columns: 64px minmax(0, 1fr) auto; }
}


/* Keep unpublished Rocky paths visible but non-actionable during initial sync. */
a.repository-link-pending { cursor: not-allowed; }
.service-row.repository-link-pending, .endpoint-card > a.repository-link-pending { color: #858095; background: #faf9fc; pointer-events: none; }
.endpoint-card > a.repository-link-pending::after { content: "Syncing"; color: #9a94a7; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.repo-footer a.repository-link-pending { opacity: .56; filter: saturate(.25); pointer-events: none; }
