.tool-page {
  background: #080807;
}

.tool-page .site-header {
  position: fixed;
}

.tool-page .main-nav a[aria-current="page"] {
  color: var(--gold-bright);
}

.tool-page .main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.tool-page main .container {
  width: min(1160px, calc(100vw - 48px));
}

.tool-hero {
  position: relative;
  display: flex;
  min-height: 278px;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.tool-hero__backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(5, 5, 4, 0.35), rgba(7, 7, 6, 0.5) 48%, #080807 100%),
    linear-gradient(90deg, rgba(5, 5, 4, 0.82), transparent 66%),
    url("/assets/vae-noctis-fortress.webp");
  background-position: center 49%;
  background-size: cover;
  filter: saturate(0.68);
}

.tool-hero__content {
  padding-top: 108px;
  padding-bottom: 34px;
}

.tool-hero h1 {
  margin-bottom: 12px;
  color: var(--gold-pale);
  font-family: var(--display);
  font-size: clamp(2.7rem, 5.4vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
  text-shadow: 0 4px 20px #000;
}

.tool-hero__content > p:not(.kicker) {
  max-width: 680px;
  margin-bottom: 0;
  color: #c2bbae;
  font-family: var(--serif);
  font-size: 18px;
}

.builder {
  min-height: 720px;
  padding: 16px 0 88px;
  background:
    radial-gradient(circle at 80% 10%, rgba(150, 103, 38, 0.08), transparent 26rem),
    #080807;
}

.builder-error {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.builder-app {
  min-width: 0;
}

.builder-toolbar {
  display: grid;
  padding: 16px;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(110px, 0.7fr)) auto;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(14, 14, 12, 0.88);
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.field > span,
.control-label {
  color: #8d887d;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input,
.field select,
.tool-select,
.tool-search,
.tool-textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(190, 151, 75, 0.2);
  border-radius: 0;
  outline: 0;
  background: #0a0a08;
  color: #ded6c7;
  font: inherit;
  font-size: 12px;
}

.field input:focus,
.field select:focus,
.tool-select:focus,
.tool-search:focus,
.tool-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(190, 151, 75, 0.1);
}

.tool-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid rgba(190, 151, 75, 0.28);
  border-radius: 0;
  background: rgba(16, 15, 12, 0.9);
  color: #c6bda9;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}

.tool-button:hover {
  border-color: var(--gold);
  color: var(--gold-pale);
}

.tool-button--primary {
  border-color: rgba(222, 186, 111, 0.55);
  background: linear-gradient(135deg, #b9924d, #80602e);
  color: #080706;
}

.tool-button--quiet {
  align-self: end;
}

.class-strip {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(9, 1fr);
  border: 1px solid var(--line);
  background: #0b0b09;
}

.class-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: flex-end;
  padding: 10px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  background: #0b0b09;
  color: #8f8a80;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  isolation: isolate;
}

.class-option:last-child {
  border-right: 0;
}

.class-option img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.34;
  filter: grayscale(0.75) saturate(0.65);
}

.class-option::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 20%, rgba(6, 6, 5, 0.94));
}

.class-option:hover,
.class-option[aria-pressed="true"] {
  color: var(--gold-pale);
}

.class-option[aria-pressed="true"] {
  box-shadow: inset 0 -2px var(--gold);
}

.class-option[aria-pressed="true"] img {
  opacity: 0.7;
  filter: grayscale(0.15) saturate(0.8);
}

.builder-tabs {
  display: flex;
  margin-top: 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.builder-tabs button {
  display: inline-flex;
  min-width: max-content;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-top: 1px solid transparent;
  background: transparent;
  color: #817c72;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.builder-tabs button span {
  padding: 2px 5px;
  background: rgba(188, 147, 69, 0.1);
  color: #a89162;
  font-size: 8px;
}

.builder-tabs button:hover,
.builder-tabs button[aria-current="page"] {
  color: var(--gold-pale);
}

.builder-tabs button[aria-current="page"] {
  border-top-color: var(--gold);
  background: linear-gradient(180deg, rgba(181, 138, 61, 0.12), transparent);
}

.builder-layout {
  display: grid;
  margin-top: 14px;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 20px;
}

.builder-panel {
  min-width: 0;
  min-height: 520px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 10, 0.86);
}

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

