/* =========================================================
   ui.css — Typography, headings, buttons, actions
   Migrated from main.css; keep class names for PHP / post_content.
   Type scale tokens aligned with cocolifestyle (coco2026).
   ========================================================= */

/* ---------- Type scale (coco2026) ---------- */
:root {
  --fs-body: 1.05rem;
  --fs-heading: 1.2rem;
  --fs-title: 0.95rem;
  --fs-lead: 0.92rem;
  --fs-ui: 0.88rem;
  --fs-meta: 0.78rem;
  --fs-label: 0.72rem;
  --fs-tiny: 0.68rem;
  /* Reading text only — bumped by [data-body-size="lg"] */
  --fs-read: var(--fs-body);
  --lh-body: 1.8;
}

html[data-body-size="lg"] {
  --fs-read: calc(var(--fs-body) * 1.08);
}

/* Front page: never apply reading-size boost */
body.home,
body.front-page {
  --fs-read: var(--fs-body);
}

@media (max-width: 720px) {
  :root {
    --fs-body: 0.95rem;
    --fs-heading: 1.1rem;
    --fs-title: 0.9rem;
    --fs-lead: 0.86rem;
    --fs-ui: 0.84rem;
    --fs-meta: 0.75rem;
    --fs-label: 0.7rem;
    --fs-tiny: 0.66rem;
    --lh-body: 1.75;
  }
}

/* ---------- Base type ---------- */
body,
input,
select,
textarea {
  color: #4a4a4a;
  font-family: "Open Sans", sans-serif;
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: var(--lh-body);
}

/*
 * Body / reading text only — responds to 文字サイズ toggle.
 * Headings / chrome use --fs-heading / --fs-ui / etc. (not this).
 */
.entrypost p,
.entrypost li,
.entrypost dd,
.entrypost td,
.entrypost th,
.a26-about__copy p,
.a26-cta p,
.a26-hero__lead,
.comment-content,
.comment-content p,
.forum-main .entrypost p {
  font-size: var(--fs-read);
}

p {
  margin: 0 0 1em 0;
}

p.last {
  margin: 0 0 2em 0;
}

/* ---------- Headings ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #2a2a2a;
  font-weight: 600;
  line-height: 1em;
  margin: 0 0 1em 0;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  color: inherit;
  text-decoration: none;
}

h1 {
  position: relative;
  line-height: 1.4;
  display: inline-block;
}

h2 {
  font-size: calc(var(--fs-heading) * 1.15);
  line-height: 1.35;
}

h3 {
  font-size: var(--fs-heading);
  line-height: 1.45;
}

h4 {
  font-size: var(--fs-heading);
  line-height: 1.45;
}

h5 {
  font-size: var(--fs-title);
  line-height: 1.5;
}

h6 {
  font-size: var(--fs-title);
  line-height: 1.5;
}

/* Section / article headers */
header.major {
  position: relative;
}

header p {
  margin: 0 0 1.5em 0;
  position: relative;
}

header h2 + p {
  font-size: var(--fs-lead);
  margin-top: -0.85em;
  line-height: 1.75em;
}

header h3 + p {
  font-size: var(--fs-lead);
  margin-top: -0.75em;
  line-height: 1.75em;
}

header h4 + p,
header h5 + p,
header h6 + p {
  font-size: var(--fs-meta);
  margin-top: -0.75em;
  line-height: 1.75em;
}

/* Page title bars */
.hdl2 {
  border-bottom: 1px solid #000;
  display: block;
  margin-bottom: 1em;
}

.hdl2 h2 {
  display: inline-block;
  min-width: 207px;
  padding-bottom: 8px;
  border-bottom: 2px solid #000;
  font-size: var(--fs-heading);
  font-weight: 700;
  margin-bottom: 0;
}

.single .hdl2 {
  border-bottom: 1px solid #000;
  display: block;
  margin-bottom: 0.3em;
}

.single .hdl2 h2 {
  display: inline-block;
  min-width: 207px;
  padding-bottom: 8px;
  border-bottom: 2px solid #000;
  font-size: 0.7em;
  font-weight: normal;
  margin-bottom: 0;
}

