/* ==========================================================================
   Silver Glass — shared components. Compose these before writing new CSS.
   Glass recipe (DESIGN.md §3): translucent fill, hairline highlight border,
   soft shadow, rounded corners.
   ========================================================================== */

/* ---- Eyebrow & lead ---- */
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-400);
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-500);
  max-width: 62ch;
}

/* ---- Glass surface shared by hero / panel / card ---- */
.hero,
.panel,
.section,
.card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 3.2rem);
  margin-bottom: 1.6rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 30% auto -10%;
  height: 320px;
  background: radial-gradient(closest-side, rgba(91, 113, 137, .18), rgba(91, 113, 137, 0) 70%);
  pointer-events: none;
}

.hero > * {
  position: relative;
}

.hero h1 {
  margin-top: .4rem;
}

.hero .lead {
  margin-bottom: 0;
}

/* ---- Panel / section ---- */
.panel,
.section {
  padding: clamp(1.3rem, 2.6vw, 2rem);
  margin-bottom: 1.6rem;
}

.panel > :last-child,
.section > :last-child,
.hero > :last-child,
.card > :last-child {
  margin-bottom: 0;
}

/* ---- Card grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 1.1rem;
}

.card {
  display: block;
  padding: 1.35rem;
  color: inherit;
}

a.card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

a.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  border-color: var(--white);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: .85rem;
  font-size: 1.35rem;
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 1.12rem;
  margin: 0 0 .35rem;
}

.card__desc {
  color: var(--ink-500);
  font-size: .95rem;
  margin: 0;
}

.card__more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: .92rem;
  color: var(--accent-strong);
}

a.card:hover .card__more {
  text-decoration: underline;
}

/* ---- Feature list ---- */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .7rem;
}

.feature-list li {
  margin: 0;
  padding: .9rem 1.1rem;
  background: var(--glass-faint);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--ink-700);
}

.feature-list li strong {
  display: block;
}

/* ---- Accordion (native <details>) ---- */
.accordion {
  display: grid;
  gap: .7rem;
}

details.acc {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

details.acc > summary {
  list-style: none;
  cursor: pointer;
  padding: .95rem 1.15rem;
  font-weight: 600;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

details.acc > summary::-webkit-details-marker {
  display: none;
}

details.acc > summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent);
  transition: transform .15s ease;
}

details.acc[open] > summary::after {
  content: "\2013"; /* en dash */
}

.acc__body {
  padding: 0 1.15rem 1.1rem;
  color: var(--ink-700);
}

.acc__body > :last-child {
  margin-bottom: 0;
}

/* ---- Code ---- */
pre {
  margin: 0 0 1rem;
  padding: 1.05rem 1.2rem;
  background: #1c2431;
  color: #e7edf5;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .88rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

pre code {
  font-size: inherit;
  color: inherit;
  background: none;
  padding: 0;
  border: 0;
  white-space: pre;
}

:not(pre) > code {
  font-family: var(--mono);
  font-size: .86em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: .08em .4em;
  word-break: break-word;
}

.code-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 .4rem;
}

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin: 0 0 1rem;
  background: var(--glass);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  font-size: .95rem;
}

.table-wrap thead th {
  background: var(--glass-faint);
  color: var(--ink-900);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

/* ---- Badges & chips ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--ink-500);
  background: var(--glass-faint);
}

.badge--accent {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: transparent;
}

.badge--ok {
  color: var(--ok);
  background: rgba(31, 122, 84, .12);
  border-color: transparent;
}

.badge--warn {
  color: var(--warn);
  background: rgba(154, 107, 22, .12);
  border-color: transparent;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 500;
  padding: .3rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass-faint);
  color: var(--ink-700);
}

/* ---- Buttons ---- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1px solid var(--hairline);
  background: var(--glass-strong);
  color: var(--ink-900);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn--primary {
  color: var(--white);
  border-color: transparent;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
}

.btn--primary:hover {
  color: var(--white);
}

.btn--sponsor {
  color: var(--white);
  border-color: transparent;
  background: linear-gradient(150deg, #e35c8a, var(--sponsor));
}

.btn--sponsor:hover {
  color: var(--white);
}

/* ---- Callouts ---- */
.callout {
  display: flex;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  border-left-width: 4px;
  background: var(--glass);
  margin: 0 0 1rem;
}

.callout__icon {
  flex: 0 0 auto;
  font-size: 1.15rem;
  line-height: 1.5;
}

.callout__body {
  color: var(--ink-700);
}

.callout__body > :last-child {
  margin-bottom: 0;
}

.callout--info {
  border-left-color: var(--accent);
}

.callout--warn {
  border-left-color: var(--warn);
  background: rgba(154, 107, 22, .06);
}

.callout--danger {
  border-left-color: var(--danger);
  background: var(--sponsor-soft);
}

/* ---- Definition list ---- */
.deflist {
  display: grid;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--glass);
}

.deflist__row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 1rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--hairline);
}

.deflist__row:last-child {
  border-bottom: 0;
}

.deflist__term {
  font-weight: 600;
  color: var(--ink-900);
  font-family: var(--mono);
  font-size: .9rem;
}

@media (max-width: 560px) {
  .deflist__row {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
}

/* ---- Utility spacing ---- */
.stack > * + * {
  margin-top: 1.1rem;
}

.section-title {
  margin-bottom: 1rem;
}
