:root {
  --ink: #172026;
  --muted: #5f6f78;
  --line: #d9e2e7;
  --panel: #ffffff;
  --soft: #f4f8f9;
  --mint: #0f766e;
  --mint-dark: #0b4f4a;
  --amber: #c77700;
  --coral: #c44f39;
  --blue: #2563eb;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fbfdfd;
}

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

a:hover {
  color: var(--mint);
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(251, 253, 253, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 88px);
  padding: clamp(38px, 7vw, 86px) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 720px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-lede,
.section-heading p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

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

.button.primary {
  color: #fff;
  background: var(--mint);
  border-color: var(--mint);
}

.button.primary:hover {
  color: #fff;
  background: var(--mint-dark);
}

.button.secondary,
.button.small {
  color: var(--ink);
  background: #fff;
}

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

.live-panel {
  min-height: 430px;
  padding: 22px;
  background:
    radial-gradient(circle at 15% 20%, rgba(199, 119, 0, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #eef7f5 42%, #f8efe8 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(23, 32, 38, 0.12);
}

.dot {
  width: 10px;
  height: 10px;
  background: var(--coral);
  border-radius: 50%;
}

.dot:nth-child(2) {
  background: var(--amber);
}

.dot:nth-child(3) {
  background: var(--mint);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.metric-grid div {
  min-height: 118px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(23, 32, 38, 0.1);
  border-radius: 8px;
}

.metric-grid span,
.template-list span,
.content-card p {
  color: var(--muted);
}

.metric-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 36px;
}

.preview-lines {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.preview-lines span {
  height: 14px;
  background: rgba(23, 32, 38, 0.1);
  border-radius: 999px;
}

.preview-lines span:nth-child(2) {
  width: 76%;
}

.preview-lines span:nth-child(3) {
  width: 54%;
}

.section {
  padding: clamp(46px, 7vw, 92px) clamp(18px, 4vw, 56px);
}

.band {
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 30px;
}

.section-actions {
  margin: -10px 0 26px;
}

.compact-hero {
  max-width: 1180px;
}

.compact-hero h1 {
  max-width: 980px;
  font-size: clamp(40px, 7vw, 76px);
}

.tool-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
}

.tool-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
}

.tool-tab {
  min-height: 46px;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.tool-tab.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.tool-area {
  min-width: 0;
}

.tool-panel {
  display: none;
  min-height: 610px;
  padding: clamp(18px, 3vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-panel.active {
  display: block;
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

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

label,
.full-label {
  display: grid;
  gap: 8px;
  color: #314049;
  font-size: 14px;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fbfdfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input {
  min-height: 44px;
  padding: 10px 12px;
}

textarea {
  min-height: 210px;
  margin-top: 16px;
  padding: 14px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

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

.content-card {
  min-height: 250px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.content-card h3 {
  margin-top: 16px;
}

.content-card p {
  line-height: 1.6;
}

.tag {
  display: inline-flex;
  color: var(--mint);
  font-size: 13px;
  font-weight: 800;
}

.template-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.template-list div,
.template-list a {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-stack,
.directory-section {
  display: grid;
  gap: 28px;
}

.small-heading {
  margin-bottom: 0;
}

.small-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.directory-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.directory-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.toolkit-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.toolkit-sidebar,
.toolkit-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toolkit-sidebar {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 110px);
  padding: 14px;
  overflow: auto;
}

.toolkit-sidebar input {
  margin-bottom: 12px;
}

.tool-list {
  display: grid;
  gap: 8px;
}

.tool-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.tool-list-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tool-list-item strong {
  font-size: 14px;
}

.tool-list-item.active {
  color: #fff;
  background: var(--ink);
}

.tool-list-item.active span {
  color: #d9e2e7;
}

.toolkit-main {
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
}

.toolkit-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.toolkit-title p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.dns-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.dns-card {
  min-width: 0;
  padding: 18px;
  background: #fbfdfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dns-card.error {
  border-color: rgba(196, 79, 57, 0.45);
}

.dns-card p {
  color: var(--muted);
  line-height: 1.55;
}

.dns-answer-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.dns-answer-list div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dns-answer-list code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dns-answer-list span {
  color: var(--muted);
  font-size: 13px;
}

.dynamic-form,
#utility-extra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dynamic-form label,
#utility-extra label {
  align-content: start;
}

.dynamic-form textarea,
#utility-extra textarea {
  min-height: 132px;
  margin-top: 0;
}

#utility-extra select {
  min-height: 44px;
  padding: 10px 12px;
  background: #fbfdfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.publish {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.daily-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
  color: #314049;
  font-size: 18px;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 30px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer div {
  display: flex;
  gap: 16px;
}

.article-page {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(38px, 7vw, 86px) clamp(18px, 4vw, 32px);
}

.article-page h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.article-meta {
  color: var(--muted);
  font-weight: 700;
}

.article-page p,
.article-page li {
  color: #314049;
  font-size: 18px;
  line-height: 1.75;
}

.article-page h2 {
  margin-top: 42px;
  font-size: clamp(25px, 3vw, 36px);
}

.article-page a {
  color: var(--mint);
  font-weight: 750;
}

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

  .workspace-hero {
    min-height: auto;
  }

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

  .card-grid,
  .template-list,
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolkit-layout {
    grid-template-columns: 1fr;
  }

  .dns-results {
    grid-template-columns: 1fr;
  }

  .toolkit-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .form-grid,
  .tool-tabs,
  .card-grid,
  .template-list,
  .metric-grid,
  .directory-grid,
  .dynamic-form,
  #utility-extra {
    grid-template-columns: 1fr;
  }

  .live-panel,
  .tool-panel {
    min-height: auto;
  }
}
