/* ============================================================
   Hytale Practical Wiki — global stylesheet
   Design intent: mature game-community wiki. Content first,
   compact navigation, real tables and lists. No marketing
   hero treatment, no gradient panels, no icon-driven cards.
   Palette: official Hytale brand colors extracted from
   hytale.com global.css (--color-hytale-* tokens).
   ============================================================ */

:root {
  --paper: #162039;         /* hytale-bg-dark, page background */
  --content-bg: #131c2e;    /* inset panels: hero, table cells */
  --ink: #d6e4ef;           /* body text, brightened from hytale-text */
  --ink-soft: #b7cedd;      /* hytale-text */
  --ink-faint: #9eb2c0;     /* hytale-text-muted */
  --line: #36455c;          /* hytale-border-separator */
  --line-soft: #243349;
  --accent: #d29f32;        /* hytale-gold, used sparingly */
  --accent-dark: #edb548;   /* hytale-gold-light, hover shade on dark bg */
  --link: #79b8ff;          /* hytale-link */
  --link-hover: #a3c9ff;
  --amber: #edb548;         /* hytale-gold-light */
  --amber-bg: #292415;      /* dark gold-tinted callout */
  --red: #e8907f;
  --red-bg: #2e1a1a;
  --note-bg: #1d3150;       /* hytale-bg-skeleton */
  --note-border: #4d6a8c;
  --head-bg: #0b1621;       /* hytale-bg-overlay */
  --head-ink: #b7cedd;
  --code-bg: #0e1a2c;
  --maxw: 1180px;
  --article-maxw: 840px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- header ---------- */

.site-head { background: var(--head-bg); color: var(--head-ink); }

.head-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .2px;
  white-space: nowrap;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .logo { width: 28px; height: 28px; border-radius: 7px; flex: 0 0 28px; }
.brand-text { display: inline-block; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; color: #edb548; font-weight: 500; }

.main-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.main-nav a {
  color: var(--head-ink);
  padding: 12px 11px;
  font-size: 14px;
  border-bottom: 3px solid transparent;
}
.main-nav a:hover { color: #fff; text-decoration: none; background: #1d3150; }
.main-nav a.is-active { color: #fff; border-bottom-color: var(--accent); }

.head-search { margin-left: auto; display: flex; padding: 8px 0; }
.head-search input {
  width: 230px;
  padding: 6px 10px;
  border: 1px solid #36455c;
  background: #151e2c;
  color: #d6e4ef;
  font-size: 13.5px;
  border-radius: 2px 0 0 2px;
}
.head-search input::placeholder { color: #6b7f93; }
.head-search input:focus { outline: 1px solid var(--accent); }
.head-search button {
  border: 1px solid #36455c;
  border-left: none;
  background: #1d3150;
  color: #b7cedd;
  font-size: 13.5px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
}
.head-search button:hover { background: #26405f; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #36455c;
  color: var(--head-ink);
  padding: 5px 12px;
  font-size: 13.5px;
  cursor: pointer;
  border-radius: 2px;
}

.head-sub {
  background: #10161e;
  border-top: 1px solid #0b1621;
}
.head-sub-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5px 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
}
.head-sub-inner > span { color: #6b7f93; }
.head-sub-inner a { color: #9eb2c0; }
.head-sub-inner a:hover { color: #edb548; }

/* ---------- layout ---------- */

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 16px 56px;
}

.crumbs {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 4px 0 14px;
}
.crumbs a { color: var(--ink-soft); }
.crumbs .sep { margin: 0 6px; color: #56687e; }

.cols { display: flex; gap: 34px; align-items: flex-start; }
.article { flex: 1 1 auto; min-width: 0; max-width: var(--article-maxw); }
.aside { flex: 0 0 246px; position: sticky; top: 14px; }
.aside section + section { margin-top: 22px; }
.aside h3 {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 5px;
}
.aside ul { list-style: none; margin: 0; padding: 0; }
.aside li { margin: 0; font-size: 13.5px; padding: 3.5px 0; border-bottom: 1px dotted var(--line-soft); }
.aside li:last-child { border-bottom: none; }
.aside li.lvl3 { padding-left: 14px; font-size: 13px; color: var(--ink-soft); }

/* ---------- typography ---------- */

.article h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 6px 0 10px;
  color: var(--ink);
  letter-spacing: -.2px;
}
.article h2 {
  font-size: 21px;
  margin: 34px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.article h3 { font-size: 16.5px; margin: 24px 0 8px; }
.article h4 { font-size: 15px; margin: 18px 0 6px; color: var(--ink-soft); }

.article p { margin: 0 0 14px; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 24px; }
.article li { margin-bottom: 6px; }
.article li > ul, .article li > ol { margin-top: 6px; margin-bottom: 4px; }

.article > .lead {
  font-size: 17.5px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 46em;
}

.article dl { margin: 0 0 16px; }
.article dt { font-weight: 600; margin-top: 10px; }
.article dd { margin: 2px 0 0 0; color: var(--ink-soft); }

.meta-line {
  font-size: 13px;
  color: var(--ink-faint);
  margin: -6px 0 18px;
}

/* article byline (collective) + improve-this-page entry */
.byline {
  font-size: 12.5px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
  margin: 0 0 18px;
}
.byline .who { color: var(--ink-soft); font-weight: 600; }
.byline .fact { color: var(--accent); }
.improve {
  margin-top: 36px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.improve a { font-weight: 600; }

/* report form on /contribute/ — same restrained field style as the rest
   of the site: visible labels, one required marker, real validation states */
.report-form { margin: 16px 0 6px; max-width: 620px; }
.report-form .field { margin-bottom: 16px; }
.report-form label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.report-form .req { color: var(--accent); }
.report-form .hint { font-weight: 400; color: var(--ink-faint); font-size: 12.5px; }
.report-form input[type="text"],
.report-form input[type="email"],
.report-form input[type="url"],
.report-form select,
.report-form textarea {
  width: 100%;
  padding: 9px 11px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--content-bg);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.report-form textarea { resize: vertical; min-height: 118px; }
.report-form input:focus,
.report-form select:focus,
.report-form textarea:focus { outline: none; border-color: var(--accent); }
.report-form .counter { text-align: right; font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }
.report-form .counter.near { color: var(--accent); }
.report-form .actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-form .btn-primary {
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  background: var(--accent);
  color: #10161e;
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
}
.report-form .btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.report-form .form-note { font-size: 12.5px; color: var(--ink-faint); }
.report-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.report-form .field-error input,
.report-form .field-error select,
.report-form .field-error textarea { border-color: var(--red); }
.report-status { font-size: 13.5px; margin: 14px 0 0; }
.report-status:empty { margin: 0; }
.report-status.ok { color: #8ed49b; }
.report-status.err { color: var(--red); }
.report-status.warn { color: var(--accent); }
.meta-line .tag {
  display: inline-block;
  border: 1px solid var(--line);
  background: #1d3150;
  padding: 1px 8px;
  border-radius: 2px;
  color: var(--ink-soft);
  margin-left: 6px;
}

code {
  font: 13px/1.5 Consolas, "SF Mono", Menlo, monospace;
  background: var(--code-bg);
  border: 1px solid var(--line-soft);
  padding: 1px 5px;
  border-radius: 2px;
}
pre {
  background: #0b1621;
  color: #cfe0ee;
  padding: 13px 15px;
  border-radius: 3px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}
pre code { background: none; border: none; color: inherit; padding: 0; }

hr { border: none; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------- callouts (text-first, no icons) ---------- */

.note, .warn, .alert {
  padding: 11px 15px;
  margin: 0 0 16px;
  border-radius: 2px;
  font-size: 15px;
}
.note { background: var(--note-bg); border-left: 4px solid var(--note-border); }
.warn { background: var(--amber-bg); border-left: 4px solid #fa9b36; }
.alert { background: var(--red-bg); border-left: 4px solid #e8907f; }
.note .label, .warn .label, .alert .label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.note .label { color: #8fb3d9; }
.warn .label { color: var(--amber); }
.alert .label { color: var(--red); }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin: 0 0 18px; }
table.data {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  background: var(--content-bg);
}
table.data th, table.data td {
  border: 1px solid var(--line);
  padding: 7px 11px;
  text-align: left;
  vertical-align: top;
}
table.data th {
  background: #1d3150;
  font-size: 13.5px;
  letter-spacing: .02em;
  color: #cfe0ee;
}
table.data tr:nth-child(even) td { background: #182642; }

/* ---------- section blocks & lists used on hubs/home ---------- */

.sect { margin-top: 38px; }
.sect-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 4px;
  padding-bottom: 6px;
}
.sect-head h2 {
  font-size: 19px;
  margin: 0;
  border: none;
  padding: 0;
}
.sect-head .more { font-size: 13px; margin-left: auto; }
.sect-head .kicker {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.plain-list { list-style: none; padding: 0; margin: 12px 0 0; }
.plain-list li {
  padding: 8px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}
.plain-list li:last-child { border-bottom: none; }
.plain-list a { font-weight: 600; display: inline-flex; align-items: flex-start; gap: 9px; }
.plain-list .desc { display: block; color: var(--ink-soft); font-weight: 400; font-size: 14px; margin-top: 1px; }

/* page-type icons (gold stroke, flat) */
.ti {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 3.5px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.aside li a { display: inline-flex; align-items: flex-start; gap: 7px; }
.aside li .ti { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 3px; stroke: #b08a2a; }

.two-col { display: flex; gap: 40px; flex-wrap: wrap; }
.two-col > div { flex: 1 1 320px; min-width: 280px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 36px; }

/* ---------- home hero (functional, not marketing) ---------- */

.hero {
  background: var(--content-bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 30px 32px 26px;
  margin-bottom: 8px;
}
.hero h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: -.3px; }
.hero p {
  font-size: 16.5px;
  color: var(--ink-soft);
  margin: 0 0 20px;
  max-width: 52em;
}
.hero form { display: flex; max-width: 560px; }
.hero input[type="search"], .hero input[type="text"] {
  flex: 1;
  padding: 11px 14px;
  font-size: 15.5px;
  border: 2px solid #36455c;
  border-right: none;
  border-radius: 2px 0 0 2px;
  background: #0b1621;
  color: #d6e4ef;
}
.hero input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.hero button {
  padding: 11px 22px;
  font-size: 15px;
  background: var(--accent);
  color: #10161e;
  border: 2px solid var(--accent);
  cursor: pointer;
  border-radius: 0 2px 2px 0;
}
.hero button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- updates feed ---------- */

.update-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.update-item:first-of-type { border-top: 1px solid var(--line); }
.update-item .date { font-size: 13px; color: var(--ink-faint); font-weight: 600; letter-spacing: .03em; }
.update-item h3 { margin: 2px 0 4px; font-size: 16px; }
.update-item p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.update-item ul { margin: 6px 0 0; padding-left: 20px; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- steps ---------- */

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 18px; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 4px 0 14px 46px;
  border-bottom: 1px dashed var(--line-soft);
  margin: 0;
}
ol.steps > li:last-child { border-bottom: none; }
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: #131c2e;
}

/* ---------- FAQ (only where genuine) ---------- */

.faq { border-top: 1px solid var(--line); }
.faq > div { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq h3 { margin: 0 0 5px; font-size: 15.5px; }
.faq p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- footer ---------- */

.site-foot { background: #10161e; color: #9eb2c0; margin-top: 40px; }
.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 16px 26px;
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}
.foot-col { flex: 1 1 150px; min-width: 150px; }
.foot-col h4 {
  color: #d6e4ef;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 9px;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.foot-col li { margin-bottom: 6px; }
.foot-col a { color: #9eb2c0; }
.foot-col a:hover { color: #edb548; }
.foot-legal {
  border-top: 1px solid #36455c;
  font-size: 12.5px;
  color: #6b7f93;
}
.foot-legal-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.foot-legal a { color: #8fa8bd; }

/* ---------- search page ---------- */

.search-page .result { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.search-page .result h3 { margin: 0 0 2px; font-size: 16.5px; }
.search-page .result p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.search-page .result .u { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .aside { display: none; }
  .head-search { margin-left: 0; width: 100%; order: 5; }
  .head-search input { flex: 1; width: auto; }
  .head-inner { gap: 10px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; order: 2; margin-left: auto; }
  .main-nav {
    display: none;
    order: 6;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 8px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 4px; border-bottom: none; border-left: 3px solid transparent; }
  .main-nav a.is-active { border-left-color: var(--accent); }
  .head-sub-inner { display: none; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 25px; }
  .article h1 { font-size: 24px; }
  .article h2 { font-size: 19px; }
  .two-col { gap: 24px; }
  .page { padding-bottom: 40px; }
}
