:root {
  color-scheme: dark;
  --parchment: #efe5cf;
  --parchment-ink: #2f271a;
  --parchment-muted: #7b6e55;
  --obsidian: #111719;
  --obsidian-2: #1d2424;
  --metal: #283131;
  --metal-soft: #34413f;
  --gold: #c8a665;
  --gold-bright: #f2d888;
  --teal: #27d7d1;
  --teal-soft: #77fff1;
  --green: #73d76c;
  --danger: #de765d;
  --line: rgba(221, 184, 103, 0.42);
  --shadow: rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #181716;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--parchment);
  font-family: var(--sans);
  background:
    linear-gradient(rgba(22, 20, 17, 0.18), rgba(22, 20, 17, 0.42)),
    url("assets/generated/texture-parchment.png") center / 720px repeat,
    #d9cdb6;
}

button,
input,
a {
  font: inherit;
}

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.icon-sprite {
  display: none;
}

.page-shell {
  width: min(1520px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border: 1px solid rgba(254, 222, 146, 0.5);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(12, 16, 17, 0.96), rgba(23, 30, 30, 0.93)),
    url("assets/generated/texture-dark-metal.png") center / 620px;
  box-shadow: 0 28px 70px var(--shadow), inset 0 0 0 1px rgba(255, 244, 195, 0.1);
  overflow: clip;
}

.nav-rail {
  position: relative;
  padding: 18px 14px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(7, 12, 13, 0.86), rgba(7, 12, 13, 0.96)),
    url("assets/generated/texture-dark-metal.png") center / 520px;
}

.nav-rail::after,
.main-frame::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 222, 142, 0.22);
  border-radius: inherit;
}

.brand-mark {
  width: 132px;
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(39, 215, 209, 0.24), transparent 62%),
    linear-gradient(145deg, rgba(223, 181, 91, 0.32), rgba(9, 13, 14, 0.1));
  border: 1px solid rgba(238, 203, 122, 0.54);
  box-shadow: inset 0 0 28px rgba(9, 243, 229, 0.12), 0 12px 30px rgba(0, 0, 0, 0.34);
}

