:root {
  --background: #fffaf3;
  --foreground: #29231f;
  --card: #fff;
  --card-foreground: var(--foreground);
  --primary: #a63e16;
  --primary-foreground: #fff;
  --accent: #fae9d9;
  --accent-foreground: #702b13;
  --muted: #f4eee6;
  --muted-foreground: #66594e;
  --border: #e0d1c1;
  --input: #a99a8a;
  --ring: #a63e16;
  --destructive: #ae2424;
  --radius: .75rem;
}

.shiba-shell {
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
}

.shiba-header, .shiba-main {
  width: min(100% - 2rem, 60rem);
  margin-inline: auto;
}

.shiba-header, .shiba-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.shiba-header {
  justify-content: space-between;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}

.shiba-brand {
  font-weight: 750;
  letter-spacing: -.025em;
}

.shiba-main {
  padding-block: clamp(1.5rem, 5vw, 3.5rem);
}

.shiba-main--narrow {
  max-width: 30rem;
}

.shiba-stack {
  display: grid;
  gap: 1rem;
}

.shiba-app-resources {
  overflow-wrap: anywhere;
}

.shiba-main h1, .shiba-main h2 {
  font-weight: 700;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.shiba-main h1 {
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  line-height: 1.15;
}

.shiba-main h2 {
  font-size: 1.2rem;
}

.shiba-main :where(.card) {
  padding: clamp(1rem, 4vw, 1.5rem);
}

.shiba-main :where(pre, .shiba-prompt) {
  padding: .75rem;
  background: var(--muted);
  border-radius: var(--radius);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.shiba-muted {
  color: var(--muted-foreground);
  overflow-wrap: anywhere;
}

.shiba-main a:not(.btn) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.shiba-main summary {
  display: list-item;
  cursor: pointer;
  color: var(--primary);
}

.shiba-main details[open] > summary {
  margin-bottom: .75rem;
}

.shiba-main :focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.shiba-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1rem;
}

.shiba-row--ruled {
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}

.shiba-secret-name {
  overflow-wrap: anywhere;
}

.shiba-health-history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.75rem, 1fr));
  gap: .5rem;
  margin-top: .5rem;
}

.shiba-health-history li {
  display: grid;
  gap: .2rem;
  font-size: .8rem;
}

.shiba-health-bar {
  height: .9rem;
  border-radius: .2rem;
  background: var(--border);
}

