/* 天帝建設テーマ：WordPress 化で増えた見た目（static/ の style.css には無いもの）。style.css より後に読み込む */

/* TOP の NEWS の帯：タイトルを記事へのリンクにした分
   3件は同じ場所に重ねて置かれ、見えていないものは文字が透明なだけでその場に残っている。
   そのままだと一番上の3件目が常に押され、Tab も見えないリンクに止まるため、
   表示中のタイトルだけを押せるようにし、Tab も表示中のタイトルにだけ止める。
   切り替わりの途中で消えていくタイトル（is-leaving）は、動きが終わるまで見せたまま押せないようにする。
   押せる範囲はタイトルの文字の部分だけにする（右の空いた所は押せない）。
   マウスを乗せたときの色は、同じ帯の VIEW MORE と同じ */
.newsbar__ticker.is-ready .newsbar__text { right: auto; }
.newsbar__ticker.is-ready .newsbar__text:not(.is-active) { pointer-events: none; }
.newsbar__ticker.is-ready .newsbar__text:not(.is-active):not(.is-leaving) { visibility: hidden; }
.newsbar__text { transition: color .3s var(--ease); }
.newsbar__text:hover { color: var(--slate-600); }

/* お知らせの記事ページ（single-post.php）：帯＋1カラム。本文の幅は個人情報保護方針と同じ 880px
   パンくずは1行に収め、入りきらない記事名は「…」で切る（記事名はすぐ下の見出しに全部出る）。記事名の英字は小文字にしない
   本文はブロックエディタの出力。WordPress の標準のブロックの CSS より強くなるよう、余白・画像の説明文・表は要素名を足して指定する
   タイトルの折り返し（text-wrap・word-break）は対応しているブラウザ（Chrome など）だけで効く */
.single-post .subhead-band__crumbs { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-transform: none; }
.post { max-width: 880px; }
.post__head { padding-bottom: clamp(20px, 2.4vw, 28px); border-bottom: 1px solid var(--line); }
.post__title { margin-top: 14px; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.6; color: var(--ink); text-wrap: pretty; word-break: auto-phrase; }
.post__media { aspect-ratio: 16 / 10; margin-top: clamp(28px, 4vw, 40px); border-radius: 2px; }
.post__body { margin-top: clamp(28px, 4vw, 40px); font-size: clamp(14px, 1.4vw, 15.5px); color: var(--ink); overflow-wrap: anywhere; }
.post__body > * { margin: 0; }
.post__body > * + * { margin-top: 1.4em; }
.post__body > figure { margin: 0; }
.post__body > * + figure { margin-top: 1.4em; }
.post__body > h2 { position: relative; margin-top: 2.4em; padding-left: calc(9px + .5em); font-size: clamp(17px, 1.6vw, 20px); }
.post__body > h2::before { content: ""; position: absolute; left: 0; top: calc(.7em - 4.5px); width: 9px; height: 9px; border-radius: 50%; background: var(--slate-600); }
.post__body > h3 { margin-top: 2em; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: clamp(15px, 1.4vw, 17px); color: var(--slate-600); letter-spacing: .06em; }
.post__body > h4 { margin-top: 1.8em; font-size: 15px; }
.post__body > h2 + *, .post__body > h3 + *, .post__body > h4 + * { margin-top: 1em; }
.post__body > :first-child { margin-top: 0; }
.post__body li { position: relative; padding-left: 1.6em; }
.post__body li + li, .post__body li > ul, .post__body li > ol { margin-top: .4em; }
.post__body ul > li::before { content: "・"; position: absolute; left: 0; top: 0; }
.post__body ol { counter-reset: post-ol; }
.post__body ol > li { counter-increment: post-ol; }
.post__body ol > li::before { content: counter(post-ol) "."; position: absolute; left: 0; top: 0; }
.post__body a:not([class]) { color: var(--slate-600); text-decoration: underline; text-underline-offset: .2em; transition: color .3s var(--ease); }
.post__body a:not([class]):hover { color: var(--navy-900); }
.post__body img { height: auto; }
.post__body figure figcaption { margin: .6em 0 0; font-size: 12.5px; color: var(--ink-mute); text-align: center; }
.post__body blockquote { padding-left: 1.2em; border-left: 3px solid var(--line); color: var(--ink-soft); }
.post__body hr { border: 0; border-top: 1px solid var(--line); }
.post__body .wp-block-table { overflow-x: auto; }
.post__body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.post__body table thead, .post__body table tfoot { border: 0; }
.post__body table th, .post__body table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.post__body table th { background: var(--bg-soft); font-weight: 500; }
.post__back { display: flex; justify-content: center; margin-top: clamp(48px, 6vw, 72px); padding-top: clamp(32px, 4vw, 40px); border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .post__back .btn { min-width: 0; width: 100%; }
}

/* お問い合わせ・採用エントリーのフォーム（page-contact.php・page-entry.php・inc/form.php）
   同意の行は「希望職種」の行と同じ部品（.form-radios・.form-radio）。個人情報保護方針のリンクは記事の本文のリンクと同じ色と下線
   人には見えない欄（迷惑送信の対策）は画面の外に置く。display: none にしないのは、それを見て空のまま送ってくる機械があるため
   送信のあとはフォームの位置に戻る（アドレスの #contact-form）。上に固定のヘッダーがあるので、その下に 40px あけて止める
   （フォームは表示の動き .reveal で 28px 下から上がってくるため、その分も足す）
   誤りのあるとき：フォームの上に赤い枠の文、その項目の枠を赤にして、入力欄のすぐ下に赤い文字（赤は「必須」の印と同じ #E60012。文字は少し濃くして読みやすく） */
.form-agree a { color: var(--slate-600); text-decoration: underline; text-underline-offset: .2em; transition: color .3s var(--ease); }
.form-agree a:hover { color: var(--navy-900); }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { scroll-margin-top: calc(var(--header-h-stuck) + 68px); }
.form-alert { margin-bottom: clamp(24px, 3vw, 36px); padding: 16px 20px; border: 1px solid #e60012; border-radius: 4px; background: #fff; color: #c40010; font-size: 14px; line-height: 1.8; }
.form-row.is-error { row-gap: 8px; }
.form-error { grid-column: 2; margin: 0; color: #c40010; font-size: 13px; line-height: 1.6; }
.form-control[aria-invalid="true"] { border-color: #e60012; background: #fff; }
@media (max-width: 1024px) {
  .form-error { grid-column: auto; }
}
