:root {
  --primary: #2563eb;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --border: #e5e7eb;
  --radius: 8px;
  --font: system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.branding {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.9rem;
}

nav a:hover {
  color: var(--primary);
}

.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #111827;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.ad-container {
  margin: 2rem auto;
  min-height: 120px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.85rem;
  max-width: 720px;
}

.sandbox-tool {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .sandbox-tool {
    grid-template-columns: 1fr;
  }
}

.editor-pane, .preview-pane {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.editor-pane h2, .preview-pane h2 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 1rem;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.char-count {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  text-align: right;
}

.device-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
  background: #fff;
}

.device-header {
  background: #f9fafb;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inbox-item {
  padding: 1rem;
  position: relative;
}

.mobile-ios .inbox-item {
  display: flex;
  padding-left: 2rem;
}

.unread-dot {
  position: absolute;
  left: 0.75rem;
  top: 1.25rem;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

.mobile-ios .item-content {
  flex-grow: 1;
  min-width: 0;
  padding-right: 1rem;
}

.item-sender {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-subject {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-preheader {
  color: var(--text-light);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mobile-ios .item-time {
  color: var(--text-light);
  font-size: 0.8rem;
  white-space: nowrap;
}

.desktop-gmail .inbox-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.desktop-gmail .item-sender {
  flex: 0 0 160px;
  font-size: 0.9rem;
  margin: 0;
}

.desktop-gmail .item-body {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-gmail .item-subject {
  font-size: 0.9rem;
  margin: 0;
  display: inline;
  white-space: normal;
}

.desktop-gmail .item-sep {
  color: var(--text-light);
}

.desktop-gmail .item-preheader {
  display: inline;
  margin: 0;
  white-space: normal;
}

.desktop-gmail .item-time {
  flex: 0 0 60px;
  text-align: right;
  color: var(--text-light);
  font-size: 0.8rem;
}

.best-practices {
  background: var(--surface);
  padding: 3rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 4rem;
}

.best-practices h2 {
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.75rem;
}

.best-practices article h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #111827;
}

.best-practices article p {
  margin-bottom: 1rem;
  color: #374151;
}

.best-practices article ul {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  color: #374151;
}

.best-practices article li {
  margin-bottom: 0.5rem;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

.site-footer nav { margin-top: 1rem; }



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
