@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --paper: #f7f7f3;
  --ink: #15211d;
  --muted: #6d7772;
  --line: #dce1da;
  --soft: #eef1eb;
  --green: #1e4b3d;
  --green-dark: #12382d;
  --mint: #cde6d6;
  --orange: #ff8654;
  --orange-dark: #e46a39;
  --white: #ffffff;
  --shadow: 0 18px 60px rgba(20, 49, 37, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Manrope', 'Noto Sans SC', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(255, 134, 84, 0.42);
  outline-offset: 3px;
}

.site-shell {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  color: var(--paper);
  background: var(--green);
  border-radius: 50%;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-tagline {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.header-note,
.status-message,
.counter,
.section-label,
.eyebrow,
.number-field,
.domain-field,
.footer,
.feature-number {
  font-family: 'DM Mono', 'Noto Sans SC', monospace;
}

.header-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

.page-link {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.page-link:hover {
  color: var(--orange-dark);
}

.language-switcher {
  position: relative;
  display: inline-flex;
  min-width: 86px;
  min-height: 32px;
  align-items: center;
  color: var(--green);
  background: var(--soft);
  border: 1px solid #e1e9e0;
  border-radius: 2px;
}

.language-switcher select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 25px 0 9px;
  color: var(--green);
  background: transparent;
  border: 0;
  outline: 0;
  appearance: none;
  cursor: pointer;
  font-family: 'DM Mono', 'Noto Sans SC', monospace;
  font-size: 11px;
}

.language-switcher .select-chevron {
  top: 6px;
  right: 7px;
  font-size: 15px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #68b888;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(104, 184, 136, 0.14);
}

.intro {
  max-width: 860px;
  padding: 48px 0 36px;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
}

.eyebrow span {
  display: inline-block;
  width: 30px;
  height: 1px;
  margin: 0 10px 3px;
  background: var(--orange-dark);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 800px;
  margin: 21px 0 20px;
  font-size: clamp(42px, 6.4vw, 82px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

h1 em {
  color: var(--green);
  font-style: normal;
}

.intro-copy {
  max-width: 485px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.workspace {
  padding: 32px 36px 22px;
  background: var(--white);
  border: 1px solid #e8ece6;
  box-shadow: var(--shadow);
}

.workspace-head,
.workspace-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.workspace-head {
  margin-bottom: 22px;
}

.workspace-head h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.counter {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.counter strong {
  color: var(--green);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.workspace-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 7px;
  padding: 0 11px;
  color: var(--green);
  background: var(--soft);
  border: 1px solid #e1e9e0;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.copy-button:hover {
  background: #e3eee5;
  border-color: #c8ddcc;
  transform: translateY(-1px);
}

.copy-button:active {
  transform: translateY(0);
}

.copy-icon {
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

textarea {
  display: block;
  width: 100%;
  min-height: 315px;
  padding: 22px;
  resize: vertical;
  color: var(--ink);
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: 'DM Mono', 'Noto Sans SC', monospace;
  font-size: 14px;
  line-height: 1.8;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea::placeholder {
  color: #a2aba5;
}

textarea:focus {
  border-color: #8ab79a;
  box-shadow: 0 0 0 4px rgba(138, 183, 154, 0.14);
  outline: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 21px 0 17px;
  border-bottom: 1px solid var(--line);
}

.generator-toolbar {
  justify-content: flex-start;
}

.generator-more-link {
  color: var(--green);
  text-decoration: none;
}

.generator-more-link:hover {
  color: var(--green);
  background: #e3eee5;
}

.link-arrow {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button-icon {
  display: inline-grid;
  width: 17px;
  height: 17px;
  border: 1px solid currentColor;
  border-radius: 50%;
  place-items: center;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}

.button-primary {
  color: var(--white);
  background: var(--green);
}

.button-primary:hover {
  background: var(--green-dark);
}

.button-secondary {
  color: var(--green);
  background: var(--soft);
  border-color: #e1e9e0;
}

.button-secondary:hover {
  background: #e3eee5;
  border-color: #c8ddcc;
}

.button-accent {
  color: #3f1e12;
  background: var(--orange);
}

.button-accent:hover {
  background: #ff9a6d;
}

.tool-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.number-field,
.domain-field {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11px;
  white-space: nowrap;
}

.number-field {
  padding-left: 11px;
}

.number-field input {
  width: 44px;
  padding: 0 3px;
  color: var(--green);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.generate-count-field {
  padding-left: 5px;
}

.generate-count-field input {
  width: 50px;
}

.number-field span:last-child {
  padding-right: 11px;
}

.virtual-group {
  margin-left: auto;
}

.domain-field {
  position: relative;
  min-width: 145px;
  padding-right: 28px;
}

.domain-field select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  color: var(--green);
  background: transparent;
  border: 0;
  outline: 0;
  appearance: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}

.select-chevron {
  position: absolute;
  right: 9px;
  top: 10px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 18px;
  pointer-events: none;
}

.workspace-foot {
  align-items: center;
  padding-top: 14px;
}

.status-message {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

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

.status-message.is-error {
  color: #bf4e2f;
}

.clear-button {
  padding: 4px 0;
  color: var(--muted);
  background: none;
  border: 0;
  font-size: 12px;
}

.clear-button:hover {
  color: var(--orange-dark);
}

.clear-button span {
  margin-left: 4px;
  font-size: 18px;
  line-height: 0;
  vertical-align: -2px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 62px 0 76px;
}

.feature-item {
  display: flex;
  gap: 18px;
  padding: 0 35px;
  border-left: 1px solid var(--line);
}

.feature-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.feature-number {
  color: var(--orange-dark);
  font-size: 11px;
  line-height: 1.7;
}

.feature-item h3 {
  margin: -3px 0 7px;
  font-size: 15px;
  font-weight: 700;
}

.feature-item p {
  max-width: 210px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.footer {
  display: flex;
  justify-content: space-between;
  padding: 18px 0 28px;
  color: #9aa39d;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:hover {
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .virtual-group {
    margin-left: 0;
  }
}

@media (max-width: 680px) {
  .site-shell {
    width: min(100% - 36px, 560px);
  }

  .topbar {
    height: 74px;
  }

  .header-note {
    font-size: 0;
  }

  .header-actions {
    gap: 13px;
  }

  .page-link {
    font-size: 11px;
  }

  .brand-tagline {
    display: none;
  }

  .language-switcher {
    min-width: 78px;
  }

  .header-note .status-dot {
    width: 8px;
    height: 8px;
  }

  .intro {
    padding: 44px 0 34px;
  }

  h1 {
    margin-top: 18px;
    font-size: clamp(39px, 12vw, 64px);
    letter-spacing: -0.045em;
  }

  .intro-copy {
    font-size: 14px;
    line-height: 1.8;
  }

  .workspace {
    padding: 24px 18px 17px;
  }

  .workspace-head h2 {
    font-size: 19px;
  }

  .workspace-head-actions {
    gap: 10px;
  }

  .copy-button {
    padding: 0 9px;
  }

  textarea {
    min-height: 270px;
    padding: 16px;
    font-size: 13px;
  }

  .toolbar {
    align-items: stretch;
  }

  .generator-toolbar {
    justify-content: stretch;
  }

  .button,
  .tool-group {
    width: 100%;
  }

  .button {
    min-height: 46px;
  }

  .tool-group .button {
    flex: 1;
  }

  .number-field {
    flex: 0 0 auto;
  }

  .virtual-group {
    display: grid;
    grid-template-columns: 1fr 145px;
  }

  .virtual-group .button {
    width: auto;
  }

  .domain-field {
    width: auto;
  }

  .feature-strip {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 46px 0 55px;
  }

  .feature-item,
  .feature-item:first-child {
    padding: 0;
    border-left: 0;
  }

  .feature-item p {
    max-width: none;
  }

  .footer {
    gap: 20px;
    line-height: 1.6;
  }
}

@media (max-width: 430px) {
  .site-shell {
    width: min(100% - 28px, 560px);
  }

  .intro {
    padding-top: 36px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .workspace-head {
    align-items: flex-start;
  }

  .header-actions {
    gap: 7px;
  }

  .page-link {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-note {
    display: none;
  }

  .counter {
    gap: 4px;
  }

  .counter strong {
    font-size: 21px;
  }

  .virtual-group {
    grid-template-columns: 1fr;
  }

  .domain-field {
    width: 100%;
  }

  .footer {
    flex-direction: column;
    gap: 5px;
  }
}
