/* Owned media styles for /knowledge/ */

:root {
  --color-text: #24282b;
  --color-bg: #f2eee8;
  --color-surface: #ffffff;
  --color-surface-muted: #e6e7df;
  --color-border: #deded9;
  --color-meta: #66716b;
  --color-brand: #b58a3a;
  --color-brand-dark: #6d541e;
  --color-foot: #9a7428;
  --color-care: #4f8540;
  --color-walking: #5868b3;
  --color-focus: #176c9f;
  --color-overlay: rgba(20, 26, 24, 0.48);
  --font-family: "Noto Sans JP", sans-serif;
  --content-width: 720px;
  --site-width: 960px;
  --header-height: 50px;
  --radius: 6px;
  --shadow-card: none;
  --shadow-card-hover: none;
}

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

* {
  margin: 0;
}

[hidden] {
  display: none !important;
}

html {
  background-color: var(--color-text);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-width: 320px;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 2;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-overlay-open {
  overflow: hidden;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--color-brand-dark);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  color: #fff;
  background: var(--color-focus);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 8px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--site-width);
  height: 100%;
  padding: 0 14px;
  margin: 0 auto;
}

.site-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  padding: 0;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.site-header__btn:hover,
.site-header__btn[aria-expanded="true"] {
  background-color: var(--color-surface-muted);
}

.icon-search {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 23px;
}

.hamburger-lines span {
  display: block;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
}

/* Branding */

.site-branding {
  display: flex;
  justify-content: center;
  padding: 22px 20px 18px;
  text-align: center;
  background-color: var(--color-bg);
}

.site-branding a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.site-branding__logo {
  width: auto;
  max-width: min(230px, 100%);
  height: 160px;
}

/* Search */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 24px;
  background-color: var(--color-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.search-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.search-overlay__inner {
  position: relative;
  width: min(100%, 560px);
  padding: 20px;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(20, 26, 24, 0.2);
  transform: translateY(-10px);
  transition: transform 0.24s ease;
}

.search-overlay.is-active .search-overlay__inner {
  transform: translateY(0);
}

.search-overlay__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.search-overlay__close:hover {
  background-color: var(--color-surface-muted);
}

.search-overlay__form {
  display: flex;
  gap: 10px;
  padding-right: 36px;
}

.search-overlay__input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
}

.search-overlay__input:focus {
  border-color: var(--color-focus);
}

.search-overlay__submit {
  flex: 0 0 auto;
  padding: 10px 20px;
  color: #fff;
  background-color: var(--color-text);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
}

.search-overlay__submit:hover {
  background-color: #111416;
}

.search-page {
  max-width: var(--site-width);
  padding: 0 24px;
  margin: 0 auto;
}

.search-page .archive-page-header {
  padding-right: 0;
  padding-left: 0;
}

.search-page__form {
  display: flex;
  gap: 10px;
  margin-top: 32px;
}

.search-page__input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
}

.search-page__input:focus {
  border-color: var(--color-focus);
}

.search-page__submit {
  flex: 0 0 auto;
  padding: 10px 24px;
  color: #fff;
  background-color: var(--color-text);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
}

.search-page__submit:hover {
  background-color: #111416;
}

.search-page__status {
  margin-top: 20px;
  color: var(--color-meta);
  font-size: 0.9rem;
  text-align: center;
}

.search-results {
  margin-top: 24px;
}

/* Navigation */

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 299;
  background-color: var(--color-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  width: min(320px, 84vw);
  padding: 24px;
  flex-direction: column;
  background-color: var(--color-surface);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}

.nav-drawer.is-open {
  box-shadow: -18px 0 36px rgba(20, 26, 24, 0.14);
  transform: translateX(0);
}

.nav-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-bottom: 24px;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.nav-drawer__close:hover {
  background-color: var(--color-surface-muted);
}

