:root {
  color-scheme: light;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --bg: #f4f7fb;
  --card: #ffffff;
  --border: #d8e0ea;
  --muted: #5f6f83;
  --text: #172033;
  --danger: #b42318;
  --success: #15803d;
  --surface: #f8fafc;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #eef5ff 0%, var(--bg) 48%, #f8fafc 100%);
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

[v-cloak] {
  display: none;
}

a {
  color: var(--accent);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.page-shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 46px 0;
}

.page-shell.page-shell-narrow {
  width: min(92vw, 680px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.home-link {
  display: inline-block;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.home-link:hover,
.home-link:focus-visible {
  text-decoration: underline;
}

.logo {
  width: 82px;
  height: auto;
}

.hero {
  margin-bottom: 30px;
}

.hero-with-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-title {
  margin: 0 0 8px;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-title-small {
  font-size: clamp(32px, 6vw, 52px);
}

.page-description {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-card,
.app-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 18px 45px rgba(23, 32, 51, 0.10);
}

.tool-card {
  display: block;
  min-height: 170px;
  padding: 24px;
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 20px 50px rgba(23, 32, 51, 0.16);
  transform: translateY(-2px);
  outline: none;
}

.tool-title {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 800;
}

.tool-description {
  margin: 0;
  color: var(--muted);
}

.arrow {
  display: inline-block;
  margin-top: 22px;
  color: var(--accent-dark);
  font-weight: 800;
}

.app-card {
  padding: 24px;
}

.app-card + .app-card {
  margin-top: 18px;
}

.card-title {
  margin: 0 0 18px;
  font-size: 20px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

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

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

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22);
}

.button-primary:not(:disabled):hover {
  background: var(--accent-dark);
}

.button-secondary {
  background: #edf2f7;
  color: #293548;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fee2e2;
  color: var(--danger);
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: #fecaca;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

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

label,
.label {
  color: #293548;
  font-weight: 800;
}

.input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.input:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status-panel {
  margin-top: 26px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.status-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-text {
  margin: 0;
  font-weight: 700;
}

.status-text.error {
  color: var(--danger);
}

.clipboard-list {
  display: grid;
  gap: 12px;
}

.clipboard-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.copy-text {
  overflow-wrap: anywhere;
  cursor: pointer;
}

.copy-text:hover,
.copy-text:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.instructions {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
  margin-bottom: 14px;
}

.results-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.word-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.word-list li {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: #293548;
  text-align: center;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px;
  border-radius: 12px;
  background: #172033;
  color: #fff;
  box-shadow: 0 18px 45px rgba(23, 32, 51, 0.22);
  font-weight: 700;
}

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 36px, 1120px);
    padding: 30px 0;
  }

  .hero-with-logo,
  .site-header {
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .logo {
    width: 70px;
  }

  .form-grid,
  .clipboard-item {
    grid-template-columns: 1fr;
  }

  .controls,
  .button {
    width: 100%;
  }

  .results-header {
    display: block;
  }
}
