/* Shopify with Claude guide. Uses the tokens, type, and buttons in styles.css.
   Mobile-first. Nothing here restyles other pages. */

.sg-hero {
  padding: 36px 0 8px;
}

.sg-hero h1 {
  max-width: 14em;
  font-size: clamp(2.15rem, 8vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.sg-byline {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.sg-toc {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  backdrop-filter: blur(16px);
}

.sg-toc-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sg-toc-inner::-webkit-scrollbar {
  display: none;
}

.sg-toc-label {
  flex: 0 0 auto;
  color: var(--text-muted);
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-right: 4px;
}

.sg-toc a {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-hairline);
  border-radius: 999px;
  background: #fff;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.011em;
  padding: 0 12px;
  white-space: nowrap;
}

.sg-toc a:hover,
.sg-toc a[aria-current="true"] {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.sg-article {
  padding: 28px 0 72px;
}

.sg-article section {
  scroll-margin-top: calc(var(--header-height) + 72px);
}

.sg-article h2 {
  max-width: 18em;
  margin: 36px 0 12px;
  font-size: clamp(1.65rem, 4.5vw, 2.15rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.sg-article h3 {
  max-width: 28em;
  margin: 28px 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.sg-article section > p,
.sg-article section > ul:not(.sg-checks) {
  max-width: 68ch;
}

.sg-article p,
.sg-article li {
  color: var(--text-dim);
  line-height: 1.6;
}

.sg-article p {
  margin: 0 0 14px;
}

.sg-article strong {
  color: var(--text-primary);
  font-weight: 600;
}

.sg-article ul {
  margin: 0 0 18px;
  padding-left: 1.15rem;
}

.sg-article li {
  margin: 0 0 8px;
}

.sg-article li::marker {
  color: var(--accent-ink);
}

.sg-dek {
  font-size: 1.0625rem;
}

.sg-kicker {
  margin-top: 8px;
  margin-bottom: 10px;
}

.sg-phase,
.sg-callout {
  margin: 8px 0 26px;
  border-radius: var(--radius-card);
  padding: 20px 18px;
}

.sg-phase p,
.sg-callout p {
  max-width: 68ch;
  margin: 0;
  color: var(--text-primary);
}

.sg-phase-label,
.sg-callout-label {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sg-phase-1 {
  background: var(--surface-soft);
  border: 1px solid var(--border-hairline);
}

.sg-phase-1 .sg-phase-label {
  color: var(--text-primary);
}

.sg-phase-2,
.sg-callout-rule {
  background: var(--accent-soft);
}

.sg-phase-2 .sg-phase-label,
.sg-callout-rule .sg-callout-label {
  color: var(--accent-ink);
}

.sg-phase-3 {
  background: #f3faf5;
  border: 1px solid #d9f0df;
}

.sg-phase-3 .sg-phase-label {
  color: var(--accent-success);
}

.sg-phase-bonus {
  background: var(--text-primary);
}

.sg-phase-bonus .sg-phase-label {
  color: var(--accent-signal);
}

.sg-phase-bonus p:last-child {
  color: #f4f4f4;
}

.sg-callout-research {
  background: #fff;
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card);
}

.sg-callout-research .sg-callout-label {
  color: var(--text-muted);
}

.sg-figure {
  margin: 8px 0 22px;
}

.sg-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: #fff;
}

.sg-figure figcaption {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sg-figure figcaption a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sg-table-wrap {
  margin: 0 0 22px;
  overflow-x: auto;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.sg-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}

.sg-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sg-table th,
.sg-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-hairline);
  text-align: left;
  vertical-align: top;
}

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

.sg-table th {
  background: var(--surface-soft);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sg-table td {
  color: var(--text-dim);
}

.sg-table td:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

.sg-table-compare th:first-child,
.sg-table-compare td:first-child {
  position: sticky;
  left: 0;
  min-width: 7.5rem;
  background: #fff;
  box-shadow: 8px 0 12px -12px rgba(10, 10, 10, 0.45);
}

.sg-table-compare th:first-child {
  background: var(--surface-soft);
}

.sg-alongside {
  display: grid;
  gap: 16px;
  margin: 0 0 8px;
}

.sg-alongside .sg-figure,
.sg-alongside .sg-table-wrap {
  margin-bottom: 0;
}

.sg-alongside .sg-table {
  min-width: 0;
}

.sg-prompt {
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.sg-prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-hairline);
  padding: 10px 12px 10px 16px;
}

.sg-prompt-bar span {
  color: var(--text-muted);
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sg-prompt pre {
  margin: 0;
  padding: 16px 18px 18px;
  overflow-x: auto;
  color: var(--text-dim);
  font: 500 0.92rem/1.6 var(--font-body);
  white-space: pre-wrap;
  word-break: break-word;
}

.sg-prompt .button.is-copied {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.sg-checks {
  list-style: none;
  display: grid;
  gap: 8px;
  max-width: none;
  margin: 0 0 20px;
  padding: 0;
}

.sg-checks label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
}

.sg-checks input {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
  accent-color: var(--accent-signal);
}

.sg-checks span {
  color: var(--text-dim);
  line-height: 1.5;
}

.sg-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 719px) {
  .sg-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .sg-table {
    min-width: 0;
  }

  .sg-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sg-table,
  .sg-table tbody,
  .sg-table tr,
  .sg-table td {
    display: block;
    width: auto;
  }

  .sg-table tr {
    margin: 0 0 12px;
    overflow: hidden;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    background: #fff;
  }

  .sg-table td {
    padding: 12px 16px;
  }

  .sg-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .sg-table-compare th:first-child,
  .sg-table-compare td:first-child {
    position: static;
    min-width: 0;
    background: transparent;
    box-shadow: none;
    white-space: normal;
  }
}

@media (min-width: 800px) {
  .sg-hero {
    padding: 72px 0 12px;
  }

  .sg-phase,
  .sg-callout {
    padding: 24px 28px;
  }

  .sg-article {
    padding-bottom: 96px;
  }
}

@media (min-width: 1100px) {
  .sg-alongside {
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.85fr);
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sg-toc a {
    transition: none;
  }
}
