* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --muted-panel: #fafafa;
  --ink: #0b0b0b;
  --muted: #6d6d6d;
  --line: #dedede;
  --line-soft: #ececec;
  --black: #151515;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.theme-minimal {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.5;
  letter-spacing: -0.035em;
}

body.theme-minimal::before,
body.theme-minimal::after { display: none; }

body.theme-minimal .nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 44px;
  padding: 0 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.theme-minimal .brand,
body.theme-minimal .back-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

body.theme-minimal .brand::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='white'/%3E%3Cg stroke='%23000' stroke-width='3' fill='white'%3E%3Crect x='10' y='10' width='10' height='10'/%3E%3Crect x='27' y='10' width='10' height='10'/%3E%3Crect x='44' y='10' width='10' height='10'/%3E%3Crect x='10' y='27' width='10' height='10'/%3E%3Crect x='27' y='27' width='10' height='10' fill='%23000'/%3E%3Crect x='44' y='27' width='10' height='10'/%3E%3Crect x='10' y='44' width='10' height='10' fill='%23000'/%3E%3Crect x='27' y='44' width='10' height='10'/%3E%3Crect x='44' y='44' width='10' height='10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

body.theme-minimal .back-link { color: var(--muted); font-weight: 500; }
body.theme-minimal .brand:hover,
body.theme-minimal .back-link:hover { color: #000; text-decoration: underline; text-underline-offset: 4px; }

body.theme-minimal .nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.theme-minimal .nav-actions a {
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
}

body.theme-minimal .nav-actions a:hover {
  background: var(--black);
  color: #fff;
}

body.theme-minimal .nav-actions .icon-link {
  width: 30px;
  padding: 0;
}

body.theme-minimal .nav-actions svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

body.theme-minimal .main {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 62px 22px 84px;
}

body.theme-minimal .form,
body.theme-minimal .results,
body.theme-minimal .loader-card {
  position: relative;
  overflow: visible;
  padding: clamp(28px, 5vw, 48px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.theme-minimal .results { display: grid; gap: 20px; }

body.theme-minimal .form::before,
body.theme-minimal .results::before,
body.theme-minimal .loader-card::before { display: none; }

body.theme-minimal .title,
body.theme-minimal .results-title,
body.theme-minimal .loader-title {
  max-width: 940px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.09em;
}

body.theme-minimal .title::before {
  content: "BenchPress:";
  display: block;
}

body.theme-minimal .subtitle,
body.theme-minimal .results-sub,
body.theme-minimal .loader-sub {
  max-width: 780px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.7vw, 1.12rem);
  line-height: 1.7;
  letter-spacing: -0.045em;
}

body.theme-minimal .section-h {
  margin: 34px 0 8px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

body.theme-minimal .section-h::before { content: "$ "; }

body.theme-minimal .hint {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

body.theme-minimal .row { margin-bottom: 16px; }

body.theme-minimal label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

body.theme-minimal input[type="text"],
body.theme-minimal input[type="number"],
body.theme-minimal select,
body.theme-minimal textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  letter-spacing: -0.04em;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: border-color 0.12s, outline-color 0.12s;
}

body.theme-minimal input:focus,
body.theme-minimal select:focus,
body.theme-minimal textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
  background: #fff;
  box-shadow: none;
}

body.theme-minimal textarea {
  min-height: 110px;
  resize: vertical;
}

body.theme-minimal .advice-card,
body.theme-minimal .results .advice-card,
body.theme-minimal .evidence-card,
body.theme-minimal .summary-card {
  margin: 22px 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--muted-panel);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.theme-minimal .results .advice-card,
body.theme-minimal .evidence-card,
body.theme-minimal .summary-card { margin: 0; }

body.theme-minimal .advice-kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

body.theme-minimal .advice-kicker::before { content: "> "; color: var(--ink); }

body.theme-minimal .advice-card h3,
body.theme-minimal .evidence-card h3,
body.theme-minimal .summary-card h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

body.theme-minimal .advice-card p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.62;
}

body.theme-minimal .mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.theme-minimal .target-row {
  margin-top: 22px;
}

body.theme-minimal .predict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.theme-minimal .predict-actions .btn-primary {
  margin-top: 0;
}

body.theme-minimal .tips-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.theme-minimal .tips-card .advice-kicker,
body.theme-minimal .tips-card h3,
body.theme-minimal .tips-card p {
  grid-column: 1 / -1;
}

body.theme-minimal .advice-block {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

body.theme-minimal .advice-block h4 {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

body.theme-minimal .advice-block ul {
  list-style: none;
  display: grid;
  gap: 6px;
}

body.theme-minimal .advice-block li,
body.theme-minimal .advice-dim {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

body.theme-minimal .share-card {
  display: block;
}

body.theme-minimal .share-card .share-note {
  margin-bottom: 14px;
  max-width: 760px;
}

body.theme-minimal .share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.theme-minimal .share-actions .btn-primary,
body.theme-minimal .share-actions .btn-secondary {
  margin-top: 0;
  text-decoration: none;
}

body.theme-minimal .evidence-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.theme-minimal .evidence-list li {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

body.theme-minimal .evidence-list li > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

body.theme-minimal .evidence-list strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

body.theme-minimal .evidence-list span {
  color: var(--ink);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  justify-self: end;
  white-space: nowrap;
}

body.theme-minimal .evidence-list p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  word-break: break-word;
}

body.theme-minimal .evidence-list a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.theme-minimal .summary-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

body.theme-minimal .summary-list li {
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

body.theme-minimal .summary-row-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: baseline;
}

body.theme-minimal .summary-rank,
body.theme-minimal .summary-list p {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

body.theme-minimal .summary-list strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-minimal .summary-row-head span:last-child {
  color: var(--ink);
  text-align: right;
  font-size: 0.9rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

body.theme-minimal .summary-bar {
  height: 10px;
  margin: 8px 0 6px;
  border: 1px solid var(--line);
  background: #fff;
}

body.theme-minimal .summary-bar span {
  display: block;
  height: 100%;
  background: var(--black);
}

body.theme-minimal .score-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px minmax(180px, 0.8fr) 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

body.theme-minimal .score-row select,
body.theme-minimal .score-row input {
  min-height: 40px;
  padding: 9px 11px;
  font-size: 0.84rem;
}

body.theme-minimal .remove-btn {
  width: 36px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

body.theme-minimal .remove-btn:hover {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}

body.theme-minimal .btn-primary,
body.theme-minimal .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.12s, color 0.12s;
}

body.theme-minimal .btn-primary {
  margin-top: 24px;
  background: var(--ink);
  color: #fff;
}

body.theme-minimal .btn-primary:hover,
body.theme-minimal .btn-secondary:hover {
  background: #000;
  color: #fff;
}

body.theme-minimal .btn-primary:disabled {
  border-color: var(--line);
  background: #efefef;
  color: var(--muted);
  cursor: not-allowed;
}

body.theme-minimal .error {
  margin-top: 16px;
  color: #b00020;
  font-size: 0.84rem;
}

body.theme-minimal .loader {
  padding: 18px 0 22px;
}

body.theme-minimal .loader-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 24px;
}

body.theme-minimal .loader-title {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: clamp(1.35rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
}

body.theme-minimal .loader-sub {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

body.theme-minimal .progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

body.theme-minimal .progress-bar {
  width: 0%;
  height: 100%;
  background: var(--black);
  transition: width 0.45s ease;
}

body.theme-minimal .legend-known,
body.theme-minimal .legend-pred {
  color: var(--ink);
  font-size: 0.9rem;
}

body.theme-minimal .results-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.theme-minimal .results-toolbar input { flex: 1; }

body.theme-minimal .full-table-details {
  border: 1px solid var(--line);
  background: #fff;
}

body.theme-minimal .full-table-details summary {
  padding: 13px 16px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

body.theme-minimal .full-table-details[open] summary {
  border-bottom: 1px solid var(--line);
}

body.theme-minimal .full-table-details .results-toolbar {
  padding: 14px;
}

body.theme-minimal .full-table-details .results-table {
  border-width: 1px 0 0;
}

body.theme-minimal .results-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.84rem;
}

body.theme-minimal .results-table th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
  color: var(--muted);
  text-align: left;
  font-weight: 900;
}

body.theme-minimal .results-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
}

body.theme-minimal .results-table tr:last-child td { border-bottom: 0; }
body.theme-minimal .results-table tr:hover td { background: #fafafa; }

body.theme-minimal .score-cell,
body.theme-minimal .range-cell {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.theme-minimal .range-cell {
  color: var(--muted);
  font-size: 0.8rem;
}

body.theme-minimal .score-known,
body.theme-minimal .score-pred { color: var(--ink); }

body.theme-minimal .badge {
  margin-left: 8px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
}

body.theme-minimal .footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 22px 60px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  font-size: 0.76rem;
}

body.theme-minimal .footer a {
  color: var(--ink);
  text-decoration: none;
}

body.theme-minimal .footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 700px) {
  body.theme-minimal .main { padding: 40px 14px 60px; }
  body.theme-minimal .form,
  body.theme-minimal .results,
  body.theme-minimal .loader-card { padding: 24px 16px; }
  body.theme-minimal .score-row {
    grid-template-columns: 1fr 88px 36px;
  }
  body.theme-minimal .score-row .source-inp {
    grid-column: 1 / -2;
  }
  body.theme-minimal .tips-card,
  body.theme-minimal .evidence-list {
    grid-template-columns: 1fr;
  }
  body.theme-minimal .results-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  body.theme-minimal .nav {
    height: auto;
    min-height: 44px;
    align-items: flex-start;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  body.theme-minimal .nav-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
