:root {
  color-scheme: dark;
  --ink: #101213;
  --panel: #191c1d;
  --panel-2: #202425;
  --line: #3a3e3f;
  --paper: #f0eadc;
  --muted: #aaa89f;
  --blood: #be2f28;
  --blood-dark: #7e1c1a;
  --hazard: #e4b640;
  --moss: #789174;
  --steel: #aab7b9;
  --radius: 6px;
  --max: 1180px;
  --shadow: 0 18px 55px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  background-image: url("../images/noise.webp");
  background-size: 320px;
  z-index: 30;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button, .button {
  min-height: 44px;
  border: 1px solid var(--blood);
  border-radius: 4px;
  background: var(--blood);
  color: #fff;
  padding: .66rem 1rem;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  transition: background .16s ease, transform .16s ease, border-color .16s ease;
}
button:hover, .button:hover { background: #d53a32; border-color: #d53a32; }
button:active, .button:active { transform: translateY(1px); }
button.secondary, .button.secondary { background: transparent; border-color: #666b6c; color: var(--paper); }
button.secondary:hover, .button.secondary:hover { background: #292d2e; border-color: #8a8e8f; }
button:disabled, .button:disabled { opacity: .36; cursor: not-allowed; transform: none; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
button.icon-button { width: 44px; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--hazard); outline-offset: 2px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  background: rgba(16, 18, 19, .96);
  border-bottom: 1px solid #343738;
  backdrop-filter: blur(10px);
}
.nav-shell { max-width: var(--max); min-height: 66px; margin: auto; padding: 0 20px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: 0 0 auto; }
.brand-mark { width: 44px; height: 44px; display: block; flex: 0 0 44px; background: url("../images/brand-mark.webp") center / contain no-repeat; }
.brand-mark span { display: none; }
.brand-copy { line-height: 1; }
.brand-copy strong { display: block; font-size: 1rem; letter-spacing: 0; text-transform: uppercase; }
.brand-copy small { color: var(--muted); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { padding: 10px 12px; color: #d7d2c8; text-decoration: none; font-size: .9rem; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; border-bottom-color: var(--blood); }
.menu-toggle { display: none; margin-left: auto; }

.wrap { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.hero {
  min-height: min(700px, calc(100vh - 66px));
  display: flex;
  align-items: end;
  position: relative;
  background: #171919 url("../images/blood-moon-base.webp") center 44% / cover no-repeat;
  border-bottom: 1px solid #3c3f40;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(8, 9, 9, .48); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: rgba(8, 9, 9, .6); }
.hero-inner { position: relative; z-index: 2; padding-block: 74px 64px; max-width: 790px; }
.eyebrow { color: var(--hazard); font-weight: 850; text-transform: uppercase; font-size: .78rem; letter-spacing: .12em; }
h1, h2, h3 { line-height: 1.08; letter-spacing: 0; margin: 0 0 .72em; font-family: "Arial Narrow", "Segoe UI", sans-serif; text-transform: uppercase; }
h1 { font-size: clamp(2.8rem, 7vw, 5.7rem); max-width: 780px; text-shadow: 0 3px 18px rgba(0,0,0,.68); }
h2 { font-size: clamp(1.75rem, 3vw, 2.65rem); }
h3 { font-size: 1.08rem; }
.hero p { color: #ddd8ce; max-width: 660px; font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.version-strip { background: var(--hazard); color: #171511; }
.version-strip .wrap { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 800; font-size: .82rem; text-transform: uppercase; }

.section { padding: 76px 0; border-bottom: 1px solid #292c2d; }
.section.alt { background: #151718; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.section-heading p { max-width: 590px; color: var(--muted); margin: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.tool-card { min-height: 235px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); text-decoration: none; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.tool-card:nth-child(1), .tool-card:nth-child(2) { grid-column: span 6; }
.tool-card:nth-child(n+3) { grid-column: span 4; }
.tool-card:hover { border-color: #74797a; background: var(--panel-2); }
.tool-number { color: var(--blood); font-weight: 900; font-size: 2.25rem; line-height: 1; }
.tool-card h3 { margin-top: auto; margin-bottom: 10px; font-size: 1.35rem; }
.tool-card p { color: var(--muted); margin: 0; }
.tool-card .arrow { position: absolute; right: 22px; top: 19px; font-size: 1.4rem; color: var(--hazard); }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.signal { padding: 22px; background: var(--ink); }
.signal strong { color: var(--hazard); display: block; font-size: 1.75rem; }
.signal span { color: var(--muted); font-size: .83rem; }

.page-hero { padding: 30px 0 24px; border-bottom: 1px solid var(--line); background-color: #151718; }
.breadcrumbs { color: var(--muted); font-size: .78rem; margin-bottom: 9px; }
.breadcrumbs a { color: #d7d2c8; }
.page-hero h1 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); margin: 4px 0 8px; text-shadow: none; }
.page-hero p { max-width: 920px; margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.status-line { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tag { border: 1px solid #515657; padding: 4px 8px; border-radius: 3px; color: #cbc7be; font-size: .69rem; text-transform: uppercase; font-weight: 750; }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; padding-block: 20px 70px; }
.tool-surface, .result-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tool-surface { padding: 24px; min-width: 0; }
.result-panel { padding: 20px; position: sticky; top: 88px; }
.result-panel h2, .tool-surface h2 { font-size: 1.35rem; }
.result-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 18px 0; }
.result-row { background: #17191a; display: flex; justify-content: space-between; gap: 12px; padding: 12px; }
.result-row span { color: var(--muted); }
.result-row strong { text-align: right; }
.result-callout { border-left: 4px solid var(--hazard); padding: 12px 14px; background: #24231e; color: #e8dfc7; font-size: .9rem; }
.fine-print { color: var(--muted); font-size: .78rem; }
.save-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.save-note strong { color: var(--paper); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { color: #d6d1c6; font-size: .84rem; font-weight: 750; }
input, select, textarea {
  width: 100%; min-height: 46px; border: 1px solid #4a4e4f; border-radius: 3px; padding: 10px 12px; background: #101213; color: var(--paper);
}
input[type="range"] { min-height: auto; padding: 0; accent-color: var(--blood); }
.range-line { display: flex; align-items: center; gap: 12px; }
.range-line output { min-width: 42px; text-align: right; color: var(--hazard); font-weight: 800; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.share-strip { border-block: 1px solid var(--line); background: #141617; }
.share-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.share-copy h2 { font-size: 1.12rem; margin: 0 0 5px; }
.share-copy p { margin: 0; color: var(--muted); font-size: .84rem; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.share-buttons button { min-width: 42px; min-height: 42px; padding: 7px 10px; background: #242829; border-color: #555a5b; }
.share-buttons button:hover { background: var(--blood); border-color: var(--blood); }
.share-buttons button[data-share="facebook"] { color: #8bb2ff; }
.share-buttons button[data-share="whatsapp"] { color: #76d79b; }

.meter { height: 12px; background: #0d0f10; border: 1px solid #45494a; overflow: hidden; margin: 14px 0 6px; }
.meter > span { display: block; height: 100%; width: 0; background: var(--moss); transition: width .2s ease; }
.meter > span.danger { background: var(--blood); }
.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 20px; }
.device-row { min-height: 68px; padding: 10px 12px; background: #141617; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.device-row small { display: block; color: var(--muted); font-weight: 400; }
.device-row input { width: 78px; min-height: 40px; }
.event-list { list-style: none; padding: 0; margin: 18px 0 0; }
.event-item { display: grid; grid-template-columns: 16px 1fr; gap: 11px; position: relative; padding: 0 0 18px; }
.event-item::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: -2px; border-left: 1px solid #4a4f50; }
.event-item:last-child::before { display: none; }
.event-item > span { width: 13px; height: 13px; margin-top: 4px; border-radius: 50%; background: var(--steel); position: relative; z-index: 1; }
.event-item.blood > span { background: var(--blood); }
.event-item.trader > span { background: var(--hazard); }
.event-item.drop > span { background: #7fa8bd; }
.event-item strong, .event-item small { display: block; }
.event-item small { color: var(--muted); }
.result-row small { display: block; color: var(--muted); font-size: .72rem; }
.progress-track { height: 8px; background: #0d0f10; border: 1px solid #424647; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--hazard); width: 0; }
.directory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.directory-item { min-height: 150px; padding: 20px; background: var(--panel); text-decoration: none; }
.directory-item:hover { background: var(--panel-2); }
.directory-item strong { display: block; margin-bottom: 8px; text-transform: uppercase; }
.directory-item span { color: var(--muted); font-size: .86rem; }

.planner-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.palette button { min-height: 38px; padding: 7px 10px; background: #272b2c; border-color: #4c5051; font-size: .8rem; }
.palette button.active { border-color: var(--hazard); color: var(--hazard); background: #302c20; }
.palette i { width: 12px; height: 12px; display: inline-block; border: 1px solid rgba(255,255,255,.35); }
.planner-wrap { overflow: auto; border: 1px solid #45494a; background: #0d0f10; touch-action: none; }
#base-canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; cursor: crosshair; }
.layer-tabs { display: flex; gap: 5px; margin-left: auto; }
.layer-tabs button { min-width: 38px; min-height: 38px; padding: 5px; background: #282c2d; border-color: #4a4e4f; }
.layer-tabs button.active { background: var(--blood); border-color: var(--blood); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; color: var(--muted); font-size: .76rem; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }

.planner-layout-v2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; padding-block: 20px 70px; }
.planner-editor { padding: 20px; }
.planner-meta { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.4fr); gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.planner-controlbar, .planner-floorbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.segmented-control { display: inline-flex; border: 1px solid #4d5152; background: #101213; }
.segmented-control button { min-height: 38px; padding: 7px 14px; border: 0; border-right: 1px solid #4d5152; border-radius: 0; background: transparent; color: var(--muted); }
.segmented-control button:last-child { border-right: 0; }
.segmented-control button.active { background: var(--hazard); color: #17191a; }
.planner-history, .floor-actions { display: flex; gap: 6px; }
.planner-history .icon-button { width: 40px; min-height: 40px; padding: 0; font-size: 1.2rem; }
.planner-history #erase-plan.active { background: var(--blood); border-color: var(--blood); }
.planner-palette { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.planner-object { min-height: 64px; padding: 8px; background: #202324; border-color: #4b4f50; color: #d7d2c8; display: flex; align-items: center; justify-content: flex-start; gap: 9px; text-align: left; }
.planner-object:hover { background: #2a2e2f; border-color: #777c7d; }
.planner-object.active { background: #302a1e; border-color: var(--hazard); box-shadow: inset 0 0 0 1px var(--hazard); }
.planner-item-icon { width: 44px; height: 44px; flex: 0 0 44px; display: block; background-image: url('/assets/images/planner-items-v2.webp'); background-size: 400% 400%; background-repeat: no-repeat; background-position: calc(var(--icon-x) * 33.333%) calc(var(--icon-y) * 33.333%); }
.planner-object span:last-child { font-size: .76rem; line-height: 1.15; }
.planner-tool-detail { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin-top: 8px; border-left: 3px solid var(--hazard); background: #151718; color: var(--muted); font-size: .78rem; }
.planner-tool-detail strong { color: var(--paper); }
.planner-floorbar { padding: 14px 0 10px; border-top: 1px solid var(--line); }
.planner-floorbar .layer-tabs { margin-left: 0; }
.floor-actions button { min-height: 38px; padding: 7px 10px; font-size: .76rem; }
.planner-readout { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding-top: 9px; color: var(--muted); font-size: .72rem; text-transform: uppercase; font-weight: 750; }
.planner-readout span:first-child { color: var(--hazard); }
.planner-primary-actions { border-top: 1px solid var(--line); padding-top: 16px; }
.planner-primary-actions .button { display: inline-flex; align-items: center; justify-content: center; }
.planner-summary h3 { margin: 22px 0 8px; font-size: .85rem; color: #d8d2c6; }
.readiness-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.readiness-head h2 { margin: 0; font-size: 2.2rem; color: var(--hazard); }
.readiness-head span { color: var(--muted); font-size: .8rem; text-align: right; }
.plan-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.plan-checks li { position: relative; padding: 9px 10px 9px 32px; background: #17191a; color: #bcb8af; font-size: .77rem; }
.plan-checks li::before { content: '!'; position: absolute; left: 10px; top: 8px; width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid #6f7475; color: var(--muted); font-size: .65rem; }
.plan-checks li.pass::before { content: '\2713'; border-color: var(--moss); color: #a9c79d; }
.plan-checks li.warn::before { border-color: var(--hazard); color: var(--hazard); }
.plan-checks li.danger::before { content: '\00d7'; border-color: var(--blood); color: #ee8f87; }
.perk-groups { display: grid; gap: 18px; }
.perk-group { border-top: 3px solid var(--attribute-color, var(--blood)); background: #161819; }
.perk-group-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-top: 0; }
.perk-group-head h3 { margin: 0; }
.attribute-control { display: flex; align-items: center; gap: 9px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #505455; }
.stepper button { width: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 0; background: #292d2e; }
.stepper output { min-width: 36px; text-align: center; font-weight: 850; }
.perk-list { border-inline: 1px solid var(--line); }
.perk-row { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 15px; border-bottom: 1px solid #303334; }
.perk-row small { display: block; color: var(--muted); }
.rank-dots { display: flex; gap: 5px; }
.rank-dot { width: 25px; height: 25px; padding: 0; min-height: 25px; border-radius: 50%; background: #292d2e; border: 1px solid #55595a; color: transparent; }
.rank-dot.filled { background: var(--attribute-color, var(--blood)); border-color: var(--attribute-color, var(--blood)); }
.rank-dot.locked { opacity: .28; cursor: not-allowed; }
.perk-rank { min-width: 38px; color: var(--hazard); text-align: right; font-weight: 800; }

.content { max-width: 850px; padding-block: 54px 80px; }
.content h2 { margin-top: 1.6em; }
.content h3 { margin-top: 1.6em; }
.content p, .content li { color: #c2beb4; }
.content a { color: var(--hazard); }
.content table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 22px 0; }
.content th, .content td { padding: 11px; border: 1px solid var(--line); text-align: left; }
.content th { background: #222627; }
.faq details { border-top: 1px solid var(--line); padding: 17px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 800; }

.site-footer { background: #0b0c0d; border-top: 1px solid #343738; padding: 42px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; }
.footer-grid h3 { font-size: .82rem; color: var(--muted); }
.footer-grid a { display: block; color: #cac5ba; text-decoration: none; padding: 4px 0; font-size: .88rem; }
.footer-grid a:hover { color: var(--hazard); }
.footer-note { border-top: 1px solid #292c2d; margin-top: 32px; padding-top: 20px; color: #777b7b; font-size: .76rem; }
.cookie-banner { position: fixed; z-index: 50; left: 18px; right: 18px; bottom: 18px; max-width: 640px; background: #202324; border: 1px solid #666b6c; box-shadow: var(--shadow); padding: 16px; display: none; align-items: center; gap: 16px; }
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; color: #cbc7be; font-size: .83rem; }
.cookie-banner .action-row { margin: 0 0 0 auto; flex: 0 0 auto; }
.cookie-banner button { min-height: 38px; padding: 7px 11px; }

.tool-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.tool-section-head h2 { margin-bottom: 5px; }
.tool-section-head p { margin: 0; color: var(--muted); font-size: .84rem; }
.subsection-title { margin: 24px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.preset-line { display: grid; grid-template-columns: minmax(180px, 1fr) 130px auto; align-items: end; gap: 10px; padding: 14px; background: #141617; border: 1px solid var(--line); margin-bottom: 16px; }
.preset-line button { white-space: nowrap; }
.armor-slot-head, .armor-slot-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 104px; align-items: center; gap: 10px; }
.armor-slot-head { padding: 0 12px 7px; color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.armor-slot-grid { border: 1px solid var(--line); }
.armor-slot-row { min-height: 66px; padding: 9px 12px; background: #141617; border-bottom: 1px solid var(--line); }
.armor-slot-row:last-child { border-bottom: 0; }
.armor-slot-row select { min-height: 42px; }
.armor-set-bonus { display: grid; gap: 5px; margin-top: 16px; padding: 13px 14px; border-left: 4px solid #656a6b; background: #17191a; }
.armor-set-bonus.active { border-left-color: var(--hazard); background: #24231e; }
.armor-set-bonus span { color: var(--muted); font-size: .82rem; }
.buff-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); }
.buff-row { min-height: 82px; display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 12px; background: #141617; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.buff-row:nth-child(2n) { border-right: 0; }
.buff-row:nth-last-child(-n+2) { border-bottom: 0; }
.buff-row > span { color: var(--hazard); font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.buff-row strong, .buff-row small { display: block; }
.buff-row small { margin-top: 4px; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 16px 0; }
.metric { min-height: 90px; padding: 12px; background: #17191a; }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: .74rem; }
.metric strong { margin-top: 5px; color: var(--hazard); font-size: 1.25rem; }
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field > small { color: var(--muted); font-size: .72rem; line-height: 1.35; }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.source-row { min-height: 68px; padding: 10px 12px; background: #141617; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.source-row strong, .source-row small { display: block; }
.source-row small { color: var(--muted); font-size: .7rem; font-weight: 400; }
.source-row input { width: 76px; min-height: 40px; }
.tool-disclosure { margin: 18px 0; border: 1px solid var(--line); background: #141617; }
.tool-disclosure summary { cursor: pointer; padding: 13px 14px; color: #ddd7cc; font-weight: 800; }
.tool-disclosure[open] summary { border-bottom: 1px solid var(--line); }
.tool-disclosure .source-grid { border: 0; }
.empty-result { padding: 14px; background: #17191a; color: var(--muted); font-size: .8rem; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 66px; padding: 12px 20px 20px; background: #111314; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .nav-links.open { display: flex; }
  .tool-layout { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .tool-card:nth-child(n) { grid-column: span 6; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .directory-grid { grid-template-columns: repeat(2, 1fr); }
  .planner-layout-v2 { grid-template-columns: 1fr; }
  .planner-summary { position: static; }
  .compact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wrap { width: min(calc(100% - 28px), var(--max)); }
  .nav-shell { padding-inline: 14px; }
  .brand-copy small { display: none; }
  .hero { min-height: 610px; }
  .hero-inner { padding-block: 52px 40px; }
  h1 { font-size: 2.75rem; }
  .version-strip .wrap { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 9px; gap: 1px; }
  .section { padding-block: 52px; }
  .section-heading { display: block; }
  .tool-card:nth-child(n) { grid-column: 1 / -1; min-height: 200px; }
  .signal-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-surface { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .planner-toolbar { align-items: flex-start; }
  .layer-tabs { width: 100%; margin-left: 0; }
  .planner-meta { grid-template-columns: 1fr; }
  .planner-controlbar, .planner-floorbar { align-items: stretch; flex-direction: column; }
  .segmented-control, .planner-history, .floor-actions { width: 100%; }
  .segmented-control button { flex: 1; padding-inline: 7px; }
  .planner-history { justify-content: flex-end; }
  .planner-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planner-object { min-width: 0; }
  .planner-floorbar .layer-tabs { width: 100%; }
  .planner-floorbar .layer-tabs button { flex: 1; }
  .floor-actions button { flex: 1; min-width: 0; }
  .planner-primary-actions > * { flex: 1 1 calc(50% - 8px); }
  .perk-row { grid-template-columns: 1fr auto; }
  .rank-dots { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .content table { display: block; overflow-x: auto; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner .action-row { margin: 0; }
  .share-inner { align-items: flex-start; flex-direction: column; }
  .device-grid, .directory-grid { grid-template-columns: 1fr; }
  .preset-line { grid-template-columns: 1fr 100px; }
  .preset-line button { grid-column: 1 / -1; }
  .armor-slot-head { display: none; }
  .armor-slot-row { grid-template-columns: 1fr 92px; }
  .armor-slot-row > strong { grid-column: 1 / -1; }
  .buff-list, .source-grid, .compact-grid { grid-template-columns: 1fr; }
  .buff-row { border-right: 0; }
  .buff-row:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .buff-row:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
