:root {
  --bg: #ffffff;
  --ink: #222;
  --muted: #5b5b5b;
  --card: #f7f7f9;
  --line: #e9e9ee;
  /* CloudMine accents */
  --red: #e53935;
  --blue: #1e88e5;
  --green: #43a047;
  --purple: #8e24aa;
  --orange: #ffa500;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --radius: 14px;

  /* Color palette for newuser guide */
  --border: #e5e7eb; /* gray-200 */
  --accent-1: #e11d48; /* red */
  --accent-2: #2563eb; /* blue */
  --accent-3: #059669; /* green */
  --accent-4: #7c3aed; /* purple */
  --accent-grad: linear-gradient(
    90deg,
    var(--accent-1),
    var(--accent-2),
    var(--accent-3),
    var(--accent-4)
  );
  --content: 1200px; /* match your main's width */
  --pad: 16px;       /* match your main's side padding */
}
html,
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    "Noto Sans", sans-serif;
  margin: 0;
}
h1 .cloud{color:#111827}
h1 .mine{color:#2BA3B2;}
/* Header keeps its full-width gradient exactly as-is */
.site-header { background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%); }

/* Shift only the logo */
.site-header .site-logo{
  height: 64px; width: auto; display: block;
  /* Move logo to the same left edge as <main>, but never less than 12px on tiny screens */
  margin-left: clamp(12px, (100vw - var(--content)) / 2 + var(--pad), 2000px);
}
header {
  padding: 40px 22px 22px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  color: white;
}
header h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.5vw, 40px);
  letter-spacing: 0.2px;
}
header p {
  margin: 0;
  opacity: 0.9;
}
.site-logo {
  height: 64px; /* pick your size */
  width: auto; /* keep aspect ratio */
  display: block;
}
main {
  padding: 30px 20px 80px;
  max-width: 1200px;
  margin: auto;
}
.note {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 12px;
  margin: 18px 0;
}
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  color: white;
  margin-right: 8px;
}
.pill.default {
  background: var(--muted);
}
.pill.member {
  background: var(--blue);
}
.pill.builder {
  background: var(--green);
}
.pill.staff {
  background: var(--purple);
}
.pill.admin {
  background: var(--orange);
}
.pill.owner {
  background: var(--red);
}
nav.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 26px;
}
nav.toc a {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
}
section.group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}
section.rulegroup {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}
section.group h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
}
section.group p.purpose {
  margin: 6px 0 12px;
  color: var(--muted);
}
details {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 10px 0;
  overflow: hidden;
}
details > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  list-style: none;
}
details[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  text-align: left;
  font-size: 0.92rem;
  color: #333;
}
td code {
  background: #f0f0f5;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;
}
.hint {
  font-size: 0.9rem;
  color: var(--muted);
}
footer {
  max-width: 1100px;
  margin: 40px auto 70px;
  padding: 0 20px;
  color: var(--muted);
}

/* --- Horizontal Nav --- */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
#site-nav .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
#site-nav .menu {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
#site-nav .menu > li {
  position: relative;
}
#site-nav .menu > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
  border-radius: 12px;
}
#site-nav .menu > li > a:hover {
  background: #fff;
  box-shadow: var(--shadow);
}
#site-nav .menu > li.has-dd > a::after {
  content: "▾";
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 4px;
}

/* Dropdown */
#site-nav .dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow);
  display: none;
}
#site-nav .menu > li:hover .dropdown,
#site-nav .menu > li:focus-within .dropdown {
  display: block;
}

#site-nav .dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
#site-nav .dropdown a:hover {
  background: var(--card);
}

/* Colored dots to match your group “pills” */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.default {
  background: var(--muted);
}
.dot.member {
  background: var(--blue);
}
.dot.builder {
  background: var(--green);
}
.dot.vip {
  background: var(--purple);
}
.dot.staff {
  background: var(--red);
}
.dot.admin {
  background: #222;
}
.dot.owner {
  background: linear-gradient(90deg, var(--blue), var(--purple));
}

/* Optional: compact on small screens */
@media (max-width: 720px) {
  #site-nav .menu {
    overflow: auto;
    padding: 6px 0;
  }
  #site-nav .menu > li > a {
    padding: 8px 10px;
  }
}

/* --- Fix hover gap + layering + smooth open --- */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
} /* already there, keeping */

#site-nav .menu > li {
  position: relative;
}

/* Invisible "hover bridge" to prevent flicker if any tiny gap exists */
#site-nav .menu > li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px; /* bridge size */
  pointer-events: none; /* don't block clicks */
}

