* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  letter-spacing: 0;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.15s ease, color 0.15s ease;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
p, li, dt, dd, h1, h2, h3, h4, button { overflow-wrap: break-word; }
.hero-copy, .workflow-copy p, .track-intro p, .process-list p, .inquiry-copy p { text-wrap: pretty; }
.page-width { width: min(calc(100% - 3rem), 1040px); margin-inline: auto; }
.page-chrome { width: min(calc(100% - 3rem), 1040px); padding-inline: 0; }
.eyebrow, .section-label {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partner-hero { padding: clamp(4rem, 8vw, 7rem) 0 2.4rem; }
.partner-hero h1 {
  max-width: 900px;
  margin: 1rem 0 1.25rem;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}
.hero-copy {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.primary-action, .secondary-action, .track-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0.72rem 1.05rem;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}
.primary-action { background: var(--accent); color: #fff; }
.secondary-action { border: 1px solid var(--border); color: var(--text); }
.primary-action:hover, .track-action:hover { filter: brightness(0.95); text-decoration: none; }
.secondary-action:hover { border-color: var(--accent); text-decoration: none; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(3.5rem, 8vw, 6.5rem) 0 0;
  padding: 1.3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.hero-facts div { min-width: 0; padding: 0 1.35rem; border-left: 1px solid var(--border); }
.hero-facts div:first-child { padding-left: 0; border-left: 0; }
.hero-facts dt { color: var(--faint); font-size: 0.78rem; }
.hero-facts dd { margin: 0.22rem 0 0; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }

.workflow-band { background: var(--bg-2); border-bottom: 1px solid var(--border); }
.workflow-inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.workflow-copy h2, .section-heading h2, .principles-inner h2, .inquiry-copy h2 {
  margin: 0.8rem 0 0;
  font-size: clamp(1.7rem, 3.8vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: 0;
}
.workflow-copy p { margin: 1rem 0 0; color: var(--muted); }
.workflow-visual { margin: 0; min-width: 0; }
.workflow-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
  object-position: center 32%;
  background: #fff;
}
.workflow-visual figcaption { margin-top: 0.55rem; color: var(--faint); font-size: 0.78rem; }

.tracks-section, .process-section, .inquiry-section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-heading { max-width: 700px; margin-bottom: 2rem; }
.partner-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}
.partner-tabs button {
  min-width: 0;
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0.8rem 0.6rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.partner-tabs button:hover { color: var(--text); }
.partner-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--text); }
.partner-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.track-panel { padding: 2.2rem 0 0; }
.track-panel[hidden] { display: none; }
.track-intro { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.track-number { color: var(--accent); font-size: 0.82rem; font-weight: 700; }
.track-intro h3 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.75rem); }
.track-intro p { max-width: 760px; margin: 0.65rem 0 0; color: var(--muted); }
.track-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin: 2rem 0 1.8rem 4rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.track-columns h4 { margin: 0 0 0.8rem; font-size: 0.85rem; color: var(--faint); }
.track-columns ul, .principles-inner ul { list-style: none; margin: 0; padding: 0; }
.track-columns li { position: relative; padding: 0.35rem 0 0.35rem 1rem; }
.track-columns li::before { content: ""; position: absolute; left: 0; top: 0.94rem; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.track-action { margin-left: 4rem; background: var(--accent); color: #fff; }

.process-section { border-top: 1px solid var(--border); }
.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.process-list li { min-width: 0; padding: 1.4rem; border-left: 1px solid var(--border); }
.process-list li:first-child { border-left: 0; padding-left: 0; }
.process-number { display: block; color: var(--accent); font-size: 0.74rem; font-weight: 700; margin-bottom: 1rem; }
.process-list strong { display: block; font-size: 1rem; }
.process-list p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.88rem; overflow-wrap: break-word; }

.principles-band { background: #101114; color: #f7f7f8; }
[data-theme="dark"] .principles-band { background: #f1f2f5; color: #14151a; }
.principles-inner { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr); gap: 4rem; padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.principles-inner .section-label { color: #9f9aff; }
.principles-inner ul { border-top: 1px solid rgba(255, 255, 255, 0.18); }
[data-theme="dark"] .principles-inner ul { border-top-color: rgba(0, 0, 0, 0.16); }
.principles-inner li { padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
[data-theme="dark"] .principles-inner li { border-bottom-color: rgba(0, 0, 0, 0.16); }

.inquiry-section { display: grid; grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr); gap: clamp(2.5rem, 7vw, 6rem); }
.inquiry-copy p { margin: 1rem 0 0; color: var(--muted); }
.inquiry-copy .patent-note { font-size: 0.82rem; color: var(--faint); }
form { position: relative; min-width: 0; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
label { display: block; margin: 0.9rem 0 0.35rem; font-size: 0.82rem; font-weight: 700; }
.req { margin-left: 0.25rem; color: var(--accent); font-size: 0.7rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 0.72rem 0.78rem;
  font-size: 0.94rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
button[type="submit"] {
  width: 100%;
  min-height: 48px;
  margin-top: 1.35rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button[type="submit"]:disabled { opacity: 0.58; cursor: wait; }
.form-note, .alternate-contact { color: var(--muted); font-size: 0.8rem; }
.form-note a, .alternate-contact a { color: var(--accent); }
.result { display: none; margin-top: 1rem; border-radius: 8px; padding: 0.85rem 0.95rem; font-size: 0.9rem; }
.result.ok { display: block; background: color-mix(in srgb, #16a34a 12%, transparent); color: color-mix(in srgb, #16a34a 80%, var(--text)); }
.result.err { display: block; background: color-mix(in srgb, #dc2626 12%, transparent); color: color-mix(in srgb, #dc2626 80%, var(--text)); }
.alternate-contact { grid-column: 2; margin: -4.8rem 0 0; align-self: end; transform: translateY(3rem); }

.partner-footer { padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--border); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 0;
  font-size: 0.78rem;
}
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-links a:not(:last-child)::after { content: "·"; margin: 0 0.55rem; color: var(--border-strong); }

@media (max-width: 820px) {
  .workflow-inner, .principles-inner, .inquiry-section { grid-template-columns: 1fr; }
  .workflow-copy { max-width: 640px; }
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-list li:nth-child(3) { border-left: 0; }
  .process-list li:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .alternate-contact { grid-column: auto; margin: -1.8rem 0 0; transform: none; }
}

@media (max-width: 620px) {
  .page-width { width: min(calc(100% - 2.2rem), 1040px); }
  .page-chrome { width: min(calc(100% - 2.2rem), 1040px); }
  .partner-hero { padding-top: 3rem; }
  .partner-hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-actions { align-items: stretch; }
  .hero-actions a { flex: 1 1 100%; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div { padding: 0.9rem 0; border-left: 0; border-top: 1px solid var(--border); }
  .hero-facts div:first-child { border-top: 0; }
  .partner-tabs { grid-template-columns: 1fr; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
  .partner-tabs button { min-height: 46px; border-bottom: 1px solid var(--border); text-align: left; padding-inline: 0.9rem; }
  .partner-tabs button:last-child { border-bottom: 0; }
  .partner-tabs button[aria-selected="true"] { border-bottom-color: var(--border); background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
  .track-intro { grid-template-columns: 1fr; gap: 0.45rem; }
  .track-columns { grid-template-columns: 1fr; gap: 1.35rem; margin-left: 0; }
  .track-action { width: 100%; margin-left: 0; }
  .process-list { grid-template-columns: 1fr; }
  .process-list li, .process-list li:first-child { padding: 1.2rem 0; border-left: 0; border-top: 1px solid var(--border); }
  .process-list li:first-child { border-top: 0; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
