/*----------------------------------------------------
// Reset
----------------------------------------------------*/

*,
::before,
::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: inherit;
}

/*----------------------------------------------------
// HTML
----------------------------------------------------*/

html {
  font-family: var(--theme-font-sans);
  word-break: break-word;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--theme-bg-1);
  color: var(--theme-tx-2);
  font-size: 1rem;
  line-height: 1.5;
  word-break: break-word;
}

a {
  color: var(--theme-lk-1);
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

figure,
.wp-caption,
.gallery-caption {
  max-width: 100%;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--theme-tx-1);
  font-weight: 600;
  font-feature-settings: "palt";
  letter-spacing: 0.0125em;
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
}

@media (max-width: 767px) {
  h1 {
    font-size: 1.5rem;
  }
}

h2 {
  font-size: 1.5rem;
}

@media (max-width: 767px) {
  h2 {
    font-size: 1.375rem;
  }
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1rem;
}

h5 {
  font-size: 0.875rem;
}

h6 {
  font-size: 0.75rem;
}

p {
  line-height: 1.75;
}

blockquote.wp-block-quote {
  padding: 1.5rem;
  background: var(--theme-bg-2);
  border-left: 5px solid var(--theme-bg-3);
}

blockquote.wp-block-quote cite {
  color: var(--theme-tx-2);
  font-size: 0.875rem;
  opacity: 0.65;
}

blockquote *:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

a button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
  cursor: pointer;
  display: inline-block;
  padding: 6px 12px;
  background: var(--theme-lk-1);
  border: 0;
  border-radius: 4px;
  font-size: 1rem;
  color: var(--theme-lk-tx);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

a button[disabled],
button[disabled],
input[type="submit"][disabled],
input[type="reset"][disabled],
input[type="button"][disabled] {
  cursor: default;
  cursor: not-allowed;
  opacity: 0.5;
}

.button:focus,
.button:hover,
button:focus,
button:hover,
input[type="submit"]:focus,
input[type="submit"]:hover,
input[type="reset"]:focus,
input[type="reset"]:hover,
input[type="button"]:focus,
input[type="button"]:hover {
  background: var(--theme-lk-2);
}

textarea,
select,
input {
  padding: 5px 12px;
  background: var(--theme-bg-2);
  border: 1px solid var(--theme-bg-3);
  border-radius: 4px;
  box-shadow: none;
  color: var(--theme-tx-2);
  font-size: 1rem;
}

code,
pre,
pre.wp-block-code {
  font-family: var(--theme-font-mono);
  color: var(--theme-tx-2);
}

:not(pre) > code {
  padding: 0.2rem 0.5rem;
  background-color: var(--theme-bg-2);
  border-radius: 2px;
  font-size: 0.875rem;
}

hr {
  border: 0;
  border-bottom: 1px solid var(--theme-bg-3);
}

/*----------------------------------------------------
// App Header
----------------------------------------------------*/

.app-header {
  position: relative;
  padding: 16px 0;
  background-color: var(--theme-bg-1);
  z-index: 80;
}

.app-header + .app-menu {
  margin-top: -12px;
}

.app-header + .app-main {
  border-top: 1px solid var(--theme-bg-3);
}

.app-header > .app-header-contents {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: calc(var(--theme-site-width) + 16px * 2);
  margin: 0 auto;
  padding: 0 16px;
}

.app-header-contents > .app-header-description {
  flex: 1 0 0;
  margin-left: 20px;
}

.app-header-site-name {
  flex: none;
  display: flex;
  color: var(--theme-tx-1);
  font-size: 1.25rem;
  font-weight: 900;
  text-decoration: none;
}

.app-header-description {
  color: var(--theme-tx-3);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.25;
}

/*----------------------------------------------------
// App Nav
----------------------------------------------------*/

.app-nav {
  position: relative;
  background-color: var(--theme-bg-1);
  z-index: 100;
}

.app-nav:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--theme-bg-2);
  transform: translateX(-50%);
  z-index: 1;
}

.app-nav-menu {
  position: relative;
  max-width: calc(var(--theme-site-width) + 16px * 2);
  margin: 0 auto;
  z-index: 2;
}

.app-nav-menu > ul {
  display: flex;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.app-nav-menu > ul > li {
  padding: 4px;
  list-style: none;
}

.app-nav-menu > ul > li > a {
  position: relative;
  display: flex;
  padding: 12px;
  color: var(--theme-tx-3);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s;
}

.app-nav-menu > ul > li > a:hover {
  color: var(--theme-tx-2);
}

.app-nav-menu > ul > li > a:after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--theme-bg-2);
  transform: translateX(-50%);
  transition: width 0.12s, background-color 0.12s;
  z-index: 2;
}

.app-nav-menu > ul > li > a:hover:after,
.app-nav-menu > ul > li.current-menu-item > a:after {
  width: calc(100% - 12px * 2);
  background-color: var(--theme-ac-1);
}

/*----------------------------------------------------
// App Main
----------------------------------------------------*/

.app-main {
  position: relative;
  display: block;
  padding-top: 32px;
  padding-bottom: 40vh;
  overflow: hidden;
}

/*----------------------------------------------------
// App Contents
----------------------------------------------------*/

.app-contents {
  max-width: calc(var(--theme-site-width) + 16px * 2);
  margin-right: auto;
  margin-left: auto;
  padding-right: 16px;
  padding-left: 16px;
}