.nav-drawer__heading {
  padding-bottom: 8px;
  margin-bottom: 12px;
  color: var(--color-meta);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.nav-drawer__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.nav-drawer__link {
  display: block;
  padding: 10px 12px;
  color: var(--color-text);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-drawer__link:hover,
.nav-drawer__link[aria-current="page"] {
  background-color: var(--color-surface-muted);
  text-decoration: none;
}

.nav-drawer__link[aria-current="page"] {
  color: var(--color-focus);
}

/* Shared page layout */

.page-main {
  padding-bottom: 64px;
}

.category-tag {
  --tag-bg: var(--color-brand);
  display: inline-block;
  max-width: 100%;
  padding: 3px 14px;
  color: #fff;
  background-color: var(--tag-bg);
  border: 3px solid var(--color-surface);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  vertical-align: middle;
}

.category-tag--foot-structure {
  --tag-bg: var(--color-foot);
}

.category-tag--self-care {
  --tag-bg: var(--color-care);
}

.category-tag--walking {
  --tag-bg: var(--color-walking);
}

.category-tag--link:hover {
  filter: brightness(0.9);
  text-decoration: none;
}

.article-meta,
.featured-card__meta,
.article-list-item__meta {
  color: var(--color-meta);
  font-size: 0.82rem;
  line-height: 1.7;
}

.article-list,
.related-list,
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-list-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--color-text);
  background-color: transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

a.article-list-item {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.article-list-item:hover {
  box-shadow: var(--shadow-card-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.article-list-item--draft {
  color: var(--color-text);
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.article-list-item__thumb {
  width: 90px;
  aspect-ratio: 4 / 3;
  flex: 0 0 auto;
  overflow: hidden;
  background-color: #d9d9d9;
  border-radius: 2px;
}

.article-list-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-list-item__body {
  min-width: 0;
  flex: 1;
}

.article-list-item__title {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-list-item__meta {
  margin-top: 4px;
  font-size: 0.78rem;
}

.article-hero__frame,
.featured-card__image {
  position: relative;
  aspect-ratio: 1.86 / 1;
  overflow: hidden;
  background-color: var(--color-surface-muted);
}

.article-hero__frame img,
.featured-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article page */

.article-header {
  position: relative;
  max-width: none;
  padding: 40px max(38px, calc((100% - var(--content-width)) / 2 + 20px)) 34px;
  margin: 0;
  background-color: var(--color-bg);
}

.article-header .category-tag {
  position: absolute;
  top: -18px;
  left: max(32px, calc((100% - var(--content-width)) / 2 + 20px));
}

.article-title {
  margin-top: 0;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-top: 18px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.article-hero {
  max-width: none;
  padding: 0;
  margin: 0;
}

.article-hero__frame {
  background-color: var(--color-surface);
  border-radius: 0;
}

.article-body-wrap {
  max-width: none;
  padding: 0;
  margin: 0;
  background-color: var(--color-surface);
}

.article-body {
  max-width: var(--content-width);
  padding: 30px 38px 72px;
  margin: 0 auto;
  background-color: var(--color-surface);
  border-radius: 0;
  font-size: 1.2rem;
  line-height: 2.05;
}

.article-body > * + * {
  margin-top: 1.45em;
}

.article-body h2,
.article-body h3 {
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0;
}

.article-body h2 {
  padding-bottom: 10px;
  margin-top: 2.65em;
  border-bottom: 2px solid var(--color-border);
  font-size: 1.65rem;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  position: relative;
  padding-left: 16px;
  margin-top: 2em;
  font-size: 1.38rem;
}

.article-body h3::before {
  content: "";
  position: absolute;
  top: 0.35em;
  left: 0;
  width: 4px;
  height: 1.3em;
  background-color: var(--color-brand);
  border-radius: 2px;
}

.article-body p {
  text-align: start;
}

.article-body ul,
.article-body ol {
  padding-left: 1.45em;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li + li {
  margin-top: 0.45em;
}

.article-body blockquote {
  padding: 18px 22px;
  color: var(--color-text);
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body figure {
  margin: 2em 0;
}

.article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 1rem;
  white-space: nowrap;
}

.article-body th,
.article-body td {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
}

.article-body th {
  background-color: var(--color-surface-muted);
  font-weight: 700;
}

.callout {
  padding: 24px 24px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0;
}

.callout__title {
  margin-bottom: 8px;
  font-size: 1.08em;
  font-weight: 700;
}

.callout p {
  font-size: 1em;
}

.callout ul {
  padding-left: 1.45em;
  list-style: disc;
}

.related-section {
  max-width: none;
  padding: 0 max(38px, calc((100% - var(--content-width)) / 2 + 20px)) 48px;
  margin: 0;
  background-color: var(--color-surface);
}

.related-section__title {
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

/* Top page */

.archive-hero {
  max-width: var(--site-width);
  padding: 0 24px;
  margin: 0 auto;
}

.featured-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.featured-card {
  display: block;
  overflow: hidden;
  color: var(--color-text);
  background-color: var(--color-surface);
  border-radius: 0;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-card:hover {
  box-shadow: var(--shadow-card-hover);
  text-decoration: none;
}

.featured-card__body {
  position: relative;
  padding: 36px 20px 34px;
}

.featured-card .category-tag {
  position: absolute;
  top: -18px;
  left: 16px;
}

.featured-card__title {
  margin-top: 0;
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.55;
}

.featured-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.archive-action {
  padding: 42px 20px 0;
  text-align: center;
}

.empty-state {
  max-width: var(--content-width);
  padding: 32px 28px;
  margin: 0 auto;
  color: var(--color-meta);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  text-align: center;
}

.empty-state__title {
  margin-bottom: 8px;
  color: var(--color-text);
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 222px;
  min-height: 66px;
  gap: 12px;
  padding: 16px 40px;
  color: #fff;
  background-color: var(--color-text);
  border: 2px solid var(--color-text);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-outline:hover {
  color: #fff;
  background-color: #111416;
  border-color: #111416;
  text-decoration: none;
}

.recommended-section {
  max-width: none;
  padding: 34px 24px 58px;
  margin: 42px 0 0;
  background-color: var(--color-surface);
}

.recommended-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: var(--site-width);
  padding-bottom: 0;
  margin-bottom: 24px;
  margin-left: auto;
  margin-right: auto;
  border-bottom: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
}

.recommended-section__title::before {
  content: "";
  width: 14px;
  height: 14px;
  background-color: var(--color-walking);
  border: 4px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--color-walking);
}

.recommended-group + .recommended-group {
  margin-top: 32px;
}

.recommended-group {
  max-width: var(--site-width);
  margin-left: auto;
  margin-right: auto;
}

.recommended-group__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.recommended-group__heading::after {
  content: "";
  height: 1px;
  flex: 1;
  background-color: var(--color-border);
}

.recommended-section .article-list {
  gap: 22px;
}

.recommended-section .article-list-item__thumb {
  width: 108px;
  aspect-ratio: 1.72 / 1;
}

.recommended-section .article-list-item__title {
  font-size: 0.88rem;
}

/* Category archive */

.archive-page-header {
  max-width: var(--site-width);
  padding: 32px 24px 0;
  margin: 0 auto;
  text-align: center;
}

.archive-page-header + .archive-hero {
  margin-top: 32px;
}

.archive-page-header__title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.5;
}

.archive-page-header__title::before {
  content: "";
  display: block;
  width: 4px;
  height: 1.2em;
  background-color: var(--color-brand);
  border-radius: 2px;
}

.archive-list {
  max-width: var(--site-width);
  padding: 0 24px;
  margin: 32px auto 0;
}

/* Footer */

.site-footer {
  display: flex;
  min-height: 220px;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 20px;
  color: #f6faf7;
  background-color: var(--color-text);
  border-top: 1px solid var(--color-border);
  font-size: 0.78rem;
  text-align: center;
}

/* Responsive */

@media (max-width: 420px) {
  .search-overlay__form {
    flex-direction: column;
    padding-right: 0;
    padding-top: 28px;
  }

  .search-page__form {
    flex-direction: column;
  }

  .search-overlay__submit,
  .search-page__submit {
    width: 100%;
  }

  .article-list-item {
    gap: 12px;
  }

  .article-list-item__thumb {
    width: 84px;
  }

  .recommended-section .article-list-item__thumb {
    width: 108px;
  }
}

@media (min-width: 600px) {
  .site-branding {
    padding-top: 32px;
    padding-bottom: 28px;
  }

  .site-branding__logo {
    max-width: none;
    height: 220px;
  }

  .article-title {
    font-size: 2rem;
  }

  .featured-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-list-item__thumb {
    width: 110px;
  }
}

@media (min-width: 960px) {
  body {
    font-size: 1.125rem;
  }

  .site-header__inner {
    padding: 0 32px;
  }

  .article-body {
    padding: 48px 56px;
  }

  .archive-hero {
    padding: 32px 32px 0;
  }

  .recommended-section,
  .archive-list {
    padding-right: 32px;
    padding-left: 32px;
  }
}

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