/* Wiki pages (views/pages/wiki.ts): website layout. The same markup is styled for the game client's old IE window
   by wiki-embed.css, so content uses tables and plain blocks; this file adds the modern look. */
.w-page { padding-top: 28px; padding-bottom: 48px; }
.w-title { margin: 6px 0 18px; overflow-wrap: anywhere; }
.w-crumbs { margin: 0; font-size: .9rem; color: var(--aet-faint); }
.w-crumbs a { color: var(--aet-muted); }
.w-crumbs__sep { margin: 0 4px; color: var(--aet-faint); }
.w-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.w-lead { color: var(--aet-muted); font-size: 1.05rem; max-width: 70ch; }
.w-muted { color: var(--aet-faint); }
.w-note { color: var(--aet-faint); font-size: .9rem; margin: 10px 0 0; }
.w-langnote { padding: 10px 14px; border-radius: var(--aet-radius-sm); border: 1px solid rgba(167, 139, 250, .4); background: rgba(76, 29, 149, .25); }
.w-n { color: var(--aet-faint); font-size: .85rem; font-variant-numeric: tabular-nums; }
.w-h2 { font-family: var(--aet-font-display); font-size: 1.3rem; color: #fff; margin: 0 0 12px; letter-spacing: .02em; }
.w-h2 a { color: inherit; text-decoration: none; }
.w-h2 a:hover { color: var(--aet-amber-soft); }
.w-h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--aet-faint); margin: 16px 0 6px; }
.w-section { margin-top: 26px; padding: 20px; border-radius: var(--aet-radius); background: var(--aet-surface); border: 1px solid var(--aet-border); }
.w-section .table-wrap { margin: 0 -20px; width: calc(100% + 40px); }

/* search */
.w-search { position: relative; display: flex; gap: 10px; max-width: 640px; margin: 0 0 18px; }
.w-search__input { flex: 1; min-width: 0; }
.w-search__btn { flex-shrink: 0; }
.w-suggest { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: 60vh; overflow-y: auto;
  border-radius: var(--aet-radius-sm); border: 1px solid var(--aet-border-strong); background: var(--aet-surface-strong); box-shadow: var(--aet-shadow); }
