:root {
  --ink: #111827;
  --muted: #667085;
  --line: #d8e0ec;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --blue: #2359d8;
  --blue-dark: #153f9f;
  --mint: #10a37f;
  --amber: #f5a524;
  --rose: #e25563;
  --shadow: 0 24px 70px -42px rgba(17, 24, 39, .46);
  --shadow-soft: 0 14px 36px -30px rgba(17, 24, 39, .35);
  --radius: 20px;
  --maxw: 1180px;
  --font: "Inter", "Noto Sans JP", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    linear-gradient(180deg, #fbfcff 0, #fff 520px),
    #fff;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
p, h1, h2, h3 { margin-top: 0; }
.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;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - var(--maxw)) / 2));
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(216, 224, 236, .82);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
  letter-spacing: -.03em;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 13px;
  background:
    radial-gradient(circle at 72% 22%, #fff 0 8px, transparent 9px),
    linear-gradient(135deg, var(--blue), #16b9d1);
  box-shadow: 0 16px 32px -22px var(--blue);
}
.nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.nav a:hover { color: var(--blue); }

.workspace {
  max-width: var(--maxw);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 56px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(520px, 1.12fr);
  gap: 34px;
  align-items: center;
}
.intro {
  position: relative;
  padding-right: 10px;
}
.eyebrow, .kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1 {
  margin-bottom: 22px;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.07;
  letter-spacing: -.07em;
}
.lead {
  max-width: 580px;
  color: var(--muted);
  font-size: 17px;
}
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.trust-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.trust-strip span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--mint);
}
.source-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
  max-width: 520px;
}
.source-mini div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
}
.source-mini strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.04em;
}
.source-mini span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-product {
  min-height: 660px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 15% 0, rgba(35,89,216,.12), transparent 32%),
    radial-gradient(circle at 100% 10%, rgba(16,163,127,.13), transparent 30%),
    #fff;
  box-shadow: var(--shadow);
}
.chat-head {
  min-height: 64px;
  padding: 0 18px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.76);
}
.chat-head div {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(16,163,127,.13);
}
.clear-btn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.messages {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}
.message {
  max-width: 86%;
  padding: 15px 16px;
  border-radius: 20px;
  font-size: 15px;
}
.message p {
  margin-bottom: 0;
  white-space: pre-wrap;
}
.message.bot {
  align-self: flex-start;
  background: #f1f5fb;
  border-bottom-left-radius: 6px;
}
.message.user {
  align-self: flex-end;
  color: #fff;
  background: var(--blue);
  border-bottom-right-radius: 6px;
}
.citations {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.citation {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
}
.citation strong {
  color: var(--blue);
  font-weight: 900;
}
.citation a {
  display: inline-block;
  margin-top: 6px;
  color: var(--mint);
  font-weight: 900;
}
.suggestion-row {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
  overflow-x: auto;
}
.suggestion-row button {
  flex: none;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.composer {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.86);
}
.composer input {
  min-width: 0;
  flex: 1;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
}
.composer input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(35,89,216,.1);
}
.composer button {
  min-width: 78px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 86px 24px;
  scroll-margin-top: 88px;
}
.section.soft {
  max-width: none;
  background: var(--soft);
}
.section.soft > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}
.section-head {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}
.section-head.left {
  margin-left: 0;
  text-align: left;
}
.section-head h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.16;
  letter-spacing: -.055em;
}
.section-head p {
  color: var(--muted);
}

