/*
Theme Name: NiwaChat Site
Theme URI: https://niwachat.com
Author: NiwaChat
Author URI: https://niwachat.com
Description: React-powered landing page and extensible WordPress theme for Niwa AI.
Version: 1.0.229
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: Proprietary
Text Domain: niwachat
*/

:root {
  --niwa-bg: #0a0a0a;
  --niwa-surface: #101010;
  --niwa-surface-soft: #151515;
  --niwa-text: #ffffff;
  --niwa-muted: rgba(255, 255, 255, 0.62);
  --niwa-border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--niwa-bg);
}

body {
  margin: 0;
  background: var(--niwa-bg);
  color: var(--niwa-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img,
iframe,
video {
  max-width: 100%;
}

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #000;
}

.niwa-site-header,
.niwa-site-footer {
  border-color: var(--niwa-border);
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(16px);
}

.niwa-site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--niwa-border);
}

.niwa-site-footer {
  border-top: 1px solid var(--niwa-border);
}

.niwa-shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.niwa-header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 0;
}

.niwa-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
}

.niwa-brand img {
  width: auto;
  height: 12px;
  filter: brightness(0) invert(1);
}

.niwa-header-menu {
  margin-left: auto;
}

.niwa-menu-checkbox,
.niwa-menu-toggle {
  display: none;
}

.niwa-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0;
  margin: 0;
  color: var(--niwa-muted);
  font-size: 14px;
  list-style: none;
}

.niwa-nav a {
  text-decoration: none;
  transition: color 180ms ease;
}

.niwa-nav a:hover {
  color: #fff;
}

.niwa-demo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  color: #000 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}

.niwa-demo-button:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #000 !important;
  transform: translateY(-1px);
}

.niwa-nav a:focus-visible,
.niwa-footer-nav a:focus-visible,
.niwa-demo-button:focus-visible,
.niwa-menu-checkbox:focus-visible + .niwa-menu-toggle {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.niwa-footer-main {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: clamp(40px, 7vw, 88px);
  padding: 64px 0 42px;
}

.niwa-footer-brand {
  display: grid;
  gap: 14px;
}

.niwa-footer-brand p,
.niwa-footer-meta p {
  margin: 0;
}

.niwa-footer-brand p {
  max-width: 260px;
  color: var(--niwa-muted);
  font-size: 14px;
  line-height: 1.6;
}

.niwa-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, auto));
  gap: 14px 32px;
  padding: 0;
  margin: 0;
  color: var(--niwa-muted);
  font-size: 14px;
  list-style: none;
}

.niwa-footer-nav a {
  text-decoration: none;
  transition: color 180ms ease;
}

.niwa-footer-nav a:hover,
.niwa-footer-meta a:hover {
  color: #fff;
}

.niwa-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--niwa-border);
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.niwa-footer-meta a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.niwa-mobile-label {
  display: none;
}

.niwa-content {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0 96px;
}

.niwa-content-wide {
  width: min(1180px, calc(100% - 40px));
}

.niwa-entry {
  border: 1px solid var(--niwa-border);
  border-radius: 28px;
  background: var(--niwa-surface);
  padding: clamp(28px, 5vw, 56px);
}

.niwa-entry + .niwa-entry {
  margin-top: 28px;
}

