:root {
  color-scheme: dark;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  --background: #05070b;
  --background-soft: #0a0d13;
  --surface: rgba(12, 16, 23, 0.88);
  --surface-strong: #0d1118;
  --surface-hover: #121822;

  --text: #f4f7fb;
  --text-soft: #b6bfcd;
  --text-muted: #6f7a8a;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --accent: #e6edf7;
  --accent-contrast: #071019;

  --success: #6ee7b7;
  --danger: #fda4af;

  --shadow:
    0 30px 90px rgba(0, 0, 0, 0.34);

  --radius-large: 28px;
  --radius-medium: 18px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background:
    radial-gradient(
      circle at 50% -20%,
      rgba(255, 255, 255, 0.06),
      transparent 36%
    ),
    var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: transparent;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

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

.kayosweb {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.kayosweb-header {
  display: flex;
  width: min(1320px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.kayosweb-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.kayosweb-brand__symbol {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.01)
    );
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.kayosweb-brand__identity {
  display: flex;
  flex-direction: column;
}

.kayosweb-brand__identity strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.15em;
}

.kayosweb-brand__identity small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.kayosweb-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navigation-action,
.navigation-icon,
.text-action,
.engineering-close {
  border: 0;
  color: var(--text-soft);
  background: transparent;
}

.navigation-action {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.navigation-action:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.navigation-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.navigation-icon span {
  width: 14px;
  height: 1px;
  background: currentColor;
}

.discovery-view {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 72px 24px 110px;
}

.discovery-content {
  width: min(760px, 100%);
  text-align: center;
}

.product-signature {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.discovery-content h1 {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text);
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 540;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.discovery-description {
  max-width: 610px;
  margin: 24px auto 0;
  color: var(--text-soft);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
}

.discovery-form {
  margin-top: 46px;
}

.discovery-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(13, 17, 24, 0.88);
  box-shadow: var(--shadow);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.discovery-input:focus-within {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.46),
    0 0 0 4px rgba(255, 255, 255, 0.025);
  transform: translateY(-1px);
}

.discovery-input input {
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}

.discovery-input input::placeholder {
  color: #687382;
}

.discovery-submit {
  display: inline-flex;
  min-width: 136px;
  min-height: 58px;
  padding: 0 21px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 17px;
  color: var(--accent-contrast);
  background: var(--accent);
  font-size: 13px;
  font-weight: 760;
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.discovery-submit:hover:not(:disabled) {
  background: #ffffff;
  transform: translateY(-1px);
}

.discovery-submit svg {
  width: 17px;
  height: 17px;
}

.search-feedback {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.search-feedback--error {
  color: var(--danger);
}

.search-feedback--success {
  color: var(--success);
}

.discovery-suggestions {
  display: flex;
  margin-top: 22px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
  font-size: 11px;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.suggestion:hover {
  border-color: var(--line-strong);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
}

.result-view {
  flex: 1;
  padding: 72px 24px 100px;
}

.result-layout {
  display: grid;
  width: min(1160px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 72px;
}

.result-question {
  position: sticky;
  top: 40px;
  height: fit-content;
}

.result-label {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.result-question h2 {
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 520;
  line-height: 1.45;
}

.result-answer {
  min-width: 0;
}

.answer-header {
  display: flex;
  padding-bottom: 25px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.answer-header h2 {
  margin: 9px 0 0;
  font-size: 32px;
  font-weight: 560;
  letter-spacing: -0.035em;
}

.text-action {
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
}

.text-action:hover {
  color: var(--text);
}

.answer-content {
  padding: 34px 0;
}

.answer-content p {
  margin: 0;
  color: var(--text);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 410;
  line-height: 1.62;
  letter-spacing: -0.018em;
  white-space: pre-wrap;
}

.analysis-details {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.analysis-section {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.analysis-section h3 {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.analysis-section div {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.72;
  white-space: pre-wrap;
}

.answer-footer {
  display: flex;
  padding-top: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-muted);
  font-size: 11px;
}

.engineering-panel {
  position: fixed;
  z-index: 20;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(440px, calc(100% - 36px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-large);
  background: rgba(10, 13, 19, 0.98);
  box-shadow:
    -30px 0 100px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(24px);
}

.engineering-panel__header {
  display: flex;
  min-height: 86px;
  padding: 22px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.engineering-panel__header h2 {
  margin: 8px 0 0;
  font-size: 19px;
  font-weight: 570;
}

.engineering-close {
  width: 34px;
  height: 34px;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
}

.engineering-panel__content {
  padding: 22px;
}

.engineering-data {
  display: grid;
  gap: 0;
  margin: 0;
}

.engineering-data > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.engineering-data dt {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.engineering-data dd {
  margin: 0;
  color: var(--text-soft);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 11px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.engineering-history {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.engineering-history li {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.02);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 10px;
  line-height: 1.6;
}

.kayosweb-footer {
  display: flex;
  width: min(1320px, calc(100% - 48px));
  min-height: 62px;
  margin: auto auto 0;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.07em;
}

.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;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .result-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .result-question {
    position: static;
  }

  .analysis-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .kayosweb-header {
    width: min(100% - 24px, 1320px);
    min-height: 70px;
  }

  .kayosweb-brand__identity small,
  .navigation-action {
    display: none;
  }

  .discovery-view {
    padding: 44px 16px 76px;
  }

  .discovery-content h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .discovery-input {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .discovery-submit {
    min-height: 50px;
    border-radius: 14px;
  }

  .discovery-suggestions {
    display: none;
  }

  .result-view {
    padding: 44px 18px 72px;
  }

  .answer-header,
  .answer-footer,
  .kayosweb-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .kayosweb-footer {
    width: min(100% - 24px, 1320px);
    padding: 18px 0;
  }
}
