:root {
  --aw-blue: #2563eb;
  --aw-navy: #12304a;
  --aw-text: #1f2937;
  --aw-muted: #667085;
  --aw-border: #e5e7eb;
  --aw-bg-soft: #f4f5f7;
  --aw-white: #ffffff;
  --aw-content-width: 1156px;
  --aw-site-padding: 24px;
  --aw-radius: 7px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--aw-white);
  color: var(--aw-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--aw-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-main {
  min-height: 45vh;
}

body.aiwpa-account-page .site-main {
  background: var(--aw-bg-soft);
}

.page-shell {
  width: min(calc(100% - (var(--aw-site-padding) * 2)), var(--aw-content-width));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.page-entry__header,
.post-entry__header,
.archive-header {
  margin-bottom: 34px;
}

.page-entry__title,
.post-entry__title,
.archive-title {
  margin: 0;
  color: var(--aw-navy);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.entry-content > *:first-child {
  margin-top: 0;
}




.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content table,
.entry-content figure {
  margin-top: 0;
  margin-bottom: 24px;
}

.post-entry {
  padding: 28px 0;
  border-bottom: 1px solid var(--aw-border);
}

.post-entry__title {
  font-size: clamp(24px, 2.5vw, 32px);
}

.post-entry__title a {
  color: inherit;
}

/* =========================================================
   ACCOUNT / MANUAL TWO-COLUMN LAYOUT
========================================================= */

body.single-post .site-main,
body.search .site-main,
body.blog .site-main,
body.archive .site-main {
  background: var(--aw-bg-soft);
}

.page-shell--account-layout,
.page-shell--manual {
  padding-top: 42px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.account-layout__main {
  min-width: 0;
}

.account-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.account-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.account-side-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius);
  background: var(--aw-white);
}

.account-side-card__title {
  margin: 0;
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--aw-border);
  color: var(--aw-navy);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.account-side-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  color: var(--aw-navy);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
}

.account-side-nav__link:hover,
.account-side-nav__link.is-current {
  background: #f3f7ff;
  color: var(--aw-blue);
  text-decoration: none;
}

.account-side-nav__link .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.manual-search {
  padding-bottom: 15px;
}

.manual-search__form {
  padding: 14px 14px 0;
}

.manual-search__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 7px;
}

.manual-search__input {
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfd6df;
  border-radius: var(--aw-radius);
  outline: none;
  background: #fff;
  color: var(--aw-text);
  font-size: 14px;
  line-height: 1.4;
}

.manual-search__input:focus {
  border-color: var(--aw-blue);
  outline: 2px solid rgba(37, 99, 235, 0.14);
  outline-offset: 1px;
}

.manual-search__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--aw-blue);
  border-radius: var(--aw-radius);
  background: var(--aw-blue);
  color: #fff;
  cursor: pointer;
}

.manual-search__button:hover {
  background: #1d4ed8;
}

.manual-search__button .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.manual-index__list {
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

.manual-index__item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #eef1f5;
}

.manual-index__item:last-child {
  border-bottom: 0;
}

.manual-index__link {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 10px 13px;
  color: #465569;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  text-decoration: none;
}

.manual-index__link:hover,
.manual-index__link.is-current {
  background: #f7f9fc;
  color: var(--aw-blue);
  text-decoration: none;
}

.manual-index__link .dashicons {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  font-size: 16px;
}

.manual-index__empty {
  margin: 0;
  padding: 14px 16px;
  color: var(--aw-muted);
  font-size: 13px;
}

/* =========================================================
   MANUAL SINGLE
========================================================= */

.manual-entry,
.manual-search-results {
  padding: 34px 38px 42px;
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius);
  background: var(--aw-white);
}

.manual-entry__header,
.manual-search-results__header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--aw-border);
}

.manual-entry__label {
  margin: 0 0 8px;
  color: var(--aw-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.5;
}

.manual-entry__title,
.manual-search-results__title {
  margin: 0;
  color: var(--aw-navy);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.manual-entry__content h2,
.manual-entry__content h3 {
  scroll-margin-top: 100px;
  color: var(--aw-navy);
}

.manual-entry__content h2 {
  margin: 46px 0 18px;
  padding-bottom: 11px;
  border-bottom: 1px solid #dce2ea;
  font-size: clamp(23px, 2.4vw, 29px);
  line-height: 1.5;
}

.manual-entry__content h3 {
  margin: 34px 0 14px;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.55;
}

.manual-entry__content h2:first-child,
.manual-entry__content h3:first-child {
  margin-top: 0;
}

.manual-entry__content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   MANUAL TABLE OF CONTENTS
========================================================= */

.manual-toc {
  margin: 0 0 34px;
  padding: 20px 22px;
  border: 1px solid #dbe3ee;
  border-radius: var(--aw-radius);
  background: #f8fafc;
}

.manual-toc__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--aw-navy);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.manual-toc__head .dashicons {
  width: 18px;
  height: 18px;
  color: var(--aw-blue);
  font-size: 18px;
}

.manual-toc__list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: manual-toc;
}

.manual-toc__item {
  position: relative;
  margin: 0;
  padding: 0 0 0 23px;
  counter-increment: manual-toc;
}

.manual-toc__item::before {
  content: counter(manual-toc) ".";
  position: absolute;
  top: 1px;
  left: 0;
  color: #8693a5;
  font-size: 12px;
  font-weight: 700;
}

.manual-toc__item--h3 {
  margin-left: 16px;
}

.manual-toc__item a {
  color: #415064;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.65;
  text-decoration: none;
}

.manual-toc__item a:hover {
  color: var(--aw-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   MANUAL SEARCH RESULTS
========================================================= */

.manual-search-results__list {
  display: grid;
}

.manual-search-result {
  padding: 22px 0;
  border-bottom: 1px solid var(--aw-border);
}

.manual-search-result:first-child {
  padding-top: 0;
}

.manual-search-result:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.manual-search-result__title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.5;
}

.manual-search-result__title a {
  color: var(--aw-navy);
}

.manual-search-result__excerpt,
.manual-search-result__excerpt p {
  margin: 0;
  color: var(--aw-muted);
  font-size: 14px;
  line-height: 1.75;
}

.manual-search-results__empty {
  padding: 18px 0 0;
  color: var(--aw-muted);
}

.page-shell--account-layout .aiwpa-page-head,
.page-shell--account-layout .aiwpa-panel,
.page-shell--account-layout .aiwpa-grid,
.page-shell--account-layout .aiwpa-notice {
  max-width: none;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  top: 8px;
  left: 8px;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 10px 14px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: #fff;
  color: var(--aw-navy);
}
