/* Cobbery design language, after DiscoveryTool's frontends/index.css and its CardScreen. */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("/fonts/pt-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "PT Serif", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;

  --neutral-50: #f2f1ed;
  --neutral-100: #e5e4df;
  --neutral-200: #d9d8d3;
  --neutral-500: #80807a;
  --neutral-900: #1a1a19;

  --background: #fffefc;
  --foreground: #0d0d0c;
  --primary: #4d171e;
  --primary-foreground: #fffefc;
  --muted-foreground: #666660;
  --border: #e5e4df;
  --panel: #f9f7f5;
  --ring: #80807a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--neutral-50);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.card {
  width: 100%;
  max-width: 28rem;
  background: var(--background);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.logo {
  display: block;
  height: 32px;
  width: auto;
}

.page-title {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
}

.description {
  margin-top: 4px;
  color: var(--muted-foreground);
}

.panel {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.panel strong,
.panel h2 {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
}

.panel ol {
  margin-left: 18px;
}

.panel li + li {
  margin-top: 2px;
}

.panel b {
  font-weight: 600;
  color: var(--foreground);
}

.panel.highlight {
  background: var(--neutral-50);
  border-color: var(--neutral-200);
}

.download-section {
  margin-top: 20px;
}

.download-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s;
}

.download-btn.primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: inset 0 -4px 4px #330a10, inset 0 4px 12px #662931;
}

.download-btn.primary:hover {
  background: rgb(77 23 30 / 0.9);
}

.download-btn.disabled {
  background: var(--neutral-50);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

.btn-label {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.8;
}

.other-options {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.other-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
  cursor: pointer;
  list-style: none;
}

.other-options summary::-webkit-details-marker {
  display: none;
}

/* Chevron, like lucide's chevron-down. */
.other-options summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}

.other-options[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.other-options summary:hover {
  color: var(--foreground);
}

.other-options-content {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
}

.dev-label {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.dev-form {
  display: flex;
  gap: 8px;
}

.dev-form input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 4px 12px;
  font: inherit;
  font-size: 16px; /* 16px keeps mobile browsers from zooming in on focus. */
  color: var(--foreground);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

@media (min-width: 768px) {
  .dev-form input {
    font-size: 14px;
  }
}

.dev-form input::placeholder {
  color: var(--muted-foreground);
}

.dev-form input:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgb(128 128 122 / 0.5);
}

.dev-form button {
  height: 36px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  cursor: pointer;
  transition: background-color 0.15s;
}

.dev-form button:hover {
  background: var(--neutral-50);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted-foreground);
  text-decoration: none;
  border-radius: 4px;
}

.back-link:hover {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.back-link svg {
  width: 16px;
  height: 16px;
}