.niwa-entry-title {
  margin: 0 0 28px;
  font-family: inherit;
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.niwa-entry-content {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.7;
}

.niwa-entry-content > *:first-child {
  margin-top: 0;
}

.niwa-entry-content > *:last-child {
  margin-bottom: 0;
}

.niwa-entry-content a {
  color: #fff;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.niwa-entry-content iframe,
.niwa-entry-content .wp-block-embed,
.niwa-entry-content .wp-block-video,
.niwa-entry-content .wp-block-image {
  overflow: hidden;
  border-radius: 18px;
}

.niwa-entry-content img {
  display: block;
  height: auto;
}

.niwa-entry-content .alignwide,
.niwa-entry-content .alignfull {
  width: 100%;
  max-width: 100%;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.niwa-entry-content pre,
.niwa-entry-content code {
  border-radius: 12px;
  background: #050505;
  color: #fff;
}

.niwa-entry-content pre {
  overflow: auto;
  padding: 18px;
}

.niwa-post-meta {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

.niwa-pagination {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  color: var(--niwa-muted);
}

.niwa-blog-main {
  width: min(1040px, calc(100% - 40px));
  padding: clamp(96px, 11vw, 154px) 0 132px;
}

.niwa-blog-post.niwa-entry {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.niwa-blog-hero {
  width: min(760px, 100%);
  margin: 0 auto clamp(76px, 9vw, 112px);
  text-align: center;
}

.niwa-blog-meta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 18px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.niwa-blog-title {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(44px, 5.5vw, 68px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.niwa-blog-dek {
  width: min(620px, 100%);
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.5;
}

.niwa-blog-content {
  width: min(680px, 100%);
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.93);
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 400;
  line-height: 1.52;
}

.niwa-blog-content > * {
  margin-top: 0;
  margin-bottom: 0;
}

.niwa-blog-content > *:last-child {
  margin-bottom: 0;
}

.niwa-blog-content h2,
.niwa-blog-content h3,
.niwa-blog-content h4,
.niwa-blog-content [data-toc] {
  scroll-margin-top: 104px;
}

.niwa-blog-content h2,
.niwa-blog-content h2.db-h2,
.niwa-blog-content h3,
.niwa-blog-content h3.db-h3,
.niwa-blog-content h4 {
  color: #fff;
  font-family: inherit;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.niwa-blog-content h2,
.niwa-blog-content h2.db-h2 {
  margin-top: clamp(82px, 10vw, 112px);
  margin-bottom: 26px;
  color: #fff;
  font-size: clamp(28px, 2.7vw, 34px);
  font-weight: 400;
}

.niwa-blog-content h3,
.niwa-blog-content h3.db-h3 {
  margin-top: 58px;
  margin-bottom: 18px;
  color: #fff;
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 400;
}

.niwa-blog-content h4 {
  margin-top: 42px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(18px, 1.5vw, 20px);
  font-weight: 500;
}

.niwa-blog-content p,
.niwa-blog-content li {
  color: rgba(255, 255, 255, 0.93);
}

.niwa-blog-content .db-p,
.niwa-blog-content .db-list,
.niwa-blog-content .db-ol {
  color: rgba(255, 255, 255, 0.93);
  font: inherit;
  line-height: inherit;
}

.niwa-blog-content .db-p strong,
.niwa-blog-content .db-list strong,
.niwa-blog-content .db-ol strong {
  color: #fff;
  font-weight: 500;
}

.niwa-blog-content ul,
.niwa-blog-content ol {
  padding-left: 1.15em;
}

.niwa-blog-content p + p,
.niwa-blog-content p + ul,
.niwa-blog-content p + ol,
.niwa-blog-content ul + p,
.niwa-blog-content ol + p,
.niwa-blog-content .db-p + .db-p,
.niwa-blog-content .db-p + .db-list,
.niwa-blog-content .db-p + .db-ol,
.niwa-blog-content .db-list + .db-p,
.niwa-blog-content .db-ol + .db-p {
  margin-top: 26px;
}

.niwa-blog-content li + li,
.niwa-blog-content .db-list li + li,
.niwa-blog-content .db-ol li + li {
  margin-top: 10px;
}

.niwa-blog-content strong {
  color: #fff;
  font-weight: 600;
}

.niwa-blog-content a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 180ms ease;
}

.niwa-blog-content a:hover {
  text-decoration-color: #fff;
}

.niwa-blog-content blockquote,
.niwa-blog-content .wp-block-quote,
.niwa-blog-content .wp-block-pullquote,
.niwa-blog-content .niwa-blog-callout {
  margin: 36px 0;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.86);
}

.niwa-blog-content blockquote p,
.niwa-blog-content .wp-block-quote p,
.niwa-blog-content .wp-block-pullquote p,
.niwa-blog-content .niwa-blog-callout p {
  color: inherit;
}

.niwa-blog-content figure,
.niwa-blog-content .wp-block-image,
.niwa-blog-content .wp-block-embed,
.niwa-blog-content .wp-block-video {
  width: min(900px, calc(100vw - 40px));
  margin: 42px 50% 42px;
  transform: translateX(-50%);
}

.niwa-blog-content img,
.niwa-blog-content video,
.niwa-blog-content iframe {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #050505;
}

.niwa-blog-content figcaption,
.niwa-blog-content .wp-element-caption {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.niwa-blog-content pre {
  margin: 34px 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #050505;
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
}

.niwa-blog-content code {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.08em 0.34em;
}

.niwa-blog-content pre code {
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.niwa-blog-content hr {
  width: 100%;
  height: 1px;
  border: 0;
  margin: 56px 0;
  background: rgba(255, 255, 255, 0.12);
}

.niwa-blog-content table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 34px 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
}

.niwa-blog-content th,
.niwa-blog-content td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.niwa-blog-content th {
  color: #fff;
}

.niwa-blog-main .niwa-pagination {
  width: min(720px, 100%);
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.niwa-blog-toc-overlay[hidden] {
  display: none;
}

.niwa-blog-toc-overlay {
  position: fixed;
  z-index: 9998;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.niwa-blog-toc-shell {
  position: fixed;
  z-index: 9999;
  bottom: 30px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.niwa-blog-toc-island {
  position: relative;
  overflow: hidden;
  width: min(280px, calc(100vw - 28px));
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: rgba(10, 10, 10, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(18px) saturate(160%);
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1), height 420ms cubic-bezier(0.22, 1, 0.36, 1), border-radius 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.niwa-blog-toc-shell.is-expanded .niwa-blog-toc-island {
  width: min(340px, calc(100vw - 28px));
  height: min(400px, calc(100svh - 80px));
  border-radius: 24px;
}

.niwa-blog-toc-pill,
.niwa-blog-toc-close,
.niwa-blog-toc-item {
  font: inherit;
}

.niwa-blog-toc-pill {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  padding: 0 16px 0 18px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  gap: 14px;
  opacity: 1;
  transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

.niwa-blog-toc-shell.is-expanded .niwa-blog-toc-pill {
  opacity: 0;
  pointer-events: none;
  filter: blur(4px);
  transform: scale(0.97);
}

.niwa-blog-toc-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  flex: 0 0 auto;
}

.niwa-blog-toc-current {
  overflow: hidden;
  min-width: 0;
  flex: 1 1 auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.niwa-blog-toc-progress {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
}

.niwa-blog-toc-progress svg {
  width: 24px;
  height: 24px;
  transform: rotate(-90deg);
}

.niwa-blog-toc-progress circle {
  fill: none;
  stroke-width: 2.5;
}

.niwa-blog-toc-progress__track {
  stroke: rgba(255, 255, 255, 0.16);
}

.niwa-blog-toc-progress__bar {
  stroke: #fff;
  stroke-linecap: round;
  transition: stroke-dashoffset 140ms ease;
}

.niwa-blog-toc-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  transition: opacity 220ms ease 0ms, transform 260ms ease 0ms;
}

.niwa-blog-toc-shell.is-expanded .niwa-blog-toc-panel {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  transition-delay: 90ms;
}

.niwa-blog-toc-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 14px;
  padding: 20px 20px 12px 22px;
}

.niwa-blog-toc-panel__header span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.niwa-blog-toc-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease;
}

.niwa-blog-toc-close:hover,
.niwa-blog-toc-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.niwa-blog-toc-list {
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px 14px;
}

.niwa-blog-toc-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px 8px calc(12px + (var(--toc-indent, 0) * 14px));
  background: transparent;
  color: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.25;
  text-align: left;
  transition: background 180ms ease, color 180ms ease;
}

.niwa-blog-toc-item:hover,
.niwa-blog-toc-item:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.86);
}

.niwa-blog-toc-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 650;
}

.niwa-blog-toc-item span {
  overflow: hidden;
  flex: 1 1 auto;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.niwa-blog-toc-item i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-left: 12px;
  background: #fff;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 180ms ease, transform 180ms ease;
}

.niwa-blog-toc-item.is-active i {
  opacity: 1;
  transform: scale(1);
}

.niwa-react-root {
  min-height: 100vh;
}

.niwa-beta-page {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  background: #000;
  color: #fff;
}

.niwa-beta-page [hidden] {
  display: none !important;
}

.niwa-beta-nav {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(24px, 4vw, 56px);
}

.niwa-beta-brand,
.niwa-beta-nav__link {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.niwa-beta-brand {
  gap: 10px;
  font-weight: 500;
}

.niwa-beta-brand img {
  width: auto;
  height: 12px;
  filter: brightness(0) invert(1);
}

.niwa-beta-nav__link {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 500;
  transition: background 180ms ease, color 180ms ease;
}

.niwa-beta-nav__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.niwa-beta-hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 88px 0 48px;
}

.niwa-beta-form-shell {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  gap: clamp(18px, 2.6vw, 30px);
  text-align: center;
}

.niwa-beta-form,
.niwa-beta-success,
.niwa-beta-content {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 16, 16, 0.78);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 24px 90px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.niwa-beta-form-intro {
  width: min(820px, 100%);
}

.niwa-beta-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 14px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.niwa-beta-hero h1 {
  max-width: 850px;
  margin: 0 auto;
  color: #fff;
  font-family: inherit;
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.niwa-beta-lede {
  max-width: 620px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.5;
}

.niwa-beta-form {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  min-height: 0;
  margin-top: 0;
  padding: clamp(18px, 2.4vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.028) 48%, rgba(255, 255, 255, 0.06)),
    rgba(8, 9, 10, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 34px 110px rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(22px) saturate(165%);
  text-align: left;
}

.niwa-beta-form::before {
  content: none;
}

.niwa-beta-form__topline,
.niwa-beta-form__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.niwa-beta-form__topline {
  justify-content: center;
}

.niwa-beta-form__actions {
  justify-content: space-between;
}

.niwa-beta-form__topline p {
  display: none;
  align-items: center;
  min-height: 28px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.niwa-beta-form__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(320px, 100%);
  margin: 0 auto;
}

.niwa-beta-form__progress button {
  position: relative;
  border: 0;
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.niwa-beta-form__progress button:not(:last-child) {
  flex: 1;
  justify-items: start;
}

.niwa-beta-form__progress button:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: 8px;
  left: 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
  content: "";
  transform: translateY(-50%);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.niwa-beta-form__progress button.is-complete:not(:last-child)::after {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

.niwa-beta-form__progress button:disabled {
  cursor: default;
}

.niwa-beta-form__progress span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.niwa-beta-form__progress strong {
  display: none;
}

.niwa-beta-form__progress button.is-active span,
.niwa-beta-form__progress button.is-complete span {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.niwa-beta-form__progress button.is-active span {
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.1);
}

.niwa-beta-form__progress button.is-active,
.niwa-beta-form__progress button.is-complete {
  color: rgba(255, 255, 255, 0.86);
}

.niwa-beta-form__step {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  margin: 24px 0 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.niwa-beta-form__step legend {
  max-width: 620px;
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-align: left;
}

.niwa-beta-step-copy p {
  max-width: 560px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.5;
}

.niwa-beta-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 20px 0 0;
}

.niwa-beta-options--stacked {
  grid-template-columns: 1fr;
}

.niwa-beta-options--compact {
  margin-top: 10px;
}

.niwa-beta-options label {
  cursor: pointer;
}

.niwa-beta-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.niwa-beta-options span {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 18px 42px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.022)),
    rgba(8, 9, 10, 0.42);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 20px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px) saturate(150%);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.niwa-beta-options span::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  content: "";
  transform: translateY(-50%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.niwa-beta-options label:hover span {
  border-color: rgba(255, 255, 255, 0.24);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.096), rgba(255, 255, 255, 0.03)),
    rgba(8, 9, 10, 0.5);
  transform: translateY(-2px);
}

.niwa-beta-options input:checked + span {
  border-color: rgba(255, 255, 255, 0.48);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.044)),
    rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 16px 38px rgba(0, 0, 0, 0.24);
}

.niwa-beta-options input:checked + span::after {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.niwa-beta-contact-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin-top: 20px;
  margin-right: auto;
  margin-left: auto;
}

.niwa-beta-field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.niwa-beta-contact-grid label,
.niwa-beta-field-grid label,
.niwa-beta-message {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.niwa-beta-contact-grid input,
.niwa-beta-field-grid select,
.niwa-beta-message textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  font: inherit;
  letter-spacing: 0;
  outline: 0;
  padding: 13px 14px;
  text-transform: none;
}

.niwa-beta-contact-grid input:focus,
.niwa-beta-field-grid select:focus,
.niwa-beta-message textarea:focus {
  border-color: rgba(255, 255, 255, 0.42);
}

.niwa-beta-message {
  width: 100%;
  margin-top: 12px;
  margin-right: auto;
  margin-left: auto;
  text-align: left;
}

.niwa-beta-message textarea {
  resize: vertical;
}

.niwa-beta-form__actions {
  justify-content: space-between;
  border-top: 0;
  padding-top: 18px;
}

.niwa-beta-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.niwa-beta-button:hover {
  transform: translateY(-1px);
}

.niwa-beta-button--primary {
  margin-left: auto;
  background: #fff;
  color: #000;
}

.niwa-beta-button--ghost {
  margin-right: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
}

.niwa-beta-button--ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
}

.niwa-beta-form__note,
.niwa-beta-noscript {
  max-width: 560px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

.niwa-beta-success {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 600px;
  margin-top: clamp(28px, 5vw, 54px);
  padding: clamp(30px, 5vw, 56px);
  border-radius: 34px;
  text-align: center;
}

.niwa-beta-success h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.niwa-beta-success p:last-child {
  max-width: 520px;
  margin: 22px auto 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 17px;
  line-height: 1.6;
}

.niwa-beta-content {
  margin-top: 28px;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.7;
}

.niwa-beta-content > *:first-child {
  margin-top: 0;
}

.niwa-beta-content > *:last-child {
  margin-bottom: 0;
}

.niwa-beta-content iframe,
.niwa-beta-content .wp-block-embed,
.niwa-beta-content .wp-block-video,
.niwa-beta-content .wp-block-image {
  overflow: hidden;
  border-radius: 18px;
}

@media (max-width: 720px) {
  .niwa-blog-main {
    width: min(100% - 28px, 980px);
    padding-top: 76px;
    padding-bottom: 112px;
  }

  .niwa-blog-hero {
    margin-bottom: 58px;
  }

  .niwa-blog-title {
    font-size: clamp(38px, 11vw, 52px);
    line-height: 1.03;
  }

  .niwa-blog-dek,
  .niwa-blog-content {
    font-size: 16px;
  }

  .niwa-blog-content h2 {
    margin-top: 72px;
    margin-bottom: 22px;
    font-size: clamp(26px, 8vw, 32px);
  }

  .niwa-blog-content h3 {
    margin-top: 48px;
    font-size: clamp(22px, 6vw, 26px);
  }

  .niwa-blog-content figure,
  .niwa-blog-content .wp-block-image,
  .niwa-blog-content .wp-block-embed,
  .niwa-blog-content .wp-block-video {
    width: min(100vw - 28px, 900px);
  }

  .niwa-blog-toc-shell {
    bottom: 18px;
  }

  .niwa-blog-toc-shell.is-expanded .niwa-blog-toc-island {
    height: min(380px, calc(100svh - 58px));
  }

  .niwa-header-inner {
    gap: 10px;
    padding: 14px 0;
  }

  .niwa-header-inner > .niwa-brand {
    margin-right: auto;
  }

  .niwa-header-menu {
    position: relative;
    order: 3;
    margin-left: 0;
  }

  .niwa-header-cta {
    order: 2;
    min-height: 42px;
    padding: 0 16px;
  }

  .niwa-menu-checkbox {
    display: block;
  }

  .niwa-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--niwa-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    list-style: none;
    transition: background 180ms ease;
  }

  .niwa-menu-toggle::before,
  .niwa-menu-toggle::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 1px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease;
  }

  .niwa-menu-toggle::before {
    transform: translateY(-3px);
  }

  .niwa-menu-toggle::after {
    transform: translateY(3px);
  }

  .niwa-menu-checkbox:checked + .niwa-menu-toggle {
    background: rgba(255, 255, 255, 0.1);
  }

  .niwa-menu-checkbox:checked + .niwa-menu-toggle::before {
    transform: rotate(45deg);
  }

  .niwa-menu-checkbox:checked + .niwa-menu-toggle::after {
    transform: rotate(-45deg);
  }

  .niwa-menu-checkbox:not(:checked) ~ .niwa-nav {
    display: none;
  }

  .niwa-header-menu > .niwa-nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(280px, calc(100vw - 40px));
    padding: 8px;
    border: 1px solid var(--niwa-border);
    border-radius: 18px;
    background: rgba(15, 15, 15, 0.98);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .niwa-header-menu .niwa-nav .niwa-nav {
    width: 100%;
    flex-direction: column;
    gap: 4px;
  }

  .niwa-header-menu .niwa-nav a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 12px;
  }

  .niwa-header-menu .niwa-nav a:hover,
  .niwa-header-menu .niwa-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.06);
  }

  .niwa-footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 48px 0 32px;
  }

  .niwa-footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 4px 20px;
    padding-top: 24px;
    border-top: 1px solid var(--niwa-border);
  }

  .niwa-footer-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .niwa-footer-cta {
    width: 100%;
    min-height: 48px;
  }

  .niwa-footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 92px;
  }

  .niwa-mobile-label {
    display: inline;
  }

  .niwa-desktop-label {
    display: none;
  }

  .niwa-beta-form-shell,
  .niwa-beta-contact-grid,
  .niwa-beta-field-grid,
  .niwa-beta-options {
    grid-template-columns: 1fr;
  }

  .niwa-beta-form-intro,
  .niwa-beta-form,
  .niwa-beta-success {
    min-height: auto;
  }

  .niwa-beta-form__topline {
    align-items: stretch;
    flex-direction: column;
  }

  .niwa-beta-form__actions {
    align-items: center;
    flex-direction: row;
  }

  .niwa-beta-hero {
    width: min(100% - 28px, 1180px);
    padding: 90px 0 28px;
  }

  .niwa-beta-hero h1 {
    font-size: clamp(31px, 10vw, 44px);
  }

  .niwa-beta-lede {
    margin-top: 14px;
  }

  .niwa-beta-form {
    width: 100%;
    padding: 16px;
    border-radius: 24px;
  }

  .niwa-beta-form__step {
    padding: 0;
    border-radius: 0;
  }

  .niwa-beta-form__step legend {
    font-size: clamp(23px, 8vw, 32px);
  }

  .niwa-beta-form__actions .niwa-beta-button {
    width: auto;
    min-width: 116px;
  }
}

