/* Nagi CMS public site. Same stationery as the admin: 藍 (indigo) on paper white,
   Zen Old Mincho for headings, BIZ UDPGothic for reading. */

:root {
  --paper: #f6f7f5;
  --surface: #ffffff;
  --ink: #1e2430;
  --ink-soft: #5b6472;
  --line: #dde1e6;
  --ai: #2b4c7e;
  --ai-deep: #1d3557;
  --ai-wash: #e6edf5;
  --moss: #3f7d5a;
  --moss-wash: #e7f2ea;

  --sans: "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --display: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: 16px;
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--ai-deep);
  color: #fff;
  border-radius: var(--radius);
}
.skip:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

.narrow {
  max-width: calc(760px + var(--gutter) * 2);
}

.center {
  text-align: center;
}

/* ------------------------------------------------------------------ buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.btn--small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}
.btn--primary {
  background: var(--ai);
  color: #fff;
}
.btn--primary:hover {
  background: var(--ai-deep);
}
.btn--quiet {
  color: var(--ai);
}
.btn--quiet:hover {
  background: var(--ai-wash);
}
.btn--outline {
  border-color: var(--ai);
  color: var(--ai);
}
.btn--outline:hover {
  background: var(--ai-wash);
}
.btn--light {
  background: #fff;
  color: var(--ai-deep);
}
.btn--light:hover {
  background: var(--ai-wash);
}

.link {
  color: var(--ai);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.link:hover {
  text-decoration-thickness: 2px;
}
/* Links inside running text (FAQ answers, pricing notes). */
.qa__a a,
.notes a,
.faq-contact a {
  color: var(--ai);
}

/* ------------------------------------------------------------------ masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  color: var(--ai-deep);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand__mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.masthead__nav ul {
  display: flex;
  gap: 4px;
}
.masthead__nav a,
.masthead__login,
.masthead__lang {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
}
.masthead__nav a:hover,
.masthead__login:hover,
.masthead__lang:hover {
  color: var(--ink);
  background: var(--paper);
}
.masthead__nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}
.masthead__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.menu {
  display: none;
  position: relative;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px -16px rgb(30 36 48 / 0.3);
}
.menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
}
.menu a:hover {
  background: var(--paper);
}
.menu .masthead__lang {
  font-size: 16px;
  color: inherit;
}

@media (max-width: 959px) {
  .masthead__nav,
  .masthead__login,
  .masthead__actions .masthead__lang {
    display: none;
  }
  .menu {
    display: block;
  }
  .masthead__inner {
    gap: 8px;
  }
}
@media (max-width: 399px) {
  .masthead__actions .btn {
    display: none;
  }
}

/* ------------------------------------------------------------------ hero */

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  gap: 48px;
  padding-block: 56px 64px;
}
@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: 56px;
    padding-block: 88px 96px;
  }
}
.hero__title {
  font-family: var(--display);
  font-weight: 600;
  /* Each phrase is one line (split by <br>), so the size is set to fit 9 characters in the column. */
  font-size: clamp(32px, 9.4vw, 52px);
  line-height: 1.38;
  white-space: nowrap;
  letter-spacing: 0.02em;
  color: var(--ai-deep);
  font-feature-settings: "palt";
}
@media (min-width: 960px) {
  /* Two columns: the text column is 5/11 of the row. */
  .hero__title {
    font-size: min(52px, calc((100vw - 120px) * 0.048));
  }
}
:lang(en) .hero__title {
  white-space: normal;
  letter-spacing: 0;
  line-height: 1.15;
}
.hero__lead {
  margin-top: 24px;
  max-width: 34em;
  font-size: 17px;
  color: var(--ink-soft);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.hero__note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* The demo: what you write on the left sheet appears on your site below it. */
.demo {
  position: relative;
  display: grid;
  font-size: 13px;
  line-height: 1.7;
}
.sheet {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 48px -28px rgb(29 53 87 / 0.35);
}
.sheet--admin {
  margin-right: 14%;
  padding: 18px 20px 16px;
}
.sheet--site {
  margin-left: 14%;
  overflow: hidden;
}
@media (max-width: 559px) {
  .sheet--admin {
    margin-right: 0;
  }
  .sheet--site {
    margin-left: 0;
  }
}
.sheet__tab {
  position: absolute;
  top: -11px;
  left: 16px;
  padding: 0 8px;
  background: var(--ai-deep);
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  line-height: 22px;
}
.memo {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 8px 10px;
  background: var(--paper);
  border-radius: 4px;
  color: var(--ink-soft);
}
.memo__label {
  flex: none;
  font-size: 11px;
  font-weight: 700;
}
.sheet__title {
  margin-top: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 700;
}
.suggest {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--ai);
  background: var(--ai-wash);
  border-radius: 0 4px 4px 0;
}
.suggest__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ai);
}
.suggest__line + .suggest__line {
  margin-top: 2px;
}
.sheet__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.publish {
  display: inline-block;
  padding: 4px 14px;
  background: var(--ai);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
}