.brand-mark img {
  width: 112px;
  filter: drop-shadow(0 0 14px rgba(58, 244, 229, 0.36));
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.nav-item {
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #ecdfc2;
  border: 1px solid rgba(211, 178, 104, 0.22);
  border-radius: 6px;
  background: rgba(18, 24, 24, 0.62);
  text-align: left;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item svg,
.icon-button svg,
.primary-button svg,
.secondary-button svg,
.mana-chip svg,
.search-control svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-item svg {
  color: var(--gold-bright);
}

.nav-item.is-active,
.nav-item:hover {
  color: #fff7dd;
  border-color: rgba(50, 232, 224, 0.58);
  background:
    linear-gradient(90deg, rgba(15, 121, 126, 0.5), rgba(28, 34, 32, 0.78)),
    rgba(18, 24, 24, 0.78);
}

.nav-item:hover {
  transform: translateX(2px);
}

.rail-status {
  min-height: 62px;
  padding: 12px;
  border: 1px solid rgba(219, 178, 95, 0.36);
  border-radius: 6px;
  background: rgba(9, 14, 14, 0.66);
  color: #ddcfb0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: center;
  font-family: var(--serif);
}

.rail-status strong {
  grid-column: 2;
  color: var(--teal-soft);
  font-weight: 600;
}

.status-orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(115, 215, 108, 0.76);
}

.main-frame {
  position: relative;
  min-width: 0;
  padding: 16px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(232, 195, 114, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(10, 17, 18, 0.92), rgba(33, 39, 37, 0.88)),
    url("assets/generated/texture-dark-metal.png") center / 520px;
  box-shadow: inset 0 -1px 0 rgba(55, 247, 231, 0.18);
}

.title-lockup {
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-lockup img {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 0 10px rgba(40, 230, 216, 0.35));
}

.title-lockup span {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.title-lockup strong {
  display: block;
  color: #fff1c9;
  font-family: var(--serif);
  font-size: 1.38rem;
  font-weight: 600;
}

.top-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.search-control {
  width: min(300px, 32vw);
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(216, 174, 91, 0.35);
  border-radius: 999px;
  color: rgba(120, 255, 244, 0.86);
  background: rgba(7, 11, 12, 0.58);
}

.search-control input {
  min-width: 0;
  color: #fff5d6;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-control input::placeholder {
  color: rgba(234, 220, 190, 0.62);
}

.mana-chip,
.icon-button {
  min-height: 42px;
  border: 1px solid rgba(218, 181, 99, 0.4);
  background: rgba(8, 13, 14, 0.72);
  color: #fff0ca;
  box-shadow: inset 0 0 18px rgba(28, 213, 203, 0.08);
}

.mana-chip {
  display: grid;
  grid-template-columns: 18px auto auto;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
}

.mana-chip span {
  color: rgba(232, 220, 195, 0.72);
}

.mana-chip strong {
  color: var(--teal-soft);
}

.icon-button {
  width: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

main {
  display: grid;
  gap: 16px;
  padding-top: 16px;
}

.hero-panel {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  align-items: center;
  border: 1px solid rgba(232, 194, 113, 0.5);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(9, 14, 15, 0.12), rgba(238, 229, 205, 0.2) 45%, rgba(239, 231, 211, 0.93) 66%),
    url("assets/generated/hero-arcane-dashboard.png") left center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 209, 0.1);
}

.hero-copy {
  grid-column: 2;
  max-width: 620px;
  padding: 36px clamp(24px, 4vw, 56px) 36px 24px;
  color: var(--parchment-ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(150, 120, 56, 0.28);
  border-radius: 999px;
  color: #5f5134;
  background: rgba(250, 244, 225, 0.54);
  font-size: 0.76rem;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 14px;
  color: #2f2617;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  font-weight: 500;
  line-height: 0.95;
}

.hero-copy p {
  max-width: 520px;
  margin-top: 16px;
  color: #574936;
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  position: relative;
  isolation: isolate;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 34px;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-button {
  color: #f4ffff;
  text-shadow: 0 1px 2px rgba(0, 23, 25, 0.88);
}

.secondary-button {
  color: #fff2cc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.primary-button::before,
.secondary-button::before {
  content: "";
  position: absolute;
  inset: -6px 0;
  z-index: -1;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.24));
}

.primary-button::before {
  background-image: url("assets/generated/button-primary-frame.png");
}

.secondary-button::before {
  background-image: url("assets/generated/button-secondary-frame.png");
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.ornament-strip {
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ornament-strip img {
  width: min(680px, 70vw);
  height: auto;
  filter: drop-shadow(0 0 12px rgba(40, 230, 216, 0.18));
}

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

.workspace-column,
.control-column {
  min-width: 0;
}

.workspace-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.tabbar {
  min-height: 54px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(225, 184, 98, 0.44);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(12, 17, 18, 0.78), rgba(9, 12, 13, 0.86)),
    url("assets/generated/texture-dark-metal.png") center / 500px;
  overflow: hidden;
}

.tab {
  position: relative;
  isolation: isolate;
  min-width: 0;
  color: #e8dcc0;
  border: 0;
  border-right: 1px solid rgba(217, 180, 98, 0.18);
  background: transparent;
  font-family: var(--serif);
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.78);
}

.tab::before {
  content: "";
  position: absolute;
  inset: 4px 4px;
  z-index: -1;
  pointer-events: none;
  background: url("assets/generated/button-tab-idle.png") center / 100% 100% no-repeat;
  opacity: 0.74;
}

.tab:last-child {
  border-right: 0;
}

.tab.is-active {
  color: #fef4d3;
}

.tab.is-active::before {
  background-image: url("assets/generated/button-tab-active.png");
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(39, 215, 209, 0.16));
}

.tab-panel {
  min-height: 268px;
}

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

.module-card,
.stat-panel,
.asset-card,
.settings-panel,
.phone-shell {
  border: 1px solid rgba(222, 181, 96, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(13, 19, 20, 0.88), rgba(20, 25, 25, 0.94)),
    url("assets/generated/texture-dark-metal.png") center / 540px;
  box-shadow: inset 0 0 0 1px rgba(255, 245, 207, 0.08), 0 18px 32px rgba(0, 0, 0, 0.22);
}

.module-card {
  min-height: 188px;
  display: grid;
  grid-template-columns: 126px 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.module-card.is-hidden {
  display: none;
}

.module-card img {
  width: 126px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(51, 230, 220, 0.25));
}

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

.module-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.module-title-row h2,
.asset-card h2 {
  color: #fff0ca;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.module-title-row span {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.module-card p {
  margin-top: 8px;
  color: rgba(230, 220, 198, 0.72);
  line-height: 1.45;
}

.progress-track {
  height: 18px;
  margin-top: 18px;
  padding: 4px 11px;
  border: 0;
  border-radius: 999px;
  background: url("assets/ui-kit/progress/progress-track.png") center / 100% 100% no-repeat;
}

.progress-track span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: url("assets/ui-kit/progress/progress-fill.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 7px rgba(55, 235, 224, 0.45));
}

body.is-loading .progress-track span {
  animation: manaPulse 1s ease-in-out infinite alternate;
}

@keyframes manaPulse {
  from {
    filter: brightness(0.9);
  }
  to {
    filter: brightness(1.3);
  }
}

.ledger-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-panel {
  min-height: 160px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.stat-panel span,
.section-heading span {
  color: rgba(232, 219, 192, 0.7);
  text-transform: uppercase;
  font-size: 0.76rem;
}

.stat-panel strong {
  color: #fff1cc;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.stat-panel small {
  color: var(--teal-soft);
}

.asset-card {
  min-height: 142px;
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.asset-card img {
  width: 96px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(40, 230, 216, 0.24));
}

.asset-card a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--teal-soft);
}