.w-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--aet-text); text-decoration: none; }
.w-suggest a:hover, .w-suggest a[aria-selected="true"] { background: var(--aet-surface-hover); color: #fff; }
.w-suggest__kind { margin-left: auto; font-size: .78rem; color: var(--aet-faint); white-space: nowrap; }
.w-suggest__en { color: var(--aet-faint); font-size: .85rem; }
.w-suggest__all { border-top: 1px solid var(--aet-border); font-weight: 600; }

/* home columns */
.w-cols { width: 100%; border-collapse: separate; border-spacing: 0; }
.w-cols, .w-cols tbody, .w-cols tr { display: block; }
.w-cols tr { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.w-col { display: block; padding: 20px; border-radius: var(--aet-radius); background: var(--aet-surface); border: 1px solid var(--aet-border); vertical-align: top; }
@media (min-width: 720px) { .w-cols tr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .w-cols tr { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.w-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.w-links li { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.w-links--big li { font-size: 1.05rem; padding: 6px 0; border-bottom: 1px solid var(--aet-border); }

/* chips (categories, kinds) */
.w-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.w-chip { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: .85rem; border: 1px solid var(--aet-border-strong); color: var(--aet-text); text-decoration: none; background: rgba(167, 139, 250, .06); }
.w-chip:hover { color: #fff; background: rgba(167, 139, 250, .18); }
.w-chip--on { color: #1a1205; background: var(--aet-amber); border-color: var(--aet-amber); font-weight: 600; }

/* tables */
.w-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.w-table th, .w-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--aet-border); vertical-align: middle; }
.w-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--aet-faint); font-weight: 600; white-space: nowrap; }
.w-table th:first-child, .w-table td:first-child { padding-left: 20px; }
.w-table th:last-child, .w-table td:last-child { padding-right: 20px; }
.w-table tbody tr:hover { background: var(--aet-surface-hover); }
.w-table tbody tr:last-child td { border-bottom: 0; }
.w-page > .table-wrap, .w-page > .w-pager + .table-wrap { border-radius: var(--aet-radius); background: var(--aet-surface); border: 1px solid var(--aet-border); }
.w-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-td-icon { width: 44px; }
.w-row--on td { background: rgba(245, 168, 58, .1); }
.w-facts { border-collapse: collapse; margin: 0; }
.w-facts th { padding: 4px 18px 4px 0; text-align: left; font-weight: 500; color: var(--aet-faint); vertical-align: top; white-space: nowrap; }
.w-facts td { padding: 4px 0; font-weight: 600; }

/* item head */
.w-head { width: 100%; border-collapse: collapse; }
.w-head td { vertical-align: top; }
.w-head__icon { width: 84px; padding-right: 18px; }
.w-head__icon .w-icon, .w-head__icon .w-noicon { width: 64px; height: 64px; }
.w-kicker { margin: 0 0 6px; color: var(--aet-amber-soft); font-weight: 600; font-size: .9rem; }
.w-icon { display: inline-block; vertical-align: middle; image-rendering: pixelated; border-radius: 6px; background: rgba(8, 9, 20, .55); border: 1px solid var(--aet-border); object-fit: contain; }
.w-noicon { display: inline-block; vertical-align: middle; width: 32px; height: 32px; border-radius: 6px; background: rgba(8, 9, 20, .45); border: 1px dashed var(--aet-border); }
.w-item { display: inline-flex; align-items: center; gap: 8px; }
.w-item .w-icon { width: 24px; height: 24px; }
.w-count { color: var(--aet-amber-soft); font-weight: 600; white-space: nowrap; }
.w-levels { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 0 0 14px; }
.w-lvl { display: inline-block; min-width: 34px; padding: 3px 6px; text-align: center; border-radius: 6px; border: 1px solid var(--aet-border-strong); text-decoration: none; color: var(--aet-text); font-variant-numeric: tabular-nums; }
.w-lvl:hover { background: var(--aet-surface-hover); color: #fff; }
.w-lvl--on { background: var(--aet-amber); border-color: var(--aet-amber); color: #1a1205; }
.w-bonus { margin: 6px 0 0; padding-left: 18px; color: var(--aet-rune-soft); }
.w-mats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* pager */
.w-pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 0 0; }
.w-pager a, .w-pager__cur { display: inline-block; min-width: 36px; padding: 6px 10px; text-align: center; border-radius: 8px; border: 1px solid var(--aet-border-strong); text-decoration: none; }
.w-pager__cur { background: var(--aet-amber); color: #1a1205; border-color: var(--aet-amber); font-weight: 700; }
.w-pager__gap { color: var(--aet-faint); }

/* guides (markdown) */
.w-md { max-width: 78ch; line-height: 1.65; }
.w-md h2 { font-family: var(--aet-font-display); color: #fff; font-size: 1.35rem; margin: 28px 0 10px; }
.w-md h3 { color: #fff; font-size: 1.1rem; margin: 22px 0 8px; }
.w-md h4, .w-md h5 { color: var(--aet-text); font-size: 1rem; margin: 18px 0 6px; }
.w-md p, .w-md ul, .w-md ol, .w-md blockquote, .w-md pre { margin: 0 0 14px; }
.w-md blockquote { padding: 10px 16px; border-left: 3px solid var(--aet-amber); background: rgba(245, 168, 58, .07); border-radius: 0 var(--aet-radius-sm) var(--aet-radius-sm) 0; }
.w-md code { font: .9em ui-monospace, Consolas, monospace; padding: 1px 5px; border-radius: 5px; background: rgba(8, 9, 20, .6); }
.w-md pre { padding: 12px 14px; overflow-x: auto; border-radius: var(--aet-radius-sm); background: rgba(8, 9, 20, .6); border: 1px solid var(--aet-border); }
.w-md pre code { padding: 0; background: none; }
.w-md img { max-width: 100%; height: auto; border-radius: var(--aet-radius-sm); }
.w-md hr { border: 0; border-top: 1px solid var(--aet-border); margin: 24px 0; }
.w-md .table-wrap { margin: 0 0 14px; border-radius: var(--aet-radius-sm); border: 1px solid var(--aet-border); }
.w-toc { float: right; max-width: 300px; margin: 0 0 16px 24px; padding: 14px 18px; border-radius: var(--aet-radius); background: var(--aet-surface); border: 1px solid var(--aet-border); }
.w-toc__title { margin: 0 0 6px; font-weight: 700; color: #fff; }
.w-toc ol { margin: 0; padding-left: 18px; }
@media (max-width: 760px) { .w-toc { float: none; max-width: none; margin: 0 0 16px; } }

/* admin editor */
.w-editor { min-height: 420px; font: .92rem/1.5 ui-monospace, Consolas, monospace; }
.w-source { white-space: pre-wrap; overflow-wrap: anywhere; font: .85rem/1.5 ui-monospace, Consolas, monospace; }
.w-lang { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: .8rem; text-decoration: none; border: 1px solid var(--aet-border-strong); }
.w-lang--db { background: var(--aet-amber); color: #1a1205; border-color: var(--aet-amber); font-weight: 700; }
.w-lang--builtin { color: var(--aet-text); }
.w-lang--none { color: var(--aet-faint); opacity: .6; }

@media (max-width: 560px) {
  .w-search { flex-direction: column; }
  .w-head__icon { width: 64px; padding-right: 12px; }
  .w-head__icon .w-icon, .w-head__icon .w-noicon { width: 48px; height: 48px; }
  .w-table th, .w-table td { padding: 7px 8px; }
  .w-table th:first-child, .w-table td:first-child { padding-left: 14px; }
  .w-section { padding: 16px 14px; }
  .w-section .table-wrap { margin: 0 -14px; width: calc(100% + 28px); }
}