.panel-head h2 {
  margin-bottom: 4px;
  color: var(--gold-pale);
  font-size: 30px;
}

.panel-head p,
.panel-head small {
  margin-bottom: 0;
  color: #817c72;
  font-size: 11px;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-search {
  width: min(300px, 38vw);
}

.filter-row {
  display: flex;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-row button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(190, 151, 75, 0.16);
  background: #0a0a08;
  color: #89847a;
  font: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-row button[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(185, 143, 63, 0.13);
  color: var(--gold-pale);
}

.skill-list {
  display: grid;
  gap: 8px;
}

.skill-list--cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.skill-list--cards .skill-row {
  min-width: 0;
  background:
    linear-gradient(135deg, rgba(190, 151, 75, 0.045), transparent 42%),
    #0a0a08;
}

.skill-list--cards .skill-row summary {
  min-height: 72px;
  padding: 11px 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 10px;
}

.skill-list--cards .skill-detail {
  padding: 14px;
}

.skill-list--cards .skill-node-grid {
  grid-template-columns: 1fr;
}

.skill-row {
  border: 1px solid rgba(190, 151, 75, 0.15);
  background: #0a0a08;
}

.skill-row[open] {
  border-color: rgba(209, 170, 91, 0.42);
  background: #0d0d0a;
}

.skill-row summary {
  display: grid;
  min-height: 70px;
  padding: 10px 13px;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

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

.skill-row summary > img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid rgba(207, 170, 92, 0.2);
  background: #14130f;
}

.skill-title {
  min-width: 0;
}

.skill-title strong,
.skill-title small {
  display: block;
}

.skill-title strong {
  overflow: hidden;
  color: #d7cfbe;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-title small {
  color: #777269;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-level {
  min-width: 68px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 12px;
  text-align: right;
}

.skill-chevron {
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.skill-row[open] .skill-chevron {
  transform: rotate(225deg);
}

.skill-detail {
  padding: 18px;
  border-top: 1px solid rgba(190, 151, 75, 0.12);
  background: rgba(18, 17, 13, 0.62);
}

.skill-metrics {
  display: flex;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-metrics span,
.stat-chip {
  padding: 4px 8px;
  border: 1px solid rgba(190, 151, 75, 0.16);
  color: #a9a293;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.skill-description {
  margin-bottom: 18px;
  color: #aba496;
  font-size: 12px;
  white-space: pre-line;
}

.skill-controls {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: end;
  gap: 12px;
}

.skill-node-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.node-select label,
.slot-card label {
  display: block;
  margin-bottom: 5px;
  color: #777269;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.node-select__control {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.node-select__control img,
.node-select__empty {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(190, 151, 75, 0.18);
  background: #14130f;
  object-fit: cover;
}

.equip-toggle {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(190, 151, 75, 0.22);
  background: transparent;
  color: #a59e90;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.equip-toggle[aria-pressed="true"] {
  border-color: #a8823f;
  background: rgba(177, 136, 59, 0.13);
  color: var(--gold-pale);
}

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

.slot-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(190, 151, 75, 0.15);
  background: #0a0a08;
}

.gear-search {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.gear-search__icon,
.gear-search__empty {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(190, 151, 75, 0.18);
  background: #14130f;
  object-fit: cover;
}

.gear-search .gear-search__input {
  width: 100%;
  min-height: 40px;
  font-size: 10px;
}

.gear-search__clear {
  width: 34px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(190, 151, 75, 0.18);
  background: transparent;
  color: #9d9586;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

.gear-search__clear:hover,
.gear-search__clear:focus-visible {
  border-color: var(--gold);
  color: var(--gold-pale);
}

.gear-results {
  display: grid;
  max-height: 278px;
  margin-top: 7px;
  overflow-y: auto;
  border: 1px solid rgba(190, 151, 75, 0.17);
  background: #070706;
}

.gear-results button {
  display: grid;
  min-width: 0;
  min-height: 46px;
  padding: 5px 7px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid rgba(190, 151, 75, 0.11);
  background: transparent;
  color: #cbc3b2;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.gear-results button:last-child {
  border-bottom: 0;
}

.gear-results button:hover,
.gear-results button:focus-visible,
.gear-results button[aria-selected="true"] {
  background: rgba(185, 143, 63, 0.12);
}

.gear-results img {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(190, 151, 75, 0.18);
  background: #14130f;
  object-fit: cover;
}

.gear-results strong,
.gear-results small {
  display: block;
}

.gear-results strong {
  overflow: hidden;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gear-results small {
  color: #777269;
  font-size: 8px;
}

.gear-results__empty {
  margin: 0;
  padding: 12px;
  color: #777269;
  font-size: 10px;
}

.slot-card__selection {
  display: grid;
  margin-top: 11px;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.slot-card__selection > img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid rgba(190, 151, 75, 0.18);
  background: #14130f;
}

.slot-card__selection strong,
.slot-card__selection small {
  display: block;
}

.slot-card__selection strong {
  overflow: hidden;
  color: #d2cab9;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-card__selection small {
  color: #807a70;
  font-size: 9px;
}

.slot-stats {
  display: flex;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 5px;
}

.slot-stats span {
  padding: 3px 6px;
  background: rgba(184, 141, 59, 0.08);
  color: #9d9586;
  font-size: 8px;
}

.arcana-skills {
  display: grid;
  margin-top: 13px;
  gap: 7px;
}

.arcana-skills > strong {
  color: #817b70;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.arcana-skill {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 7px;
}

.arcana-skill img,
.arcana-skill__empty {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(190, 151, 75, 0.18);
  background: #14130f;
  object-fit: cover;
}

.arcana-skill .tool-select {
  min-height: 36px;
  padding-inline: 8px;
  font-size: 10px;
}

.daevanion-toolbar {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daevanion-tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  gap: 6px;
  scrollbar-width: thin;
}

.daevanion-tabs button {
  min-width: max-content;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(190, 151, 75, 0.18);
  background: #0a0a08;
  color: #817b70;
  font: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.daevanion-tabs button[aria-selected="true"] {
  border-color: var(--gold);
  background: rgba(185, 143, 63, 0.13);
  color: var(--gold-pale);
}

.daevanion-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
}

.daevanion-board {
  display: grid;
  grid-template-columns: repeat(15, minmax(32px, 1fr));
  grid-template-rows: repeat(15, 34px);
  min-height: 0;
  padding: 16px;
  overflow: auto;
  gap: 4px;
  border: 1px solid rgba(190, 151, 75, 0.14);
  background:
    radial-gradient(circle at center, rgba(147, 104, 42, 0.1), transparent 48%),
    #080806;
}

.dae-row-1 { grid-row: 1; }
.dae-row-2 { grid-row: 2; }
.dae-row-3 { grid-row: 3; }
.dae-row-4 { grid-row: 4; }
.dae-row-5 { grid-row: 5; }
.dae-row-6 { grid-row: 6; }
.dae-row-7 { grid-row: 7; }
.dae-row-8 { grid-row: 8; }
.dae-row-9 { grid-row: 9; }
.dae-row-10 { grid-row: 10; }
.dae-row-11 { grid-row: 11; }
.dae-row-12 { grid-row: 12; }
.dae-row-13 { grid-row: 13; }
.dae-row-14 { grid-row: 14; }
.dae-row-15 { grid-row: 15; }

.dae-col-1 { grid-column: 1; }
.dae-col-2 { grid-column: 2; }
.dae-col-3 { grid-column: 3; }
.dae-col-4 { grid-column: 4; }
.dae-col-5 { grid-column: 5; }
.dae-col-6 { grid-column: 6; }
.dae-col-7 { grid-column: 7; }
.dae-col-8 { grid-column: 8; }
.dae-col-9 { grid-column: 9; }
.dae-col-10 { grid-column: 10; }
.dae-col-11 { grid-column: 11; }
.dae-col-12 { grid-column: 12; }
.dae-col-13 { grid-column: 13; }
.dae-col-14 { grid-column: 14; }
.dae-col-15 { grid-column: 15; }

.dae-node {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  place-items: center;
  align-self: center;
  justify-self: center;
  border: 1px solid rgba(178, 142, 70, 0.24);
  border-radius: 3px;
  background: #11100d;
  color: #8f887a;
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

.dae-node span {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 2;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 50%;
  background: rgba(4, 4, 3, 0.86);
  color: #efe0bd;
  line-height: 1;
}

.dae-node img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dae-node[data-type="skill"] {
  border-color: rgba(92, 142, 183, 0.54);
}

.dae-node[data-type="start"] {
  border-color: rgba(211, 176, 101, 0.6);
  background: #2a2112;
  color: var(--gold-pale);
  cursor: default;
}

.dae-node[aria-pressed="true"] {
  border-color: var(--gold-bright);
  background: #8d6b32;
  color: #080706;
  box-shadow: 0 0 18px rgba(186, 143, 64, 0.35);
}

.dae-node[disabled] {
  cursor: not-allowed;
  opacity: 0.42;
}

.node-inspector {
  position: sticky;
  top: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #0b0b09;
}

.node-inspector h3 {
  margin-bottom: 8px;
  color: var(--gold-pale);
  font-size: 20px;
}

.node-inspector__title {
  display: grid;
  margin-bottom: 8px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.node-inspector__title img {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(190, 151, 75, 0.2);
  background: #14130f;
  object-fit: cover;
}

.node-inspector__title h3 {
  margin-bottom: 0;
}

.node-inspector p {
  margin-bottom: 12px;
  color: #8d877c;
  font-size: 11px;
}

.node-inspector__empty {
  color: #6e6a62;
}

.node-inspector > .tool-button {
  width: 100%;
  margin-top: 14px;
}

.clipboard-fallback {
  position: fixed;
  inset: auto auto 0 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stat-table {
  display: grid;
  gap: 5px;
}

.stat-line {
  display: grid;
  min-height: 38px;
  padding: 0 11px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid rgba(190, 151, 75, 0.12);
  background: #0a0a08;
}

.stat-line span {
  color: #8f897e;
  font-size: 10px;
}

.stat-line strong {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
}

.empty-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  border: 1px dashed rgba(190, 151, 75, 0.16);
  color: #726d64;
  font-size: 11px;
  text-align: center;
}

.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.export-card {
  padding: 20px;
  border: 1px solid rgba(190, 151, 75, 0.16);
  background: #0a0a08;
}

.export-card h3 {
  margin-bottom: 8px;
  color: var(--gold-pale);
  font-size: 22px;
}

.export-card p {
  color: #858076;
  font-size: 11px;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-textarea {
  min-height: 190px;
  padding-block: 11px;
  resize: vertical;
  font-family: Consolas, monospace;
  line-height: 1.5;
}

.build-summary {
  position: sticky;
  top: 90px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b0b09;
}

.summary-class {
  position: relative;
  display: flex;
  min-height: 150px;
  align-items: flex-end;
  padding: 18px;
  overflow: hidden;
  isolation: isolate;
}

.summary-class img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  opacity: 0.62;
}

.summary-class::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(6, 6, 5, 0.96));
}

.summary-class span,
.summary-class strong,
.summary-class small {
  display: block;
}

.summary-class span {
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-class strong {
  color: var(--gold-pale);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
}

.summary-class small {
  color: #aaa396;
  font-size: 9px;
}

.summary-counters {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-counters div {
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-counters div:nth-child(even) {
  border-right: 0;
}

.summary-counters dt {
  color: #777269;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-counters dd {
  margin: 2px 0 0;
  color: var(--gold-pale);
  font-family: var(--serif);
  font-size: 19px;
}

.summary-stats {
  padding: 15px;
}

.summary-stats__heading {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
}

.summary-stats__heading h2 {
  margin-bottom: 0;
  color: #d3cbb9;
  font-size: 17px;
}

.summary-stats__heading button {
  border: 0;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-size: 8px;
  text-transform: uppercase;
  cursor: pointer;
}

.summary-stats .stat-line {
  min-height: 30px;
  padding-inline: 0;
  border-width: 0 0 1px;
  background: transparent;
}

.build-summary > .tool-button {
  width: calc(100% - 30px);
  margin: 0 15px;
}

.save-status {
  margin: 9px 15px 15px;
  color: #69655d;
  font-size: 8px;
  text-align: center;
  text-transform: uppercase;
}

.tool-footer {
  padding-top: 24px;
}

.tool-footer .footer-legal {
  justify-content: flex-start;
}

.tool-footer .footer-legal a {
  color: #807a70;
  text-decoration: none;
}

@media (max-width: 1120px) {
  .builder-toolbar {
    grid-template-columns: repeat(3, 1fr);
  }

  .tool-button--quiet {
    width: 100%;
  }

  .class-strip {
    grid-template-columns: repeat(5, 1fr);
  }

  .class-option:nth-child(5) {
    border-right: 0;
  }

  .class-option:nth-child(-n + 5) {
    border-bottom: 1px solid var(--line);
  }

  .builder-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

}

@media (max-width: 850px) {
  .tool-hero {
    min-height: 250px;
  }

  .builder-layout {
    grid-template-columns: 1fr;
  }

  .skill-list--cards {
    grid-template-columns: 1fr;
  }

  .build-summary {
    position: static;
  }

  .summary-counters {
    grid-template-columns: repeat(5, 1fr);
  }

  .summary-counters div,
  .summary-counters div:nth-child(even) {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .summary-counters div:last-child {
    border-right: 0;
  }

  .daevanion-layout {
    grid-template-columns: 1fr;
  }

  .node-inspector {
    position: static;
  }
}

@media (max-width: 620px) {
  .tool-page main .container {
    width: min(100% - 24px, 1160px);
  }

  .tool-hero {
    min-height: 224px;
  }

  .tool-hero__content {
    padding-top: 88px;
    padding-bottom: 22px;
  }

  .tool-hero h1 {
    font-size: clamp(2.45rem, 13vw, 3.4rem);
  }

  .tool-hero__content > p:not(.kicker) {
    font-size: 15px;
  }

  .builder {
    padding-top: 18px;
  }

  .builder-toolbar {
    padding: 12px;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .field--class {
    grid-column: 1 / -1;
  }

  .class-strip {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
  }

  .class-option,
  .class-option:nth-child(5) {
    min-width: 104px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .builder-panel {
    padding: 12px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-head h2 {
    font-size: clamp(24px, 9vw, 30px);
  }

  .tool-search {
    width: 100%;
  }

  .skill-row summary {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .skill-row summary > img {
    width: 42px;
    height: 42px;
  }

  .skill-level {
    display: none;
  }

  .skill-controls,
  .skill-node-grid,
  .skill-list--stigma,
  .slot-grid,
  .export-grid {
    grid-template-columns: 1fr;
  }

  .skill-detail,
  .slot-card,
  .export-card {
    padding: 12px;
  }

  .arcana-skill {
    grid-template-columns: 32px minmax(0, 1fr) 70px;
  }

  .arcana-skill img,
  .arcana-skill__empty {
    width: 32px;
    height: 32px;
  }

  .summary-counters {
    grid-template-columns: repeat(3, 1fr);
  }

  .summary-counters div:nth-child(3) {
    border-right: 0;
  }

  .summary-counters div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .daevanion-board {
    grid-template-columns: repeat(15, minmax(32px, 1fr));
    grid-template-rows: repeat(15, 34px);
    min-height: 0;
    padding: 10px;
  }

  .dae-node {
    width: 30px;
    height: 30px;
  }

  .daevanion-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-button--quiet {
    grid-column: 1 / -1;
  }

  .tool-footer .footer-legal {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .builder-toolbar {
    grid-template-columns: 1fr;
  }

  .field--class,
  .tool-button--quiet {
    grid-column: auto;
  }

  .summary-counters {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-counters div,
  .summary-counters div:nth-child(3),
  .summary-counters div:nth-child(even) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .summary-counters div:nth-child(even) {
    border-right: 0;
  }

  .summary-counters div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}