.niwa-help {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.page-template-niwa-ai-help .niwa-widget {
  display: none !important;
}

.niwa-help-hero {
  display: grid;
  align-items: center;
  gap: 36px;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  padding: 24px 0 54px;
}

.niwa-help-kicker {
  margin: 0 0 12px;
  color: rgba(191, 219, 140, 0.92);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.niwa-help h1,
.niwa-help h2 {
  margin: 0;
  color: #fff;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
}

.niwa-help h1 {
  max-width: 760px;
  font-size: 64px;
}

.niwa-help h2 {
  font-size: 42px;
}

.niwa-help p,
.niwa-help li {
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.65;
}

.niwa-help-hero p {
  max-width: 720px;
}

.niwa-help-actions,
.niwa-help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.niwa-help-actions {
  margin-top: 26px;
}

.niwa-help-button,
.niwa-help-toc a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  text-decoration: none;
}

.niwa-help-button {
  padding: 0 22px;
  background: #fff;
  color: #050505;
  font-weight: 700;
}

.niwa-help-button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.niwa-help-toc {
  position: sticky;
  z-index: 10;
  top: 86px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(16px);
}

.niwa-help-toc a {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.niwa-help-section {
  display: grid;
  align-items: center;
  gap: 38px;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  padding: 74px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.niwa-help-section--last {
  display: block;
  max-width: 860px;
  border-bottom: 0;
}

.niwa-help-copy > p:not(.niwa-help-kicker) {
  margin: 18px 0 0;
}

.niwa-help-steps,
.niwa-help-list {
  display: grid;
  gap: 12px;
  padding-left: 24px;
  margin: 22px 0 0;
}

.niwa-help code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.niwa-help-feature-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.niwa-help-feature-grid div {
  min-height: 128px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.niwa-help-feature-grid b,
.niwa-shot-main b,
.niwa-channel-preview b,
.niwa-agent-preview b {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

.niwa-help-feature-grid span,
.niwa-channel-preview span {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  line-height: 1.5;
}

.niwa-help-shot {
  margin: 0;
}

.niwa-help-shot figcaption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.5;
}

.niwa-shot-window,
.niwa-widget-preview,
.niwa-analytics-preview,
.niwa-channel-preview,
.niwa-agent-preview {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.niwa-shot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #171717;
}

.niwa-shot-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.niwa-shot-bar strong {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.niwa-shot-body {
  display: grid;
  min-height: 330px;
  grid-template-columns: 150px minmax(0, 1fr);
}

.niwa-shot-body aside {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
  background: #0b0b0b;
}

.niwa-shot-body aside b,
.niwa-shot-title {
  color: #fff;
}

.niwa-shot-body aside span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.niwa-shot-main {
  padding: 22px;
}

.niwa-shot-title {
  margin-bottom: 18px;
  font-size: 22px;
  font-weight: 700;
}

.niwa-shot-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.niwa-shot-grid span,
.niwa-flow-preview span {
  min-height: 74px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.niwa-shot-chat,
.niwa-shot-form,
.niwa-upload-box,
.niwa-agent-preview {
  padding: 22px;
}

.niwa-shot-chat {
  margin-top: 16px;
  border-radius: 8px;
  background: rgba(191, 219, 140, 0.1);
}

.niwa-shot-chat p,
.niwa-shot-form p,
.niwa-agent-preview p {
  margin: 0 0 10px;
  font-size: 14px;
}

.niwa-shot-body--upload {
  display: block;
  min-height: 280px;
  padding: 36px;
}

.niwa-upload-box,
.niwa-shot-form {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.niwa-upload-box button,
.niwa-shot-form button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #050505;
  font-weight: 700;
}

.niwa-shot-form label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.niwa-shot-input {
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: #050505;
  color: #fff;
  font-family: Consolas, Monaco, monospace;
  word-break: break-all;
}

.niwa-shot-settings {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.niwa-shot-settings p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.niwa-shot-settings span {
  color: rgba(191, 219, 140, 0.92);
}

.niwa-widget-preview {
  position: relative;
  min-height: 360px;
  padding: 24px;
  background: #f3f4f6;
}

.niwa-store-preview {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.niwa-store-preview div {
  height: 160px;
  border-radius: 8px;
  background: linear-gradient(180deg, #dedede, #b9b9b9);
}

.niwa-chat-preview {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(330px, calc(100% - 44px));
  padding: 18px;
  border-radius: 8px;
  background: #0d0d0d;
  color: #fff;
}

.niwa-chat-preview p {
  margin: 8px 0 14px;
  font-size: 14px;
}

.niwa-chat-preview div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.niwa-flow-preview {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 24px;
}

.niwa-analytics-preview {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 22px;
}

.niwa-analytics-preview div:not(.niwa-chart-bars),
.niwa-channel-preview div {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.niwa-analytics-preview span {
  display: block;
  color: rgba(191, 219, 140, 0.9);
  font-size: 14px;
}

.niwa-chart-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  grid-column: 1 / -1;
  height: 150px;
  padding: 18px;
  border-radius: 8px;
  background: #080808;
}

.niwa-chart-bars i {
  flex: 1;
  border-radius: 8px 8px 0 0;
  background: #d7f7a1;
}

.niwa-chart-bars i:nth-child(1) { height: 42%; }
.niwa-chart-bars i:nth-child(2) { height: 68%; }
.niwa-chart-bars i:nth-child(3) { height: 51%; }
.niwa-chart-bars i:nth-child(4) { height: 82%; }
.niwa-chart-bars i:nth-child(5) { height: 64%; }

.niwa-channel-preview {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px;
}

.niwa-help h3 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.niwa-help-section--intro {
  align-items: start;
}

.niwa-help-stack,
.niwa-help-modules {
  padding: 74px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.niwa-help-stack__header {
  max-width: 860px;
  margin-bottom: 34px;
}

.niwa-help-shot {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.niwa-help-shot img,
.niwa-help-module-card img {
  display: block;
  width: 100%;
  height: auto;
}

.niwa-help-shot figcaption,
.niwa-help-module-card figcaption {
  padding: 12px 14px;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.45;
}

.niwa-help-module-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.niwa-help-module-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111;
}

@media (max-width: 980px) {
  .niwa-help-hero,
  .niwa-help-section {
    grid-template-columns: 1fr;
  }

  .niwa-help-toc {
    position: static;
  }

  .niwa-help h1 {
    font-size: 48px;
  }

  .niwa-help h2 {
    font-size: 34px;
  }

  .niwa-help h3 {
    font-size: 30px;
  }

  .niwa-help-module-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .niwa-help {
    width: min(100% - 28px, 1180px);
    padding: 48px 0 72px;
  }

  .niwa-help h1 {
    font-size: 38px;
  }

  .niwa-help h2 {
    font-size: 28px;
  }

  .niwa-help h3 {
    font-size: 25px;
  }

  .niwa-help p,
  .niwa-help li {
    font-size: 16px;
  }

  .niwa-help-feature-grid,
  .niwa-shot-body,
  .niwa-shot-grid,
  .niwa-flow-preview,
  .niwa-analytics-preview,
  .niwa-channel-preview {
    grid-template-columns: 1fr;
  }

  .niwa-shot-body aside {
    display: none;
  }

  .niwa-store-preview {
    grid-template-columns: 1fr;
  }

  .niwa-store-preview div {
    height: 86px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .niwa-menu-toggle,
  .niwa-menu-toggle::before,
  .niwa-menu-toggle::after,
  .niwa-blog-toc-island,
  .niwa-blog-toc-pill,
  .niwa-blog-toc-panel,
  .niwa-blog-toc-progress__bar,
  .niwa-blog-toc-item,
  .niwa-blog-toc-item i {
    animation: none;
    transition: none;
  }
}

.niwa-blog-cover {
  width: min(1040px, calc(100vw - 40px));
  margin: clamp(-38px, -3vw, -24px) 50% clamp(68px, 8vw, 96px);
  transform: translateX(-50%);
}

.niwa-blog-cover-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #050505;
  object-fit: cover;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
}

.niwa-blog-cover figcaption {
  width: min(680px, 100%);
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* Blog index */
.niwa-journal {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(88px, 11vw, 150px) 0 120px;
}

.niwa-journal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  align-items: end;
  gap: 32px clamp(40px, 8vw, 112px);
  margin-bottom: clamp(58px, 8vw, 92px);
}

.niwa-journal-kicker {
  grid-column: 1 / -1;
  margin: 0 0 -8px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.niwa-journal-hero h1 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: clamp(64px, 10vw, 136px);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.045em;
}

.niwa-journal-intro {
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
}

.niwa-journal-intro > * {
  margin: 0;
}

.niwa-journal-categories {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin-bottom: 46px;
  padding: 14px 0;
  border-top: 1px solid var(--niwa-border);
  border-bottom: 1px solid var(--niwa-border);
  scrollbar-width: none;
}

.niwa-journal-categories::-webkit-scrollbar {
  display: none;
}

.niwa-journal-categories a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.niwa-journal-categories a:hover,
.niwa-journal-categories a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.niwa-journal-categories a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.niwa-journal-categories a[aria-current="page"] {
  background: #fff;
  color: #0a0a0a;
}

.niwa-journal-categories span {
  color: inherit;
  font-size: 10px;
  opacity: 0.58;
}

.niwa-journal-grid {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--niwa-border);
  border-left: 1px solid var(--niwa-border);
}

.niwa-journal-card {
  display: flex;
  min-width: 0;
  min-height: 410px;
  flex-direction: column;
  border-right: 1px solid var(--niwa-border);
  border-bottom: 1px solid var(--niwa-border);
  background: #0a0a0a;
}

.niwa-journal-card--featured {
  min-height: 470px;
  grid-column: 1 / -1;
}

.niwa-journal-card--featured.niwa-journal-card--has-image {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
}

.niwa-journal-card__image {
  display: block;
  overflow: hidden;
  height: 250px;
  border-bottom: 1px solid var(--niwa-border);
  background: var(--niwa-surface);
}

.niwa-journal-card--featured .niwa-journal-card__image {
  height: 100%;
  min-height: 470px;
  border-right: 1px solid var(--niwa-border);
  border-bottom: 0;
}

.niwa-journal-card__image img {
  width: 100%;
  height: 100%;
  padding: clamp(10px, 1.25vw, 18px);
  background: #070707;
  object-fit: contain;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.niwa-journal-card__image:hover img {
  transform: scale(1.012);
}

.niwa-journal-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(26px, 4vw, 46px);
}

.niwa-journal-card--featured:not(.niwa-journal-card--has-image) .niwa-journal-card__body {
  justify-content: center;
  max-width: 930px;
}

.niwa-journal-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.niwa-journal-card__meta > * + *::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 12px 2px 0;
  border-radius: 50%;
  background: currentColor;
}

.niwa-journal-card__meta a {
  color: inherit;
  text-decoration: none;
}

.niwa-journal-card h2 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.niwa-journal-card--featured h2 {
  font-size: clamp(46px, 6vw, 76px);
}

.niwa-journal-card h2 a {
  color: #fff;
  text-decoration: none;
}

.niwa-journal-card__excerpt {
  max-width: 660px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 1.65;
}

.niwa-journal-card__excerpt > * {
  margin: 0;
}

.niwa-journal-card__link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-top: 34px;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.niwa-journal-card__link span {
  transition: transform 180ms ease;
}

.niwa-journal-card__link:hover span,
.niwa-journal-card__link:focus-visible span {
  transform: translate(2px, -2px);
}

.niwa-journal-card h2 a:focus-visible,
.niwa-journal-card__link:focus-visible,
.niwa-journal-card__meta a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.niwa-journal-pagination {
  margin-top: 50px;
}

.niwa-journal-pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.niwa-journal-pagination .page-numbers {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--niwa-border);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  place-items: center;
  text-decoration: none;
}

.niwa-journal-pagination .page-numbers.current,
.niwa-journal-pagination a.page-numbers:hover,
.niwa-journal-pagination a.page-numbers:focus-visible {
  background: #fff;
  color: #0a0a0a;
}

@media (max-width: 720px) {
  .niwa-journal {
    width: min(100% - 28px, 1180px);
    padding: 72px 0 96px;
  }

  .niwa-journal-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 52px;
  }

  .niwa-journal-kicker {
    margin-bottom: 2px;
  }

  .niwa-journal-hero h1 {
    font-size: clamp(62px, 23vw, 94px);
  }

  .niwa-journal-intro {
    max-width: 520px;
  }

  .niwa-journal-categories {
    width: calc(100% + 14px);
    margin-bottom: 28px;
  }

  .niwa-journal-grid {
    grid-template-columns: 1fr;
  }

  .niwa-journal-card,
  .niwa-journal-card--featured {
    min-height: 380px;
    grid-column: auto;
  }

  .niwa-journal-card--featured.niwa-journal-card--has-image {
    display: flex;
  }

  .niwa-journal-card--featured .niwa-journal-card__image {
    height: 260px;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--niwa-border);
  }

  .niwa-journal-card__body {
    padding: 28px 24px 30px;
  }

  .niwa-journal-card h2,
  .niwa-journal-card--featured h2 {
    font-size: clamp(34px, 10vw, 46px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .niwa-journal-categories a,
  .niwa-journal-card__image img,
  .niwa-journal-card__link span {
    transition: none;
  }
}
