:root {
  --ghs-bg: #f8fafc;
  --ghs-surface: #ffffff;
  --ghs-card: #ffffff;
  --ghs-border: #e2e8f0;
  --ghs-border-focus: #2563eb;
  --ghs-blue: #2563eb;
  --ghs-green: #238636;
  --ghs-green-hover: #1c6b2b;
  --ghs-star: #b45309;
  --ghs-purple: #7c3aed;
  --ghs-text: #0f172a;
  --ghs-muted: #64748b;
  --ghs-radius: 10px;
  /* The generated GitHub-card preview itself is always dark, regardless of
     site theme — that's the actual look of the exported card, not a chrome
     choice. Everything else on the page follows the site's light/dark mode. */
  --ghs-preview-bg: #0d1117;
  --ghs-preview-border: #30363d;
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.ghs-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.ghs-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--ghs-border);
}

.ghs-breadcrumbs {
  font-size: 0.875rem;
  color: var(--ghs-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.ghs-breadcrumbs a {
  color: var(--ghs-blue);
  text-decoration: none;
}

.ghs-breadcrumbs a:hover {
  text-decoration: underline;
}

.ghs-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--ghs-text);
  letter-spacing: -0.025em;
}

.ghs-subtitle {
  font-size: 1.0625rem;
  color: var(--ghs-muted);
  margin: 0;
}

.ghs-main {
  padding: 32px 0 60px;
}

.ghs-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 860px) {
  .ghs-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.ghs-panel {
  background: var(--ghs-surface);
  border: 1px solid var(--ghs-border);
  border-radius: var(--ghs-radius);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.ghs-panel-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ghs-text);
  margin: 0 0 16px;
}

.ghs-form-group {
  margin-bottom: 16px;
}

.ghs-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ghs-muted);
  margin-bottom: 8px;
}

.ghs-input-row {
  display: flex;
  gap: 10px;
}

.ghs-input {
  flex: 1;
  background: var(--ghs-bg);
  border: 1.5px solid var(--ghs-border);
  color: var(--ghs-text);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.ghs-input:focus {
  outline: none;
  border-color: var(--ghs-border-focus);
}

.ghs-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ghs-green);
  color: #ffffff;
  border: 1px solid rgba(240,246,252,0.1);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.ghs-btn-primary:hover {
  background: var(--ghs-green-hover);
}

.ghs-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ghs-preset-lbl {
  font-size: 0.75rem;
  color: var(--ghs-muted);
  font-weight: 600;
}

.ghs-chip {
  background: var(--ghs-bg);
  color: var(--ghs-muted);
  border: 1px solid var(--ghs-border);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ghs-chip:hover {
  border-color: var(--ghs-blue);
  color: var(--ghs-blue);
}

.ghs-divider {
  border: 0;
  border-top: 1px solid var(--ghs-border);
  margin: 20px 0;
}

.ghs-theme-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.ghs-theme-btn {
  background: var(--ghs-bg);
  color: var(--ghs-muted);
  border: 1px solid var(--ghs-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.ghs-theme-btn.active {
  background: rgba(88, 166, 255, 0.15);
  border-color: var(--ghs-blue);
  color: var(--ghs-blue);
  font-weight: 700;
}

.ghs-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ghs-toggle-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ghs-text);
  cursor: pointer;
}

/* Preview Column */
.ghs-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ghs-badge {
  background: rgba(35, 134, 54, 0.15);
  color: #3fb950;
  border: 1px solid #238636;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.ghs-card-canvas-wrap {
  background: var(--ghs-preview-bg);
  border: 1px dashed var(--ghs-preview-border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  overflow: auto;
}

.ghs-svg-container {
  width: 100%;
  max-width: 480px;
}

.ghs-svg-container svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.ghs-export-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.ghs-btn-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ghs-card);
  color: var(--ghs-text);
  border: 1px solid var(--ghs-border);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ghs-btn-action:hover {
  background: var(--ghs-border);
  border-color: var(--ghs-muted);
}

.ghs-btn-copy {
  background: rgba(88, 166, 255, 0.15);
  color: var(--ghs-blue);
  border-color: var(--ghs-blue);
}

.ghs-btn-copy:hover {
  background: rgba(88, 166, 255, 0.25);
}

.ghs-code-box {
  margin-top: 14px;
}

.ghs-code-output {
  width: 100%;
  box-sizing: border-box;
  background: var(--ghs-bg);
  border: 1px solid var(--ghs-border);
  color: #7ee787;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  padding: 10px 12px;
  border-radius: 6px;
  resize: none;
}

/* Ad slots */
.ghs-ad-container {
  width: 100%;
  margin: 36px 0;
  display: flex;
  justify-content: center;
}

.ghs-ad-box {
  width: 100%;
  max-width: 728px;
  min-height: 280px;
  background: var(--ghs-surface);
  border: 1px dashed var(--ghs-border);
  border-radius: var(--ghs-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Explanatory Content */
.ghs-content-section {
  margin-top: 48px;
}

.ghs-content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ghs-text);
  margin-bottom: 16px;
}

.ghs-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.ghs-feature-card {
  background: var(--ghs-surface);
  border: 1px solid var(--ghs-border);
  border-radius: var(--ghs-radius);
  padding: 20px;
}

.ghs-feature-card h3 {
  font-size: 1.125rem;
  margin: 0 0 8px;
  color: var(--ghs-blue);
}

.ghs-feature-card p {
  font-size: 0.875rem;
  color: var(--ghs-muted);
  margin: 0;
}

.ghs-footer {
  border-top: 1px solid var(--ghs-border);
  padding: 28px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ghs-muted);
}

.ghs-footer a {
  color: var(--ghs-blue);
  text-decoration: none;
}

.ghs-consent-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ghs-consent-text {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin: 0;
}

.ghs-consent-actions {
  display: flex;
  gap: 8px;
}

.ghs-btn-consent-yes {
  background: var(--ghs-green);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.ghs-btn-consent-no {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.ghs-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: ghs-spin 0.6s linear infinite;
}

@keyframes ghs-spin {
  to { transform: rotate(360deg); }
}

#ghsFetchBtn:disabled {
  opacity: 0.75;
  cursor: wait;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --ghs-bg: var(--tf-surface);
  --ghs-surface: var(--tf-surface);
  --ghs-card: var(--tf-surface);
  --ghs-border: var(--tf-surface);
  --ghs-border-focus: #819dda;
  --ghs-blue: #819dda;
  --ghs-green: #6dd581;
  --ghs-green-hover: #59cf6f;
  --ghs-star: #d9a57d;
  --ghs-purple: #a281da;
  --ghs-text: var(--tf-ink);
  --ghs-muted: var(--tf-ink-faint);
  --ghs-preview-bg: var(--tf-ink);
  --ghs-preview-border: var(--tf-ink);
}
