
/* 凭证页以开放导轨和单一隔离剖面组织，不使用卡片阵列或装饰圆环。 */
.view--keys {
  --key-cold: 112, 188, 202;
  padding-bottom: 56px;
}

.key-masthead {
  position: relative;
  min-height: 218px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 164px;
  align-items: end;
  gap: 28px;
  padding: 38px 1.5% 34px 3.2%;
  overflow: clip;
  border-bottom: 1px solid var(--line-strong);
  isolation: isolate;
}

.key-masthead::before {
  position: absolute;
  z-index: -2;
  content: "";
  inset: 0 -8% -34% 27%;
  background:
    linear-gradient(151deg, transparent 0 31%, rgba(var(--accent-rgb), 0.08) 31.2% 31.45%, transparent 31.7%),
    linear-gradient(164deg, transparent 0 48%, rgba(var(--key-cold), 0.055) 48.2% 65%, transparent 65.2%);
  clip-path: polygon(13% 0, 100% 0, 91% 72%, 57% 100%, 0 63%);
}

.key-masthead::after {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 9%;
  width: 26%;
  height: 100%;
  content: "";
  border-left: 1px solid rgba(var(--key-cold), 0.2);
  background: linear-gradient(118deg, rgba(var(--key-cold), 0.025), transparent 68%);
  transform: skewX(-21deg);
  transform-origin: bottom;
}

.key-masthead__copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding-left: 19px;
}

.key-masthead__copy::before {
  position: absolute;
  top: 3px;
  bottom: 2px;
  left: 0;
  width: 1px;
  content: "";
  background: linear-gradient(var(--accent) 0 34%, var(--line-strong) 34% 100%);
}

.key-masthead__copy .eyebrow {
  margin: 0 0 15px;
  color: var(--text-3);
  font: 9px/1 var(--font-data);
  letter-spacing: 0.14em;
}

.key-masthead__copy .eyebrow span {
  margin-right: 13px;
  color: var(--accent);
}

.key-masthead__copy h1 {
  margin: 0;
  color: var(--text-1);
  font: 400 clamp(34px, 4vw, 48px)/0.96 var(--font-display);
  letter-spacing: -0.045em;
}

.key-masthead__copy > p:last-child {
  max-width: 590px;
  margin: 17px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.75;
}

.key-masthead__measure {
  position: relative;
  z-index: 2;
  min-height: 98px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: end;
  gap: 3px 12px;
  padding: 0 0 13px 16px;
  border-left: 1px solid var(--line-strong);
}

.key-masthead__measure::before {
  position: absolute;
  top: 0;
  left: -1px;
  width: 2px;
  height: 26px;
  content: "";
  background: var(--accent);
}

.key-masthead__measure span {
  grid-column: 1 / -1;
  color: var(--text-3);
  font-size: 9px;
}

.key-masthead__measure b {
  color: var(--text-1);
  font: 400 41px/0.9 var(--font-display);
}

.key-masthead__measure small {
  align-self: end;
  padding-bottom: 2px;
  color: var(--text-2);
  font: 9px/1.3 var(--font-data);
}

.key-create-button {
  position: relative;
  z-index: 3;
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 14px 0 21px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  clip-path: polygon(0 0, 89% 0, 100% 35%, 97% 100%, 8% 92%, 0 70%);
  font: 600 11px/1 var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
  transition: filter 160ms var(--ease-mechanical), transform 160ms var(--ease-mechanical);
}

.key-create-button:hover:not(:disabled) { filter: brightness(1.09); transform: translate(2px, -1px); }
.key-create-button:disabled { cursor: not-allowed; filter: grayscale(0.8); opacity: 0.38; }
.key-create-button i { font: 15px/1 var(--font-data); }

.key-masthead__trace {
  position: absolute;
  z-index: 0;
  inset: auto -2% -8px 24%;
  width: 78%;
  height: 84%;
  pointer-events: none;
}

.key-masthead__trace path {
  fill: none;
  stroke: rgba(var(--key-cold), 0.19);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.key-masthead__trace path:first-child { stroke: rgba(var(--accent-rgb), 0.31); }

/* 庭中主题拥有独立的横向缀线语法，工业主题不会渲染这组花瓣与种子。 */
.garden-key-weave,
.garden-key-mobile-weave {
  display: none;
}

.key-shared-note {
  position: relative;
  max-width: 880px;
  display: grid;
  grid-template-columns: 53px 1fr;
  align-items: center;
  gap: 15px;
  margin: 20px 0 0 3.2%;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.6;
}

.key-shared-note span {
  position: relative;
  height: 1px;
  background: var(--accent);
}

.key-shared-note span::after {
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  content: "";
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}

.key-workbench {
  min-height: 625px;
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.28fr);
  gap: 28px;
  margin-top: 30px;
}

