/* 本番の LP だけで使う CSS。デザインの bundle.css（lp-design）の後に読む。
   デザインに無い表示（入れ忘れ、送っている間、失敗、日付を選ぶ部品（カレンダー）、規約のページ）を、デザインシステムのトークンで足す。
   赤は、デザインシステムで唯一の赤（深刻度 P1 の sev-p1・sev-p1-bg）を使う。 */

body { margin: 0; background: var(--white, #FFFFFF); }
a { color: var(--blue-700, #1E5A85); }
a:hover { color: var(--blue-800, #16466A); }

/* ---------- 送るボタン（<button>）を、デザインの <a> のボタンと同じ見た目にする ---------- */
.sm-root button.sm-btn { margin: 0; }
.sm-root button.sm-btn:focus-visible { outline: 2px solid var(--blue-700, #1E5A85); outline-offset: 2px; }
/* 送っている間: 押せないことを、薄さと待ちのカーソルで示す。文字は「送っています…」に替える（site.js）。 */
.sm-root .sm-btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; transform: none; }
.sm-btn__spinner {
  width: 18px; height: 18px; flex: none; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: sm-spin 0.8s linear infinite;
}
@keyframes sm-spin { to { transform: rotate(360deg); } }

/* ---------- 入れ忘れ・失敗の知らせ（ボタンのすぐ上。枠で囲む。上に色の帯は付けない） ---------- */
.sm-alert {
  align-self: stretch; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px;
  border: 1.5px solid var(--sev-p1, #B3261E); border-radius: 10px; background: var(--sev-p1-bg, #FBE9E7);
  font-size: 15px; line-height: 1.7; color: var(--navy-900, #1B2233); text-align: left;
}
.sm-alert[hidden] { display: none; }
.sm-alert:focus { outline: none; }
.sm-alert:focus-visible { outline: 2px solid var(--blue-700, #1E5A85); outline-offset: 2px; }
.sm-alert__title { display: flex; align-items: flex-start; gap: 8px; font-weight: 700; color: var(--sev-p1, #B3261E); }
.sm-alert__title .sm-icon { margin-top: 4px; color: var(--sev-p1, #B3261E); }
.sm-alert__list { margin: 0; padding: 0 0 0 28px; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sm-alert__list a { color: var(--blue-700, #1E5A85); }
.sm-alert__text { padding-left: 28px; }
/* 点検表のフォームの中（行の下）では、上下の間をあける。 */
.sm-checklist form .sm-alert { margin-top: 4px; }

/* 欄ごとの短い文 */
.sm-error { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 14px; line-height: 1.6; font-weight: 700; color: var(--sev-p1, #B3261E); }
.sm-error .sm-icon { width: 16px; height: 16px; margin-top: 3px; color: var(--sev-p1, #B3261E); }
.sm-error[hidden] { display: none; }
.sm-q > fieldset > .sm-error { padding-left: 50px; }
.sm-q__sub .sm-error { margin-top: 12px; }
.sm-root .sm-input[aria-invalid="true"] { border-color: var(--sev-p1, #B3261E); box-shadow: 0 0 0 1px var(--sev-p1, #B3261E); }
.sm-consent--row.is-invalid { border-color: var(--sev-p1, #B3261E); }
.sm-q.is-invalid .sm-q__num { background: var(--sev-p1, #B3261E); }
.sm-slot.is-invalid .sm-slot__title { color: var(--sev-p1, #B3261E); }
.sm-slot .sm-error { margin-top: 10px; }
.sm-jobtitle > .sm-error { margin-bottom: 8px; }

/* ---------- 隠す欄（スパムの見張り。人には見せず、読み上げもしない） ---------- */
.sm-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sm-noscript { text-align: center; }

/* ---------- 日付を選ぶ部品（カレンダー）。日付の欄のすぐ下に重ねて開く ----------
   選べる日（2 営業日後から 30 日先までの月曜〜金曜。ADR-0030）だけを押せる。選べない日は薄い字にして、押せなくする（disabled）。
   日のボタンは高さ 44px。幅は 7 等分（幅 320px の画面でも、欄の幅に収める）。 */
.sm-datefield > [data-date-display] { caret-color: transparent; }
.sm-calendar {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; padding: 8px 10px 10px;
  border: 1px solid var(--line-500, #7D8898); border-radius: 10px; background: var(--white, #FFFFFF);
  box-shadow: 0 8px 24px rgba(27, 34, 51, 0.16);
}
.sm-calendar[hidden] { display: none; }
.sm-calendar:focus { outline: none; }
.sm-calendar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sm-calendar__month { margin: 0; font-size: 16px; line-height: 1.6; font-weight: 700; color: var(--navy-900, #1B2233); }
.sm-calendar__nav {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--ink-700, #2E3747); cursor: pointer;
}
.sm-calendar__nav > .sm-icon { color: inherit; }
.sm-calendar__nav--prev > .sm-icon { transform: rotate(90deg); }
.sm-calendar__nav--next > .sm-icon { transform: rotate(-90deg); }
.sm-calendar__nav:hover:not(:disabled) { background: var(--grey-50, #F4F6F8); color: var(--navy-900, #1B2233); }
.sm-calendar__nav:disabled { color: var(--line-300, #C3CDD9); cursor: default; }
.sm-calendar__grid { width: 100%; margin-top: 4px; border-collapse: collapse; table-layout: fixed; }
.sm-calendar__grid th { padding: 4px 0; font-size: 13px; line-height: 1.6; font-weight: 400; color: var(--ink-500, #5B6573); text-align: center; }
.sm-calendar__grid td { padding: 1px; text-align: center; }
.sm-calendar__day {
  display: block; width: 100%; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none;
  font-family: inherit; font-size: 16px; line-height: 1; color: var(--navy-900, #1B2233); cursor: pointer;
}
.sm-calendar__day:hover:not(:disabled) { background: var(--blue-50, #EEF3F8); }
.sm-calendar__day:disabled { color: var(--line-400, #A9B4C2); cursor: default; pointer-events: none; }
.sm-calendar__day[aria-pressed="true"] { background: var(--blue-700, #1E5A85); color: var(--white, #FFFFFF); font-weight: 700; }
.sm-calendar__day:focus-visible, .sm-calendar__nav:focus-visible { outline: 2px solid var(--blue-700, #1E5A85); outline-offset: 1px; }
@media (forced-colors: active) {
  .sm-calendar__day:disabled, .sm-calendar__nav:disabled { color: GrayText; }
  .sm-calendar__day[aria-pressed="true"] { background: Highlight; color: HighlightText; forced-color-adjust: none; }
}

/* ---------- 送った後（ページの中で入れ替える） ---------- */
.sm-stack--tight { gap: 4px; }
.sm-done [data-done-heading]:focus, .sm-checklist [data-done-heading]:focus { outline: none; }
.sm-summary__list dd { overflow-wrap: anywhere; }
.sm-checklist [data-fill="email"] { overflow-wrap: anywhere; font-weight: 700; color: var(--navy-900, #1B2233); }

/* ---------- 利用規約・プライバシーポリシー ---------- */
.sm-legal { padding-top: 64px; }
.sm-legal__inner { display: flex; flex-direction: column; gap: 28px; max-width: 840px; }
.sm-legal__intro { font-size: 16px; line-height: 1.85; color: var(--ink-700, #2E3747); }
.sm-legal__section { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line-200, #D5DCE4); }
.sm-legal__h2 { font-size: 18px; line-height: 1.6; font-weight: 700; color: var(--navy-900, #1B2233); }
.sm-legal__section p, .sm-legal__section li { font-size: 15px; line-height: 1.85; color: var(--ink-700, #2E3747); }
.sm-legal__section ul { display: flex; flex-direction: column; gap: 4px; }
.sm-legal__section li { position: relative; padding-left: 18px; }
.sm-legal__section li::before { content: ""; position: absolute; left: 4px; top: 0.8em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-700, #1E5A85); }
.sm-legal__section a { overflow-wrap: anywhere; }
.sm-legal__date { padding-top: 8px; }

/* ---------- 記事（site/articles/*.md から articles.py が作る）。書き方の決まりは .agents/skills/article-write ---------- */
.sm-article, .sm-articles { padding-top: 48px; }
.sm-article__inner { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.sm-article__crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ink-500, #5B6573); }
.sm-article__title { margin: 0; font-size: 30px; line-height: 1.45; font-weight: 700; color: var(--navy-900, #1B2233); }
.sm-article__date { margin: -12px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.sm-article__eyecatch { margin: 0; }
.sm-article__eyecatch img, .sm-article__figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line-200, #D5DCE4); }
.sm-article p, .sm-article li, .sm-article td, .sm-article th { font-size: 16px; line-height: 1.9; color: var(--ink-700, #2E3747); }
.sm-article p { margin: 0; max-width: none; }
.sm-article ul { list-style: disc; }
.sm-article ol { list-style: decimal; }
.sm-article li { padding-left: 2px; }
.sm-article__lead { display: flex; flex-direction: column; gap: 16px; }
.sm-article__lead p { font-size: 17px; }
.sm-article__toc { padding: 18px 22px; border-radius: 12px; background: var(--grey-50, #F4F6F8); }
.sm-article__toc-title { margin: 0 0 6px; font-weight: 700; color: var(--navy-900, #1B2233); }
.sm-article__toc ol { margin: 0; padding-left: 1.4em; }
.sm-article__section { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line-200, #D5DCE4); scroll-margin-top: 16px; }
.sm-article__section h2 { margin: 0; font-size: 23px; line-height: 1.5; font-weight: 700; color: var(--navy-900, #1B2233); scroll-margin-top: 16px; }
.sm-article__section h3 { margin: 8px 0 0; padding-left: 12px; border-left: 4px solid var(--blue-700, #1E5A85); font-size: 18px; line-height: 1.6; font-weight: 700; color: var(--navy-900, #1B2233); }
.sm-article__section ul, .sm-article__section ol { margin: 0; padding-left: 1.5em; display: flex; flex-direction: column; gap: 4px; }
.sm-article__figure { margin: 4px 0; display: flex; flex-direction: column; gap: 8px; }
.sm-article__figure figcaption { font-size: 13px; line-height: 1.7; color: var(--ink-500, #5B6573); text-align: center; }
.sm-article__point { padding: 14px 18px; border-left: 4px solid var(--yellow-400, #F2C14E); border-radius: 0 10px 10px 0; background: var(--grey-50, #F4F6F8); }
.sm-article__table { overflow-x: auto; }
.sm-article__table table { width: 100%; border-collapse: collapse; }
.sm-article__table th, .sm-article__table td { padding: 8px 10px; border-bottom: 1px solid var(--line-200, #D5DCE4); text-align: left; vertical-align: top; font-size: 15px; }
.sm-article__table th { color: var(--navy-900, #1B2233); background: var(--grey-50, #F4F6F8); }
.sm-article code { padding: 1px 5px; border-radius: 4px; background: var(--grey-50, #F4F6F8); font-size: 0.92em; overflow-wrap: anywhere; }
.sm-article__code { margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: 10px; background: var(--grey-50, #F4F6F8); }
.sm-article__code code { padding: 0; background: none; }
.sm-article a { overflow-wrap: anywhere; }
.sm-article__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 24px; border-radius: 14px; background: var(--navy-900, #1B2233); }
.sm-article__cta p { color: var(--on-navy-700, #D5DCE4); }
.sm-article__cta .sm-article__cta-title { font-size: 19px; font-weight: 700; color: var(--white, #FFFFFF); }
.sm-article__related h2 { margin: 0 0 8px; font-size: 18px; color: var(--navy-900, #1B2233); }
.sm-article__related ul { margin: 0; padding-left: 1.4em; }
.sm-articles__inner { display: flex; flex-direction: column; gap: 24px; }
.sm-articles__intro { margin: 0; font-size: 16px; line-height: 1.85; color: var(--ink-700, #2E3747); }
.sm-articles__list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.sm-articles__item a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.sm-articles__item img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line-200, #D5DCE4); }
.sm-articles__title { font-size: 17px; line-height: 1.6; font-weight: 700; color: var(--navy-900, #1B2233); }
.sm-articles__item a:hover .sm-articles__title { text-decoration: underline; }
.sm-articles__desc { font-size: 14px; line-height: 1.75; color: var(--ink-700, #2E3747); }

@media (max-width: 640px) {
  .sm-q > fieldset > .sm-error { padding-left: 0; }
  .sm-legal { padding-top: 40px; }
  .sm-article, .sm-articles { padding-top: 32px; }
  .sm-article__title { font-size: 24px; }
  .sm-article__section h2 { font-size: 20px; }
  .sm-article__cta { padding: 20px; }
  .sm-alert { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-btn__spinner { animation: none; }
}
