:root {
  color-scheme: dark;
  --bg: #10120f;
  --surface: #181b17;
  --surface-strong: #20241e;
  --surface-soft: #141713;
  --text: #f0f1ec;
  --muted: #a3aa9e;
  --faint: #737a70;
  --line: #343a31;
  --line-strong: #4a5145;
  --accent: #d4aa55;
  --accent-strong: #edc36e;
  --teal: #67b7a6;
  --danger: #df766d;
  --danger-soft: #351d1b;
  --success: #75bb83;
  --focus: #f1ca78;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 6px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

[hidden],
.hidden {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(74, 81, 69, 0.78);
  background: rgba(16, 18, 15, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  min-height: 64px;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 24px;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 11px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #7b6536;
  border-radius: 4px;
  color: #16140e;
  background: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.site-nav {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  align-items: stretch;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  min-height: 40px;
  padding: 0 12px;
  align-items: center;
  gap: 7px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-link svg,
.button svg,
.icon-button svg,
.field-icon svg,
.stat-icon svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.header-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 8px;
}

.page-main {
  min-height: calc(100vh - 130px);
}

.container {
  width: min(100% - 48px, var(--content));
  margin-inline: auto;
}

.button,
.icon-button {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-strong);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease,
    color 120ms ease, transform 120ms ease;
}

.button {
  display: inline-flex;
  min-height: 40px;
  padding: 8px 13px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.button:hover,
.icon-button:hover {
  border-color: #67705f;
  background: #292e26;
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button-primary {
  border-color: #ba9143;
  color: #17140e;
  background: var(--accent);
}

.button-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button-danger {
  border-color: #72403b;
  color: #ffd9d5;
  background: var(--danger-soft);
}

.button-quiet {
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.button-sm {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.button[disabled],
.icon-button[disabled] {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
}

.hero {
  position: relative;
  display: flex;
  min-height: 430px;
  overflow: hidden;
  align-items: center;
  isolation: isolate;
  background: #11130f url("../images/raid-hall-hero.webp") center / cover no-repeat;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(9, 11, 9, 0.46);
}

.hero-content {
  width: min(100% - 48px, var(--content));
  margin: 0 auto;
  padding: 54px 0 58px;
}

.eyebrow {
  display: flex;
  margin: 0 0 12px;
  align-items: center;
  gap: 9px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  content: "";
  background: var(--accent);
}

.hero h1 {
  max-width: 640px;
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.08;
}

.hero-lead {
  max-width: 580px;
  margin: 18px 0 0;
  color: #d3d7cf;
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  margin-top: 26px;
  flex-wrap: wrap;
  gap: 10px;
}

.raid-strip {
  border-bottom: 1px solid var(--line);
  background: #151814;
}

.raid-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.raid-fact {
  min-width: 0;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.raid-fact:first-child {
  border-left: 1px solid var(--line);
}

.raid-fact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.raid-fact strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.content-band {
  padding: 52px 0;
}

.content-band-alt {
  border-block: 1px solid var(--line);
  background: var(--surface-soft);
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.section-heading p {
  max-width: 600px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 36px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tool-item {
  display: grid;
  min-height: 112px;
  padding: 16px;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tool-item:hover {
  border-color: #646d5d;
  background: var(--surface-strong);
}

.tool-icon,
.stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #5f5339;
  border-radius: 4px;
  color: var(--accent-strong);
  background: #292419;
}

.tool-copy {
  min-width: 0;
}

.tool-copy strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.tool-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.tool-copy small {
  display: inline-block;
  margin-top: 10px;
  color: var(--teal);
  font-size: 11px;
}

.tool-arrow {
  margin-top: 2px;
  color: var(--faint);
}

.tool-arrow svg {
  width: 17px;
  height: 17px;
}

.side-stack {
  display: grid;
  align-content: start;
  gap: 28px;
}

.subsection-title {
  display: flex;
  margin: 0 0 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.subsection-title a {
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
}

.feed-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.feed-item {
  display: grid;
  padding: 14px 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.feed-item strong {
  display: block;
  font-size: 13px;
}

.feed-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-line;
}

.feed-item time {
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.recruitment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  align-items: start;
  gap: 52px;
}

.recruitment-copy h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.recruitment-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.check-list {
  display: grid;
  margin: 24px 0 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 22px;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d6dad2;
  font-size: 13px;
}

.check-list svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}

.contact-panel {
  padding: 19px;
  border-left: 3px solid var(--accent);
  background: var(--surface-strong);
}

.contact-panel h3 {
  margin: 0 0 13px;
  font-size: 15px;
}

.contact-row {
  display: flex;
  padding: 8px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.contact-row strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--faint);
  background: #0d0f0c;
}

.footer-inner {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
}

.page-header {
  padding: 42px 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.page-header-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.page-header h1 {
  margin: 0;
  font-size: 30px;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-field {
  position: relative;
  width: min(100%, 360px);
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px 9px 39px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
}

.search-field input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}

.guide-list {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.guide-item {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-item[open] {
  border-color: var(--line-strong);
}

.guide-summary {
  display: grid;
  min-width: 0;
  min-height: 62px;
  padding: 14px 16px;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

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

.guide-summary strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.guide-summary time {
  color: var(--muted);
  font-size: 12px;
}

.guide-summary svg {
  width: 17px;
  color: var(--faint);
  transition: transform 120ms ease;
}

.guide-item[open] .guide-summary > svg {
  transform: rotate(180deg);
}

.guide-content {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 4px 16px 20px;
  border-top: 1px solid var(--line);
  color: #c6cbc1;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.guide-content > :first-child {
  margin-top: 16px;
}

.guide-content p,
.guide-content ul,
.guide-content ol,
.guide-content blockquote {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}

.guide-content ul,
.guide-content ol {
  padding-left: 1.5em;
}

.guide-content li + li {
  margin-top: 0.35em;
}

.guide-content blockquote {
  padding: 10px 12px;
  border-left: 3px solid var(--teal);
  color: #d6ddd2;
  background: #121713;
}

.guide-content blockquote > :first-child {
  margin-top: 0;
}

.guide-content blockquote > :last-child {
  margin-bottom: 0;
}

.guide-content h1,
.guide-content h2,
.guide-content h3 {
  margin: 1.5em 0 0.55em;
  color: var(--text);
}

.guide-content h1 {
  font-size: 22px;
}

.guide-content h2 {
  font-size: 18px;
}

.guide-content h3 {
  font-size: 15px;
}

.guide-content img {
  display: block;
  max-height: 720px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: contain;
}

.guide-content a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-content code,
.code-value {
  border: 1px solid #3c453a;
  border-radius: 4px;
  color: #dce6d7;
  background: #111510;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.guide-content code {
  padding: 2px 5px;
}

.guide-content pre {
  overflow: auto;
  padding: 13px;
  border: 1px solid var(--line);
  background: #0d100c;
}

.guide-table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 14px 0 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #10130f;
  scrollbar-color: var(--line-strong) transparent;
}

.guide-table-wrap:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.guide-content table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  line-height: 1.55;
}

.guide-content th,
.guide-content td {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.guide-content th {
  color: var(--text);
  background: #191e18;
  font-size: 13px;
  white-space: nowrap;
}

.guide-content tr:last-child td {
  border-bottom: 0;
}

.guide-content th:last-child,
.guide-content td:last-child {
  border-right: 0;
}

.copy-list {
  display: grid;
  margin-top: 18px;
  gap: 8px;
}

.copy-row {
  display: grid;
  padding: 9px 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #121511;
}

.copy-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-row small {
  color: var(--muted);
}

.empty-state {
  display: grid;
  min-height: 240px;
  padding: 36px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

.field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.field > label,
.field > .label {
  color: #cbd0c6;
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: #111410;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-field input:focus {
  border-color: #a7894d;
  outline: 2px solid rgba(212, 170, 85, 0.16);
}

.field input:disabled,
.field select:disabled {
  color: #878d84;
  background: #1b1e1a;
}

.field-hint {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.status-chip {
  display: inline-flex;
  min-height: 24px;
  padding: 3px 7px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  white-space: nowrap;
}

.status-main {
  border-color: #846c3c;
  color: #f0ca7b;
  background: #2d2719;
}

.status-inactive {
  color: #8c9289;
  background: #1b1e1a;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(380px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  padding: 12px 14px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #22261f;
  box-shadow: var(--shadow);
  font-size: 13px;
  pointer-events: auto;
}

.toast-error {
  border-color: #70413d;
  background: #2c1c1a;
}

.toast-success {
  border-color: #416b49;
}

.skeleton {
  min-height: 52px;
  animation: skeleton-pulse 1.2s ease-in-out infinite alternate;
  border: 1px solid var(--line);
  background: #1b1f1a;
}

@keyframes skeleton-pulse {
  to {
    background: #242922;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .header-inner {
    min-height: 58px;
    padding-inline: 18px;
    gap: 12px;
  }

  .brand-copy small,
  .nav-link span,
  .header-actions .button span {
    display: none;
  }

  .site-nav {
    margin-left: auto;
  }

  .header-actions {
    margin-left: 0;
  }

  .nav-link {
    min-width: 40px;
    padding-inline: 10px;
    justify-content: center;
  }

  .container,
  .hero-content {
    width: min(100% - 36px, var(--content));
  }

  .home-grid,
  .recruitment-layout {
    grid-template-columns: 1fr;
  }

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

  .raid-fact:nth-child(3) {
    border-left: 1px solid var(--line);
  }

  .raid-fact:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .page-header-row,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header-row {
    display: flex;
  }

  .search-field {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .header-inner {
    padding-inline: 12px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .site-nav {
    gap: 0;
  }

  .nav-link[data-nav="home"] {
    display: none;
  }

  .nav-link {
    padding-inline: 8px;
  }

  .header-actions .button {
    width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .hero {
    min-height: 390px;
    background-position: 64% center;
  }

  .hero::before {
    background: rgba(9, 11, 9, 0.72);
  }

  .hero-content {
    padding-block: 44px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .content-band {
    padding-block: 38px;
  }

  .tool-grid,
  .check-list,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .raid-fact {
    padding: 15px 13px;
  }

  .guide-summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .guide-summary time {
    display: none;
  }

  .copy-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .copy-row small {
    grid-column: 1 / -1;
  }

  .footer-inner {
    padding-block: 15px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
}
