/* Guides — article and hub pages. Builds on the tokens in site.css. */

/* Header */

.g-hero {
  padding: 64px 0 44px;
}

.g-hero .wrap {
  max-width: 1080px;
}

.g-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--faint);
}

.g-crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.g-crumbs a:hover {
  color: var(--pop);
}

.g-crumbs li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--rule);
}

.g-kicker {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pop);
}

.g-hero h1 {
  margin: 0 0 20px;
  max-width: 20ch;
  font-size: clamp(36px, 5.2vw, 60px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.g-dek {
  margin: 0 0 30px;
  max-width: 58ch;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.g-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--faint);
}

.g-byline img {
  width: 42px;
  height: 42px;
  padding: 5px;
  border-radius: 50%;
  background: var(--gray);
  object-fit: contain;
}

.g-byline strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Layout: article + sticky contents */

.g-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 72px;
  align-items: start;
}

.g-toc {
  position: sticky;
  top: 84px;
  font-size: 13px;
}

.g-toc-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
}

.g-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--rule-soft);
}

.g-toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
}

.g-toc a:hover {
  color: var(--text);
}

.g-toc a.is-active {
  border-left-color: var(--pop);
  color: var(--pop);
  font-weight: 600;
}

.g-toc-cta {
  margin-top: 28px;
  padding: 20px 18px;
  border-radius: 18px;
  background: var(--gray);
  text-align: center;
}

.g-toc-cta img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.g-toc-cta p {
  margin: 8px 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.g-toc-mobile {
  display: none;
}

/* Article typography */

.g-article {
  min-width: 0;
  max-width: 700px;
  font-size: 17px;
  line-height: 1.7;
  color: #3a3a3c;
}

.g-article p {
  margin: 0 0 18px;
}

.g-article h2 {
  margin: 72px 0 16px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: balance;
  scroll-margin-top: 84px;
}

.g-article h3 {
  margin: 36px 0 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  scroll-margin-top: 84px;
}

.g-article a {
  color: var(--pop);
  text-decoration: underline;
  text-decoration-color: rgba(10, 104, 201, 0.35);
  text-underline-offset: 3px;
}

.g-article a:hover {
  text-decoration-color: var(--pop);
}

.g-article a.btn {
  text-decoration: none;
}

.g-article a.btn-primary,
.g-article a.btn-primary:hover,
.g-article a.btn-ghost:hover {
  color: #fff;
}

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

.g-article ul {
  margin: 0 0 20px;
  padding-left: 22px;
}

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

.g-article code,
.g-article kbd {
  padding: 1px 6px;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  background: var(--gray);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84em;
  color: var(--text);
}

.g-menu {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.g-article code {
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .g-menu {
    white-space: normal;
  }
}

/* Short answer + disclosure */

.g-answer {
  margin: 0 0 18px;
  padding: 26px 28px;
  border-radius: 20px;
  background: var(--gray);
}

.g-answer-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pop);
}

.g-answer-label .icon {
  font-size: 18px;
}

.g-article .g-answer p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}

/* Comparison table */

.g-table-wrap {
  margin: 8px 0 14px;
  overflow-x: auto;
  border: 1px solid var(--rule-soft);
  border-radius: 18px;
}

.g-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}

.g-table th,
.g-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--rule-soft);
  text-align: left;
  vertical-align: top;
}

.g-table thead th {
  background: var(--paper);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.g-table tbody th {
  font-weight: 600;
  color: var(--text);
}

.g-table tbody th small {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--faint);
}

.g-table tbody tr:last-child > * {
  border-bottom: 0;
}

.g-table .ours > * {
  background: #f2f7fd;
}

.g-y,
.g-n,
.g-p {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 980px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.g-y {
  background: #e8f7ee;
  color: #1d6b3f;
}

.g-n {
  background: #fdecec;
  color: #9b2020;
}

.g-p {
  background: #fff4dc;
  color: #7a5200;
}

.g-article .g-table-note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--faint);
}

/* Method headings + fact chips */

.g-method-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 88px 0 16px;
}

.g-article .g-method-head h2 {
  margin: 0;
}

.g-num {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
}

.g-article .g-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.g-article .g-facts li {
  margin: 0;
  padding: 6px 12px;
  border-radius: 980px;
  background: var(--gray);
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}

.g-facts b {
  font-weight: 600;
  color: var(--text);
}

/* Numbered steps */

.g-article .g-steps {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.g-article .g-steps li {
  position: relative;
  margin: 0;
  padding: 0 0 18px 48px;
  counter-increment: step;
}

.g-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8f1fb;
  color: var(--pop);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

.g-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 37px;
  bottom: 5px;
  width: 1px;
  background: var(--rule-soft);
}

/* Figures: app mock-ups */

.g-figure {
  margin: 30px 0 34px;
}

