/* DSR calculator — dark theme, card layout, ReefGear accent */
:root {
  --dsr-accent: #f05a28;
  --dsr-accent-dim: rgba(240, 90, 40, 0.15);
  --dsr-surface: rgba(18, 18, 22, 0.92);
  --dsr-surface-2: rgba(28, 28, 34, 0.95);
  --dsr-border: rgba(255, 255, 255, 0.09);
  --dsr-border-strong: rgba(255, 255, 255, 0.14);
  --dsr-text: #e6e6ea;
  --dsr-text-muted: #9b9ba8;
  --dsr-text-dim: #78788a;
  --dsr-radius: 16px;
  --dsr-radius-sm: 10px;
  --dsr-shadow: 0 28px 56px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.dsr-shell a {
  text-transform: none;
}

.dsr-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(42rem, calc(100vw - 2rem));
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2rem) clamp(2.5rem, 5vw, 3.5rem);
  text-align: left;
  min-height: 100vh;
  box-sizing: border-box;
  color: var(--dsr-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background: var(--dsr-surface);
  border: 1px solid var(--dsr-border);
  border-radius: var(--dsr-radius);
  box-shadow: var(--dsr-shadow);
  backdrop-filter: blur(12px);
}

.dsr-shell p {
  color: var(--dsr-text);
  margin: 0 0 1rem;
  font-size: 1rem;
}

.dsr-shell h1 {
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 0.65rem;
  line-height: 1.25;
}

.dsr-shell .lead {
  font-size: 1rem;
  color: var(--dsr-text-muted);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  max-width: 38em;
}

.dsr-shell .goal {
  font-size: 0.8125rem;
  color: var(--dsr-text-dim);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--dsr-radius-sm);
  border: 1px solid var(--dsr-border);
}

.dsr-meta {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dsr-text-dim);
  margin: 0 0 1rem;
}

/* Progress */
.dsr-progress {
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--dsr-border);
}
.dsr-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c73d18 0%, var(--dsr-accent) 50%, #ff8a5c 100%);
  border-radius: 999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 16px rgba(240, 90, 40, 0.35);
}

/* Form */
.dsr-shell label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #c8c8d4;
  margin-bottom: 0.5rem;
}

.dsr-shell input[type="text"],
.dsr-shell input[type="number"] {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--dsr-radius-sm);
  border: 1px solid var(--dsr-border-strong);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.0625rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dsr-shell input::placeholder {
  color: #666;
}
.dsr-shell input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.dsr-shell input:focus {
  outline: none;
  border-color: var(--dsr-accent);
  box-shadow: 0 0 0 3px var(--dsr-accent-dim);
}

.dsr-actions {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.dsr-actions button,
.dsr-shell .btn {
  padding: 0.65rem 1.25rem;
  border-radius: var(--dsr-radius-sm);
  border: 1px solid var(--dsr-border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: #eee;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.dsr-actions button[type="submit"] {
  background: linear-gradient(180deg, #ff6b38 0%, var(--dsr-accent) 45%, #d44818 100%);
  border-color: rgba(255, 140, 90, 0.4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(240, 90, 40, 0.35);
}
.dsr-actions button[type="submit"]:hover {
  filter: brightness(1.08);
  border-color: rgba(255, 180, 140, 0.5);
}
.dsr-shell .btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--dsr-accent);
  color: #fff;
}

.dsr-shell .error {
  color: #ff8a8a;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: rgba(180, 40, 40, 0.15);
  border-radius: var(--dsr-radius-sm);
  border: 1px solid rgba(255, 100, 100, 0.25);
}

/* Element list (start page) */
.dsr-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}
.dsr-list li {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--dsr-radius-sm);
  border: 1px solid var(--dsr-border);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dsr-list li + li {
  margin-top: 0.5rem;
}
.dsr-list li:hover {
  border-color: rgba(240, 90, 40, 0.35);
  background: rgba(240, 90, 40, 0.06);
}
.dsr-list a {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.dsr-list a:hover {
  color: #ffb090;
}
.dsr-list__meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--dsr-text-dim);
  font-weight: 400;
}

.dsr-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--dsr-border);
  font-size: 0.9375rem;
}
.dsr-footer a {
  color: #9fd4ff;
  text-decoration: none;
}
.dsr-footer a:hover {
  color: var(--dsr-accent);
}

/* Results table */
.dsr-result table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1rem 0;
  border-radius: var(--dsr-radius-sm);
  overflow: hidden;
  border: 1px solid var(--dsr-border);
}
.dsr-result thead {
  background: rgba(0, 0, 0, 0.35);
}
.dsr-result th,
.dsr-result td {
  border: 1px solid var(--dsr-border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}
.dsr-result th {
  color: var(--dsr-text-muted);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dsr-result tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.dsr-result p,
.dsr-result li {
  color: var(--dsr-text);
}
.dsr-result td {
  color: #f0f0f4;
  font-variant-numeric: tabular-nums;
}
.dsr-result pre {
  color: #ccc;
}

.dsr-note {
  font-size: 0.9375rem;
  color: var(--dsr-text-muted);
  line-height: 1.55;
}
.dsr-note--small {
  font-size: 0.8125rem;
  color: var(--dsr-text-dim);
}
.dsr-shell strong {
  color: #fff;
  font-weight: 600;
}
.dsr-dump {
  font-size: 0.8125rem;
  color: #c8c8d0;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.35);
  padding: 1rem;
  border-radius: var(--dsr-radius-sm);
  border: 1px solid var(--dsr-border);
}

/* Wizard pages: allow scroll on dark page */
body {
  display: block !important;
  align-items: unset !important;
  justify-content: unset !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh;
  padding: clamp(0.75rem, 2vw, 1.5rem) 0;
}
