/* LotofBench portal — Cloud Mercato house theme (card t_d0c9e69c).
 *
 * Theme source of truth: cloud-mercato/ctp-common
 *   ctp_common/static/css/cm.css      (tokens, navbar, footer, tables, gold)
 *   ctp_common/static/css/cm_v1.css   (green gradient variants)
 * cloud-mercato/pcr ao/static/css/pcr.css (link/hover greens, controls)
 * Bootstrap 4 + cm.css/cm_v2.css load ahead of this layer from
 * cm_skeleton_v2.html; everything below derives from those tokens.
 */

/* Cabin — same @font-face sources as cm.css (shared static root). */
@font-face {
  font-family: 'Cabin';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  src: url(/static/fonts/cabin-latin-ext.woff) format('woff');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cabin';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  src: url(/static/fonts/cabin-latin.woff) format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens — values lifted from cm.css :root and CM palette usage. */
:root {
  --primary: #53A551;        /* cm.css --primary-color */
  --primary-hover: #4baf50;  /* cm.css link green */
  --primary-active: #4aaf30; /* cm.css / pcr.css hover green */
  --primary-dark: #006E1A;   /* pcr.css slider border green */
  --green-light: #71C75F;    /* cm.css .green-back-light */
  --green-lighter: #afdfb2;  /* cm.css .green-back-light2 */
  --green-tint: #eaf6ec;     /* light wash of the primary */
  --gold: #EEA700;           /* cm.css .btn-gold / .badge-gold */
  --gold-tint: #fdf3dc;
  --grad-green: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,84,63,1) 0%, rgba(75,175,80,1) 100%); /* cm.css .green-back-gradient */
  --ink: #212529;            /* bootstrap body text */
  --muted: #6c757d;          /* bootstrap secondary + cm.css footer color */
  --border-color: rgba(217, 217, 217, 1); /* cm.css --border-color */
  --bg-soft: #f8f9fa;        /* bootstrap light */
}

* { box-sizing: border-box; }

body {
  font-family: 'Cabin', sans-serif;   /* cm.css body rule */
  margin: 0;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}

.container { padding-left: 1rem; padding-right: 1rem; }

h1, h2, h3, h4 { font-weight: 700; }
h1 { font-size: 2.2rem; line-height: 1.2; margin: 0.6rem 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 1.6rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.2rem 0 0.5rem; }
h4 { font-size: 1rem; margin: 0; }

a { color: var(--primary-hover); }                    /* cm.css a */
a:hover:not(.btn) { color: var(--primary-active); }   /* cm.css a:hover */
a:hover { text-decoration: underline; }
a.btn:hover { text-decoration: none; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 80%;                                      /* pcr.css code */
  color: var(--primary-dark);                          /* bootstrap defaults code to pink — off-palette */
  background: none;
  padding: 0;
}
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: #9ff2a3;                                      /* cm.css .pre.code */
  background: #000;                                    /* cm.css .pre.code */
  border-radius: 6px;
  padding: 1em 1em;
  margin: 1em 0;
  overflow-x: auto;
}
pre code { color: inherit; }

/* Navbar — cm.css/pcr.css brand pattern (white bar, green wordmark). */

.navbar .navbar-brand {
  font-size: x-large;                                  /* cm.css */
  padding-bottom: 0;                                   /* cm.css */
  line-height: normal;                                 /* cm.css */
  color: var(--ink);
}
.navbar .navbar-brand:hover { color: var(--ink); text-decoration: none; }
.navbar .navbar-brand span { color: var(--primary-hover); }
.navbar span.brand-by {
  display: block;                                      /* cm.css */
  font-size: small;                                    /* cm.css */
  line-height: normal;                                 /* cm.css */
  color: var(--muted);
}
.navbar #brand img {                                  /* cm.css logo rule */
  max-height: 60px;
  margin: 10px 15px 10px 0;
  border: 1px solid #FFF;
  border-radius: 50px;
}
.navbar-nav .nav-link { color: var(--ink); }
.navbar-nav .nav-link:hover { color: var(--primary-hover); }
.navbar-nav .nav-item.active .nav-link { color: var(--primary-hover); font-weight: 700; }
nav.navbar { padding: 0.25rem 0; }

/* Hero ---------------------------------------------------------------------- */

.hero { padding: 2.4rem 0 1.6rem; max-width: 50rem; }
.hero h1 { font-size: 2.6rem; margin-bottom: 0.3rem; }
.tagline { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.8rem; }
.subhead { color: var(--muted); margin-bottom: 1.2rem; }
.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 1rem 0 0.5rem; }
a.cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
}
a.cta:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }
a.cta.secondary {
  background: transparent;
  color: var(--primary-hover);
  border: 1px solid var(--primary-hover);
}
a.cta.secondary:hover { background: var(--green-tint); color: var(--primary-dark); }
.trust-strip { color: var(--muted); font-size: 0.85rem; margin: 0.4rem 0 0; }
.board-head h1 { margin-bottom: 0.2rem; }