.key-rail {
  position: relative;
  min-width: 0;
  padding: 23px 20px 28px 3.2%;
  border-right: 1px solid var(--line-strong);
  overflow: hidden;
}

.key-rail::before {
  position: absolute;
  top: 0;
  right: -1px;
  width: 2px;
  height: 105px;
  content: "";
  background: var(--accent);
}

.key-rail::after {
  position: absolute;
  z-index: -1;
  right: -28%;
  bottom: 7%;
  width: 92%;
  height: 42%;
  content: "";
  background: linear-gradient(152deg, transparent, rgba(var(--key-cold), 0.035));
  clip-path: polygon(22% 0, 100% 17%, 76% 100%, 0 73%);
}

.key-rail__head {
  min-height: 63px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.key-rail__head span {
  color: var(--text-3);
  font: 8px/1 var(--font-data);
  letter-spacing: 0.13em;
}

.key-rail__head h2 {
  margin: 7px 0 0;
  font: 400 18px/1 var(--font-display);
}

.key-rail__head button {
  min-height: 32px;
  padding: 0 0 0 18px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--text-3);
  font-size: 9px;
  cursor: pointer;
}

.key-rail__head button:hover:not(:disabled) { color: var(--accent); }
.key-rail__head button:disabled { cursor: default; opacity: 0.35; }

.key-list-state {
  min-height: 39px;
  display: flex;
  align-items: center;
  color: var(--text-3);
  font: 8px/1 var(--font-data);
  letter-spacing: 0.08em;
}

.key-route-list {
  position: relative;
  max-height: 500px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.key-route {
  position: relative;
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) minmax(78px, auto);
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 12px;
  padding: 13px 8px 13px 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
  transition: background 150ms var(--ease-mechanical), padding 150ms var(--ease-mechanical);
}

.key-route::before {
  position: absolute;
  z-index: -1;
  inset: 5px -24% 5px 4px;
  content: "";
  background: linear-gradient(102deg, rgba(var(--accent-rgb), 0.1), rgba(var(--key-cold), 0.035) 52%, transparent 76%);
  clip-path: polygon(0 7%, 84% 0, 100% 39%, 90% 100%, 4% 94%);
  opacity: 0;
  transform: translateX(-11px);
  transition: opacity 150ms var(--ease-mechanical), transform 180ms var(--ease-mechanical);
}

.key-route:hover { background: linear-gradient(90deg, rgba(var(--key-cold), 0.025), transparent 82%); }
.key-route.is-active { padding-left: 8px; }
.key-route.is-active::before { opacity: 1; transform: none; }

.key-route > i {
  grid-row: 1 / -1;
  width: 2px;
  height: 39px;
  background: var(--status-success);
  box-shadow: 0 0 11px rgba(var(--key-cold), 0.18);
}

.key-route.is-expiring > i { background: var(--status-warning); }
.key-route.is-expired > i,
.key-route.is-paused > i { background: var(--text-3); box-shadow: none; }
.key-route.is-revoked > i { height: 1px; background: var(--status-danger); box-shadow: none; }

.key-route__identity { min-width: 0; align-self: end; }
.key-route__identity b { display: block; overflow: hidden; font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.key-route__identity code { display: block; margin-top: 5px; overflow: hidden; color: var(--text-3); font: 8px/1 var(--font-data); text-overflow: ellipsis; white-space: nowrap; }
.key-route__usage { grid-column: 2; align-self: start; display: flex; gap: 8px; margin-top: 5px; }
.key-route__usage small { color: var(--text-3); font-size: 8px; }
.key-route__usage time { color: var(--text-2); font: 8px/1.2 var(--font-data); }
.key-route em { grid-column: 3; grid-row: 1 / -1; justify-self: end; color: var(--status-success); font: normal 8px/1 var(--font-data); letter-spacing: 0.08em; }
.key-route.is-expiring em { color: var(--status-warning); }
.key-route.is-expired em,
.key-route.is-paused em { color: var(--text-3); }
.key-route.is-revoked em { color: var(--status-danger); }

.key-route-empty {
  min-height: 210px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 15px;
  color: var(--text-3);
  text-align: center;
}

.key-route-empty > i {
  width: 72px;
  height: 31px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  transform: skewX(-28deg);
}

.key-route-empty p { margin: 0; font-size: 10px; }
.key-route-empty button { min-height: 34px; padding: 0 15px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-1); cursor: pointer; }
.key-route-empty.is-error > i { border-color: var(--status-danger); }

