@import url("./brand-tokens.css");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
}

/* BRAND_LOCK_START: Keep this section identical across all NeoNema properties. */
.header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--header-bg) 84%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  display: block;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand img.brand-main {
  height: 50px;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 4px 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand img.brand-main {
    height: 40px;
  }
}
/* BRAND_LOCK_END */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 16px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  max-width: 760px;
  width: 100%;
  text-align: center;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
}

.hero-copy {
  color: var(--muted);
  line-height: 1.6;
}

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

.tool-card {
  margin-top: 16px;
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 20px;
}

.tool-card:first-of-type {
  margin-top: 28px;
}

.tool-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.tool-description {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

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

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  background: #101713;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.preset-btn:hover {
  border-color: var(--primary);
}

.preset-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

.preset-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.preset-btn code {
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}

.builder-fields label:first-child {
  margin-top: 0;
}

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101713;
  color: var(--foreground);
  padding: 12px;
  font: inherit;
}

select:focus,
input:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 1px;
}

.builder-fields {
  margin-top: 12px;
}

.time-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.time-row label {
  margin-top: 14px;
}

.expr-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.field-hint {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ghost-btn {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.ghost-btn:hover {
  border-color: var(--primary);
}

.ghost-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

.status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--primary);
}

.status[data-state="error"] {
  color: #f07178;
}

.description {
  margin: 8px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.parts {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.part {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101713;
  padding: 8px;
  text-align: center;
  min-width: 0;
}

.part-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.part code {
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--primary);
}

.subhead {
  margin: 18px 0 8px;
  font-size: 0.95rem;
}

.subhead-note {
  color: var(--muted);
  font-weight: 500;
}

.next-list {
  margin: 0;
  padding: 12px 12px 12px 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101713;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

.next-list:empty {
  display: none;
}

.privacy-note {
  width: 100%;
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.privacy-bold {
  display: block;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 6px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

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

.policy {
  max-width: 760px;
  margin: 48px auto;
  padding: 0 16px;
  line-height: 1.65;
}

.policy a {
  color: var(--muted);
}

.policy a:hover {
  color: var(--foreground);
}

@media (max-width: 768px) {
  .container {
    padding: 28px 12px 56px;
  }

  .preset-list {
    grid-template-columns: 1fr;
  }

  .expr-row {
    grid-template-columns: 1fr;
  }

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

  .field-hint {
    display: none;
  }

  .footer {
    gap: 14px;
    padding: 20px 12px;
  }
}

html.hub-embed body {
  min-height: auto;
}

html.hub-embed .header,
html.hub-embed .hero,
html.hub-embed .footer {
  display: none;
}

html.hub-embed .container {
  padding: 0 16px 24px;
}

html.hub-embed .tool-card:first-of-type {
  margin-top: 0;
}