.hdl3 h3 {
  border-bottom: solid 3px black;
  padding-bottom: 0.3em;
  margin-top: 0;
}

.hdl3 {
  margin-top: 1.35rem;
  margin-bottom: 1.1rem;
}

/* ---------- Actions ---------- */
li.aright {
  margin: 0 0 0 auto;
}

ul.actions {
  display: flex;
  cursor: default;
  list-style: none;
  margin-left: -1em;
  padding-left: 0;
}

ul.actions li {
  padding: 0 0 0 1em;
  vertical-align: middle;
}

ul.actions.special {
  justify-content: center;
  width: 100%;
  margin-left: 0;
}

ul.actions.special li:first-child {
  padding-left: 0;
}

ul.actions.stacked {
  flex-direction: column;
  margin-left: 0;
}

ul.actions.stacked li {
  padding: 0;
  margin-bottom: 0.5em;
}

ul.actions.stacked li:first-child {
  padding-top: 0;
}

.box.alt ul.actions.stacked li:last-child {
  margin-bottom: 0;
}

ul.actions.fit {
  width: calc(100% + 1em);
}

ul.actions.fit li {
  flex-grow: 1;
  flex-shrink: 1;
  width: 100%;
}

ul.actions.fit li > * {
  width: 100%;
}

ul.actions.fit.stacked {
  width: 100%;
}

ul.actions.last {
  margin-bottom: 0;
}

/* ---------- Buttons ---------- */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  -ms-appearance: none;
  border-radius: 0;
  border: 0;
  cursor: pointer;
  display: inline-block;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 3em;
  overflow: hidden;
  padding: 0.1em 2.2em;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transition: 0.5s;
  background: #000;
  color: #fff;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
  opacity: 0.8;
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active,
.button:active {
  opacity: 0.8;
}

input[type="submit"].icon,
input[type="reset"].icon,
input[type="button"].icon,
button.icon,
.button.icon {
  padding-left: 2.35em;
  vertical-align: middle;
  background: #000;
  color: #fff;
}

input[type="submit"].icon:before,
input[type="reset"].icon:before,
input[type="button"].icon:before,
button.icon:before,
.button.icon:before {
  margin-right: 0.5em;
}

input[type="submit"].xsmall.icon:before,
input[type="reset"].xsmall.icon:before,
input[type="button"].xsmall.icon:before,
button.xsmall.icon:before,
.xsmall.button.icon:before {
  margin-right: 0.2em;
}

input[type="submit"].fit,
input[type="reset"].fit,
input[type="button"].fit,
button.fit,
.button.fit {
  width: 100%;
}

input[type="submit"].small,
input[type="reset"].small,
input[type="button"].small,
button.small,
.button.small {
  vertical-align: middle;
  background: #e9eef5;
  color: #000;
}

input[type="submit"].xsmall,
input[type="reset"].xsmall,
input[type="button"].xsmall,
button.xsmall,
.button.xsmall {
  vertical-align: middle;
  background: #e9eef5;
  color: #000;
  height: 2em;
  line-height: 2em;
  padding: 0 0.5em;
}

input[type="submit"].large,
input[type="reset"].large,
input[type="button"].large,
button.large,
.button.large {
  font-size: 1em;
  height: 3em;
  line-height: 3em;
}

input[type="submit"].alt,
input[type="reset"].alt,
input[type="button"].alt,
button.alt,
.button.alt {
  background-color: transparent;
  box-shadow: inset 0 0 0 1px #e9eef5;
  color: #000;
}

input[type="submit"].alt:hover,
input[type="reset"].alt:hover,
input[type="button"].alt:hover,
button.alt:hover,
.button.alt:hover {
  background-color: rgba(144, 144, 144, 0.05);
}

input[type="submit"].alt:active,
input[type="reset"].alt:active,
input[type="button"].alt:active,
button.alt:active,
.button.alt:active {
  background-color: rgba(144, 144, 144, 0.1);
}

