:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #15803d;
  --green-bg: #f0fdf4;
  --red: #b91c1c;
  --amber: #a16207;
  --radius: 14px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  line-height: 1.6;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.top-nav a,
.footer-links a {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
}

.top-nav a:hover,
.footer-links a:hover {
  color: var(--blue);
}

/* Introduction */

.page-intro {
  padding-top: 52px;
  padding-bottom: 28px;
}

.eyebrow {
  margin: 0 0 9px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -.045em;
}

.intro-copy {
  max-width: 760px;
  margin: 15px 0 18px;
  color: #4b5563;
  font-size: 17px;
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: #4b5563;
  font-size: 13px;
}

.trust-points i {
  margin-right: 5px;
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

/* Workspace and panels */

.workspace {
  display: grid;
  gap: 22px;
  padding-bottom: 58px;
}

.panel {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 24, 40, .035);
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h2,
.preview-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.section-heading > div > p:last-child,
.preview-heading > div > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Fields */

.field-group {
  min-width: 0;
  margin-top: 16px;
}

.field-group label,
.label-row label,
.preview-controls label {
  display: block;
  margin-bottom: 8px;
  color: #273244;
  font-size: 13px;
  font-weight: 700;
}

input[type="text"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .11);
}

textarea {
  display: block;
  min-height: 100px;
  resize: vertical;
  line-height: 1.55;
}

#htmlInput {
  min-height: 175px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.field-group small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label-row label {
  margin-bottom: 8px;
}

.limit-label {
  color: var(--muted);
  font-size: 11px;
}

.input-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

/* Editor */

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.editor-grid .field-group {
  margin-top: 4px;
  margin-bottom: 15px;
}

.field-full {
  grid-column: 1 / -1;
}

/* Buttons */

.input-actions,
.image-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  color: #fff;
  background: #111827;
  border-color: #111827;
}

.button-primary:hover {
  background: #273244;
  border-color: #273244;
}

.button-secondary {
  color: #273244;
  background: #fff;
  border-color: #d0d5dd;
}

.button-secondary:hover {
  background: #f8fafc;
  border-color: #98a2b3;
}

.button-quiet {
  color: #667085;
  background: #f8fafc;
  border-color: #f8fafc;
}

.button-quiet:hover {
  color: #111827;
  background: #f3f4f6;
}

.button-small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

.upload-button {
  cursor: pointer;
}

/* Status */

.status-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.status-message.success {
  color: var(--green);
}

.status-message.error {
  color: var(--red);
}

/* Preview */

.preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.preview-controls {
  width: 150px;
  flex: 0 0 150px;
}

.preview-controls label {
  margin-bottom: 5px;
}

.image-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 21px 0;
}

#imageCounter {
  min-width: 115px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.social-card {
  min-width: 0;
}

.preview-label {
  margin: 0 0 10px;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.social-card-frame {
  overflow: hidden;
  border: 1px solid #d9dde3;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(16, 24, 40, .055);
}

.card-image-area {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f1f3f5;
}

.card-image-area img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-image-area img.fit-contain {
  object-fit: contain;
}

.image-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #98a2b3;
  background: linear-gradient(135deg, #f8fafc, #eef1f5);
  font-size: 12px;
}

.placeholder-icon {
  font-size: 30px;
  line-height: 1;
}

.social-card-content {
  padding: 13px 15px 15px;
}

.card-domain {
  margin: 0 0 5px;
  color: #667085;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.social-card-content h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #17202e;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.social-card-content > p:last-child {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.linkedin-frame {
  border-radius: 8px;
}

.linkedin-frame .card-image-area {
  aspect-ratio: 1.91 / 1;
}

.linkedin-frame .social-card-content {
  padding: 12px 14px;
}

.linkedin-frame .social-card-content h3 {
  font-size: 14px;
}

.linkedin-domain {
  margin: 4px 0 0 !important;
  color: #667085;
  font-size: 11px !important;
}

.linkedin-frame .social-card-content > p:last-child {
  margin-top: 7px;
}

.preview-disclaimer {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Export */

.code-output {
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 17px;
  border: 1px solid #273244;
  border-radius: 9px;
  color: #e5e7eb;
  background: #17202e;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-output code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
}

/* Privacy */

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px 19px;
  border: 1px solid #dce7f8;
  border-radius: 10px;
  background: #f8fbff;
}

.privacy-icon {
  flex: 0 0 auto;
  font-size: 17px;
}

.privacy-note p {
  margin: 0;
  color: #475467;
  font-size: 13px;
}

.privacy-note strong {
  color: #273244;
}

/* Guide and FAQ */

.content-section {
  padding-bottom: 65px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.content-panel {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.content-panel h2,
.faq-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.content-panel p,
.content-panel li {
  color: #4b5563;
  font-size: 14px;
}

.content-panel p:last-child {
  margin-bottom: 0;
}

.content-panel ol {
  margin: 12px 0 0;
  padding-left: 21px;
}

.content-panel li + li {
  margin-top: 7px;
}

.content-panel code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #273244;
  background: #f3f4f6;
  font-size: 12px;
}

.faq-section {
  margin-top: 48px;
}

.faq-section h2 {
  margin-bottom: 19px;
}

.faq-section details {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.faq-section summary {
  color: #273244;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.faq-section details p {
  max-width: 850px;
  margin: 10px 0 0;
  color: #667085;
  font-size: 13px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: #9ca3af;
  font-size: 12px;
}

.footer-inner nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  color: #4b5563;
  text-decoration: none;
  font-size: 12px;
}

.site-footer a:hover {
  color: #111827;
}

 (max-width: 520px) {
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .footer-inner nav {
    flex-wrap: wrap;
  }
}

/* Footer end */

/* Responsive */

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
    gap: 14px;
  }

  .brand-logo {
    width: 155px;
  }

  .top-nav {
    gap: 13px;
  }

  .top-nav a {
    font-size: 12px;
  }

  .page-intro {
    padding-top: 37px;
  }

  .panel {
    padding: 19px;
  }

  .preview-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .preview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-controls {
    width: 100%;
    flex-basis: auto;
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .footer-inner {
    width: min(100% - 28px, 1120px);
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 11px 0;
  }

  .brand-logo {
    width: 145px;
  }

  .top-nav {
    gap: 12px;
  }

  .top-nav a {
    font-size: 11px;
  }

  .page-intro {
    padding-top: 30px;
  }

  .intro-copy {
    font-size: 15px;
  }

  .trust-points {
    gap: 7px 13px;
    font-size: 11px;
  }

  .panel {
    padding: 16px;
    border-radius: 11px;
  }

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

  .field-full {
    grid-column: auto;
  }

  .input-actions,
  .image-actions {
    align-items: stretch;
  }

  .input-actions .button,
  .image-actions .button {
    flex: 1 1 auto;
  }

  .image-navigation {
    gap: 7px;
  }

  .image-navigation .button {
    padding-inline: 8px;
    font-size: 11px;
  }

  #imageCounter {
    min-width: 82px;
    font-size: 11px;
  }

  .social-card-content h3 {
    font-size: 15px;
  }

  .content-panel {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
