/* Style guide — Wooden Hotel Kazbegi design reference */
body.sg { background: var(--stone-50); }

.sg-header {
  background: var(--wood-800);
  color: var(--stone-50);
  padding: 14px 0;
  position: sticky; top: 0; z-index: 20;
}
.sg-header .nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sg-header a.back { color: var(--stone-100); font-size: 0.9rem; font-weight: 600; opacity: 0.85; }
.sg-header a.back:hover { opacity: 1; color: var(--gold-400); }

.sg-main { padding: 40px 20px 80px; max-width: 1000px; margin: 0 auto; }
.sg-main > p.lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 640px; margin: 10px 0 8px; }

.sg-section { margin-top: 56px; }
.sg-section > h2 { font-size: 1.8rem; margin-bottom: 6px; }
.sg-section > .sg-sub { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 22px; max-width: 640px; }
.sg-section h3 { font-size: 1.15rem; margin: 26px 0 12px; }

/* Swatches */
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.sg-swatch { background: var(--white); border-radius: var(--radius); overflow: hidden; }
.sg-swatch .chip-color { height: 72px; display: flex; align-items: flex-end; padding: 8px 12px; }
.sg-swatch .chip-color code { font-size: 0.72rem; font-weight: 700; background: rgba(255,255,255,0.85); color: var(--ink); padding: 2px 7px; border-radius: 6px; }
.sg-swatch .chip-meta { padding: 10px 14px 12px; }
.sg-swatch .chip-meta strong { display: block; font-size: 0.88rem; }
.sg-swatch .chip-meta code { font-size: 0.74rem; color: var(--forest-700); }
.sg-swatch .chip-meta span { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-top: 3px; line-height: 1.45; }

/* Do / don't */
.sg-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sg-rule { border-radius: var(--radius); padding: 14px 18px; font-size: 0.92rem; }
.sg-rule.do { background: var(--success-100); color: var(--success-700); }
.sg-rule.dont { background: var(--danger-100); color: var(--danger-700); }
.sg-rule strong { display: block; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; margin-bottom: 4px; }

/* Type specimens */
.sg-type { background: var(--white); border-radius: var(--radius); padding: 22px 26px; display: grid; gap: 18px; }
.sg-type-row { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; }
.sg-type-row:first-child { border-top: none; padding-top: 0; }
.sg-type-row .spec { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.5; }
.sg-type-row .spec code { color: var(--forest-700); }
.sg-h1 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.12; color: var(--wood-900); }
.sg-h2 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.12; color: var(--wood-900); }
.sg-h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; line-height: 1.12; color: var(--wood-900); }
.sg-body { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.sg-secondary { font-size: 0.92rem; line-height: 1.6; color: var(--ink-soft); }
.sg-eyebrow-demo { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--gold-700); }
.sg-label-demo { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }

/* Spacing scale */
.sg-space { display: grid; gap: 10px; background: var(--white); border-radius: var(--radius); padding: 22px 26px; }
.sg-space-row { display: grid; grid-template-columns: 120px 1fr 240px; gap: 16px; align-items: center; font-size: 0.85rem; }
.sg-space-row .bar { height: 18px; background: var(--forest-500); border-radius: 4px; }
.sg-space-row code { color: var(--forest-700); font-weight: 600; }
.sg-space-row span { color: var(--ink-soft); }

/* Radii */
.sg-radii { display: flex; gap: 18px; flex-wrap: wrap; }
.sg-radius { background: var(--white); padding: 18px; border-radius: var(--radius); text-align: center; flex: 1; min-width: 150px; }
.sg-radius .shape { height: 64px; background: var(--stone-200); margin-bottom: 10px; }
.sg-radius code { font-size: 0.78rem; color: var(--forest-700); }
.sg-radius span { display: block; font-size: 0.8rem; color: var(--ink-soft); }

/* Component demo panels */
.sg-demo { background: var(--white); border-radius: var(--radius); padding: 22px 26px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.sg-demo.dark { background: var(--wood-800); }
.sg-demo.stack { display: grid; align-items: stretch; }
.sg-demo .note { flex-basis: 100%; font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
.sg-demo.dark .note { color: rgba(247,247,243,0.75); }
/* Illustrates the real .site-header:not(.solid)/.res-header gold exception
   (see styles.css/reservation.css) without depending on that page context. */
.sg-demo.dark .btn-primary { background: var(--gold-400); color: var(--wood-900); }
.sg-demo.dark .btn-primary:hover { background: var(--gold-500); }

/* Status chips demo reuses admin classes; ensure they exist standalone here */
.sg-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.sg-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sg-status.pending { background: var(--amber-100); color: var(--amber-700); }
.sg-status.confirmed { background: var(--success-100); color: var(--success-700); }
.sg-status.cancelled { background: var(--danger-100); color: var(--danger-700); }

.sg-badge { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--gold-500); color: var(--wood-900); padding: 4px 10px; border-radius: 999px; }
.sg-badge.subtle { background: var(--stone-200); color: var(--wood-700); }
.sg-chip { font-size: 0.78rem; background: var(--stone-100); color: var(--wood-700); padding: 5px 10px; border-radius: 999px; font-weight: 500; }

/* Alerts */
.sg-alert { border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.9rem; font-weight: 600; flex-basis: 100%; }
.sg-alert.ok { background: var(--success-100); color: var(--success-700); }
.sg-alert.warn { background: var(--amber-100); color: var(--amber-700); }
.sg-alert.err { background: var(--danger-100); color: var(--danger-700); }

/* Bubbles */
.sg-thread { display: flex; flex-direction: column; gap: 10px; flex-basis: 100%; }
.sg-bubble { max-width: 70%; padding: 9px 13px; border-radius: var(--radius); font-size: 0.92rem; }
.sg-bubble .meta { font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.03em; }
.sg-bubble.mine { align-self: flex-end; background: var(--success-100); }
.sg-bubble.theirs { align-self: flex-start; background: var(--stone-100); }

/* Contrast table */
.sg-table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); padding: 8px 4px; }
.sg-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
.sg-table th, .sg-table td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); }
.sg-table thead th { border-top: none; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.sg-table .pair { display: inline-flex; align-items: center; gap: 8px; }
.sg-table .pair i { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 0.7rem; font-weight: 700; }
.sg-pass { color: var(--success-700); font-weight: 700; }

.sg-list { display: grid; gap: 8px; padding-left: 20px; color: var(--ink); font-size: 0.95rem; }
.sg-list code { color: var(--forest-700); }

.sg-footer { border-top: 1px solid var(--line); padding: 22px 20px; text-align: center; font-size: 0.85rem; color: var(--ink-soft); }
.sg-footer a { color: var(--forest-500); font-weight: 600; }

@media (max-width: 700px) {
  .sg-rules { grid-template-columns: 1fr; }
  .sg-type-row { grid-template-columns: 1fr; gap: 6px; }
  .sg-space-row { grid-template-columns: 90px 1fr; }
  .sg-space-row span { display: none; }
}
