@font-face {
  font-family: "Guide Noto Sans JP";
  src: url("/ai-dev-guide/assets/guide-japanese.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --brand: #1f4d3a;
  --brand-dark: #163829;
  --ink: #171717;
  --secondary: #525252;
  --line: #dedede;
  --pale: #f5f5f5;
  --error: #a5201b;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #fff; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.8 "Guide Noto Sans JP", "Hiragino Sans", Meiryo, sans-serif;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p, figure { margin: 0; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
a { color: var(--ink); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }

.skip {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  padding: 8px 14px;
  background: #fff;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap { width: min(calc(100% - 72px), 1140px); margin-inline: auto; }
.site-header { border-bottom: 1px solid #eeeeee; }
.header-inner { min-height: 72px; display: flex; align-items: center; }
.logo { width: 140px; height: auto; }

.guide-heading { padding-block: 36px 34px; text-align: center; }
h1 {
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.heading-lead {
  display: block;
  margin-bottom: .42em;
  color: var(--ink);
  font-size: .55em;
  letter-spacing: .01em;
}
.heading-phrase { white-space: nowrap; }
.guide-heading p { margin-top: 13px; color: var(--secondary); font-size: .94rem; }

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  grid-template-areas: "intro form" "details form";
  grid-template-rows: auto 1fr;
  column-gap: clamp(26px, 4vw, 52px);
  row-gap: 32px;
  align-items: start;
  padding-bottom: 55px;
}
.guide-intro { grid-area: intro; }
.guide-details { grid-area: details; display: grid; gap: 28px; }
.form-card { grid-area: form; scroll-margin-top: 16px; }
.guide-art {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.guide-art img { width: 100%; height: auto; }
.intro-copy { margin-top: 18px; color: var(--ink); line-height: 1.86; }
.button.mobile-download { display: none; }

h2 { color: var(--ink); font-size: 1.32rem; line-height: 1.5; font-weight: 750; }
.guide-details h2 { margin-bottom: 12px; }
.audience-list { margin: 0; padding: 0; list-style: none; }
.audience-list li { position: relative; padding-inline-start: 1.55em; }
.audience-list li + li { margin-top: 5px; }
.audience-list li::before {
  content: "";
  position: absolute;
  inset-block-start: .4em;
  inset-inline-start: .2em;
  width: .45em;
  height: .75em;
  border: solid var(--brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.contents-list { counter-reset: topic; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.contents-list li {
  counter-increment: topic;
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
}
.contents-list li::before {
  content: counter(topic, decimal-leading-zero);
  color: #a5201b;
  font-weight: 700;
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
}

.samples-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.sample-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--pale);
}
.sample-open img { width: 100%; height: auto; }
.sample-enlarge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--brand-dark);
  color: #fff;
  font-size: .68rem;
}
.sample-open:hover { border-color: var(--brand); }
.page-ref { margin-top: 5px; color: var(--ink); font-size: .76rem; font-weight: 700; }
.sample-card h3 { font-size: .81rem; line-height: 1.55; }
.sample-card > p:last-child { display: none; }

.consult { padding-top: 18px; border-top: 1px solid var(--line); }
.consult p { color: var(--secondary); }
.consult a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 3px; font-weight: 650; }

.form-card {
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.form-title, #success-content h2 { margin-bottom: 21px; text-align: center; }
.download-actions { display: grid; gap: 10px; }

.button { min-height: 44px; padding: 8px 16px; font-size: .84rem; }

.hero {
  color: var(--navy);
  background: linear-gradient(110deg, #f5f8fd 0%, #e6effb 100%);
}
.hero-inner {
  min-height: 550px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
  align-items: center;
  gap: clamp(28px, 4.4vw, 64px);
  padding-block: 54px;
}
.edition { margin-bottom: 12px; font-size: .86rem; font-weight: 700; color: var(--ink); }
.hero h1 {
  font-size: clamp(2.45rem, 4.8vw, 4rem);
  line-height: 1.22;
  letter-spacing: -.025em;
  font-weight: 800;
}
.tagline { margin-top: 16px; font-size: clamp(1rem, 1.65vw, 1.3rem); font-weight: 700; }
.hero-intro { margin-top: 13px; max-width: 32em; line-height: 1.9; color: var(--secondary); }
.hero-art img { width: 100%; height: auto; border: 1px solid #bed1e5; box-shadow: 0 12px 28px #142d5029; }
.actions, .download-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.actions { margin-top: 26px; }
.button {
  min-height: 53px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 21px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease;
}
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button.light { background: #fff; border-color: #adadad; color: var(--ink); box-shadow: none; }
.button.light:hover { background: var(--pale); }
.button:disabled { opacity: .6; cursor: wait; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { margin-bottom: 14px; }
.field > label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; margin-bottom: 5px; }
.required, .optional { display: inline-block; font-size: .75rem; font-weight: 600; line-height: 1.6; padding: 0 6px; border-radius: 3px; }
.required { background: var(--error); color: #fff; }
.optional { background: #e8e8e8; color: var(--secondary); }
.note { color: var(--secondary); }
input:not([type=checkbox]) {
  width: 100%;
  border: 1px solid #adadad;
  border-radius: 4px;
  padding: 8px 12px;
  min-height: 46px;
  background: #fff;
  color: var(--ink);
}
.trap { display: none; }
.field-error, .form-error { color: var(--error); font-size: .88rem; margin-top: 4px; }
input[aria-invalid=true] { border-color: var(--error); }
.form-error { background: #fff1f0; padding: 9px 12px; margin-block: 9px 14px; border-inline-start: 2px solid var(--error); }
.privacy-area { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.privacy-area > p, #privacy p, .note { font-size: .875rem; color: var(--secondary); }
#privacy { margin-block: 0 8px; }
#privacy summary { font-size: .875rem; color: var(--ink); padding-block: 7px; }
#privacy p { padding-bottom: 10px; }
.check { min-height: 44px; display: flex; align-items: center; gap: 10px; line-height: 1.6; cursor: pointer; font-size: .9rem; }
.check input { flex: none; width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.full { width: 100%; margin-top: 14px; }
#success-content > p { margin-block: .65rem 1rem; }
.sub-link { min-height: 44px; padding: 5px 0; border: 0; background: none; color: var(--ink); text-decoration: underline; }
.reset { margin-top: 8px; }


.footer { padding-block: 18px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--secondary); }
.footer-inner a { font-size: .84rem; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 60px; }
  .logo { width: 118px; }
  .guide-heading { padding-block: 25px 22px; }
  h1 { font-size: clamp(1.5rem, 7vw, 2.5rem); }
  .heading-lead { font-size: .58em; }
  .guide-heading p { margin-top: 10px; font-size: .82rem; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "form" "details"; gap: 24px; padding-bottom: 35px; }
  .intro-copy { margin-top: 14px; font-size: .94rem; }
  .button.mobile-download { display: inline-flex; width: 100%; min-height: 46px; margin-top: 16px; }
  .form-card { padding: 20px 16px; }
  .samples-grid { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

dialog {
  width: min(1060px, calc(100% - 36px));
  padding: clamp(14px, 2.4vw, 24px);
  max-height: 94dvh;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  overflow: auto;
}
dialog::backdrop { background: #191919bd; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.dialog-head h2 { font-size: clamp(1.02rem, 2.8vw, 1.52rem); }
.dialog-head .page-ref { margin-top: 0; }
.close, .viewer-toolbar button { min-height: 44px; min-width: 44px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 3px; }
.close { font: 400 1.6rem/1 system-ui, sans-serif; }
#sample-dialog-description { font-size: .88rem; color: var(--secondary); margin-block: 6px; }
.viewer-toolbar { text-align: right; margin-bottom: 6px; }
.viewer-toolbar button { font-size: .82rem; padding-inline: 12px; }
.page-scroll { overflow: auto; max-height: 62dvh; background: var(--pale); border: 1px solid var(--line); }
.page-scroll img { width: 100%; height: auto; }
.page-scroll.is-zoomed img { max-width: none; width: max(100%, 1450px); }