.key-route-skeleton { display: grid; gap: 1px; }
.key-route-skeleton i {
  height: 82px;
  background: linear-gradient(105deg, rgba(var(--key-cold), 0.018), rgba(var(--key-cold), 0.07), rgba(var(--key-cold), 0.018));
  background-size: 220% 100%;
  clip-path: polygon(0 0, 93% 0, 100% 28%, 95% 100%, 0 100%);
  animation: key-loading 1.4s linear infinite;
}

.key-focus {
  position: relative;
  min-width: 0;
  min-height: 625px;
  overflow: clip;
  outline: 0;
  background:
    linear-gradient(123deg, rgba(var(--key-cold), 0.035), transparent 37%),
    linear-gradient(155deg, rgba(var(--accent-rgb), 0.025), transparent 59%);
  clip-path: polygon(2% 0, 96% 0, 100% 5%, 98.5% 96%, 91% 100%, 0 98%, 0 8%);
}

.key-focus::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: -7%;
  width: 61%;
  height: 100%;
  content: "";
  border-left: 1px solid rgba(var(--key-cold), 0.13);
  background: linear-gradient(131deg, rgba(var(--key-cold), 0.038), transparent 60%);
  clip-path: polygon(30% 0, 100% 0, 100% 84%, 3% 100%, 17% 47%);
}

.key-focus[aria-busy="true"] { cursor: wait; }
.key-focus-view { position: relative; min-height: 625px; padding: 42px clamp(27px, 4vw, 62px) 38px; }
.key-focus__axis { position: absolute; top: 0; left: 21px; width: 1px; height: 38%; background: linear-gradient(var(--accent), var(--line)); }
.key-focus__axis::after { position: absolute; top: 42%; left: -4px; width: 9px; height: 9px; content: ""; border: 1px solid var(--accent); transform: rotate(45deg); }

.key-focus__empty {
  min-height: 625px;
  display: grid;
  place-content: center;
  justify-items: start;
  max-width: 520px;
  padding: 40px 12%;
}

.key-focus__empty > span {
  width: min(310px, 70vw);
  height: 64px;
  margin-bottom: 35px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(var(--key-cold), 0.03), transparent);
  clip-path: polygon(0 9%, 79% 0, 100% 43%, 83% 100%, 5% 82%);
}

.key-focus__empty h2 { margin: 0; font: 400 clamp(25px, 3vw, 36px)/1.05 var(--font-display); }
.key-focus__empty p { max-width: 500px; margin: 15px 0 0; color: var(--text-2); font-size: 11px; line-height: 1.75; }
.key-focus__empty button { min-height: 39px; margin-top: 24px; padding: 0 20px; border: 1px solid var(--accent); background: transparent; color: var(--accent); clip-path: polygon(0 0, 93% 0, 100% 35%, 97% 100%, 6% 91%, 0 70%); cursor: pointer; }
.key-focus__empty button:disabled { opacity: 0.35; }
.key-focus__empty.is-error > span { border-color: var(--status-danger); }
.key-focus__empty.is-demo > span { border-color: var(--line); opacity: 0.52; }

.key-focus__loading { min-height: 625px; position: relative; display: grid; align-content: center; gap: 16px; padding: 15%; }
.key-focus__loading i { display: block; width: 64%; height: 1px; background: var(--line); transform: skewX(-30deg); }
.key-focus__loading i:nth-child(2) { width: 82%; margin-left: 8%; }
.key-focus__loading i:nth-child(3) { width: 43%; margin-left: 22%; background: var(--accent); }
.key-focus__loading span { position: absolute; inset: 24% 19%; background: linear-gradient(130deg, rgba(var(--key-cold), 0.05), transparent); clip-path: polygon(11% 0, 100% 17%, 79% 100%, 0 71%); animation: key-breathe 1.4s ease-in-out infinite alternate; }