.article-contents:after {
  content: "";
  display: table;
  clear: both;
}

.app-contents > *:not(:first-child) {
  margin-top: 2rem;
}

.app-contents ol,
.app-contents ul {
  padding-left: 2rem;
}

.app-contents li {
  margin-top: 0.4rem;
  line-height: 1.6875;
}

/*----------------------------------------------------
// App Widget
----------------------------------------------------*/

.app-widget {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--theme-bg-3);
}

.app-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  max-width: calc(var(--theme-site-width) + 16px * 2);
  margin-right: auto;
  margin-left: auto;
  padding-right: 16px;
  padding-left: 16px;
}

.app-widget-column > *:not(:first-child) {
  margin-top: 1rem;
}

.app-widget-column ol,
.app-widget-column ul {
  padding-left: 2rem;
}

.app-widget-column li {
  margin-top: 0.4rem;
  line-height: 1.6875;
}

/*----------------------------------------------------
// Article
----------------------------------------------------*/

.article > *:not(:first-child) {
  margin-top: 2rem;
}

.article-header > *:not(:first-child) {
  margin-top: 0.5rem;
}

.article-meta {
  color: var(--theme-tx-3);
  font-size: 0.875rem;
}

.article-date,
.article-category,
.article-tag {
  display: inline-block;
  margin-right: 0.5rem;
}

.article-contents > *:not(:first-child) {
  margin-top: 2rem;
}

/*----------------------------------------------------
// Pager & Pagination & Post Navigation
----------------------------------------------------*/

.pager,
.pagination,
.post-navigation {
  padding-top: 1rem;
  border-top: 1px solid var(--theme-bg-3);
  color: var(--theme-tx-3);
  font-size: 0.875rem;
}

.post-navigation .nav-links {
  display: flex;
  align-items: center;
}

.post-navigation .nav-links .nav-previous,
.post-navigation .nav-links .nav-next {
  flex: 1 0 0;
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
}

.post-navigation .nav-links .nav-next {
  justify-content: flex-end;
  text-align: right;
}

.post-navigation .nav-links .nav-previous:before,
.post-navigation .nav-links .nav-next:after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-top: 1px solid var(--theme-tx-3);
  border-right: 1px solid var(--theme-tx-3);
}

.post-navigation .nav-links .nav-previous:before {
  margin-right: 0.25rem;
  transform: rotate(-135deg);
}

.post-navigation .nav-links .nav-next:after {
  margin-left: 0.25rem;
  transform: rotate(45deg);
}

/*----------------------------------------------------
// Blocks: Core Image
----------------------------------------------------*/

.wp-block-image figcaption,
.wp-caption-text {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: var(--theme-tx-2);
  font-size: 0.875rem;
  opacity: 0.65;
}

/*----------------------------------------------------
// Blocks: Core Gallery
----------------------------------------------------*/

.app-contents .blocks-gallery-grid,
.app-contents .wp-block-gallery {
  padding-left: 0;
}

/*----------------------------------------------------
// Blocks: Core Embed
----------------------------------------------------*/

.wp-block-embed.alignwide iframe,
.wp-block-embed.alignfull iframe {
  width: 100%;
}

.wp-block-embed.alignwide .twitter-tweet,
.wp-block-embed.alignfull .twitter-tweet {
  margin-left: auto;
  margin-right: auto;
}

.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper {
  position: relative;
}

.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper:before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.wp-block-embed.wp-has-aspect-ratio iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/*----------------------------------------------------
// Blocks: Core Table
----------------------------------------------------*/

.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}

.wp-block-table table thead {
  border-bottom: none;
}

.wp-block-table table thead th {
  text-align: center;
}

.wp-block-table table td,
.wp-block-table table th {
  padding: 0.5rem;
  border: 1px solid var(--theme-bg-3);
}

.wp-block-table table th {
  background: var(--theme-bg-2);
}

.wp-block-table table caption {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.wp-block-table table tfoot {
  border-top: 2px solid var(--theme-bg-3);
}

.wp-block-table figcaption {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: var(--theme-tx-2);
  font-size: 0.875rem;
  opacity: 0.65;
}

/*----------------------------------------------------
// Blocks: Core Code
----------------------------------------------------*/

.wp-block-code {
  background-color: var(--theme-bg-2);
  border: 1px solid var(--theme-bg-3);
  font-family: var(--theme-font-mono);
  white-space: pre;
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/*----------------------------------------------------
// Theme Support: Align Wide
----------------------------------------------------*/

.alignwide {
  max-width: max(70vw, calc(100% + 16px));
  width: max(70vw, calc(100% + 16px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.alignfull {
  max-width: calc(100vw - var(--scrollbar-width, 0px));
  width: calc(100vw - var(--scrollbar-width, 0px));
  margin-left: 50%;
  transform: translateX(-50%);
}

/*----------------------------------------------------
// Theme Support: Required CSS
----------------------------------------------------*/

.sticky {
  position: relative;
}

.bypostauthor {
  padding: 2px;
  border: 1px solid var(--theme-tx-2);
}

.alignleft {
  float: left;
  display: inline;
  margin-right: 1.5em;
}

.alignright {
  float: right;
  display: inline;
  margin-left: 1.5em;
}

.aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #eee;
  clip: auto !important;
  clip-path: none;
  color: #444;
  display: block;
  font-size: 1em;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}
