/*! TPT2 Community Brand Kit v1.1.0 (full)
 * https://www.perfecttower2.com/brandkit/
 * CSS licensed under the MIT License, (c) 2026 Fire Sword Studios.
 * Not included and not licensed: The Perfect Tower II logos, symbol, key art and other game assets.
 * Fonts are not bundled: load Archivo, Oswald, Oxanium and JetBrains Mono (see the brand kit page).
 */
@layer tpt.tokens {
  /* Tokens. Dark is the default. Light: class="tpt-light" or data-theme="light" on <html> or any wrapper.
     Follow the operating system: class="tpt-auto" or data-theme="auto". */
  :root {
    --tpt-version: "1.1.0";
    --tpt-brand-ember: #f4560a;
    --tpt-brand-amber: #f8a106;
    --tpt-brand-sun: #fdec02;
    --tpt-brand-sky: #29abe2;
    --tpt-brand-sky-deep: #0071bc;
    --tpt-brand-azure: #1583cd;
    --tpt-brand-navy: #004495;
    --tpt-brand-stone: #8f8c8c;
    --tpt-brand-mist: #e1e1e1;
    --tpt-brand-brown: #36261c;
    --tpt-brand-white: #fcfffc;
    --tpt-bg: #1a120d;
    --tpt-surface: #251a13;
    --tpt-surface-alt: #36261c;
    --tpt-line: #3d2c21;
    --tpt-line-strong: #8a6f5b;
    --tpt-outline: #0e0907;
    --tpt-ink: #f4ece4;
    --tpt-ink-muted: #c9b8a8;
    --tpt-ink-subtle: #a38f7d;
    --tpt-accent: #ffb43a;
    --tpt-accent-fill: var(--tpt-brand-amber);
    --tpt-on-accent: var(--tpt-brand-brown);
    --tpt-focus: #4cc0f0;
    --tpt-info: var(--tpt-focus);
    --tpt-success: #4fdc6a;
    --tpt-warning: #fdec02;
    --tpt-danger: #ff6b5e;
    --tpt-on-status: #1a120d;
    --tpt-code-bg: #120c09;
    --tpt-code-ink: #f4ece4;
    --tpt-syn-keyword: #ffb43a;
    --tpt-syn-call: #ff8fa3;
    --tpt-syn-string: #a6e3a1;
    --tpt-syn-number: #90daff;
    --tpt-syn-comment: #a08a78;
    --tpt-on-fac: #1a120d;
    --tpt-fac-power-plant: #ffff00;
    --tpt-fac-power-plant-ink: #ffff00;
    --tpt-fac-mine: #ff9900;
    --tpt-fac-mine-ink: #ff9900;
    --tpt-fac-factory: #ff0000;
    --tpt-fac-factory-ink: #ff5252;
    --tpt-fac-headquarters: #dc00ff;
    --tpt-fac-headquarters-ink: #e542ff;
    --tpt-fac-arcade: #ff6681;
    --tpt-fac-arcade-ink: #ff6681;
    --tpt-fac-laboratory: #00ff21;
    --tpt-fac-laboratory-ink: #00ff21;
    --tpt-fac-shipyard: #00ffc0;
    --tpt-fac-shipyard-ink: #00ffc0;
    --tpt-fac-trading-post: #90daff;
    --tpt-fac-trading-post-ink: #90daff;
    --tpt-fac-workshop: #45abff;
    --tpt-fac-workshop-ink: #45abff;
    --tpt-fac-museum: #b4b4b4;
    --tpt-fac-museum-ink: #b4b4b4;
    --tpt-fac-construction-firm: #986f44;
    --tpt-fac-construction-firm-ink: #b48758;
    --tpt-fac-statue-of-cubos: #525252;
    --tpt-fac-statue-of-cubos-ink: #909090;
    --tpt-module-offensive: #ff7171;
    --tpt-module-defensive: #7197ff;
    --tpt-module-utility: #ffd200;
    --tpt-module-ultimate: #f465ff;
    --tpt-module-legendary: #ff9400;
    --tpt-module-special: #808080;
    --tpt-extrude: 0 3px 0 0 #0e0907;
    --tpt-extrude-pressed: 0 1px 0 0 #0e0907;
    --tpt-lift: 0 16px 40px -12px rgba(14,9,7,0.7);
    --tpt-space-1: 4px;
    --tpt-space-2: 8px;
    --tpt-space-3: 12px;
    --tpt-space-4: 16px;
    --tpt-space-5: 24px;
    --tpt-space-6: 32px;
    --tpt-space-7: 48px;
    --tpt-space-8: 64px;
    --tpt-space-9: 96px;
    --tpt-radius-0: 0px;
    --tpt-radius-1: 2px;
    --tpt-radius-2: 4px;
    --tpt-size-page: 1240px;
    --tpt-size-measure: 720px;
    --tpt-size-wiki-nav: 248px;
    --tpt-size-wiki-aside: 340px;
    --tpt-size-header: 64px;
    --tpt-stroke-hair: 1px;
    --tpt-stroke-control: 2px;
    --tpt-stroke-sunburst: 3px;
    --tpt-font-display: "Oxanium", "Oswald", Impact, sans-serif;
    --tpt-font-heading: "Oswald", "Arial Narrow", sans-serif;
    --tpt-font-body: "Archivo", "Segoe UI", system-ui, sans-serif;
    --tpt-font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  }
  .tpt-dark, [data-theme="dark"] {
    --tpt-bg: #1a120d;
    --tpt-surface: #251a13;
    --tpt-surface-alt: #36261c;
    --tpt-line: #3d2c21;
    --tpt-line-strong: #8a6f5b;
    --tpt-outline: #0e0907;
    --tpt-ink: #f4ece4;
    --tpt-ink-muted: #c9b8a8;
    --tpt-ink-subtle: #a38f7d;
    --tpt-accent: #ffb43a;
    --tpt-focus: #4cc0f0;
    --tpt-success: #4fdc6a;
    --tpt-warning: #fdec02;
    --tpt-danger: #ff6b5e;
    --tpt-on-status: #1a120d;
    --tpt-code-bg: #120c09;
    --tpt-fac-power-plant-ink: #ffff00;
    --tpt-fac-mine-ink: #ff9900;
    --tpt-fac-factory-ink: #ff5252;
    --tpt-fac-headquarters-ink: #e542ff;
    --tpt-fac-arcade-ink: #ff6681;
    --tpt-fac-laboratory-ink: #00ff21;
    --tpt-fac-shipyard-ink: #00ffc0;
    --tpt-fac-trading-post-ink: #90daff;
    --tpt-fac-workshop-ink: #45abff;
    --tpt-fac-museum-ink: #b4b4b4;
    --tpt-fac-construction-firm-ink: #b48758;
    --tpt-fac-statue-of-cubos-ink: #909090;
    --tpt-extrude: 0 3px 0 0 #0e0907;
    --tpt-extrude-pressed: 0 1px 0 0 #0e0907;
    --tpt-lift: 0 16px 40px -12px rgba(14,9,7,0.7);
  }
  .tpt-light, [data-theme="light"] {
    --tpt-bg: #efece9;
    --tpt-surface: #fcfffc;
    --tpt-surface-alt: #e5e0db;
    --tpt-line: #d9d1ca;
    --tpt-line-strong: #82776f;
    --tpt-outline: #36261c;
    --tpt-ink: #36261c;
    --tpt-ink-muted: #5f4e42;
    --tpt-ink-subtle: #6f5f54;
    --tpt-accent: #b23c00;
    --tpt-focus: #0067ad;
    --tpt-success: #1a6e30;
    --tpt-warning: #7d5a00;
    --tpt-danger: #c0281d;
    --tpt-on-status: #fcfffc;
    --tpt-code-bg: #2a1e16;
    --tpt-fac-power-plant-ink: #6b6b00;
    --tpt-fac-mine-ink: #965a00;
    --tpt-fac-factory-ink: #d60000;
    --tpt-fac-headquarters-ink: #b400d1;
    --tpt-fac-arcade-ink: #d40025;
    --tpt-fac-laboratory-ink: #007a10;
    --tpt-fac-shipyard-ink: #00785a;
    --tpt-fac-trading-post-ink: #006fa7;
    --tpt-fac-workshop-ink: #006ac2;
    --tpt-fac-museum-ink: #696969;
    --tpt-fac-construction-firm-ink: #86623c;
    --tpt-fac-statue-of-cubos-ink: #525252;
    --tpt-extrude: 0 3px 0 0 #36261c;
    --tpt-extrude-pressed: 0 1px 0 0 #36261c;
    --tpt-lift: 0 16px 40px -14px rgba(54,38,28,0.35);
  }
  @media (prefers-color-scheme: light) {
    .tpt-auto, [data-theme="auto"] {
      --tpt-bg: #efece9;
      --tpt-surface: #fcfffc;
      --tpt-surface-alt: #e5e0db;
      --tpt-line: #d9d1ca;
      --tpt-line-strong: #82776f;
      --tpt-outline: #36261c;
      --tpt-ink: #36261c;
      --tpt-ink-muted: #5f4e42;
      --tpt-ink-subtle: #6f5f54;
      --tpt-accent: #b23c00;
      --tpt-focus: #0067ad;
      --tpt-success: #1a6e30;
      --tpt-warning: #7d5a00;
      --tpt-danger: #c0281d;
      --tpt-on-status: #fcfffc;
      --tpt-code-bg: #2a1e16;
      --tpt-fac-power-plant-ink: #6b6b00;
      --tpt-fac-mine-ink: #965a00;
      --tpt-fac-factory-ink: #d60000;
      --tpt-fac-headquarters-ink: #b400d1;
      --tpt-fac-arcade-ink: #d40025;
      --tpt-fac-laboratory-ink: #007a10;
      --tpt-fac-shipyard-ink: #00785a;
      --tpt-fac-trading-post-ink: #006fa7;
      --tpt-fac-workshop-ink: #006ac2;
      --tpt-fac-museum-ink: #696969;
      --tpt-fac-construction-firm-ink: #86623c;
      --tpt-fac-statue-of-cubos-ink: #525252;
      --tpt-extrude: 0 3px 0 0 #36261c;
      --tpt-extrude-pressed: 0 1px 0 0 #36261c;
      --tpt-lift: 0 16px 40px -14px rgba(54,38,28,0.35);
    }
  }
}