.history-list {
  margin: 0;
  padding: 18px;
  list-style: none;
  border: 1px solid rgba(222, 181, 96, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(13, 19, 20, 0.88), rgba(20, 25, 25, 0.94)),
    url("assets/generated/texture-dark-metal.png") center / 540px;
}

.history-list li {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(222, 181, 96, 0.16);
}

.history-list li:last-child {
  border-bottom: 0;
}

.history-list strong {
  color: var(--gold-bright);
  font-family: var(--serif);
}

.history-list span {
  color: rgba(232, 219, 192, 0.76);
}

.control-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.settings-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.section-heading strong {
  min-width: 104px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--teal-soft);
  background: url("assets/generated/button-status-chip.png") center / 100% 100% no-repeat;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
}

body.is-loading .section-heading strong {
  color: #ffdda1;
  border-color: rgba(242, 216, 136, 0.56);
}

.switch-row,
.range-row {
  min-height: 46px;
  display: grid;
  align-items: center;
  gap: 12px;
  color: #eadfc3;
}

.switch-row {
  grid-template-columns: 1fr auto auto;
}

.switch-row input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.switch {
  width: 48px;
  height: 26px;
  border: 1px solid rgba(216, 177, 94, 0.42);
  border-radius: 999px;
  background: rgba(5, 9, 10, 0.75);
  position: relative;
}

.switch::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(242, 216, 136, 0.4);
  transition: transform 160ms ease, background 160ms ease;
}

.switch-row input:checked + .switch::before {
  transform: translateX(20px);
  background: var(--teal-soft);
  box-shadow: 0 0 12px rgba(55, 235, 224, 0.7);
}

.range-row {
  grid-template-columns: 1fr;
}

.range-row input {
  width: 100%;
  accent-color: var(--teal);
}