.key-detail__head {
  position: relative;
  min-height: 146px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 5px 0 25px 17px;
  border-left: 1px solid var(--line-strong);
}

.key-detail__status { display: inline-flex; align-items: center; gap: 7px; color: var(--status-success); font: 8px/1 var(--font-data); letter-spacing: 0.09em; }
.key-detail__status i { width: 23px; height: 1px; background: currentColor; }
.key-detail__status.is-expiring { color: var(--status-warning); }
.key-detail__status.is-expired,
.key-detail__status.is-paused { color: var(--text-3); }
.key-detail__status.is-revoked { color: var(--status-danger); }
.key-detail__head h2 { max-width: 560px; margin: 18px 0 10px; overflow-wrap: anywhere; font: 400 clamp(30px, 4vw, 47px)/0.98 var(--font-display); letter-spacing: -0.04em; }
.key-detail__head code { color: var(--text-3); font: 9px/1 var(--font-data); }
.key-detail__index { align-self: start; color: rgba(var(--key-cold), 0.11); font: 300 clamp(55px, 8vw, 92px)/0.8 var(--font-display); letter-spacing: -0.08em; }

.key-detail__facts {
  display: grid;
  grid-template-columns: 0.82fr 1.22fr 1fr 1.35fr;
  margin: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.key-detail__facts > div { min-width: 0; min-height: 76px; padding: 15px 12px; border-right: 1px solid var(--line); }
.key-detail__facts > div:last-child { border-right: 0; }
.key-detail__facts dt { color: var(--text-3); font-size: 8px; }
.key-detail__facts dd { margin: 10px 0 0; overflow-wrap: anywhere; color: var(--text-1); font: 9px/1.4 var(--font-data); }
.key-detail__facts dd small { display: block; margin-top: 4px; color: var(--text-3); font-size: 7px; }

.key-limit-section { position: relative; margin-top: 42px; padding-left: 17px; }
.key-section-heading { border-left: 1px solid var(--line-strong); padding-left: 13px; }
.key-section-heading span { color: var(--accent); font: 8px/1 var(--font-data); letter-spacing: 0.1em; }
.key-section-heading h3 { margin: 8px 0 0; font-size: 12px; font-weight: 520; }
.key-limit-trace { position: relative; width: calc(66.66% - 90px); height: 22px; margin: 15px 0 -4px 33.33%; border-top: 1px solid rgba(var(--key-cold), 0.27); transform: skewX(-28deg); }
.key-limit-trace::before { position: absolute; top: -1px; right: -33%; width: 34%; height: 1px; content: ""; background: var(--accent); }
.key-limit-trace i { position: absolute; top: -4px; width: 7px; height: 7px; border: 1px solid rgba(var(--key-cold), 0.48); background: var(--canvas); transform: skewX(28deg) rotate(45deg); }
.key-limit-trace i:nth-child(1) { left: 0; }
.key-limit-trace i:nth-child(2) { left: 50%; }
.key-limit-trace i:nth-child(3) { right: -33%; border-color: var(--accent); }
.key-limit-row { display: grid; grid-template-columns: 1fr repeat(3, 1.18fr); border-bottom: 1px solid var(--line); }
.key-limit-row > span { display: flex; align-items: center; color: var(--text-3); font-size: 8px; }
.key-limit-row > div { min-height: 61px; padding: 12px 10px; border-left: 1px solid var(--line); }
.key-limit-row small { display: block; color: var(--text-3); font-size: 7px; }
.key-limit-row b { display: block; margin-top: 8px; overflow-wrap: anywhere; font: 500 8px/1.35 var(--font-data); }
.key-limit-row .is-effective { background: linear-gradient(112deg, rgba(var(--accent-rgb), 0.08), transparent); }
.key-limit-row .is-effective b { color: var(--accent); }
.key-limit-section > p { margin: 11px 0 0; color: var(--text-3); font-size: 8px; line-height: 1.6; }

.key-action-error { margin: 20px 0 0; padding: 10px 13px; border-left: 2px solid var(--status-danger); background: rgba(205, 57, 68, 0.07); color: #f29ba3; font-size: 10px; line-height: 1.5; }

.key-detail__actions {
  min-height: 82px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-top: 30px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.key-detail__actions > p { margin: 0; color: var(--text-3); font-size: 9px; }
.key-detail__actions > div { display: flex; gap: 8px; }
.key-detail__actions button,
.key-secret-actions button,
.key-form-actions button,
.key-reveal-foot button {
  min-height: 39px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-1);
  clip-path: polygon(0 0, 93% 0, 100% 30%, 97% 100%, 6% 93%, 0 72%);
  font-size: 10px;
  cursor: pointer;
}

.key-detail__actions button:hover:not(:disabled),
.key-secret-actions button:hover:not(:disabled),
.key-form-actions button:hover:not(:disabled),
.key-reveal-foot button:hover:not(:disabled) { background: rgba(var(--key-cold), 0.06); }
.key-detail__actions button:disabled,
.key-form-actions button:disabled { cursor: not-allowed; opacity: 0.32; }
.key-detail__actions .key-reveal-button { min-width: 174px; display: flex; align-items: center; justify-content: space-between; border-color: var(--accent); color: var(--accent); }
.key-detail__actions .is-danger,
.key-form-actions .is-danger { border-color: var(--status-danger); color: #ef7e87; }

.key-workbench-title { position: relative; max-width: 650px; padding-left: 17px; border-left: 1px solid var(--line-strong); }
.key-workbench-title > span { color: var(--accent); font: 8px/1 var(--font-data); letter-spacing: 0.1em; }
.key-workbench-title h2 { margin: 15px 0 0; font: 400 clamp(29px, 4vw, 44px)/1 var(--font-display); letter-spacing: -0.04em; }
.key-workbench-title p { max-width: 570px; margin: 14px 0 0; color: var(--text-2); font-size: 11px; line-height: 1.7; }

.key-create-form { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px; margin-top: 49px; }
.key-create-form label { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; }
.key-create-form label > span { color: var(--text-1); font-size: 10px; }
.key-create-form label > small { color: var(--text-3); font-size: 8px; }
.key-create-form input,
.key-create-form select {
  grid-column: 1 / -1;
  width: 100%;
  height: 46px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  background: linear-gradient(90deg, rgba(var(--key-cold), 0.045), transparent);
  color: var(--text-1);
  font: 11px/1 var(--font-ui);
}

.key-create-form select { color-scheme: dark; }
.key-create-form input:focus,
.key-create-form select:focus { border-bottom-color: var(--accent); box-shadow: inset 19px 0 0 -18px var(--accent); }
.key-create-form input[aria-invalid="true"] { border-bottom-color: var(--status-danger); }

.key-create-summary {
  position: relative;
  max-width: 690px;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 24px;
  margin: 43px 0 0 8%;
}

.key-create-summary > span {
  min-height: 72px;
  border-top: 1px solid rgba(var(--key-cold), 0.4);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(143deg, rgba(var(--key-cold), 0.07), transparent);
  clip-path: polygon(6% 0, 100% 17%, 78% 100%, 0 71%);
}

.key-create-summary b,
.key-create-safety b { font-size: 10px; }
.key-create-summary p,
.key-create-safety p { margin: 8px 0 0; color: var(--text-2); font-size: 10px; line-height: 1.65; }
.key-create-safety { margin-top: 39px; padding: 15px 0 15px 17px; border-left: 1px solid var(--accent); }
.key-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 33px; padding-top: 19px; border-top: 1px solid var(--line); }
.key-form-actions .is-primary,
.key-secret-actions .is-primary { min-width: 168px; display: flex; align-items: center; justify-content: space-between; border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.key-focus-view[aria-busy="true"],
.key-focus[aria-busy="true"] .key-focus-view { opacity: 0.72; }

.key-focus-view--reveal {
  background:
    linear-gradient(128deg, rgba(211, 230, 237, 0.075), transparent 38%),
    linear-gradient(160deg, transparent 37%, rgba(var(--key-cold), 0.045));
}

.key-focus__veil { position: absolute; z-index: -1; pointer-events: none; }
.key-focus__veil--one { inset: 8% -7% 19% 26%; border: 1px solid rgba(211, 230, 237, 0.11); background: linear-gradient(134deg, rgba(211, 230, 237, 0.045), transparent 61%); clip-path: polygon(19% 0, 100% 13%, 83% 100%, 0 78%); }
.key-focus__veil--two { inset: 27% 13% 5% -5%; border-top: 1px solid rgba(var(--accent-rgb), 0.22); background: linear-gradient(151deg, rgba(var(--key-cold), 0.025), transparent 68%); clip-path: polygon(7% 0, 100% 17%, 72% 100%, 0 74%); }

.key-secret-shell {
  position: relative;
  max-width: 820px;
  margin: 61px 0 0 5%;
  padding: 27px 31px 25px;
  border-top: 1px solid rgba(213, 236, 242, 0.43);
  border-bottom: 1px solid rgba(var(--key-cold), 0.2);
  background: linear-gradient(112deg, rgba(211, 230, 237, 0.075), rgba(var(--key-cold), 0.025) 60%, transparent);
  clip-path: polygon(0 0, 96% 0, 100% 22%, 97% 100%, 4% 92%, 0 71%);
}

.key-secret-shell::before { position: absolute; top: 0; left: 0; width: 28%; height: 2px; content: ""; background: var(--accent); }
.key-secret-shell > span { color: rgba(220, 239, 244, 0.63); font: 8px/1 var(--font-data); letter-spacing: 0.12em; }
.key-secret-shell code { display: block; margin-top: 22px; overflow-wrap: anywhere; color: #e8f5f5; font: 500 clamp(12px, 1.45vw, 17px)/1.65 var(--font-data); letter-spacing: 0.025em; outline: 0; }
.key-secret-shell.is-masked code { color: rgba(220, 239, 244, 0.54); letter-spacing: 0.16em; }
.key-secret-shell code:focus-visible { box-shadow: 0 2px 0 var(--accent); }
.key-secret-shell p { margin: 20px 0 0; color: var(--text-2); font-size: 9px; line-height: 1.6; }
.key-secret-actions { max-width: 780px; display: flex; justify-content: flex-end; gap: 9px; margin: 21px 0 0 8%; }
.key-reveal-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 54px; padding-top: 17px; border-top: 1px solid var(--line); }
.key-reveal-foot p { margin: 0; color: var(--text-3); font-size: 9px; }
.key-reveal-failure { max-width: 650px; margin-top: 50px; padding: 21px 24px; border-left: 2px solid var(--status-danger); background: rgba(205, 57, 68, 0.06); }
.key-reveal-failure b { color: #ef8b94; font-size: 11px; }
.key-reveal-failure p { margin: 9px 0 0; color: var(--text-2); font-size: 10px; }

.key-focus-view--revoke { background: linear-gradient(127deg, rgba(205, 57, 68, 0.035), transparent 45%); }
.key-focus__danger-line { position: absolute; top: 0; left: 21px; width: 1px; height: 58%; background: linear-gradient(var(--status-danger), rgba(205, 57, 68, 0.08)); }
.key-focus-view--revoke .key-workbench-title { border-left-color: var(--status-danger); }
.key-focus-view--revoke .key-workbench-title > span { color: #ef7e87; }
.key-revoke-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 49px 0 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.key-revoke-summary > div { min-height: 79px; padding: 16px; border-right: 1px solid var(--line); }
.key-revoke-summary > div:last-child { border-right: 0; }
.key-revoke-summary dt { color: var(--text-3); font-size: 8px; }
.key-revoke-summary dd { margin: 11px 0 0; overflow-wrap: anywhere; font: 9px/1.45 var(--font-data); }
.key-danger-check { min-height: 58px; max-width: 670px; display: grid; grid-template-columns: 20px 1fr; gap: 14px; margin-top: 42px; padding: 18px 21px; border-left: 2px solid var(--status-danger); background: linear-gradient(100deg, rgba(205, 57, 68, 0.08), transparent); cursor: pointer; touch-action: manipulation; }
.key-danger-check input { width: 18px; height: 18px; margin: 1px 0 0; appearance: none; border: 1px solid color-mix(in srgb, var(--status-danger) 76%, var(--line-strong)); background: transparent; clip-path: polygon(0 0, 68% 0, 100% 32%, 100% 100%, 32% 100%, 0 68%); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.key-danger-check input:checked { border-color: var(--status-danger); background: linear-gradient(45deg, transparent 43%, var(--canvas) 44% 56%, transparent 57%) center / 8px 8px no-repeat, linear-gradient(-45deg, transparent 43%, var(--canvas) 44% 56%, transparent 57%) center / 8px 8px no-repeat, var(--status-danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--status-danger) 15%, transparent); }
.key-danger-check input:focus-visible { outline: 2px solid var(--status-danger); outline-offset: 3px; }
.key-danger-check:has(input:disabled) { cursor: not-allowed; opacity: 0.46; }
.key-danger-check input:disabled { cursor: not-allowed; }
.key-danger-check:hover input:not(:disabled) { border-color: var(--status-danger); }
html[data-skin="aletheia"] .key-danger-check input { border-radius: 50%; clip-path: none; }
html[data-skin="aletheia"] .key-danger-check input:checked { background: radial-gradient(circle, var(--surface-1) 0 2px, transparent 2.5px), color-mix(in srgb, var(--status-danger) 82%, var(--surface-1)); }
.key-danger-check b { display: block; font-size: 10px; }
.key-danger-check small { display: block; margin-top: 7px; color: var(--text-3); font-size: 9px; line-height: 1.5; }

.key-endpoint {
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) minmax(250px, 0.75fr) 104px;
  align-items: center;
  gap: 18px;
  margin: 24px 0 0 3.2%;
  padding: 0 2.5% 0 17px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(var(--key-cold), 0.025), transparent 72%);
}

.key-endpoint::before { position: absolute; top: -1px; left: 0; width: 18%; height: 2px; content: ""; background: var(--accent); }
.key-endpoint__label { padding-left: 11px; border-left: 1px solid var(--line-strong); }
.key-endpoint__label span { display: block; color: var(--text-3); font-size: 8px; }
.key-endpoint__label b { display: block; margin-top: 5px; font: 500 10px/1 var(--font-data); }
.key-endpoint code { overflow: hidden; color: var(--text-1); font: 10px/1 var(--font-data); text-overflow: ellipsis; white-space: nowrap; }
.key-endpoint > p { margin: 0; color: var(--text-3); font-size: 9px; line-height: 1.5; }
.key-endpoint > button { min-height: 35px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-1); clip-path: polygon(0 0, 92% 0, 100% 31%, 97% 100%, 5% 92%, 0 72%); font-size: 9px; cursor: pointer; }
.key-endpoint > button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.key-endpoint > button:disabled { cursor: not-allowed; opacity: 0.3; }

@keyframes key-loading { to { background-position: -120% 0; } }
@keyframes key-breathe { from { opacity: 0.35; transform: translate(-4px, 3px); } to { opacity: 0.8; transform: translate(4px, -3px); } }

@media (max-width: 1120px) {
  .key-masthead { grid-template-columns: minmax(0, 1fr) 130px 150px; gap: 18px; }
  .key-workbench { grid-template-columns: minmax(270px, 0.62fr) minmax(470px, 1.38fr); gap: 18px; }
  .key-focus-view { padding-inline: 35px; }
  .key-detail__facts { grid-template-columns: repeat(2, 1fr); }
  .key-detail__facts > div:nth-child(2) { border-right: 0; }
  .key-detail__facts > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .key-limit-row { grid-template-columns: 0.82fr repeat(3, 1.18fr); }
  .key-limit-row b { font-size: 7px; }
  .key-endpoint { grid-template-columns: 108px minmax(210px, 1fr) 104px; }
  .key-endpoint > p { display: none; }
}

@media (max-width: 860px) {
  .key-masthead { min-height: 194px; grid-template-columns: minmax(0, 1fr) 112px; padding-inline: 14px 2%; }
  .key-masthead__copy { padding-left: 15px; }
  .key-masthead__copy h1 { font-size: 36px; }
  .key-masthead__measure { grid-column: 2; grid-row: 1; min-height: 75px; }
  .key-create-button { grid-column: 2; grid-row: 1; align-self: end; min-height: 42px; margin-bottom: -4px; }
  .key-masthead__measure { align-self: start; }
  .key-masthead__measure b { font-size: 30px; }
  .key-masthead__trace { left: 13%; width: 94%; }
  .key-shared-note { margin-left: 14px; margin-right: 14px; }
  .key-workbench { min-height: 0; display: flex; flex-direction: column; gap: 23px; margin-top: 23px; }
  .key-rail { padding-inline: 14px; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .key-rail::before { top: auto; right: auto; bottom: -2px; left: 14px; width: 88px; height: 3px; }
  .key-route-list { max-height: 310px; }
  .key-focus { min-height: 0; margin-inline: 14px; }
  .key-focus-view,
  .key-focus__empty,
  .key-focus__loading { min-height: 570px; }
  .key-endpoint { margin-inline: 14px; padding-right: 14px; }
}

@media (max-width: 620px) {
  .view--keys { padding-inline: 0; }
  .key-masthead { min-height: 230px; grid-template-columns: minmax(0, 1fr) 104px; gap: 10px; padding: 23px 14px 24px; }
  .key-masthead__copy { align-self: start; }
  .key-masthead__copy .eyebrow { margin-bottom: 12px; }
  .key-masthead__copy h1 { font-size: 32px; }
  .key-masthead__copy > p:last-child { max-width: 280px; margin-top: 13px; font-size: 10px; }
  .key-masthead__measure { min-height: 74px; padding-left: 10px; }
  .key-masthead__measure small { font-size: 7px; }
  .key-create-button { width: 100%; min-height: 43px; padding-inline: 12px; }
  .key-shared-note { grid-template-columns: 34px 1fr; font-size: 9px; }
  .key-rail { padding-top: 16px; }
  .key-route { min-height: 79px; grid-template-columns: 7px minmax(0, 1fr) auto; padding-right: 3px; }
  .key-route__usage small { display: none; }
  .key-route em { font-size: 7px; }
  .key-focus { clip-path: polygon(2% 0, 96% 0, 100% 3%, 99% 98%, 91% 100%, 0 98%, 0 6%); }
  .key-focus-view { min-height: 540px; padding: 31px 21px 29px 27px; }
  .key-focus__empty,
  .key-focus__loading { min-height: 500px; padding-inline: 28px; }
  .key-detail__head { min-height: 132px; padding-left: 12px; }
  .key-detail__head h2 { max-width: 82%; font-size: 31px; }
  .key-detail__index { position: absolute; right: 0; font-size: 53px; }
  .key-detail__facts { grid-template-columns: 1fr; }
  .key-detail__facts > div:nth-child(n) { min-height: 60px; display: grid; grid-template-columns: 88px 1fr; align-items: center; padding: 10px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .key-detail__facts > div:last-child { border-bottom: 0; }
  .key-detail__facts dd { margin: 0; }
  .key-limit-section { margin-top: 32px; padding-left: 0; }
  .key-limit-trace { display: none; }
  .key-limit-row { grid-template-columns: 1fr; padding: 10px 0; }
  .key-limit-row > span { min-height: 30px; color: var(--text-2); }
  .key-limit-row > div { min-height: 50px; display: grid; grid-template-columns: 84px 1fr; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); border-left: 0; }
  .key-limit-row b { margin-top: 0; font-size: 8px; text-align: right; }
  .key-detail__actions { align-items: stretch; flex-direction: column; }
  .key-detail__actions > div { flex-direction: column; }
  .key-detail__actions button { width: 100%; }
  .key-create-form { grid-template-columns: 1fr; gap: 24px; margin-top: 37px; }
  .key-create-summary { grid-template-columns: 73px 1fr; gap: 15px; margin-left: 0; }
  .key-form-actions,
  .key-secret-actions { align-items: stretch; flex-direction: column-reverse; }
  .key-form-actions button,
  .key-secret-actions button { width: 100%; }
  .key-secret-shell { margin: 43px 0 0; padding: 24px 20px; }
  .key-secret-shell code { font-size: 11px; }
  .key-secret-actions { margin-left: 0; }
  .key-reveal-foot { align-items: stretch; flex-direction: column; }
  .key-reveal-foot button { width: 100%; }
  .key-revoke-summary { grid-template-columns: 1fr; }
  .key-revoke-summary > div { min-height: 59px; display: grid; grid-template-columns: 86px 1fr; align-items: center; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .key-revoke-summary > div:last-child { border-bottom: 0; }
  .key-revoke-summary dd { margin: 0; }
  .key-danger-check { padding-inline: 15px; }
  .key-endpoint { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 15px 10px 15px 13px; }
  .key-endpoint > p { display: block; grid-column: 1 / -1; }
  .key-endpoint > button { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .key-route-skeleton i,
  .key-focus__loading span { animation: none; }
  .key-create-button,
  .key-route,
  .key-route::before { transition: none; }
  .key-route.is-active::before { transform: none; }
}

@media (forced-colors: active) {
  .key-danger-check input,
  html[data-skin="aletheia"] .key-danger-check input {
    appearance: auto;
    border: 1px solid ButtonText;
    border-radius: 0;
    background: Canvas;
    box-shadow: none;
    clip-path: none;
    accent-color: Highlight;
    forced-color-adjust: auto;
  }
}