/* Base. Applies only inside .tpt-root, so the kit never restyles a host page on its own. */

.tpt-root { background: var(--tpt-bg); color: var(--tpt-ink); font-family: var(--tpt-font-body); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; color-scheme: dark; }
.tpt-root.tpt-light, .tpt-light .tpt-root, .tpt-root[data-theme="light"], [data-theme="light"] .tpt-root { color-scheme: light; }
.tpt-root.tpt-dark, .tpt-dark .tpt-root, .tpt-root[data-theme="dark"], [data-theme="dark"] .tpt-root { color-scheme: dark; }
@media (prefers-color-scheme: light) {
  .tpt-root.tpt-auto, .tpt-auto .tpt-root, .tpt-root[data-theme="auto"], [data-theme="auto"] .tpt-root { color-scheme: light; }
}
.tpt-root *, .tpt-root *::before, .tpt-root *::after { box-sizing: border-box; }
:where(.tpt-btn, .tpt-input, .tpt-tab, .tpt-card, .tpt-nav a, .tpt-link, .tpt-prose a, .tpt-chip):focus-visible { outline: 2px solid var(--tpt-focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tpt-root *, .tpt-btn, .tpt-card { transition: none !important; } }

/* Components. Every value comes from a --tpt- token; facility scoping uses .tpt-fac-<id>. */

/* ---------- Type ---------- */
.tpt-display { font-family: var(--tpt-font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0; line-height: 1; margin: 0; text-wrap: balance; }
.tpt-display--hero { font-size: 84px; line-height: .95; }
.tpt-display--xl { font-size: 64px; }
.tpt-display--l { font-size: 44px; line-height: 1.05; }
.tpt-display--m { font-size: 28px; line-height: 1.1; }
.tpt-sunburst-text { background: linear-gradient(90deg, var(--tpt-brand-ember), var(--tpt-brand-sun)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tpt-h1 { font-family: var(--tpt-font-heading); font-weight: 600; font-size: 36px; line-height: 42px; letter-spacing: .01em; text-transform: uppercase; margin: 0; text-wrap: balance; }
.tpt-h2 { font-family: var(--tpt-font-heading); font-weight: 600; font-size: 28px; line-height: 34px; letter-spacing: .01em; text-transform: uppercase; margin: 0; text-wrap: balance; }
.tpt-h3 { font-family: var(--tpt-font-heading); font-weight: 600; font-size: 21px; line-height: 28px; margin: 0; }
.tpt-h4 { font-family: var(--tpt-font-heading); font-weight: 500; font-size: 17px; line-height: 24px; letter-spacing: .02em; margin: 0; }
.tpt-label { font-family: var(--tpt-font-heading); font-weight: 500; font-size: 13px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--tpt-ink-muted); }
.tpt-label--s { font-size: 11px; line-height: 14px; letter-spacing: .1em; }
.tpt-lead { font-size: 19px; line-height: 30px; color: var(--tpt-ink-muted); margin: 0; max-width: 62ch; }
.tpt-small { font-size: 14px; line-height: 22px; }
.tpt-caption { font-size: 13px; line-height: 18px; color: var(--tpt-ink-subtle); }
.tpt-link, .tpt-prose a { color: var(--tpt-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tpt-link:hover, .tpt-prose a:hover { text-decoration-thickness: 2px; }
.tpt-prose { max-width: var(--tpt-size-measure); }
.tpt-prose p { margin: 0 0 16px; }
.tpt-prose code, code.tpt-inline { font-family: var(--tpt-font-mono); font-size: .9em; font-weight: 500; padding: 1px 5px; border-radius: var(--tpt-radius-1); background: var(--tpt-surface-alt); color: var(--tpt-ink); }

/* ---------- Plate: brown block with sunburst text, like the wordmark ---------- */
.tpt-plate { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 8px; background: var(--tpt-brand-brown); border: 2px solid var(--tpt-outline); box-shadow: var(--tpt-extrude); border-radius: var(--tpt-radius-0); }
.tpt-plate > .tpt-display { background: linear-gradient(90deg, var(--tpt-brand-ember), var(--tpt-brand-sun)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.tpt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--tpt-radius-1); border: 2px solid var(--tpt-line-strong); background: transparent; color: var(--tpt-ink); font-family: var(--tpt-font-heading); font-weight: 500; font-size: 15px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .12s, border-color .12s, color .12s, transform .08s, box-shadow .08s; }
.tpt-btn:hover { border-color: var(--tpt-accent); color: var(--tpt-accent); }
.tpt-btn svg { width: 18px; height: 18px; flex: none; }
.tpt-btn--primary { background: var(--tpt-accent-fill); color: var(--tpt-on-accent); border-color: var(--tpt-outline); box-shadow: var(--tpt-extrude); }
.tpt-btn--primary:hover { background: var(--tpt-brand-sun); color: var(--tpt-on-accent); border-color: var(--tpt-outline); }
.tpt-btn--primary:active { transform: translateY(2px); box-shadow: var(--tpt-extrude-pressed); }
.tpt-btn--ghost { border-color: transparent; color: var(--tpt-ink-muted); }
.tpt-btn--ghost:hover { background: var(--tpt-surface-alt); border-color: transparent; color: var(--tpt-ink); }
.tpt-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.tpt-btn--lg { height: 48px; padding: 0 24px; font-size: 17px; }
.tpt-btn--icon { width: 40px; padding: 0; }
.tpt-btn[disabled], .tpt-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- Site header (shared by website, wiki and tools) ---------- */
.tpt-header { position: relative; background: var(--tpt-surface); border-bottom: 1px solid var(--tpt-line); }
.tpt-header::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--tpt-brand-ember), var(--tpt-brand-sun)); }
.tpt-header__bar { max-width: var(--tpt-size-page); margin: 0 auto; min-height: var(--tpt-size-header); padding: 3px 24px 0; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.tpt-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tpt-ink); flex: none; }
.tpt-lockup img { height: 36px; width: auto; display: block; }
.tpt-lockup__name { font-family: var(--tpt-font-display); font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; color: var(--tpt-ink); padding-top: 2px; }
.tpt-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tpt-nav a { position: relative; display: inline-flex; align-items: center; height: var(--tpt-size-header); padding: 0 12px; font-family: var(--tpt-font-heading); font-weight: 500; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--tpt-ink-muted); text-decoration: none; }
.tpt-nav a:hover { color: var(--tpt-ink); }
.tpt-nav a[aria-current="page"] { color: var(--tpt-ink); }
.tpt-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--tpt-accent-fill); }
.tpt-header__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ---------- Inputs ---------- */
.tpt-field { display: grid; gap: 6px; }
.tpt-input { height: 40px; width: 100%; padding: 0 12px; background: var(--tpt-bg); color: var(--tpt-ink); border: 2px solid var(--tpt-line-strong); border-radius: var(--tpt-radius-1); font-family: var(--tpt-font-body); font-size: 15px; }
.tpt-input::placeholder { color: var(--tpt-ink-subtle); }
.tpt-input:focus { border-color: var(--tpt-focus); outline: none; }
.tpt-search { position: relative; display: flex; align-items: center; min-width: 220px; }
.tpt-search svg { position: absolute; left: 11px; width: 18px; height: 18px; color: var(--tpt-ink-subtle); pointer-events: none; }
.tpt-search .tpt-input { padding-left: 38px; padding-right: 40px; }
.tpt-kbd { position: absolute; right: 8px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 5px; font-family: var(--tpt-font-mono); font-size: 12px; color: var(--tpt-ink-muted); border: 1px solid var(--tpt-line-strong); border-radius: var(--tpt-radius-1); }