.g-figure figcaption {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--faint);
  text-align: center;
}

.g-stage {
  display: flex;
  justify-content: center;
  padding: 40px 22px;
  border-radius: 22px;
  background:
    radial-gradient(520px 260px at 15% 0%, rgba(122, 92, 255, 0.16), transparent 60%),
    radial-gradient(520px 300px at 90% 100%, rgba(52, 213, 139, 0.14), transparent 60%),
    #eef1f7;
}

.g-stage-dark {
  background:
    radial-gradient(560px 280px at 18% 0%, rgba(122, 92, 255, 0.5), transparent 60%),
    radial-gradient(520px 320px at 88% 30%, rgba(52, 213, 139, 0.26), transparent 55%),
    linear-gradient(160deg, #17203a 0%, #2a2550 55%, #3f2d63 100%);
}

/* macOS-style Disk Utility dialog */

.mac-sheet {
  width: 100%;
  max-width: 480px;
  padding: 22px 24px 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 70px rgba(30, 40, 80, 0.2), 0 2px 8px rgba(0, 0, 0, 0.06);
  font: 13px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: #1d1d1f;
}

.mac-row {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}

.mac-row > span:first-child {
  text-align: right;
  color: #3a3a3c;
}

.mac-sep {
  height: 1px;
  margin: 14px 0 13px;
  background: rgba(0, 0, 0, 0.08);
}

.mac-field,
.mac-pop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 5px 9px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 7px;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mac-pop {
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.1);
}

.mac-pop::after {
  content: "⌃⌄";
  flex: none;
  width: 16px;
  height: 17px;
  border-radius: 4px;
  background: #0a7aff;
  color: #fff;
  font-size: 8px;
  line-height: 8px;
  display: grid;
  place-items: center;
  writing-mode: vertical-lr;
  letter-spacing: -2px;
}

.mac-hl .mac-pop,
.mac-hl .mac-field {
  border-color: var(--pop);
  box-shadow: 0 0 0 3px rgba(10, 104, 201, 0.25);
}

.mac-badge {
  position: absolute;
  right: -34px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--pop);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
}

.mac-sheet-sm {
  max-width: 400px;
}

.mac-title {
  margin: 0 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}

.mac-sheet-sm .mac-row {
  grid-template-columns: 70px minmax(0, 1fr);
}

.mac-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0 80px;
}

.mac-check::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  background: #fff;
}

.mac-hl-check::before {
  border-color: var(--pop);
  box-shadow: 0 0 0 3px rgba(10, 104, 201, 0.25);
}

.mac-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.mac-btn {
  padding: 5px 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.08);
}

.mac-btn-primary {
  border-color: #0a7aff;
  background: #0a7aff;
  color: #fff;
}

/* System Settings switch rows */

.g-set-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 2px;
}

.g-set-row + .g-set-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.g-set-note {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: #86868b;
}

.g-switch {
  flex: none;
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: #d1d1d6;
}

.g-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.g-switch-on {
  background: #0a7aff;
}

.g-switch-on::after {
  left: 18px;
}

.g-set-hl .g-switch {
  box-shadow: 0 0 0 3px rgba(10, 104, 201, 0.25);
}

/* Doghouse app mock (matches the homepage demo) */

.g-app {
  width: 100%;
  max-width: 480px;
  padding: 20px 22px;
  border-radius: 18px;
  background: #0f141b;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.g-app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.g-app-head img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.g-app-title {
  font-size: 16px;
  font-weight: 800;
  color: #eef3f8;
}

.g-app-sub {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: #7fe0ae;
}

.g-app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #151c26;
}

.g-app-row .icon {
  font-size: 22px;
  color: #5f8ef7;
}

.g-app-row.open {
  border-color: rgba(52, 213, 139, 0.4);
}

.g-app-row.open .icon {
  color: #34d58b;
}

.g-app-name {
  font-size: 14px;
  font-weight: 700;
  color: #eef3f8;
}

.g-app-meta {
  margin-top: 1px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #6d7d8e;
}

.g-app-btn {
  flex: none;
  margin-left: auto;
  padding: 6px 14px;
  border: 1.5px solid #34d58b;
  border-radius: 100px;
  color: #34d58b;
  font-size: 11.5px;
  font-weight: 700;
}

.g-app-row.open .g-app-btn {
  background: #34d58b;
  color: #06281a;
}

.g-app-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #8fa0b3;
}

/* Callouts */

.g-callout {
  display: flex;
  gap: 14px;
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: 16px;
  font-size: 15.5px;
  line-height: 1.6;
}

.g-callout > .icon {
  flex: none;
  margin-top: 1px;
  font-size: 22px;
}

.g-article .g-callout p {
  margin: 0 0 8px;
}

.g-article .g-callout p:last-child {
  margin-bottom: 0;
}

