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

body {
  background: #f3f4f6;
  color: #111827;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

.ad-banner-top {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 15px;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

.nav {
  margin-bottom: 24px;
}

.nav a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav a:hover {
  color: #111827;
}

.header {
  margin-bottom: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e5f2ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.logo-wordmark {
  font-weight: 700;
  letter-spacing: -0.06em;
}

.header h1 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.subtitle {
  color: #4b5563;
  font-size: 0.95rem;
  max-width: 560px;
}

/* Two-column layout */
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* Left column — form */
.tool-section {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #111827;
}

.form-group {
  margin-bottom: 18px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #374151;
}

.char-count {
  font-size: 0.78rem;
  color: #9ca3af;
}

.char-count.warn {
  color: #d97706;
}

.char-count.over {
  color: #ef4444;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  background: #ffffff;
  color: #111827;
}

textarea {
  resize: vertical;
  min-height: 72px;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

.help-text {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Summary table */
.summary-section {
  margin-top: 20px;
  border-top: 1px solid #f3f4f6;
  padding-top: 18px;
}

.summary-heading {
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.summary-table th {
  padding: 8px 10px;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.summary-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.status-ok {
  color: #10b981;
  font-weight: 600;
}

.status-warn {
  color: #d97706;
  font-weight: 600;
}

/* Right column — previews */
.preview-column {
  display: flex;
  flex-direction: column;
}

.preview-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 8px;
}

/* Gmail Desktop mock */
.gmail-mock {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.gmail-header {
  background: #f9fafb;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gmail-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.gmail-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: #6b7280;
  flex-shrink: 0;
  text-transform: uppercase;
}

.gmail-content {
  min-width: 0;
}

.gmail-sender {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmail-subject-line {
  font-size: 0.875rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmail-subject-text {
  color: #111827;
}

.gmail-preheader {
  color: #9ca3af;
}

.gmail-time {
  font-size: 0.78rem;
  color: #9ca3af;
  flex-shrink: 0;
}

/* Phone mock — iPhone */
.phone-mock {
  background: #1f2937;
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 4px;
  max-width: 320px;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #9ca3af;
  margin-bottom: 10px;
  padding: 0 4px;
}

.phone-email-row {
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
}

.phone-sender {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-subject {
  font-size: 0.82rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-preheader-text {
  color: #9ca3af;
}

/* Android Gmail mock */
.android-mock {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.android-header {
  background: #1d4ed8;
  padding: 7px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.android-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.android-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: #6b7280;
  flex-shrink: 0;
  text-transform: uppercase;
}

.android-content {
  min-width: 0;
}

.android-sender {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.android-subject {
  font-size: 0.85rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.android-preheader {
  color: #9ca3af;
}

/* Truncation warning */
.truncation-warning {
  display: none;
  color: #d97706;
  font-size: 0.78rem;
  margin-top: 4px;
  margin-bottom: 8px;
}

.truncation-warning.visible {
  display: block;
}

/* FAQ accordion */
.faq {
  margin-top: 40px;
}

.faq-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 14px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.faq-question {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.1rem;
  color: #9ca3af;
  flex-shrink: 0;
  line-height: 1;
}

details[open] > .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 12px 16px 14px;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.65;
  border-top: 1px solid #f3f4f6;
}

/* Related tools */
.related-tools {
  margin-top: 32px;
}

.related-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.related-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.1);
  transform: translateY(-1px);
}

.related-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1d4ed8;
}

.related-desc {
  font-size: 0.82rem;
  color: #6b7280;
}

/* Bottom ad + footer */
.ad-banner-bottom {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 20px;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.footer {
  margin-top: 12px;
  text-align: center;
  font-size: 0.78rem;
  color: #9ca3af;
}

@media (max-width: 640px) {
  .page {
    padding: 24px 16px;
  }

  .header h1 {
    font-size: 1.6rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .phone-mock {
    max-width: 100%;
  }
}