/* ---------- Numbers ---------- */
.tpt-num { font-family: var(--tpt-font-heading); font-variant-numeric: tabular-nums lining-nums; font-weight: 500; white-space: nowrap; }
.tpt-num__e { font-size: .72em; font-weight: 600; color: var(--tpt-ink-muted); margin: 0 .06em; }
.tpt-stat { display: grid; gap: 6px; align-content: start; }
.tpt-stat__value { display: flex; align-items: center; gap: 8px; font-family: var(--tpt-font-heading); font-variant-numeric: tabular-nums; font-weight: 500; font-size: 22px; line-height: 1; color: var(--tpt-ink); }
.tpt-stat--xl .tpt-stat__value { font-size: 48px; font-weight: 600; }
.tpt-cube { width: 1em; height: 1em; flex: none; color: var(--tpt-fac, var(--tpt-brand-mist)); }

/* ---------- Facility scoping ---------- */
.tpt-fac-power-plant { --tpt-fac: var(--tpt-fac-power-plant); --tpt-fac-ink: var(--tpt-fac-power-plant-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-mine { --tpt-fac: var(--tpt-fac-mine); --tpt-fac-ink: var(--tpt-fac-mine-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-factory { --tpt-fac: var(--tpt-fac-factory); --tpt-fac-ink: var(--tpt-fac-factory-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-headquarters { --tpt-fac: var(--tpt-fac-headquarters); --tpt-fac-ink: var(--tpt-fac-headquarters-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-arcade { --tpt-fac: var(--tpt-fac-arcade); --tpt-fac-ink: var(--tpt-fac-arcade-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-laboratory { --tpt-fac: var(--tpt-fac-laboratory); --tpt-fac-ink: var(--tpt-fac-laboratory-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-shipyard { --tpt-fac: var(--tpt-fac-shipyard); --tpt-fac-ink: var(--tpt-fac-shipyard-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-trading-post { --tpt-fac: var(--tpt-fac-trading-post); --tpt-fac-ink: var(--tpt-fac-trading-post-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-workshop { --tpt-fac: var(--tpt-fac-workshop); --tpt-fac-ink: var(--tpt-fac-workshop-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-museum { --tpt-fac: var(--tpt-fac-museum); --tpt-fac-ink: var(--tpt-fac-museum-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-construction-firm { --tpt-fac: var(--tpt-fac-construction-firm); --tpt-fac-ink: var(--tpt-fac-construction-firm-ink); --tpt-fac-on: var(--tpt-on-fac); }
.tpt-fac-statue-of-cubos { --tpt-fac: var(--tpt-fac-statue-of-cubos); --tpt-fac-ink: var(--tpt-fac-statue-of-cubos-ink); --tpt-fac-on: var(--tpt-brand-white); }

/* ---------- Module categories (game data colors, fill only) ---------- */
.tpt-module-offensive { --tpt-module: var(--tpt-module-offensive); }
.tpt-module-defensive { --tpt-module: var(--tpt-module-defensive); }
.tpt-module-utility { --tpt-module: var(--tpt-module-utility); }
.tpt-module-ultimate { --tpt-module: var(--tpt-module-ultimate); }
.tpt-module-legendary { --tpt-module: var(--tpt-module-legendary); }
.tpt-module-special { --tpt-module: var(--tpt-module-special); }
.tpt-module-swatch { display: inline-block; width: 12px; height: 12px; flex: none; background: var(--tpt-module, var(--tpt-line-strong)); box-shadow: 0 0 0 1px var(--tpt-outline); }

/* ---------- Hex badge (the symbol's hexagon) ---------- */
.tpt-hex { --tpt-hex-size: 44px; position: relative; width: calc(var(--tpt-hex-size) * .849); height: var(--tpt-hex-size); display: inline-grid; place-items: center; flex: none; background: var(--tpt-outline); clip-path: polygon(50% 0, 100% 27.5%, 100% 72.5%, 50% 100%, 0 72.5%, 0 27.5%); }
.tpt-hex::before { content: ""; position: absolute; inset: 3px; background: var(--tpt-fac, var(--tpt-accent-fill)); clip-path: inherit; }
.tpt-hex > * { position: relative; }
.tpt-hex__mark { font-family: var(--tpt-font-display); font-weight: 800; font-size: calc(var(--tpt-hex-size) * .32); line-height: 1; color: var(--tpt-fac-on, var(--tpt-on-accent)); }
.tpt-hex--s { --tpt-hex-size: 28px; }
.tpt-hex--l { --tpt-hex-size: 64px; }
.tpt-hex--xs { --tpt-hex-size: 14px; }
.tpt-hex--xs::before { inset: 2px; }
/* Digits and capitals sit in the optical middle of the hexagon. Oxanium's line box puts them about .06em high, so the box is trimmed to cap height and baseline; browsers without text-box get a nudge instead. */
@supports (text-box: trim-both cap alphabetic) { .tpt-hex__mark { text-box: trim-both cap alphabetic; } }
@supports not (text-box: trim-both cap alphabetic) { .tpt-hex__mark { top: .08em; } }
.tpt-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px 0 6px; background: var(--tpt-surface-alt); border-radius: var(--tpt-radius-1); font-family: var(--tpt-font-heading); font-weight: 500; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--tpt-fac-ink, var(--tpt-ink)); text-decoration: none; }
.tpt-chip:hover { background: var(--tpt-line); }

/* ---------- Tags ---------- */
.tpt-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--tpt-radius-1); background: var(--tpt-surface-alt); color: var(--tpt-ink-muted); font-family: var(--tpt-font-heading); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.tpt-tag--info { background: var(--tpt-info); color: var(--tpt-on-status); }
.tpt-tag--success { background: var(--tpt-success); color: var(--tpt-on-status); }
.tpt-tag--warning { background: var(--tpt-warning); color: var(--tpt-on-status); }
.tpt-tag--danger { background: var(--tpt-danger); color: var(--tpt-on-status); }
.tpt-tag--new { background: var(--tpt-accent-fill); color: var(--tpt-on-accent); }

/* ---------- Cards ---------- */
.tpt-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--tpt-surface); border: 1px solid var(--tpt-line); border-radius: var(--tpt-radius-2); color: inherit; text-decoration: none; transition: border-color .12s, transform .12s; min-width: 0; }
a.tpt-card:hover { border-color: var(--tpt-line-strong); transform: translateY(-2px); }
.tpt-card__head { display: flex; align-items: center; gap: 12px; }
.tpt-card__title { font-family: var(--tpt-font-heading); font-weight: 600; font-size: 21px; line-height: 28px; margin: 0; color: var(--tpt-ink); }
.tpt-card__text { font-size: 14px; line-height: 22px; color: var(--tpt-ink-muted); margin: 0; }
.tpt-card__meta { margin-top: auto; display: flex; gap: 12px; align-items: center; font-family: var(--tpt-font-heading); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--tpt-ink-subtle); }
.tpt-card__media { margin: -20px -20px 4px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--tpt-radius-2) var(--tpt-radius-2) 0 0; background: var(--tpt-surface-alt); }
.tpt-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Callout ---------- */
.tpt-callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; background: var(--tpt-surface-alt); border: 1px solid var(--tpt-line); border-radius: var(--tpt-radius-2); font-size: 15px; line-height: 24px; max-width: var(--tpt-size-measure); }
.tpt-callout p { margin: 0; }
.tpt-callout__tag { margin-top: 1px; }

/* ---------- Tabs ---------- */
.tpt-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--tpt-line); overflow-x: auto; }
.tpt-tab { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 14px 9px; font-family: var(--tpt-font-heading); font-weight: 500; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--tpt-ink-muted); cursor: pointer; white-space: nowrap; text-decoration: none; }
.tpt-tab:hover { color: var(--tpt-ink); }
.tpt-tab[aria-selected="true"] { color: var(--tpt-ink); border-bottom-color: var(--tpt-accent-fill); }

/* ---------- Table ---------- */
.tpt-table-wrap { overflow-x: auto; background: var(--tpt-surface); border: 1px solid var(--tpt-line); border-radius: var(--tpt-radius-2); }
.tpt-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.tpt-table caption { text-align: left; padding: 12px 14px; font-family: var(--tpt-font-heading); font-weight: 500; font-size: 17px; letter-spacing: .02em; color: var(--tpt-ink); }
.tpt-table th { padding: 10px 14px; text-align: left; background: var(--tpt-surface-alt); border-bottom: 2px solid var(--tpt-line-strong); font-family: var(--tpt-font-heading); font-weight: 500; font-size: 12.5px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--tpt-ink-muted); white-space: nowrap; }
.tpt-table td { padding: 10px 14px; border-bottom: 1px solid var(--tpt-line); vertical-align: top; }
.tpt-table tbody tr:last-child td { border-bottom: 0; }
.tpt-table tbody tr:hover td { background: var(--tpt-surface-alt); }
.tpt-table .is-num { text-align: right; font-family: var(--tpt-font-heading); font-variant-numeric: tabular-nums; font-size: 16px; white-space: nowrap; }

/* ---------- Infobox (wiki) ---------- */
.tpt-infobox { background: var(--tpt-surface); border: 1px solid var(--tpt-line); border-radius: var(--tpt-radius-2); overflow: hidden; font-size: 14px; line-height: 22px; }
.tpt-infobox__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--tpt-surface-alt); border-bottom: 1px solid var(--tpt-line); }
.tpt-infobox__title { font-family: var(--tpt-font-display); font-weight: 800; font-size: 28px; line-height: 1.1; text-transform: uppercase; margin: 0; color: var(--tpt-ink); }
.tpt-infobox__media { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tpt-bg); border-bottom: 1px solid var(--tpt-line); }
.tpt-infobox__rows { margin: 0; padding: 4px 16px 8px; }
.tpt-infobox__rows > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--tpt-line); }
.tpt-infobox__rows > div:last-child { border-bottom: 0; }
.tpt-infobox__rows dt { font-family: var(--tpt-font-heading); font-weight: 500; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--tpt-ink-muted); }
.tpt-infobox__rows dd { margin: 0; color: var(--tpt-ink); }
.tpt-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; background: var(--tpt-fac); box-shadow: 0 0 0 1px var(--tpt-outline); }

/* ---------- Code block (AI scripts) ---------- */
.tpt-code { margin: 0; background: var(--tpt-code-bg); border-radius: var(--tpt-radius-1); overflow: hidden; color: var(--tpt-code-ink); max-width: 100%; }
.tpt-code__bar { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border-bottom: 1px solid rgba(244, 236, 228, .1); font-family: var(--tpt-font-heading); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--tpt-syn-comment); }
.tpt-code__bar > :last-child { margin-left: auto; }
.tpt-code__bar .tpt-btn--ghost { color: var(--tpt-code-ink); }
.tpt-code__bar .tpt-btn--ghost:hover { background: rgba(244, 236, 228, .08); color: var(--tpt-code-ink); }
.tpt-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--tpt-font-mono); font-size: 14px; line-height: 22px; tab-size: 2; }
.tpt-code .k { color: var(--tpt-syn-keyword); }
.tpt-code .f { color: var(--tpt-syn-call); }
.tpt-code .s { color: var(--tpt-syn-string); }
.tpt-code .n { color: var(--tpt-syn-number); }
.tpt-code .c { color: var(--tpt-syn-comment); font-style: italic; }

/* ---------- Sunburst rays (hero backdrops only) ---------- */
.tpt-rays { background-image: repeating-conic-gradient(from -90deg at 50% 115%, color-mix(in srgb, var(--tpt-brand-amber) 12%, transparent) 0deg 5deg, transparent 5deg 12deg); }

/* ---------- Fan-made line (required in the footer of community sites) ---------- */
.tpt-fanmade { display: block; margin: 0; font-size: 13px; line-height: 18px; color: var(--tpt-ink-subtle); }
.tpt-fanmade::before { content: ""; display: inline-block; width: 10px; height: 12px; margin-right: 8px; vertical-align: -1px; background: var(--tpt-accent-fill); clip-path: polygon(50% 0, 100% 27.5%, 100% 72.5%, 50% 100%, 0 72.5%, 0 27.5%); }
.tpt-fanmade a { color: var(--tpt-ink-muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tpt-fanmade a:hover { color: var(--tpt-accent); }
