/* optimize.css: styles for GET /optimize. Loaded by views/Optimize.tsx only.
   Uses the shared tokens from Layout.tsx and the .price-table, .table-scroll,
   .badge and .muted classes from site.css. Dense, 1px rules, no rounded
   cards. */

.opt-page section {
  margin: 1.5rem 0;
}
.opt-page h1 {
  margin: 0 0 0.5rem;
}
.opt-page h2 {
  font-size: 18px;
  margin: 0 0 0.5rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.2rem;
}
.opt-page h3 {
  font-size: 15px;
  margin: 1.2rem 0 0.4rem;
}
.opt-lead {
  max-width: 70ch;
}
.opt-page code {
  font-family: var(--font-mono);
  font-size: 13px;
}
.opt-cmd {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.3rem 0;
  flex-wrap: wrap;
}
.opt-cmd code {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 0.25rem 0.5rem;
  overflow-x: auto;
  max-width: 100%;
}
.opt-label {
  display: block;
  margin: 0.8rem 0 0.2rem;
  font-size: 13px;
}
.opt-text {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  padding: 0.5rem;
  resize: vertical;
}
.opt-text.opt-drop {
  outline: 2px dashed var(--accent);
  background: #fff8ec;
}
.opt-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.5rem 0;
}
.opt-btn {
  font: inherit;
  font-size: 13px;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: inline-block;
}
.opt-btn:hover {
  background: var(--bg);
}
.opt-primary {
  background: var(--ink);
  color: var(--surface);
}
.opt-primary:hover {
  background: #000;
}
.opt-btn:focus-visible,
.opt-est:focus-visible,
.opt-page select:focus-visible,
.opt-page input:focus-visible,
.opt-text:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 1px;
}
.opt-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.opt-file:focus-within .opt-btn {
  outline: 2px solid var(--accent-ink);
  outline-offset: 1px;
}
.opt-privacy {
  margin: 0.2rem 0;
}
.opt-status {
  min-height: 1.4em;
  font-size: 13px;
}
.opt-status-error {
  color: var(--up);
}
.opt-status-ok {
  color: var(--muted);
}
.opt-warn {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0.6rem;
  background: var(--surface);
  font-size: 13px;
  margin: 0.4rem 0;
}
.opt-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.4rem 0;
  font-size: 13px;
}
.opt-inline {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.opt-page select,
.opt-pick {
  font: inherit;
  font-size: 13px;
  padding: 0.2rem 0.3rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  max-width: 100%;
}
.opt-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  margin: 0.6rem 0;
}
.opt-tile {
  padding: 0.5rem 0.75rem;
  border-right: 1px solid var(--rule);
}
.opt-tile:last-child {
  border-right: 0;
}
.opt-tile-k {
  font-size: 12px;
  color: var(--muted);
}
.opt-tile-v {
  font-family: var(--font-mono);
  font-size: 18px;
}
.opt-chart {
  background: var(--surface);
  border: 1px solid var(--rule);
  margin: 0.6rem 0;
  min-height: 222px;
}
.opt-table td code,
.opt-table .opt-reg {
  font-size: 12px;
}
.opt-table .opt-reg {
  font-family: var(--font-mono);
}
.opt-total-row td {
  font-weight: 600;
  border-top: 1px solid var(--ink);
}
.opt-best {
  background: #fff8ec;
}
.opt-conf {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--rule);
}
.opt-conf-exact,
.opt-conf-manual {
  color: var(--down);
  border-color: var(--down);
}
.opt-conf-alias {
  color: var(--ink);
}
.opt-conf-fuzzy {
  color: var(--accent-ink);
  border-color: var(--accent);
}
.opt-conf-none {
  color: var(--up);
  border-color: var(--up);
}
.opt-estwrap {
  display: inline;
}
.opt-est {
  font: inherit;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px dotted var(--accent-ink);
  padding: 0;
  cursor: help;
}
.opt-why {
  display: block;
  font-size: 12px;
  color: var(--muted);
  max-width: 60ch;
  border-left: 2px solid var(--accent);
  padding-left: 0.5rem;
  margin: 0.2rem 0;
}
.opt-verdict-list {
  margin: 0.3rem 0;
  padding-left: 1.2rem;
}
.opt-total {
  margin: 0.5rem 0;
}
.opt-unmapped-list {
  list-style: none;
  padding: 0;
}
.opt-unmapped-list li {
  margin: 0.3rem 0;
}
.opt-page details {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 0.4rem 0.75rem;
  margin: 0.4rem 0;
}
.opt-page summary {
  cursor: pointer;
}
.opt-inline-h {
  display: inline;
  border: 0;
  font-size: 18px;
}
#opt-faq details p {
  max-width: 70ch;
}
@media (max-width: 640px) {
  .opt-tile {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
}