/* Sections / bands ---------------------------------------------------------- */

.band { padding: 1.2rem 0; border-top: 1px solid var(--border-color); }
.band:first-child { border-top: none; }
.section-title { margin-top: 1.4rem; }

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  counter-reset: step;
}
.steps li {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 2.2rem 1.1rem 1rem;
  counter-increment: step;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute; top: 0.6rem; left: 1rem;
  background: var(--primary);
  color: #fff;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.steps h3 { margin: 0 0 0.3rem; }

/* Workload grid -------------------------------------------------------------- */

.workload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.workload-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 0.95rem;
  background: #fff;
}
.workload-card p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9rem; }
.workload-head { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

/* Badges — CM palette only: primary green, light greens, house gold. */

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
  vertical-align: middle;
}
.badge-int { background: var(--gold-tint); color: #8a5a00; border: 1px solid var(--gold); }
.badge-fp { background: var(--green-tint); color: var(--primary-dark); border: 1px solid var(--green-light); }
.badge-unit { background: var(--bg-soft); color: var(--muted); font-weight: 500; }
.badge-official { background: var(--primary); color: #fff; }      /* green fill */
.badge-community { background: var(--green-lighter); color: var(--primary-dark); }
.badge-verified { background: var(--primary-dark); color: #fff; }
.badge-env { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--border-color); }

/* Audit list / score box ------------------------------------------------------ */

.audit-list { padding-left: 1.2rem; }
.audit-list li { margin-bottom: 0.45rem; }
.score-box {
  background: var(--green-tint);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}
.score-box p { margin: 0.3rem 0; }

/* Disclaimer ------------------------------------------------------------------ */

.disclaimer {
  background: var(--gold-tint);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
}
.disclaimer p { margin: 0.3rem 0; }
.banner { margin-top: 1rem; }

/* Filters ---------------------------------------------------------------------- */

.filters { padding: 0.8rem 0; }
.filters form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.filters select, .filters input {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
}
.filters select:focus, .filters input:focus {
  outline: 0;
  border-color: #4caf51;                               /* cm.css form focus */
  box-shadow: 0 0 0 0.2rem rgb(10 173 85 / 25%);       /* cm.css form focus */
}
.filters label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.filters button {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  border-radius: 5px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.filters button:hover { background: var(--primary-hover); }
.filters .clear { font-size: 0.9rem; }

/* Board / data tables — cm.css .table-cm green header treatment. */

.table-scroll { overflow-x: auto; }

table.data-table { border-collapse: collapse; width: 100%; margin: 0.6rem 0 1rem; }
table.data-table th, table.data-table td {
  border-bottom: 1px solid var(--border-color);
  padding: 0.45rem 0.6rem;
  text-align: right;
  white-space: nowrap;
  vertical-align: top;
}
table.data-table thead th {
  text-align: right;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background-color: #4CAF51;                           /* cm.css .table-cm */
  color: #FFF;                                         /* cm.css .table-cm */
  border-bottom: none;
}
table.data-table thead th:nth-child(4),
table.data-table thead th:nth-child(6) { text-align: left; }
table.data-table td.rank { color: var(--muted); }
table.data-table td.score { font-variant-numeric: tabular-nums; }
table.data-table td.score a { font-weight: 700; color: var(--ink); }
table.data-table td.cpu, table.data-table td.platform { text-align: left; white-space: normal; min-width: 12rem; }
table.data-table tbody tr:hover { background: var(--green-tint); }
td.empty { text-align: center; color: var(--muted); padding: 1.4rem 0; white-space: normal; }
.cpu-model { font-weight: 600; display: block; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

/* Methodology baselines table */
table.baselines td:nth-child(-n+4) { text-align: left; white-space: normal; }

/* Pagination ------------------------------------------------------------------ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 1rem 0;
}

/* Detail page ------------------------------------------------------------------ */

.breadcrumb { color: var(--muted); margin: 1rem 0 0; }
.detail-head h1 { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.detail-head .muted { font-weight: 400; font-size: 1.1rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}
.stat-box {
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--primary);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  background: var(--bg-soft);
}
.stat-box h2 { margin: 0; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.stat-box h2.date { font-size: 1.4rem; padding-top: 0.2rem; }
.stat-label { font-size: 0.85rem; font-weight: 600; margin: 0.1rem 0; }
.stat-box .muted { font-size: 0.85rem; margin: 0.1rem 0 0; }

.system-info { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1.2rem; }
.system-info dt { color: var(--muted); font-weight: 600; }
.system-info dd { margin: 0; }

.unavailable {
  background: var(--bg-soft);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  color: var(--muted);
}
.share-url { word-break: break-all; }
.share-url a { font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; }

/* The common bottom bar (cm_skeleton_v2.html) gets its presentation from
   cm.css — nothing to restyle here. */

@media (max-width: 40rem) {
  .hero h1 { font-size: 2rem; }
  table.data-table th, table.data-table td { padding: 0.35rem 0.4rem; }
}
