:root {
  --ink:var(--sb-color-ink);
  --paper:var(--sb-surface-canvas);
  --white:var(--sb-color-white);
  --teal:var(--sb-color-teal);
  --red:var(--sb-color-coral);
  --yellow:var(--sb-color-yellow);
  --space:clamp(1.25rem,4vw,4rem);
  --link-color: var(--teal);
  --link-line-width: 1px;
  --link-line-hover-width: 2px;
  --link-line-offset: .22em;
  --link-target-size: 44px;
  --link-prominent-size: 1.05em;
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
  scroll-padding-top:2rem;
}

body {
  margin:0;
  color:var(--ink);
  background:var(--paper);
  font-family:"Yu Gothic",Meiryo,sans-serif;
  line-height:1.8;
}

a {
  color:inherit;
  text-underline-offset: var(--link-line-offset);
}

/* 独立した矢印付きリンクは文字列ではなく外枠へ線を引く。
   flexのgapも一本でつなぎ、本文中の通常リンクやボタンには適用しない。 */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  width: fit-content;
  max-width: 100%;
  min-height: var(--link-target-size);
  border-bottom: var(--link-line-width) solid currentColor;
  text-decoration: none;
  transition: box-shadow 160ms ease;
}

/* カードやボタン内の案内。操作領域は親が持ち、線は文言から矢印までつなぐ。 */
.text-link--label {
  min-height: 0;
  padding-bottom: var(--link-line-offset);
  border-bottom-color: transparent;
}

.text-link:is(:hover, :focus-visible),
:is(a, button):is(:hover, :focus-visible) .text-link--label {
  /* 細い一本線から内側へ太くする。寸法と線の連続性は保つ。 */
  border-bottom-color: currentColor;
  box-shadow: inset 0 calc(var(--link-line-width) - var(--link-line-hover-width)) 0 currentColor;
  text-decoration: none;
}

.text-link > [aria-hidden="true"] {
  flex-shrink: 0;
}

/* 補足のリンク。文字に近い細い下線と44pxの操作領域を組み合わせる。 */
.text-link--quiet {
  display: inline-block;
  padding-block: 7px;
  border-bottom: 0;
  color: var(--link-color);
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-thickness: var(--link-line-width);
}

.text-link--quiet:is(:hover, :focus-visible) {
  box-shadow: none;
  text-decoration-line: underline;
  text-decoration-thickness: var(--link-line-hover-width);
}

/* 独立した案内の入口。色・文字の重みで強調し、線の太さは増やさない。 */
.text-link--prominent {
  color: var(--link-color);
  font-size: var(--link-prominent-size);
  font-weight: 800;
}

/* 文中は文章と同じ行に収める。flexのgapを使わず、矢印も文字列へ続ける。 */
.inline-link {
  color: var(--link-color);
  text-decoration-line: underline;
  text-decoration-thickness: var(--link-line-width);
}

.inline-link:is(:hover, :focus-visible) {
  text-decoration-thickness: var(--link-line-hover-width);
}

button,input,select {
  font:inherit;
}

button,a,input,select,[tabindex] {
  outline-offset:5px;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible {
  outline:3px solid var(--teal);
}

.skip {
  position:absolute;
  top:-100px;
  left:1rem;
  z-index:9999;
  background:white;
  padding:.5rem;
}

.skip:focus {
  top:1rem;
}

/* ヘッダー・フッターの見た目は frame.css（共通枠）が受け持つ。 */

main {
  max-width:1240px;
  margin:auto;
  padding:0 var(--space) 4rem;
}

.page-heading {
  padding:3rem 0 2.5rem;
  position:relative;
  border-bottom:12px solid var(--yellow);
  margin-bottom:3rem;
}

.page-heading h1 {
  font-size:clamp(2rem,5vw,3.5rem);
  line-height:1.35;
  letter-spacing:.04em;
  margin:.6rem 0 1rem;
}

.eyebrow {
  font-size:.8rem;
  letter-spacing:.12em;
  font-weight:800;
  color:var(--teal);
}

h2 {
  font-size:clamp(1.4rem,3vw,2rem);
  line-height:1.5;
}

p {
  margin:.6rem 0;
}

@media(max-width:540px) {
  .page-heading {
    padding-top:2rem;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }

  .text-link {
    transition: none;
  }
}