.diagram-section {
  padding-top: 94px;
  border-top: 1px solid var(--line);
}
.rag-diagram {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 46px 1fr 46px 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 10%, rgba(35,89,216,.12), transparent 28%),
    radial-gradient(circle at 92% 0, rgba(16,163,127,.12), transparent 26%),
    linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.rag-diagram::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(35,89,216,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,89,216,.055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 88%);
  pointer-events: none;
}
.diagram-lane {
  position: relative;
  z-index: 1;
  min-height: 380px;
  padding: 20px;
  border: 1px solid rgba(216,224,236,.86);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
}
.lane-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 16px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef4ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sources-lane {
  display: grid;
  align-content: start;
  gap: 12px;
}
.visual-doc {
  position: relative;
  min-height: 86px;
  padding: 15px 15px 13px 60px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.visual-doc::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 17px;
  width: 30px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #65a7ff);
}
.visual-doc.faq::before {
  background: linear-gradient(135deg, var(--mint), #79d9bd);
}
.visual-doc.web::before {
  background: linear-gradient(135deg, var(--amber), #ffd77a);
}
.visual-doc span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.visual-doc strong {
  display: block;
  margin: 1px 0 8px;
  font-size: 15px;
}
.visual-doc i {
  display: block;
  height: 5px;
  margin-top: 5px;
  border-radius: 999px;
  background: #e8eef7;
}
.visual-doc i:nth-of-type(2) {
  width: 76%;
}
.visual-doc i:nth-of-type(3) {
  width: 54%;
}
.diagram-arrow {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 32px;
  font-weight: 900;
}
.chunk-cloud {
  position: relative;
  min-height: 210px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}
.chunk-cloud span {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}
.chunk-cloud span:nth-child(2),
.chunk-cloud span:nth-child(5) {
  border-color: rgba(35,89,216,.36);
  background: #eef4ff;
  color: var(--blue);
}
.search-beam {
  position: relative;
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 18px;
  color: var(--blue);
  background:
    linear-gradient(90deg, transparent, rgba(35,89,216,.16), transparent),
    #fff;
  border: 1px dashed rgba(35,89,216,.34);
  font-weight: 900;
  text-align: center;
}
.answer-visual {
  display: grid;
  gap: 14px;
  align-content: center;
  min-height: 300px;
}
.question-pill {
  justify-self: end;
  max-width: 230px;
  padding: 12px 15px;
  border-radius: 18px 18px 6px 18px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}
.answer-bubble {
  padding: 16px;
  border-radius: 18px 18px 18px 6px;
  background: #f1f5fb;
}
.answer-bubble strong {
  color: var(--blue);
}
.answer-bubble p {
  margin: 6px 0 0;
}
.citation-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.citation-strip span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(16,163,127,.32);
  border-radius: 14px;
  color: var(--mint);
  background: #effbf7;
  font-size: 13px;
  font-weight: 900;
}
.diagram-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.diagram-notes article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.diagram-notes strong {
  display: block;
  margin-bottom: 4px;
}
.diagram-notes p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.source-section {
  display: grid;
  grid-template-columns: .84fr 1.16fr;
  gap: 36px;
  align-items: start;
}
.source-grid {
  display: grid;
  gap: 14px;
}
.source-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.source-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 900;
}
.source-card h3 {
  margin-bottom: 4px;
  font-size: 17px;
}
.source-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}
.source-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.source-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.source-card a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.design-section {
  border-top: 1px solid var(--line);
}
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.pattern-grid article {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.pattern-grid article:nth-child(2) {
  background: #fffdf7;
}
.pattern-grid article:nth-child(3) {
  background: #f7fffc;
}
.pattern-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pattern-grid h3 {
  margin: 22px 0 10px;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -.03em;
}
.pattern-grid p {
  color: var(--muted);
}

.guard-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.guard-list article {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.guard-list article > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--blue);
  font-size: 13px;
  font-weight: 900;
}
.guard-list h3 {
  margin-bottom: 6px;
  font-size: 18px;
}
.guard-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  padding: 34px 24px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 980px) {
  .workspace,
  .source-section {
    grid-template-columns: 1fr;
  }
  .workspace {
    min-height: auto;
    padding-top: 44px;
  }
  .chat-product {
    min-height: 590px;
  }
  .pattern-grid,
  .guard-list,
  .diagram-notes {
    grid-template-columns: repeat(2, 1fr);
  }
  .rag-diagram {
    grid-template-columns: 1fr;
  }
  .diagram-arrow {
    min-height: 34px;
    transform: rotate(90deg);
  }
  .diagram-lane {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: auto;
    min-height: 72px;
    padding: 14px 20px;
  }
  .brand {
    font-size: 15px;
  }
  .nav {
    display: none;
  }
  .workspace {
    padding: 34px 20px 56px;
    gap: 28px;
  }
  h1 {
    font-size: 38px;
    letter-spacing: -.06em;
  }
  .lead {
    font-size: 16px;
  }
  .source-mini {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .source-mini div {
    padding: 10px 8px;
    min-height: 82px;
  }
  .source-mini strong {
    font-size: 23px;
  }
  .source-mini span {
    font-size: 11px;
  }
  .chat-product {
    min-height: 620px;
    border-radius: 24px;
  }
  .messages {
    padding: 18px;
  }
  .message {
    max-width: 94%;
    font-size: 14px;
  }
  .composer {
    align-items: stretch;
  }
  .composer button {
    min-width: 68px;
  }
  .section {
    padding: 66px 20px;
  }
  .rag-diagram {
    padding: 14px;
    border-radius: 24px;
  }
  .diagram-lane {
    padding: 16px;
    border-radius: 20px;
  }
  .chunk-cloud {
    min-height: auto;
  }
  .diagram-notes {
    grid-template-columns: 1fr;
  }
  .source-card {
    grid-template-columns: auto 1fr;
  }
  .source-card a {
    grid-column: 2;
  }
  .pattern-grid,
  .guard-list {
    grid-template-columns: 1fr;
  }
  .pattern-grid article {
    min-height: auto;
  }
}
