/* IDCloudHost Mirror — "Premium Infrastructure Console" (dark navy only).
   Old token names (--paper, --surface, --ink, --mute, --line, --link …) are kept so the
   directory-listing pages that share this file keep working. */
:root {
  /* surfaces */
  --paper: #080F1D;        /* page */
  --paper-2: #0D1829;      /* alternate section */
  --surface: #132339;      /* cards, inputs */
  --surface-2: #192C44;    /* hover / elevated */
  --accent-soft: #153B60;  /* subtle blue fill */
  /* lines */
  --line: #29415B;
  --line-hover: #44668B;
  /* text */
  --ink: #F2F7FC;          /* headings, primary */
  --mute: #A8BAD0;         /* descriptions */
  --faint: #8397AE;        /* metadata */
  /* brand */
  --brand: #3999F7;
  --link: #7DB9F9;
  /* status */
  --fresh: #34C99A;
  --busy: #66A8F8;
  --stale: #F0B653;
  --fail: #F0707A;
  --idle: #8394A9;
  /* terminal */
  --term: #0A1322;
  --term-ink: #E3ECF5;
  --term-dim: #8FA3BA;
  --term-ok: #4FD1A5;
  /* type */
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* shape + motion */
  --r-sm: 6px; --r-md: 10px; --r-lg: 12px; --r-xl: 14px;
  --ease: cubic-bezier(.2, .6, .2, 1);
  --t: 160ms;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
code, pre, kbd { font-family: var(--mono); font-size: .875em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* header */
.top { background: #0A1424; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); padding: 6px 0; }
.brand img { height: 38px; width: auto; display: block; }
.brand span { font-weight: 600; font-size: .9375rem; padding-left: 14px; border-left: 1px solid var(--line); }
.top nav { display: flex; gap: 4px; }
.top nav a {
  color: var(--mute); text-decoration: none; font-size: .875rem; font-weight: 500; letter-spacing: .01em;
  padding: 10px 14px; border-radius: var(--r-md); transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.top nav a:hover { color: var(--ink); background: var(--surface); }

/* hero */
.hero { padding: 88px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.12fr 1fr; gap: 64px; align-items: center; }
.hero h1 {
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin: 0 0 24px;
  max-width: 13ch;
  text-wrap: balance;
}
.hero p.lede { font-size: 1.0625rem; line-height: 1.7; color: var(--mute); margin: 0 0 36px; max-width: 520px; }
.facts { display: flex; flex-wrap: wrap; row-gap: 16px; margin: 0; padding: 0; }
.facts > div { padding: 0 28px; border-left: 1px solid var(--line); }
.facts > div:first-child { padding-left: 0; border-left: 0; }
.facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 1rem; font-weight: 600; color: var(--ink); }

/* terminal */
.term {
  background: linear-gradient(180deg, #0E1A2C 0%, var(--term) 100%);
  color: var(--term-ink);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .7);
  overflow: hidden;
  font-family: var(--mono);
  font-size: .8125rem;
  line-height: 1.75;
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); background: rgba(255, 255, 255, .015); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #233650; display: block; }
.term-bar i:first-child { background: var(--brand); }
.term-bar b { margin-left: 8px; font-weight: 400; color: var(--term-dim); font-size: .75rem; }
.term-bar button {
  margin-left: auto; background: transparent; border: 1px solid var(--line); color: var(--term-dim);
  font: 500 .75rem var(--mono); padding: 4px 10px; border-radius: var(--r-sm); cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.term-bar button:hover { color: var(--term-ink); border-color: var(--line-hover); }
.term pre { margin: 0; padding: 20px 22px 24px; min-height: 240px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: inherit; }
.term .p { color: var(--brand); }
.term .d { color: var(--term-dim); }
.term .u { color: var(--term-ink); }
.term .ok { color: var(--term-ok); }
.term .cur { display: inline-block; width: .6em; background: var(--term-ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* mirror section */
section.block { padding: 80px 0 88px; background: var(--paper-2); border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 32px; margin-bottom: 28px; flex-wrap: wrap; }
.block-head h2 { font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 8px; }
.tools-head { font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin: 40px 0 16px; }
.block-head p { margin: 0; color: var(--mute); font-size: .9375rem; max-width: 60ch; }
.block-head em { font-style: normal; color: var(--ink); font-weight: 600; }

.filter {
  font: inherit; font-size: .9375rem; color: var(--ink); background-color: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  height: 46px; padding: 0 14px 0 42px; width: min(320px, 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238397AE' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.75'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px center; background-size: 16px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.filter::placeholder { color: var(--faint); }
.filter:hover { border-color: var(--line-hover); }
.filter:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(57, 153, 247, .25); }

/* status legend: one integrated reference strip */
.legend {
  list-style: none; display: inline-flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0;
  padding: 9px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.legend .state { font-size: .8125rem; }
.legend .state.fresh, .legend .state.busy, .legend .state.stale, .legend .state.fail { color: var(--mute); }

/* status indicator */
.state { font-size: .875rem; font-weight: 500; display: flex; align-items: center; gap: 8px; color: var(--mute); }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: transparent; box-shadow: inset 0 0 0 1.5px var(--idle); }
.state.fresh { color: var(--fresh); } .state.fresh::before { background: var(--fresh); box-shadow: none; }
.state.busy  { color: var(--busy); }  .state.busy::before  { background: var(--busy);  box-shadow: none; }
.state.stale { color: var(--stale); } .state.stale::before { background: var(--stale); box-shadow: none; }
.state.fail  { color: var(--fail); }  .state.fail::before  { background: var(--fail);  box-shadow: none; }

/* repository rows */
.distros { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.distro, .distros .empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.distro:hover { border-color: var(--line-hover); background: var(--surface-2); }
.row {
  display: grid;
  grid-template-columns: 56px minmax(200px, 1.5fr) 96px minmax(170px, 1.15fr) 150px auto;
  align-items: center; column-gap: 20px; min-height: 80px; padding: 14px 20px 14px 0;
}
.logo {
  justify-self: end; align-self: center; width: 36px; height: 36px; margin-left: 16px; border-radius: var(--r-md); flex: none;
  background: color-mix(in srgb, var(--cd, var(--brand)) 14%, transparent);
  position: relative;
}
.logo::after {
  content: ""; position: absolute; inset: 5px; background: var(--cd, var(--brand));
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.name { font-size: 1.03125rem; font-weight: 650; line-height: 1.35; color: var(--ink); min-width: 0; }
.name small { display: block; margin-top: 3px; font-size: .8125rem; font-weight: 400; color: var(--faint); }
.pm {
  justify-self: start; font-family: var(--mono); font-size: .75rem; font-weight: 500; line-height: 1;
  color: var(--mute); background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 8px;
}
.links { display: flex; gap: 18px; font-size: .875rem; font-weight: 500; white-space: nowrap; }
.links a { color: var(--link); text-decoration: none; padding: 4px 0; transition: color var(--t) var(--ease); }
.links a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }

/* primary action */
.use {
  font: 600 .84375rem var(--sans); height: 38px; padding: 0 16px; cursor: pointer; white-space: nowrap;
  color: #CFE5FF; background: var(--accent-soft); border: 1px solid #24527F; border-radius: var(--r-md);
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.use:hover { background: #1A4875; border-color: var(--brand); color: #fff; }
.use:active { background: #133557; }
.use[aria-expanded="true"] { background: var(--brand); border-color: var(--brand); color: #04101E; }

/* expanded "Cara pakai" panel */
.how { padding: 4px 20px 20px 24px; border-top: 1px solid var(--line); }
.how[hidden] { display: none; }
.how p { margin: 16px 0 12px; color: var(--mute); font-size: .9375rem; max-width: 72ch; }
.snip { position: relative; }
.snip pre {
  margin: 0; background: var(--term); color: var(--term-ink); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px; overflow-x: auto; line-height: 1.7; font-size: .8125rem;
}
.snip pre .c { color: var(--term-dim); }
.copy {
  position: absolute; top: 10px; right: 10px; font: 600 .75rem var(--sans);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 5px 10px; cursor: pointer; transition: border-color var(--t) var(--ease);
}
.copy:hover { border-color: var(--line-hover); }
.empty { padding: 28px 20px; color: var(--mute); }

/* status note */
.note {
  margin: 24px 0 0; max-width: 72ch; padding: 14px 16px;
  color: var(--mute); font-size: .875rem; line-height: 1.65;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--stale); border-radius: var(--r-md);
}
.note strong { color: var(--ink); font-weight: 600; }

/* footer */
footer { background: var(--paper); border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--faint); font-size: .8125rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; align-items: center; }

/* directory listing (fancyindex) */
.crumbs { padding: 40px 0 20px; }
.crumbs h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; word-break: break-all; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--mono); font-size: .8125rem; color: var(--mute); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line-hover); }
.listing { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; margin-bottom: 56px; }
#list { width: 100%; border-collapse: collapse; font-size: .9375rem; }
#list th { text-align: left; font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#list th a { color: inherit; text-decoration: none; }
#list th a:hover { color: var(--ink); }
#list td { padding: 9px 16px; border-top: 1px solid var(--line); white-space: nowrap; }
#list tbody tr:first-child td { border-top: 0; }
#list tbody tr:hover { background: var(--surface-2); }
#list td.link a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
#list td.link a:hover { color: var(--link); text-decoration: underline; }
#list td.link a::before {
  content: ""; width: 16px; height: 16px; flex: none; background: var(--faint);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 1h5l4 4v10H4z' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E");
}
#list td.link a[href$="/"]::before {
  background: var(--brand);
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 3h5l1.5 1.5H15V14H1z' fill='black'/%3E%3C/svg%3E");
}
#list td.size, #list td.date { font-family: var(--mono); font-size: .8125rem; color: var(--faint); }
#list td.size { text-align: right; }

/* responsive */
@media (max-width: 1100px) {
  .wrap { padding: 0 32px; }
  .hero .wrap { gap: 44px; }
  .row { grid-template-columns: 56px minmax(170px, 1.4fr) 84px minmax(150px, 1.1fr) 128px auto; column-gap: 16px; }
}
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .hero { padding: 64px 0 72px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 16ch; }
  section.block { padding: 64px 0 72px; }
  /* card stacks: name + action, then package manager, status, links */
  .row {
    grid-template-columns: 56px 1fr auto;
    grid-template-areas: "s n u" "s p p" "s t t" "s l l";
    row-gap: 10px; column-gap: 16px; min-height: 0; padding: 16px 16px 16px 0;
  }
  .logo { grid-area: s; align-self: start; }
  .name { grid-area: n; }
  .use { grid-area: u; align-self: start; }
  .pm { grid-area: p; }
  .state { grid-area: t; }
  .links { grid-area: l; }
  .links:empty { display: none; }
  .top nav { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .brand img { height: 34px; }
  .brand span { font-size: .875rem; padding-left: 10px; }
  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
  .facts > div { padding: 0 18px; }
  .term { font-size: .75rem; }
  .term pre { padding: 16px; min-height: 220px; }
  .block-head h2, .tools-head { font-size: 1.625rem; }
  .filter { width: 100%; height: 48px; }
  .legend { display: flex; }
  .use { height: 44px; }
  .links a { padding: 10px 0; }
  .how { padding-left: 16px; padding-right: 16px; }
  #list td.date, #list th:nth-child(3) { display: none; }
}
@media (max-width: 360px) {
  .facts > div { padding: 0 12px; }
  .row { grid-template-columns: 56px 1fr; grid-template-areas: "s n" "s p" "s t" "s l" "s u"; }
  .use { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .term .cur { animation: none; }
}