/* The tag that joins the two: a calm vertical line with the snippet on it. */
.pipe {
  position: relative;
  display: flex;
  justify-content: center;
  padding-block: 18px;
}
.pipe::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  border-left: 1px dashed var(--ai);
  opacity: 0.5;
}
.pipe code {
  position: relative;
  padding: 3px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ai-deep);
}

.browser {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-soft);
}
.browser__dots {
  width: 34px;
  height: 8px;
  background: radial-gradient(circle, var(--line) 3.5px, transparent 4px) 0 0 / 13px 8px repeat-x;
}
.site__heading {
  padding: 14px 18px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
}
.site__list {
  padding: 6px 18px 12px;
}
.site__row {
  border-bottom: 1px solid var(--line);
}
.site__row:last-child {
  border-bottom: 0;
}
.site__row > div,
.site__row:not(.site__row--new) {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 12px;
  padding-block: 9px;
}
.site__row--new {
  display: grid;
  grid-template-rows: 1fr;
}
.site__row--new > div {
  min-height: 0;
  overflow: hidden;
}
.site__date {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.site__cat {
  justify-self: start;
  padding: 0 6px;
  background: var(--ai-wash);
  color: var(--ai);
  border-radius: 3px;
  font-size: 11px;
}
.site__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 419px) {
  .site__row > div,
  .site__row:not(.site__row--new) {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .site__title {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

/* One sequence on load: the AI writes, Publish is pressed, the article lands on the site. */
@media (prefers-reduced-motion: no-preference) {
  .suggest__line {
    animation: write 0.9s cubic-bezier(0.3, 0, 0.2, 1) both;
    animation-delay: calc(0.6s + var(--i) * 0.75s);
  }
  .publish {
    animation: press 0.5s ease both 3s;
  }
  .site__row--new {
    animation: land 0.6s cubic-bezier(0.2, 0, 0, 1) both 3.6s;
  }
  .site__row--new > div {
    animation:
      open 0.6s cubic-bezier(0.2, 0, 0, 1) both 3.6s,
      settle 2.4s ease-out both 3.6s;
  }
}
@keyframes write {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes press {
  0%,
  100% {
    transform: none;
  }
  40% {
    transform: scale(0.94);
    background: var(--ai-deep);
  }
}
@keyframes land {
  from {
    grid-template-rows: 0fr;
  }
  to {
    grid-template-rows: 1fr;
  }
}
@keyframes open {
  from {
    padding-block: 0;
  }
}
@keyframes settle {
  from {
    background: var(--moss-wash);
    box-shadow:
      -18px 0 0 var(--moss-wash),
      18px 0 0 var(--moss-wash);
  }
  to {
    background: transparent;
    box-shadow:
      -18px 0 0 transparent,
      18px 0 0 transparent;
  }
}

/* ------------------------------------------------------------------ bands */

.band {
  padding-block: 72px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 960px) {
  .band {
    padding-block: 104px;
  }
}
.band--paper {
  background: var(--paper);
}
.band--tight {
  padding-block: 48px 72px;
}
.band__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.45;
  color: var(--ai-deep);
}
.band__lead {
  margin-top: 16px;
  max-width: 38em;
  color: var(--ink-soft);
}

.split {
  display: grid;
  gap: 40px;
}
@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
  }
  .split--reverse > :first-child {
    order: 2;
  }
}

/* Steps really are a sequence, so they carry numbers. */
.steps {
  counter-reset: step;
  display: grid;
  gap: 32px;
  margin-top: 48px;
}
@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1040px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }
}
.steps li {
  counter-increment: step;
  padding-top: 20px;
  border-top: 2px solid var(--ai-deep);
}
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  color: var(--ai);
}
.steps h3 {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.5;
}
.steps p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

.defs {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}
.defs dt,
.grid-defs dt {
  font-weight: 700;
}
.defs dd,
.grid-defs dd {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink-soft);
}