input[type="submit"].alt.icon:before,
input[type="reset"].alt.icon:before,
input[type="button"].alt.icon:before,
button.alt.icon:before,
.button.alt.icon:before {
  color: #bbb;
}

input[type="submit"].primary,
input[type="reset"].primary,
input[type="button"].primary,
button.primary,
.button.primary {
  background-color: #51c5e8;
  color: #ffffff !important;
}

input[type="submit"].primary:hover,
input[type="reset"].primary:hover,
input[type="button"].primary:hover,
button.primary:hover,
.button.primary:hover {
  background-color: #68cdeb;
}

input[type="submit"].primary:active,
input[type="reset"].primary:active,
input[type="button"].primary:active,
button.primary:active,
.button.primary:active {
  background-color: #3abde5;
}

a.disabled,
a.disabled img {
  opacity: 0.5;
  cursor: default;
  background: #000;
  pointer-events: none;
}

input[type="submit"].disabled,
input[type="submit"]:disabled,
input[type="reset"].disabled,
input[type="reset"]:disabled,
input[type="button"].disabled,
input[type="button"]:disabled,
button.disabled,
button:disabled,
.button.disabled,
.button:disabled {
  background-color: #4a4a4a !important;
  box-shadow: inset 0 -0.15em 0 0 rgba(0, 0, 0, 0.15);
  color: #fff !important;
  cursor: default;
  opacity: 0.25;
}

/* ---------- Responsive (layout; type scale is token-driven) ---------- */
@media screen and (max-width: 980px) {
  header h2 + p {
    font-size: var(--fs-lead);
  }

  header h3 + p {
    font-size: var(--fs-lead);
  }

  header h4 + p,
  header h5 + p,
  header h6 + p {
    font-size: var(--fs-meta);
  }
}

@media screen and (max-width: 736px) {
  ul.actions:not(.fixed) {
    flex-direction: column;
    margin-left: 0;
    width: 100% !important;
  }

  ul.actions:not(.fixed) li {
    flex-grow: 1;
    flex-shrink: 1;
    padding: 1em 0 0 0;
    text-align: center;
    width: 100%;
  }

  ul.actions:not(.fixed) li > * {
    width: 100%;
  }

  ul.actions:not(.fixed) li:first-child {
    padding-top: 0;
  }

  ul.actions:not(.fixed) li input[type="submit"],
  ul.actions:not(.fixed) li input[type="reset"],
  ul.actions:not(.fixed) li input[type="button"],
  ul.actions:not(.fixed) li button,
  ul.actions:not(.fixed) li .button {
    width: 100%;
  }

  ul.actions:not(.fixed) li input[type="submit"].icon:before,
  ul.actions:not(.fixed) li input[type="reset"].icon:before,
  ul.actions:not(.fixed) li input[type="button"].icon:before,
  ul.actions:not(.fixed) li button.icon:before,
  ul.actions:not(.fixed) li .button.icon:before {
    margin-left: -0.5em;
  }

  input[type="submit"].small,
  input[type="reset"].small,
  input[type="button"].small,
  button.small,
  .button.small {
    height: 3em;
    line-height: 3em;
    padding: 0 2em;
  }

  input[type="submit"].alt,
  input[type="reset"].alt,
  input[type="button"].alt,
  button.alt,
  .button.alt {
    background: #e9eef5;
  }
}

@media screen and (max-width: 480px) {
  h1 br,
  h2 br,
  h3 br,
  h4 br,
  h5 br,
  h6 br {
    display: none;
  }

  .a26-hero__title br,
  .a26-hero__lead br {
    display: unset;
  }

  ul.actions {
    margin: 0 0 2em 0;
  }

  ul.actions li {
    display: block;
    padding: 1em 0 0 0;
    text-align: center;
    width: 100%;
  }

  ul.actions li:first-child {
    padding-top: 0;
  }

  ul.actions li > * {
    margin: 0 !important;
    width: 100%;
  }

  ul.actions li > *.icon:before {
    margin-left: -2em;
  }

  ul.actions.small li {
    padding: 0.5em 0 0 0;
  }

  ul.actions.small li:first-child {
    padding-top: 0;
  }
}