[data-health="healthy"] .shiba-health-bar { background: #298354; }
[data-health="mixed"] .shiba-health-bar { background: #a4690b; }
[data-health="unhealthy"] .shiba-health-bar { background: var(--destructive); }

.shiba-quota-form {
  display: grid;
  grid-template-columns: minmax(5rem, 8rem) auto;
  align-items: end;
  gap: .5rem;
  max-width: 100%;
}

.shiba-deployment {
  overflow-wrap: anywhere;
}

.shiba-deployment-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.shiba-deployment-meta dd {
  overflow-wrap: anywhere;
}

.shiba-deployment-meta dt {
  color: var(--muted-foreground);
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .25rem;
}

.shiba-deployment-intent {
  grid-column: 1 / -1;
  white-space: pre-wrap;
}

.shiba-deployment-entry {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shiba-deployment-status[data-state="live"] {
  background: #e5f4ea;
  color: #225d3b;
  border-color: #b7d7c2;
}

.shiba-deployment-status:is([data-state$="failed"], [data-state="blocked"]) {
  background: #fff0ed;
  color: var(--destructive);
}

.shiba-deployment pre {
  max-height: 24rem;
  overflow: auto;
}

.shiba-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

.shiba-checks legend {
  margin-bottom: .5rem;
  font-weight: 600;
}

.shiba-checks label {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}

.shiba-timeline {
  --timeline-blue: #245ca6;
  --timeline-blue-tint: #eaf3ff;
  --timeline-blue-border: #8aaedd;
  list-style: none;
  margin: 0;
  padding: 0;
}

.shiba-timeline-stage {
  position: relative;
  min-width: 0;
  padding-inline-start: 2.75rem;
}

.shiba-timeline-stage:not(:last-child) {
  padding-bottom: 1.5rem;
}

.shiba-timeline-stage:not(:last-child)::before {
  content: "";
  position: absolute;
  inset-block: 1.625rem -.125rem;
  inset-inline-start: .75rem;
  border-inline-start: 2px dashed var(--border);
}

.shiba-timeline-stage[data-status="complete"]::before {
  border-color: #298354;
  border-inline-start-style: solid;
}

.shiba-timeline-marker {
  position: absolute;
  inset-block-start: .125rem;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  font-size: .875rem;
  font-weight: 700;
}

.shiba-timeline-stage:is([data-status="active"], [data-status="pending"])::before {
  border-color: var(--timeline-blue-border);
}

.shiba-timeline-stage[data-status="pending"] .shiba-timeline-marker {
  border-color: var(--timeline-blue-border);
  background: var(--timeline-blue-tint);
}

.shiba-timeline-stage[data-status="active"] .shiba-timeline-marker {
  border-color: var(--timeline-blue);
  background: var(--timeline-blue-tint);
}

.shiba-timeline-stage[data-status="active"] .shiba-timeline-marker::after {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--timeline-blue);
}

@media (prefers-reduced-motion: no-preference) {
  .shiba-timeline-stage[data-status="active"] .shiba-timeline-marker::after {
    animation: shiba-timeline-pulse 2s ease-in-out infinite;
  }
}

@keyframes shiba-timeline-pulse {
  50% {
    opacity: .65;
    transform: scale(1.25);
  }
}

.shiba-timeline-stage[data-status="complete"] .shiba-timeline-marker {
  border-color: #298354;
  background: #e5f4ea;
  color: #225d3b;
}

.shiba-timeline-stage[data-status="failed"] .shiba-timeline-marker {
  border-color: var(--destructive);
  background: #fff0ed;
  color: var(--destructive);
}

.shiba-timeline-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .125rem .75rem;
  min-height: 1.875rem;
}

.shiba-timeline-heading h3 {
  font-size: 1rem;
  font-weight: 650;
}

.shiba-timeline-status {
  color: var(--muted-foreground);
  font-size: .875rem;
}

.shiba-timeline-stage:is([data-status="active"], [data-status="pending"]) .shiba-timeline-status {
  color: var(--timeline-blue);
}

.shiba-timeline-stage[data-status="active"] .shiba-timeline-status {
  font-weight: 600;
}

.shiba-timeline-stage[data-status="failed"] .shiba-timeline-status {
  color: var(--destructive);
  font-weight: 600;
}

.shiba-timeline-details,
.shiba-timeline-actions {
  margin-block-start: .5rem;
}

.shiba-timeline-details > summary {
  width: fit-content;
  color: var(--primary);
  cursor: pointer;
  font-size: .875rem;
}

.shiba-review-summary {
  display: grid;
  gap: .75rem;
  margin-block-start: .75rem;
  max-inline-size: 72ch;
  overflow-wrap: anywhere;
}

.shiba-timeline-detail-content {
  margin-block-start: .75rem;
  padding: .875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
}

.shiba-infrastructure-checklist {
  display: grid;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shiba-infrastructure-checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.shiba-infrastructure-check {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #e5f4ea;
  color: #225d3b;
  font-weight: 700;
}

.shiba-admin-account {
  min-width: 0;
}

.shiba-admin-account h3, .shiba-app-resources h4 {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.shiba-release-log {
  max-block-size: 32rem;
  overflow: auto;
}

.shiba-resource-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.shiba-resource-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  font-size: .875rem;
}

.shiba-resource-table th, .shiba-resource-table td {
  padding: .625rem .75rem;
  text-align: start;
  vertical-align: top;
}

.shiba-resource-table thead {
  background: var(--muted);
}

.shiba-resource-table tbody tr {
  border-top: 1px solid var(--border);
}

.shiba-gcp-resource-table {
  table-layout: fixed;
  min-width: 58rem;
}

.shiba-gcp-resource-kind {
  width: 7rem;
}

.shiba-gcp-resource-name, .shiba-gcp-resource-location {
  width: 10rem;
}

.shiba-gcp-resource-provisioned {
  width: 10.5rem;
}

.shiba-gcp-resource-state {
  width: 7.5rem;
}

.shiba-gcp-resource-table thead th, .shiba-gcp-resource-table time {
  white-space: nowrap;
}

.shiba-gcp-resource-table code {
  overflow-wrap: anywhere;
}

.shiba-resource-project {
  display: block;
  margin-top: .2rem;
}

.shiba-resource-status {
  white-space: nowrap;
}

.shiba-resource-status[data-state="ready"] {
  background: #e5f4ea;
  color: #225d3b;
}

.shiba-resource-status[data-state="failed"] {
  background: #fff0ed;
  color: var(--destructive);
}

.shiba-stage-progress {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-block: .25rem .75rem;
  color: var(--muted-foreground);
  font-size: .75rem;
}

.shiba-stage-progress-bar {
  appearance: none;
  flex: 1;
  min-width: 0;
  height: .5rem;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--timeline-blue-tint);
  color: var(--timeline-blue);
}

.shiba-stage-progress-bar::-webkit-progress-bar {
  background: var(--timeline-blue-tint);
}

.shiba-stage-progress-bar::-webkit-progress-value {
  background: currentColor;
  border-radius: 999px;
}

.shiba-stage-progress-bar::-moz-progress-bar {
  background: currentColor;
  border-radius: 999px;
}

.shiba-timeline-stage[data-status="complete"] .shiba-stage-progress-bar {
  color: #298354;
}

.shiba-timing-table {
  min-width: 67rem;
}

.shiba-timing-table time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.shiba-timing-track {
  position: relative;
  min-inline-size: 8rem;
  block-size: .625rem;
  margin: .35rem .2rem;
  border-radius: var(--radius);
  background: var(--muted);
}

.shiba-timing-track span {
  position: absolute;
  inset-block: 0;
  border-radius: inherit;
}

.shiba-timing-queue {
  background: var(--muted-foreground);
  opacity: .55;
}

.shiba-timing-run, .shiba-timing-point {
  background: var(--primary);
}

.shiba-timing-point {
  inline-size: .25rem;
  translate: -50% 0;
}