.phone-shell {
  width: min(100%, 340px);
  min-height: 572px;
  margin-inline: auto;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(rgba(9, 13, 14, 0.86), rgba(13, 19, 20, 0.96)),
    url("assets/generated/texture-dark-metal.png") center / 480px;
  box-shadow: inset 0 0 0 4px rgba(2, 4, 5, 0.72), 0 22px 42px rgba(0, 0, 0, 0.32);
  transition: min-height 180ms ease;
}

.phone-shell.is-compact {
  min-height: 488px;
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-top img {
  width: 54px;
  height: 54px;
  border-radius: 8px;
}

.phone-top span,
.phone-hero span {
  display: block;
  color: rgba(232, 219, 192, 0.68);
  font-size: 0.82rem;
}

.phone-top strong {
  color: #fff1cc;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 500;
}

.phone-hero {
  margin-top: 26px;
  min-height: 238px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(222, 181, 96, 0.38);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 45%, rgba(38, 217, 210, 0.32), transparent 48%),
    linear-gradient(160deg, rgba(229, 213, 171, 0.16), rgba(8, 13, 14, 0.72)),
    url("assets/generated/texture-parchment.png") center / 460px;
}

.phone-hero img {
  width: 172px;
  filter: drop-shadow(0 0 22px rgba(41, 230, 216, 0.36));
}

.phone-hero span {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1.5rem;
}

.phone-modules {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.phone-modules button {
  min-height: 68px;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  color: #fff1cc;
  border: 1px solid rgba(222, 181, 96, 0.36);
  border-radius: var(--radius);
  background: rgba(8, 13, 14, 0.7);
  text-align: left;
}

.phone-modules img {
  width: 54px;
  aspect-ratio: 1;
  object-fit: contain;
}

.skin-panel {
  border-style: solid;
  border-width: 56px 72px 64px;
  border-image-source: url("assets/ui-kit/panel/panel.png");
  border-image-slice: 160 210 175 210 fill;
  border-image-width: 56px 72px 64px;
  border-image-repeat: stretch;
}

.skin-header-bar {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px clamp(24px, 4vw, 54px);
  background: url("assets/ui-kit/header/header.png") center / 100% 100% no-repeat;
}

.skin-rail {
  min-height: 560px;
  padding: 132px 28px 72px;
  background: url("assets/ui-kit/rail/rail.png") center / 100% 100% no-repeat;
}

.skin-nav-item {
  position: relative;
  isolation: isolate;
  min-height: 54px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 0 28px 0 24px;
  border: 0;
  color: #efe2c2;
  background: transparent;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
}

.skin-nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("assets/ui-kit/nav/nav-idle.png") center / 100% 100% no-repeat;
}

.skin-nav-item.is-active::before,
.skin-nav-item:hover::before {
  background-image: url("assets/ui-kit/nav/nav-active.png");
}

.skin-nav-item svg {
  width: 18px;
  height: 18px;
  fill: var(--gold-bright);
}

.skin-progress {
  margin-top: 0;
}

.skin-progress-knob {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(44, 231, 219, 0.25));
}

.kit-page {
  background:
    linear-gradient(rgba(16, 18, 18, 0.8), rgba(16, 18, 18, 0.88)),
    url("assets/generated/texture-dark-metal.png") center / 680px;
}

.kit-shell {
  width: min(1380px, calc(100% - 28px));
  margin: 14px auto 42px;
  display: grid;
  gap: 18px;
}

.kit-header {
  justify-content: space-between;
  min-width: 0;
}

.kit-header img {
  width: 58px;
  filter: drop-shadow(0 0 12px rgba(44, 231, 219, 0.28));
}

.kit-header div {
  flex: 1;
  min-width: 0;
}