.grid-defs {
  display: grid;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.grid-defs > div {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .grid-defs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
  }
}
@media (min-width: 1040px) {
  .grid-defs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ticks {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  margin-bottom: 28px;
}
.ticks li {
  position: relative;
  padding-left: 28px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--moss);
  border-bottom: 2px solid var(--moss);
  transform: rotate(-45deg);
}

/* Note → draft, as a sheet of paper. */
.example {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  font-size: 15px;
}
.example figcaption {
  font-size: 13px;
  color: var(--ink-soft);
}
.example__in {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--paper);
  border-radius: 4px;
  color: var(--ink-soft);
}
.example__out {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 3px solid var(--ai);
  background: var(--ai-wash);
  border-radius: 0 4px 4px 0;
}
.example__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.example__out .example__label {
  color: var(--ai);
}
.example__title {
  margin-block: 4px 8px;
  font-weight: 700;
  font-size: 17px;
}

.code {
  min-width: 0;
}
.code figcaption {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.code pre {
  overflow-x: auto;
  padding: 20px 22px;
  background: var(--ink);
  color: #e9edf2;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
}
.code .code__out {
  margin-top: 8px;
  background: var(--ai-deep);
  color: #d7e2f0;
}

/* ------------------------------------------------------------------ plans */

.plans {
  display: grid;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
@media (min-width: 840px) {
  .plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.plan {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 28px 24px 32px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 840px) {
  .plan + .plan {
    border-left: 1px solid var(--line);
  }
}
.plan--pick {
  background: var(--surface);
  box-shadow: inset 0 3px 0 var(--ai);
}
.band--paper .plan--pick {
  background: var(--surface);
}
.plan__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
}
.plan__price {
  font-size: 13px;
  color: var(--ink-soft);
}
.plan__price span {
  margin-right: 4px;
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.plan ul {
  display: grid;
  gap: 6px;
  font-size: 15px;
}
.plan .btn {
  width: 100%;
  margin-top: 8px;
}
.band .center {
  margin-top: 32px;
}

/* ------------------------------------------------------------------ closing and footer */

.closing {
  background: var(--ai-deep);
  color: #fff;
}
.closing__inner {
  padding-block: 80px;
  text-align: center;
}
.closing h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.5;
}
.closing p {
  margin-top: 12px;
  color: rgb(255 255 255 / 0.78);
}
.closing .btn {
  margin-top: 16px;
}

.footer {
  background: var(--paper);
  font-size: 14px;
}
.footer__inner {
  display: grid;
  gap: 32px;
  padding-block: 48px 32px;
}
@media (min-width: 720px) {
  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.footer__brand p {
  margin-top: 12px;
  color: var(--ink-soft);
}
.footer ul {
  display: grid;
  gap: 8px;
}
.footer nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer__copy {
  padding-block: 16px 32px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ inner pages */

.page-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-block: 56px 48px;
}
.page-head h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.4;
  color: var(--ai-deep);
}
.page-head p {
  margin-top: 12px;
  max-width: 40em;
  color: var(--ink-soft);
}
.page-head--lost {
  min-height: 50vh;
}
.page-head--lost .link {
  display: inline-block;
  margin-top: 24px;
}

.table-scroll {
  margin-top: 32px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.compare {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 15px;
}
.compare th,
.compare td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.compare thead th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
}
.compare tbody th {
  font-weight: 400;
  color: var(--ink-soft);
  width: 34%;
}
.compare td {
  font-variant-numeric: tabular-nums;
}
.compare tbody tr:last-child > * {
  border-bottom: 0;
}
.compare .yes {
  color: var(--moss);
  font-weight: 700;
}
.compare .no {
  color: var(--ink-soft);
}

.notes {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 24px;
}
.notes li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
}
.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 6px;
  height: 6px;
  background: var(--ai);
  border-radius: 50%;
}

.faq-group + .faq-group {
  margin-top: 48px;
}
.faq-group h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ai-deep);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ai-deep);
}
.qa {
  border-bottom: 1px solid var(--line);
}
.qa summary {
  position: relative;
  padding: 18px 40px 18px 0;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 26px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ai);
  border-bottom: 2px solid var(--ai);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.qa[open] summary::after {
  transform: translate(0, 4px) rotate(-135deg);
}
.qa__a {
  padding-bottom: 20px;
  color: var(--ink-soft);
}
.faq-contact {
  margin-top: 40px;
}

.news {
  min-height: 160px;
}
.news--empty {
  padding: 32px 0;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .qa summary::after {
    transition: none;
  }
}