.g-tip {
  background: #eef5fd;
}

.g-warn {
  background: #fff6e0;
}

.g-warn > .icon {
  color: #b25e00;
}

.g-bad {
  background: #fdf0ef;
}

.g-bad > .icon {
  color: #c4302b;
}

/* Terminal blocks */

.g-code {
  margin: 18px 0 22px;
  overflow: hidden;
  border-radius: 14px;
  background: #1d1d1f;
  color: #f5f5f7;
}

.g-code-bar {
  padding: 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  color: #8e8e93;
}

.g-code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.g-code .c {
  color: #8e8e93;
}

/* "What doesn't work" list */

.g-article .g-nope {
  display: grid;
  gap: 12px;
  margin: 8px 0 24px;
  padding: 0;
  list-style: none;
}

.g-article .g-nope li {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--rule-soft);
  border-radius: 16px;
  font-size: 15.5px;
  line-height: 1.6;
}

.g-nope .icon {
  flex: none;
  margin-top: 2px;
  font-size: 22px;
  color: #c4302b;
}

.g-nope.g-fixes .icon {
  color: var(--pop);
}

/* Decision cards */

.g-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 24px;
}

.g-pick-card {
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--gray);
}

.g-article .g-pick-card p {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

.g-article .g-pick-card p.g-pick-a {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* Dark "no back door" block */

.g-dark {
  margin: 56px 0;
  padding: 36px 34px;
  border-radius: 22px;
  background: var(--text);
  color: #a1a1a6;
}

.g-dark > .icon {
  display: block;
  margin-bottom: 14px;
  font-size: 38px;
}

.g-article .g-dark h2 {
  margin: 0 0 12px;
  font-size: 30px;
  color: #fff;
}

.g-article .g-dark p {
  color: #a1a1a6;
}

.g-article .g-dark p:last-child {
  margin-bottom: 0;
}

.g-article .g-dark strong {
  color: #f5f5f7;
}

/* CTA */

.g-cta {
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 48px 0;
  padding: 30px 32px;
  border-radius: 22px;
  background: var(--gray);
}

.g-cta > img {
  flex: none;
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.g-cta h3 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}

.g-article .g-cta p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.g-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.g-cta-row .btn {
  padding: 10px 20px;
  font-size: 14.5px;
}

/* FAQ inside the article */

.g-article .faq-list {
  margin-top: 8px;
}

/* About + sources */

.g-about {
  display: flex;
  gap: 16px;
  margin-top: 64px;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}

.g-about > img {
  flex: none;
  width: 52px;
  height: 52px;
  padding: 6px;
  border-radius: 50%;
  background: var(--gray);
  object-fit: contain;
}

.g-about h2 {
  font-size: 17px;
}

.g-article .g-about h2 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.g-article .g-about p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

.g-article .g-sources {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.g-article .g-sources li {
  margin: 0 0 6px;
}

/* Hub */

.g-hub {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 110px;
}

.g-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.g-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 30px;
  border-radius: 22px;
  background: var(--gray);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.g-card:hover {
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
}

.g-card .icon {
  font-size: 32px;
}

.g-card-kicker {
  font-size: 13px;
  font-weight: 700;
  color: var(--pop);
}

.g-card h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.g-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.g-card-meta {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12.5px;
  color: var(--faint);
}

.g-card-quiet {
  grid-column: 1 / -1;
  border: 1px solid var(--rule-soft);
  background: #fff;
}

.g-card-quiet h2 {
  font-size: 21px;
}

/* Responsive */

@media (max-width: 960px) {
  .g-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .g-toc {
    display: none;
  }

  .g-toc-mobile {
    display: block;
    margin: 0 0 32px;
    padding: 14px 18px;
    border: 1px solid var(--rule-soft);
    border-radius: 16px;
    font-size: 15px;
  }

  .g-toc-mobile summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
  }

  .g-toc-mobile ol {
    margin: 12px 0 4px;
    padding-left: 22px;
  }

  .g-article .g-toc-mobile li {
    margin: 0 0 6px;
  }

  .g-hub-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .g-hero {
    padding-top: 40px;
  }

  .g-dek {
    font-size: 17.5px;
  }

  .g-article {
    font-size: 16px;
  }

  .g-article h2 {
    margin-top: 56px;
    font-size: 26px;
  }

  .g-method-head {
    margin-top: 64px;
  }

  .g-pick {
    grid-template-columns: 1fr;
  }

  .g-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 24px;
  }

  .g-dark {
    padding: 30px 24px;
  }

  .g-stage {
    padding: 26px 12px;
  }

  .mac-sheet {
    padding: 18px 14px 14px;
    font-size: 12px;
  }

  .mac-row {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
  }

  .mac-badge {
    display: none;
  }

  .mac-sheet-sm .mac-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .mac-check {
    margin-left: 0;
  }
}