/* Dropdown: remove physical gap; use translate for the visual offset */
#site-nav .dropdown {
  position: absolute;
  left: 0;
  top: 100%; /* was calc(100% + 6px) — remove the gap */
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow);
  z-index: 1000; /* make sure it stays above content */

  /* smooth open without creating hover gaps */
  display: block; /* keep in flow for transition */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.12s ease, transform 0.12s ease,
    visibility 0s linear 0.12s;
}

/* Show on hover or keyboard focus */
#site-nav .menu > li:hover .dropdown,
#site-nav .menu > li:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.discord-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #7289da; /* Discord blue */
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.discord-button:hover {
  background-color: #5b6eae; /* Darker blue for hover effect */
}

.discord-button:active {
  background-color: #4c5a8c; /* Even darker blue for active state */
}
.wrapper {
  overflow: hidden;
}

.discord-link {
  display: inline;
  clear: both;
}
.hover-text-gritty {
  position: relative; /* Needed for absolute positioning of the image */
  cursor: pointer;
  color: blue;
  text-decoration: underline;
}
.hover-text-gritty img {
  position: absolute;
  bottom: 100%; /* Push image below the text */
  left: 0;
  display: none; /* Hide image by default */
  width: 150px; /* Adjust size as needed */
  border: 1px solid #ccc;
  background: white;
  padding: 5px;
  z-index: 10; /* Keep it above other elements */
}

.hover-text-gritty:hover img {
  display: block; /* Show image when hovering over text */
}
/* Begin table of contents for rules page */
.toc {
  list-style-type: none;
  padding-left: 0;
}
.toc li {
  margin: 10px 0;
}
.toc a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}
.toc a:hover {
  color: #007bff;
}
.back-to-top {
  float: right;
  margin-bottom: 10px;
  font-size: 10px;
}
.back-to-top a {
  text-decoration: none;
  /* font-size: 14px; */
  color: #007bff;
}
.back-to-top a:hover {
  color: #0056b3;
}
/* End table of contents for rules page */
a.servbutton {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 10px;
  background: green;
  color: white;
  text-decoration: none;
  border-radius: 8px;
}
footer {
  text-align: center;
  margin: 20px 0;
  color: #666;
}

/* Begin NEW User Guide CSS */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
.brand img {
  height: 42px;
  width: auto;
}
.brand h1 {
  margin: 0;
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 34px;
  letter-spacing: 0.5px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
}
nav a {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}
nav a:hover {
  border-color: #c7cad1;
}

.hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}
.hero h2 {
  margin: 0 0 8px 0;
  font-family: "Bebas Neue";
  font-size: 40px;
  letter-spacing: 0.5px;
}
.nu-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
}
.card {
  grid-column: span 12;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.card h3 {
  margin: 0 0 6px 0;
  font-size: 22px;
}
.card .hd {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(0deg, #fff, #fff), var(--accent-grad);
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
  border-radius: 16px 16px 0 0;
}
.card .bd {
  padding: 18px;
}
.card .ft {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: #fafafa;
  border-radius: 0 0 16px 16px;
}

.two-col {
  display: grid;
  gap: 16px;
}
@media (min-width: 820px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.steps {
  counter-reset: step;
}
.steps li {
  list-style: none;
  margin: 12px 0;
  padding-left: 36px;
  position: relative;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 700;
}

code,
.kbd {
  font-family: ui-monospace, SFMono-Regular, Consolas, Monaco, Monospace;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.2em 0.4em;
  font-size: 0.95em;
}
pre {
  background: #0b1220;
  color: #d1e5ff;
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
  border: 1px solid #0f1a33;
}
pre code {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
}

.copybtn {
  float: right;
  margin-left: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 6px 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.copybtn[aria-live] {
  min-width: 90px;
}

.callout {
  border-left: 4px solid var(--accent-2);
  background: #eef2ff;
  padding: 12px 14px;
  border-radius: 8px;
  color: #1e3a8a;
}
.warn {
  border-left: 4px solid var(--accent-1);
  background: #fff1f2;
  color: #9f1239;
}
.ok {
  border-left: 4px solid var(--accent-3);
  background: #ecfdf5;
  color: #065f46;
}

.nu-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nu-toc a {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.nu-toc a:hover {
  border-color: #c7cad1;
}

.kbd {
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
}
.small {
  color: var(--muted);
  font-size: 14px;
}
/* End NEW User Guide CSS */
