:root {
  --awl-page-pad: clamp(24px, 4vw, 64px);
  --awl-blue: #1478ff;
  --awl-cyan: #32b7ff;
  --awl-navy: #020713;
  --awl-surface: #071326;
  --awl-line: #1d3554;
  --awl-muted: #a9b8cc;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--awl-navy);
  color: #f7fbff;
  font-family: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.wp-element-button:focus-visible {
  outline: 3px solid #7dd7ff;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.awl-skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 4px;
  background: #fff;
  color: #020713;
  font-weight: 800;
}

.awl-skip-link:focus {
  transform: translateY(0);
}

.awl-site-header {
  position: absolute;
  z-index: 30;
  inset: 0 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-inline: var(--awl-page-pad);
  border-bottom: 1px solid rgba(112, 173, 235, 0.14);
  background: rgba(2, 7, 19, 0.86);
  backdrop-filter: blur(18px);
}

.admin-bar .awl-site-header {
  top: 32px;
}

.awl-brand,
.awl-footer-brand {
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.awl-brand-accent {
  margin-right: 4px;
  color: var(--awl-cyan);
}

.awl-primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
}

.awl-primary-nav a,
.awl-primary-nav button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #eaf3ff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.awl-primary-nav a:hover,
.awl-primary-nav button:hover {
  color: var(--awl-cyan);
}

.awl-header-actions {
  display: flex;
  gap: 10px;
}

.awl-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--awl-line);
  border-radius: 50%;
  background: #071426;
  color: #ddecff;
  cursor: pointer;
}

.awl-icon-button:hover {
  border-color: var(--awl-cyan);
  color: #fff;
}

.awl-icon-pause,
.awl-icon-pause::after {
  width: 4px;
  height: 16px;
  display: block;
  border-radius: 2px;
  background: currentColor;
}

.awl-icon-pause {
  position: relative;
  transform: translateX(-4px);
}

.awl-icon-pause::after {
  position: absolute;
  left: 8px;
  content: "";
}

.awl-motion-toggle[aria-pressed="true"] .awl-icon-pause {
  width: 0;
  height: 0;
  transform: translateX(2px);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
  border-radius: 0;
  background: transparent;
}

.awl-motion-toggle[aria-pressed="true"] .awl-icon-pause::after {
  display: none;
}

