:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #ecf4ff;
  --ink: #0f172a;
  --muted: #475569;
  --brand: #0f766e;
  --brand-2: #ea580c;
  --line: #cbd5e1;
  --card-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --max-width: 1280px;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 118, 110, 0.12), transparent 65%),
    radial-gradient(900px 500px at 90% 0%, rgba(234, 88, 12, 0.14), transparent 60%),
    linear-gradient(180deg, #f5f8fc 0%, #f1f5f9 100%);
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  background: rgba(245, 248, 252, 0.86);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  transition: transform 0.2s ease;
}

.brand:hover .brand-logo {
  transform: rotate(-4deg) scale(1.03);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a,
.nav-link-btn {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-link-btn {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav a:hover,
.nav-link-btn:hover {
  background: rgba(15, 118, 110, 0.1);
  color: var(--ink);
}

.hero {
  padding: 4.25rem 0 2.4rem;
  position: relative;
  overflow: hidden;
}

.hero-grid,
.workspace {
  animation: rise-in 0.7s ease both;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.hero-wrap {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--card-shadow);
  padding: 2.8rem;
  position: relative;
  overflow: hidden;
}

.hero-wrap::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.25), transparent 70%);
  pointer-events: none;
}

.kicker,
.card-label,
.metric-pill,
.preset-chip,
.tab-button,
.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker {
  display: inline-block;
  color: var(--brand);
  border: 1px solid rgba(15, 118, 110, 0.45);
  border-radius: 999px;
  padding: 0.33rem 0.68rem;
  background: rgba(15, 118, 110, 0.08);
  margin-bottom: 1rem;
}

.card-label {
  display: inline-block;
  color: var(--brand);
  margin: 0 0 0.45rem;
}

h1,
.hero-side h2,
.panel h2,
.section-head h2 {
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 4.1rem);
  line-height: 1.05;
  margin: 0 0 0.8rem;
  max-width: 12ch;
}

.subtitle {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  max-width: 60ch;
  color: var(--muted);
  margin: 0 0 1.9rem;
}

.hero-actions,
.panel-head,
.output-head,
.preset-row,
.metric-strip,
.tab-row,
.action-row,
.inline-actions,
.action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn,
.read-btn,
.preset-chip,
.tab-button,
.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.btn:hover,
.read-btn:hover,
.preset-chip:hover,
.tab-button:hover,
.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-2px);
}

.btn-primary,
.primary-button {
  background: linear-gradient(125deg, var(--brand), #0d9488);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(13, 148, 136, 0.28);
}

.btn-secondary,
.ghost-button,
.preset-chip,
.tab-button {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--ink);
}

.tab-button.is-active,
.preset-chip:hover {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.3);
}

.read-btn {
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1;
}

.secondary-link {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.meta-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.meta-card {
  position: relative;
  padding: 0.85rem 0.95rem 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(51, 65, 85, 0.18);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.meta-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #0f766e 0%, #0d9488 100%);
}

.meta-label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
  margin-bottom: 0.28rem;
}

.meta-copy {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.45;
  color: #1e293b;
}

.hero-side {
  display: grid;
  gap: 1rem;
}

.card,
.panel,
.author-block {
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.card,
.panel {
  padding: 1.2rem;
}

.author-block {
  position: relative;
  padding: 1.35rem;
  background: linear-gradient(155deg, rgba(240, 253, 250, 0.92) 0%, rgba(255, 255, 255, 0.96) 55%, rgba(239, 246, 255, 0.93) 100%);
  overflow: hidden;
}

.author-block::after {
  content: "";
  position: absolute;
  right: -76px;
  top: -86px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(14, 116, 144, 0.16), transparent 70%);
  pointer-events: none;
}

.author-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.author-head h2 {
  margin: 0.08rem 0 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.author-mark {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
  white-space: nowrap;
}

.author-summary,
.info-card p,
.panel-intro,
.section-heading p,
.card p,
.validation-item span {
  color: var(--muted);
}

.author-summary {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
}

.how-to-list {
  margin: 0.85rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
  color: #334155;
}

.how-to-list li {
  line-height: 1.5;
}

.author-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(3px);
}

.author-modal[hidden] {
  display: none;
}

.author-dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.38);
}

.author-dialog .author-block {
  margin: 0;
  border-color: rgba(15, 118, 110, 0.32);
}