.kit-header span {
  color: var(--gold);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.kit-header strong,
.kit-panel-large h1,
.kit-panel-small h2,
.kit-assets h2 {
  display: block;
  color: #fff2cd;
  font-family: var(--serif);
  font-weight: 500;
}

.kit-header strong {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.kit-layout {
  display: grid;
  grid-template-columns: minmax(220px, 286px) minmax(0, 1fr);
  gap: 18px;
}

.kit-rail {
  display: grid;
  align-content: start;
  gap: 10px;
}

.kit-stack {
  display: grid;
  gap: 18px;
}

.kit-panel-large,
.kit-panel-small,
.kit-assets {
  color: #e9dec1;
}

.kit-panel-large {
  min-height: 310px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.kit-panel-large h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.kit-panel-large p,
.kit-panel-small p {
  max-width: 720px;
  color: rgba(232, 220, 198, 0.75);
  line-height: 1.55;
}

.kit-progress-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 44px;
  align-items: center;
  gap: 14px;
  max-width: 680px;
}

.kit-card-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(360px, 1.3fr);
  gap: 18px;
}

.kit-panel-small {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 14px;
}

.kit-panel-small h2,
.kit-assets h2 {
  font-size: 1.6rem;
}

.kit-assets {
  min-height: 154px;
  display: grid;
  align-content: center;
  gap: 12px;
}

.kit-asset-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kit-asset-links a {
  color: var(--teal-soft);
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .nav-rail {
    padding-inline: 10px;
  }

  .brand-mark {
    width: 58px;
  }

  .brand-mark img {
    width: 54px;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .nav-item span,
  .rail-status span,
  .rail-status strong {
    display: none;
  }

  .rail-status {
    min-height: 44px;
    grid-template-columns: 1fr;
    place-items: center;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .control-column {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 16px, 720px);
    grid-template-columns: 1fr;
    margin: 8px auto;
  }

  .nav-rail {
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: 42px;
    overflow-x: hidden;
    align-content: center;
    justify-content: center;
  }

  .nav-item {
    min-height: 40px;
  }

  .rail-status {
    display: none;
  }

  .topbar,
  .top-controls {
    flex-wrap: wrap;
  }

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

  .top-controls {
    width: 100%;
  }

  .search-control {
    width: 100%;
    flex: 1 1 100%;
  }

  .hero-panel {
    min-height: 480px;
    grid-template-columns: 1fr;
    align-items: end;
    background:
      linear-gradient(180deg, rgba(12, 17, 18, 0.08), rgba(239, 231, 211, 0.96) 62%),
      url("assets/generated/hero-arcane-dashboard.png") 25% top / 900px auto no-repeat;
  }

  .hero-copy {
    grid-column: 1;
    padding: 230px 22px 24px;
  }

  .module-list,
  .asset-grid,
  .ledger-grid,
  .control-column,
  .kit-layout,
  .kit-card-grid {
    grid-template-columns: 1fr;
  }

  .kit-rail {
    min-height: 420px;
    padding-top: 118px;
  }

  .module-card {
    grid-template-columns: 104px 1fr;
  }

  .module-card img {
    width: 104px;
  }
}

@media (max-width: 560px) {
  .main-frame {
    padding: 10px;
  }

  .skin-panel {
    border-width: 44px 42px 48px;
    border-image-width: 44px 42px 48px;
  }

  .skin-header-bar {
    flex-wrap: wrap;
    padding: 18px 22px;
  }

  .kit-header {
    gap: 10px;
  }

  .kit-header img {
    width: 46px;
  }

  .kit-header .secondary-button {
    min-height: 48px;
    padding-inline: 28px;
  }

  .kit-shell {
    width: min(100% - 18px, 720px);
  }

  .kit-rail {
    min-height: 380px;
    padding: 108px 22px 58px;
  }

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

  .tab {
    min-height: 46px;
    border-bottom: 1px solid rgba(217, 180, 98, 0.32);
  }

  .module-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .module-card img {
    margin: 0 auto;
  }

  .module-title-row {
    justify-content: center;
  }

  .asset-card {
    grid-template-columns: 72px 1fr;
  }

  .asset-card img {
    width: 72px;
  }
}