.awl-motion-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: max-content;
  max-width: min(240px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid #315d87;
  border-radius: 6px;
  background: #071426;
  color: #f7fbff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.awl-motion-toggle:hover .awl-motion-tooltip,
.awl-motion-toggle:focus-visible .awl-motion-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.awl-menu-button {
  display: none;
}

.awl-menu-lines,
.awl-menu-lines::before,
.awl-menu-lines::after {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: currentColor;
}

.awl-menu-lines {
  position: relative;
}

.awl-menu-lines::before,
.awl-menu-lines::after {
  position: absolute;
  left: 0;
  content: "";
}

.awl-menu-lines::before { top: -6px; }
.awl-menu-lines::after { top: 6px; }

.awl-hero {
  min-height: 580px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(520px, 1.14fr);
  align-items: center;
  padding: 90px var(--awl-page-pad) 60px;
  background: var(--awl-navy);
}

.awl-hero-copy {
  position: relative;
  z-index: 5;
  max-width: 650px;
}

.awl-eyebrow {
  width: fit-content;
  margin: 0 0 16px;
  padding: 9px 14px;
  border: 1px solid #1989ed;
  border-radius: 6px;
  color: #3db9ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.awl-hero h1 {
  max-width: 650px;
  margin: 0;
  color: #fff;
  font-size: clamp(52px, 5.2vw, 78px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.awl-hero-description {
  margin: 18px 0 0;
  color: #d7e4f3;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.8;
}

.awl-hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.awl-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 26px;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.awl-button:hover { transform: translateY(-2px); }

.awl-button-primary {
  border: 1px solid var(--awl-blue);
  background: var(--awl-blue);
  color: #fff;
}

.awl-button-primary:hover { background: #2b88ff; color: #fff; }

.awl-button-secondary {
  border: 1px solid #8ca1bb;
  background: rgba(5, 15, 31, 0.78);
  color: #fff;
}

.awl-button-secondary:hover { border-color: #fff; color: #fff; }

.awl-hero-visual {
  position: absolute;
  z-index: 1;
  width: min(58vw, 780px);
  aspect-ratio: 1;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.awl-ring {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  mix-blend-mode: screen;
  will-change: transform;
  animation: awl-ring-clockwise 78s linear infinite;
}

.awl-motion-paused .awl-ring { animation-play-state: paused !important; }

@keyframes awl-ring-clockwise {
  to { transform: rotate(360deg); }
}

.awl-category-rail {
  position: absolute;
  z-index: 6;
  left: var(--awl-page-pad);
  right: var(--awl-page-pad);
  bottom: 0;
  min-height: 60px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  border: 1px solid #1a3454;
  border-radius: 10px;
  background: rgba(5, 16, 34, 0.94);
  backdrop-filter: blur(16px);
}

.awl-category-rail button {
  min-width: 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-right: 1px solid #1a3454;
  background: transparent;
  color: #eaf3ff;
  font-weight: 700;
  cursor: pointer;
}

.awl-category-rail button:last-child { border-right: 0; }
.awl-category-rail button:hover { background: #0b2443; color: #5bc7ff; }
.awl-category-icon { color: #42bdff; font-size: 20px; }

.awl-articles-section {
  padding: 32px var(--awl-page-pad) 80px;
  border-top: 1px solid #10243e;
  background: #050c19;
}

.awl-section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.awl-section-kicker {
  margin: 0 0 8px;
  color: #3ebaff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.awl-section-heading-row h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.2;
}

.awl-all-articles-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #48bdff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.awl-filter-row {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.awl-filter-row::-webkit-scrollbar { display: none; }

.awl-filter-row button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #243d5c;
  border-radius: 999px;
  background: transparent;
  color: #b9c7d9;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.awl-filter-row button.is-active,
.awl-filter-row button:hover {
  border-color: var(--awl-blue);
  background: var(--awl-blue);
  color: #fff;
}

.awl-article-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.awl-article-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #1e3958;
  border-radius: 12px;
  background: #081526;
  transition: transform 180ms ease, border-color 180ms ease;
}

.awl-article-card:hover {
  transform: translateY(-5px);
  border-color: #3aaeff;
}

.awl-article-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #fff;
  text-decoration: none;
}

.awl-card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  display: block;
  object-fit: cover;
  background: #020713;
}

.awl-card-image-placeholder {
  background: radial-gradient(circle at 60% 45%, #176cc8, #071326 58%, #020713 72%);
}

.awl-article-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 22px;
}

.awl-card-category {
  margin-bottom: 10px;
  color: #3ebaff;
  font-size: 13px;
  font-weight: 800;
}

.awl-article-card h3 {
  min-height: 4.7em;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.55;
}

.awl-card-read {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a8bcd3;
  font-size: 13px;
  font-weight: 700;
}

.awl-load-more-row {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}

.awl-load-more-row button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  border: 1px solid #318bc7;
  border-radius: 7px;
  background: #07172a;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.awl-load-more-row button:hover { border-color: #55c6ff; background: #0b2443; }

.awl-empty-state {
  margin-top: 24px;
  padding: 40px;
  border: 1px solid #213b5b;
  border-radius: 12px;
  background: #081526;
  color: #c0d0e1;
  text-align: center;
}

.awl-site-footer {
  padding: 36px var(--awl-page-pad) 40px;
  border-top: 1px solid #1a3454;
  background: #020713;
}

.awl-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.awl-footer-brand { font-size: 19px; }
.awl-footer-identity p { margin: 8px 0 0; color: #8396ad; font-size: 12px; }

.awl-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 24px;
}

.awl-footer-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #c6d6e8;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.awl-footer-nav a:hover { color: var(--awl-cyan); }

.awl-search-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 5, 13, 0.9);
  backdrop-filter: blur(16px);
}

.awl-search-panel {
  width: min(560px, 100%);
  position: relative;
  padding: 42px;
  border: 1px solid #2c5b88;
  border-radius: 16px;
  background: #071426;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.awl-search-close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  border: 1px solid #294866;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.awl-search-symbol { color: #4fc4ff; font-size: 32px; }
.awl-search-panel h2 { margin: 16px 0 24px; font-size: 32px; }
.awl-search-panel label { display: block; margin-bottom: 10px; color: #b8c9dc; font-size: 14px; }

.awl-search-field {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-inline: 16px;
  border: 1px solid #365d83;
  border-radius: 8px;
  background: #020b18;
}

.awl-search-field:focus-within { border-color: #7dd7ff; box-shadow: 0 0 0 3px rgba(125, 215, 255, 0.28); }
.awl-search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: 16px; }
.awl-search-field input::placeholder { color: #6f839c; }

.awl-page-shell,
.awl-single-shell {
  min-height: 70vh;
  padding: 138px var(--awl-page-pad) 80px;
}

.awl-page-title,
.awl-single-title {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.awl-page-title { font-size: clamp(36px, 5vw, 64px); }
.awl-single-shell { max-width: 900px !important; }
.awl-single-title { font-size: clamp(34px, 4vw, 58px); line-height: 1.35; }
.awl-single-terms a { color: var(--awl-cyan); }
.awl-single-date { color: var(--awl-muted); }
.awl-single-image img { width: 100%; border-radius: 12px; }

.awl-post-content {
  max-width: 760px;
  margin-top: 42px;
  color: #edf4fc;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 2;
}

.awl-post-content > * + * { margin-top: 1.45em; }
.awl-post-content h2 { margin-top: 2.2em; font-size: clamp(28px, 3vw, 40px); line-height: 1.45; }
.awl-post-content h3 { margin-top: 1.8em; font-size: clamp(22px, 2.3vw, 30px); }
.awl-post-content img { max-width: 100%; height: auto; }
.awl-post-content pre { max-width: 100%; overflow-x: auto; }
.awl-post-content table { width: 100%; display: block; overflow-x: auto; border-collapse: collapse; }
.awl-post-content th,
.awl-post-content td { padding: 10px 12px; border: 1px solid #315070; }

/* Convert legacy light WordPress callouts into dark-theme cards. */
.awl-post-content .wp-block-group.has-background[style*="background-color:#e"],
.awl-post-content .wp-block-group.has-background[style*="background-color:#f"] {
  color: #edf4fc;
  background-color: #0b1a2e !important;
  border: 1px solid #315070;
  border-radius: 12px;
}

.awl-post-content .wp-block-group.has-background[style*="background-color:#e"] h2,
.awl-post-content .wp-block-group.has-background[style*="background-color:#e"] h3,
.awl-post-content .wp-block-group.has-background[style*="background-color:#e"] h4,
.awl-post-content .wp-block-group.has-background[style*="background-color:#e"] h5,
.awl-post-content .wp-block-group.has-background[style*="background-color:#e"] h6,
.awl-post-content .wp-block-group.has-background[style*="background-color:#f"] h2,
.awl-post-content .wp-block-group.has-background[style*="background-color:#f"] h3,
.awl-post-content .wp-block-group.has-background[style*="background-color:#f"] h4,
.awl-post-content .wp-block-group.has-background[style*="background-color:#f"] h5,
.awl-post-content .wp-block-group.has-background[style*="background-color:#f"] h6 {
  color: #ffffff;
}

.awl-post-content .wp-block-group.has-background[style*="background-color:#e"] a,
.awl-post-content .wp-block-group.has-background[style*="background-color:#f"] a {
  color: #5cc8ff;
}

.awl-post-content .wp-block-group.has-background[style*="background-color:#e"] li::marker,
.awl-post-content .wp-block-group.has-background[style*="background-color:#f"] li::marker {
  color: #5cc8ff;
}

.awl-query .wp-block-post-template {
  margin-top: 32px;
  gap: 22px;
}

.awl-query-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid #1e3958;
  border-radius: 12px;
  background: #081526;
}

.awl-query-card .wp-block-post-featured-image { margin: 0; }
.awl-query-card .wp-block-post-featured-image img { width: 100%; object-fit: cover; }
.awl-query-card-body { padding: 18px 20px 22px; }
.awl-query-card-body h2 { margin-top: 8px; font-size: 18px; line-height: 1.55; }
.awl-query-card-body h2 a { color: #fff; text-decoration: none; }
.awl-query-card-terms a { color: var(--awl-cyan); font-size: 13px; font-weight: 700; }
.awl-query .wp-block-query-pagination { margin-top: 44px; }
.awl-inline-search { max-width: 720px; }
.awl-inline-search .wp-block-search__inside-wrapper { border-radius: 8px; overflow: hidden; }
.awl-not-found { text-align: center; }

@media (max-width: 960px) {
  .awl-primary-nav {
    position: absolute;
    top: 68px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px;
    border: 1px solid #24466b;
    border-radius: 12px;
    background: #061426;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
  }

  .awl-primary-nav.is-open { display: flex; }
  .awl-primary-nav a,
  .awl-primary-nav button { padding: 16px 0; border-bottom: 1px solid #1a3553; text-align: left; }
  .awl-primary-nav a:last-child { border-bottom: 0; }
  .awl-menu-button { display: grid; }
  .awl-hero { min-height: 790px; grid-template-columns: 1fr; align-items: start; padding-top: 138px; }
  .awl-hero-visual { width: 650px; right: -240px; top: 43%; opacity: 0.58; }
  .awl-category-rail { grid-template-columns: repeat(5, minmax(170px, 1fr)); overflow-x: auto; scrollbar-width: none; }
  .awl-category-rail::-webkit-scrollbar { display: none; }
  .awl-article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .awl-query .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
  .admin-bar .awl-site-header { top: 46px; }
}

@media (max-width: 640px) {
  :root { --awl-page-pad: 20px; }
  .awl-site-header { min-height: 66px; gap: 12px; }
  .awl-brand { font-size: 18px; }
  .awl-icon-button { width: 38px; height: 38px; }
  .awl-hero { min-height: 760px; padding-top: 110px; padding-bottom: 110px; }
  .awl-eyebrow { margin-bottom: 18px; font-size: 12px; }
  .awl-hero h1 { font-size: clamp(48px, 14vw, 64px); line-height: 1.12; }
  .awl-hero-description { max-width: 310px; font-size: 16px; }
  .awl-hero-actions { max-width: 330px; flex-direction: column; align-items: stretch; }
  .awl-button { width: 100%; }
  .awl-hero-visual { width: 520px; right: -280px; top: 43%; opacity: 0.42; }
  .awl-category-rail { right: 0; bottom: 22px; border-radius: 10px 0 0 10px; }
  .awl-articles-section { padding-top: 42px; }
  .awl-section-heading-row { align-items: start; flex-direction: column; gap: 18px; }
  .awl-article-grid,
  .awl-query .wp-block-post-template { grid-template-columns: 1fr; }
  .awl-load-more-row button { width: 100%; }
  .awl-article-card h3 { min-height: 0; }
  .awl-search-panel { padding: 34px 22px 24px; }
  .awl-site-footer { padding-top: 30px; padding-bottom: 34px; }
  .awl-footer-inner { align-items: flex-start; flex-direction: column; gap: 24px; }
  .awl-footer-nav { width: 100%; justify-content: flex-start; gap: 2px 22px; }
  .awl-page-shell,
  .awl-single-shell { padding-top: 112px; padding-bottom: 60px; }
  .awl-post-content { font-size: 17px; line-height: 1.9; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