.author-close {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  z-index: 2;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border-radius: 10px;
  padding: 0.36rem 0.58rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.author-close:hover {
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.45);
}

.compact-tags {
  margin-top: 0.8rem;
}

.workspace-section {
  padding: 0 0 2.8rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2,
.panel h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.mono {
  color: #64748b;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 1rem;
  align-items: start;
}

.panel {
  position: relative;
}

.panel-head,
.output-head {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-intro {
  margin: 0.45rem 0 0;
  max-width: 52ch;
}

.builder-form {
  display: grid;
  gap: 1rem;
}

.form-section,
.validation-panel {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(236, 244, 255, 0.55);
  padding: 1rem;
}

.section-heading {
  margin-bottom: 0.85rem;
}

.section-heading h3,
.info-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

label {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.95rem;
  font-size: 0.96rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.82rem 0.9rem;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
  border-color: rgba(15, 118, 110, 0.55);
}

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

.toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.toggle span {
  font-weight: 700;
}

.metric-strip,
.tab-row,
.action-row {
  gap: 0.6rem;
}

.metric-pill,
.preset-chip,
.tab-button {
  border-radius: 999px;
  padding: 0.62rem 0.8rem;
}

.preview-stack {
  margin-top: 1rem;
}

.preview-surface {
  min-height: 500px;
  margin: 0;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 1rem;
  overflow: auto;
  color: #1e293b;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.88rem;
  line-height: 1.6;
}

.validation-panel {
  margin-top: 1rem;
}

.validation-list {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.validation-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 0.75rem;
  align-items: start;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  border: 1px solid transparent;
}

.validation-item strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}

.validation-item.is-pass {
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.2);
}

.validation-item.is-warning {
  background: rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.16);
}

.validation-item.is-error {
  background: rgba(190, 24, 93, 0.08);
  border-color: rgba(190, 24, 93, 0.18);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: #0f172a;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  white-space: nowrap;
}

.post-cta {
  margin-top: auto;
  padding-top: 0.2rem;
}

.repo-updated {
  margin: 0.1rem 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: #334155;
}

footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin-top: 2rem;
  padding: 1.35rem 0 2rem;
  color: #334155;
  font-size: 0.9rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.1rem;
  margin-top: 0.45rem;
  justify-content: center;
}

.footer-links a {
  color: var(--brand);
  font-weight: 600;
}

.footer-disclaimer {
  margin-top: 0.55rem;
  color: #64748b;
  font-size: 0.8rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .hero-grid,
  .workspace {
    grid-template-columns: 1fr;
  }

  .meta-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-wrap {
    padding: 2.2rem;
  }

  h1 {
    max-width: 14ch;
  }
}

@media (max-width: 960px) {
  .site-header .container,
  .section-head,
  .panel-head,
  .output-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header .container {
    min-height: auto;
    padding: 0.75rem 0;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .nav a,
  .nav-link-btn {
    flex: 0 0 auto;
  }

  .panel-head,
  .output-head {
    gap: 0.9rem;
  }

  .metric-strip {
    width: 100%;
  }

  .author-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .author-mark {
    white-space: normal;
  }
}

@media (max-width: 840px) {
  .hero {
    padding-top: 2.4rem;
  }

  .hero-wrap,
  .card,
  .panel,
  .author-block {
    padding: 1.1rem;
  }

  .author-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1rem, var(--max-width));
  }

  .hero-actions,
  .preset-row,
  .action-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .btn,
  .preset-row .preset-chip,
  .action-row .ghost-button,
  .action-row .primary-button {
    width: 100%;
  }

  .tab-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    width: 100%;
  }

  .nav a,
  .nav-link-btn {
    width: auto;
  }

  .hero-wrap::after {
    right: -150px;
    bottom: -180px;
    width: 280px;
    height: 280px;
  }

  input,
  textarea {
    padding: 0.75rem 0.8rem;
  }

  .validation-item {
    grid-template-columns: 1fr;
  }

  .preview-surface {
    min-height: 360px;
    padding: 0.9rem;
  }

  .author-dialog {
    max-height: calc(100vh - 1rem);
  }

  .author-close {
    top: 0.55rem;
    right: 0.55rem;
  }
}

@media (max-width: 520px) {
  .meta-line,
  .tab-row {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: 0.94rem;
  }

  .nav a,
  .nav-link-btn {
    padding: 0.34rem 0.58rem;
    font-size: 0.84rem;
  }
}
