/* =========================================================
   KITT Study
   components.css v1.0
   ---------------------------------------------------------
   Purpose:
   - Buttons / CTA
   - Cards
   - Notice boxes
   - Breadcrumbs
   - Header navigation
   - Footer navigation
   - FAQ
   - Forms
   ========================================================= */


/* ---------------------------------------------------------
   1. Buttons
   --------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;
  padding: 12px 24px;

  border: 2px solid transparent;
  border-radius: 8px;

  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;

  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.button:hover {
  text-decoration: none;
}

.button:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.button:active {
  transform: translateY(1px);
}


/* Primary */

.button--primary {
  background: var(--color-primary);
  color: #ffffff;
}

.button--primary:hover {
  background: #1d4ed8;
}


/* Secondary */

.button--secondary {
  background: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.button--secondary:hover {
  background: #eff6ff;
}


/* Wide */

.button--wide {
  width: 100%;
}


/* Large CTA */

.button--large {
  min-height: 56px;
  padding: 16px 32px;
  font-size: 18px;
}


/* ---------------------------------------------------------
   2. CTA area
   --------------------------------------------------------- */

.cta {
  padding: 40px;
  border-radius: 16px;

  background: var(--color-background-soft);
  border: 1px solid var(--color-border-accent);

  text-align: center;
}

.cta__title {
  margin-bottom: 16px;
  font-size: 26px;
  font-weight: 700;
}

.cta__text {
  margin-bottom: 24px;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}


/* ---------------------------------------------------------
   3. Cards
   --------------------------------------------------------- */

.card {
  height: 100%;
  padding: 28px;

  background: #ffffff;

  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.card__title {
  margin-bottom: 12px;

  color: var(--color-heading);
  font-size: 20px;
  font-weight: 700;
}

.card__text {
  color: var(--color-text);
}

.card__footer {
  margin-top: 24px;
}


/* ---------------------------------------------------------
   4. Information / Notice boxes
   --------------------------------------------------------- */

.notice {
  padding: 24px;

  background: var(--color-background-soft);

  border: 1px solid var(--color-border-accent);
  border-left: 5px solid var(--color-primary);
  border-radius: 8px;
}

.notice__title {
  margin-bottom: 8px;

  color: var(--color-heading);
  font-weight: 700;
}


/* Important notice */

.notice--important {
  background: #fff7ed;
  border-color: #fed7aa;
  border-left-color: #ea580c;
}


/* Error / warning */

.notice--warning {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #dc2626;
}


/* Success */

.notice--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-left-color: #16a34a;
}


/* ---------------------------------------------------------
   5. Breadcrumbs
   --------------------------------------------------------- */

.breadcrumb {
  padding-block: 16px;

  font-size: 14px;
  color: var(--color-muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  padding-left: 0;
  list-style: none;
}

.breadcrumb li {
  margin: 0;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--color-muted);
}

.breadcrumb a {
  color: inherit;
}


/* ---------------------------------------------------------
   6. Header navigation
   --------------------------------------------------------- */

.header-nav__list {
  display: flex;
  align-items: center;

  gap: 24px;

  padding-left: 0;
  list-style: none;
}

.header-nav__item {
  margin: 0;
}

.header-nav__link {
  display: inline-flex;
  align-items: center;

  min-height: 44px;

  color: var(--color-heading);

  font-size: 15px;
  font-weight: 600;

  text-decoration: none;
}

.header-nav__link:hover {
  color: var(--color-primary);
}

.header-nav__link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}


/* ---------------------------------------------------------
   7. Header CTA
   --------------------------------------------------------- */

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  padding: 10px 18px;

  background: var(--color-primary);
  color: #ffffff;

  border-radius: 8px;

  font-size: 15px;
  font-weight: 700;

  text-decoration: none;
}

.header-cta:hover {
  background: #1d4ed8;
  text-decoration: none;
}


/* ---------------------------------------------------------
   8. Footer navigation
   --------------------------------------------------------- */

.footer-nav__title {
  margin-bottom: 16px;

  color: var(--color-heading);
  font-size: 16px;
  font-weight: 700;
}

.footer-nav__list {
  padding-left: 0;
  list-style: none;
}

.footer-nav__item {
  margin-bottom: 8px;
}

.footer-nav__item:last-child {
  margin-bottom: 0;
}

.footer-nav__link {
  color: var(--color-text);
  text-decoration: none;
}

.footer-nav__link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}


/* ---------------------------------------------------------
   9. FAQ
   --------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--color-border);
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__question {
  margin: 0;
}

.faq__question button {
  width: 100%;
  padding: 20px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  background: transparent;
  border: 0;

  color: var(--color-heading);

  font-weight: 700;
  text-align: left;
}

.faq__question button:hover {
  color: var(--color-primary);
}

.faq__answer {
  padding: 0 0 24px;
}


/* ---------------------------------------------------------
   10. Forms
   --------------------------------------------------------- */

.form {
  width: 100%;
}

.form__group {
  margin-bottom: 28px;
}

.form__group:last-child {
  margin-bottom: 0;
}

.form__label {
  display: block;

  margin-bottom: 8px;

  color: var(--color-heading);

  font-weight: 700;
}

.form__required {
  margin-left: 6px;

  color: #b91c1c;

  font-size: 0.85em;
}

.form__help {
  margin-top: 6px;

  color: var(--color-muted);

  font-size: 14px;
  line-height: 1.6;
}


/* Text fields */

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="url"],
.form input[type="password"],
.form input[type="number"],
.form select,
.form textarea {
  width: 100%;

  padding: 12px 14px;

  background: #ffffff;
  color: var(--color-text);

  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.form textarea {
  min-height: 160px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--color-primary);

  outline: 3px solid #dbeafe;
  outline-offset: 1px;
}


/* Checkbox / Radio */

.form__choice {
  display: flex;
  align-items: flex-start;

  gap: 10px;
}

.form__choice input {
  flex: 0 0 auto;
  margin-top: 0.45em;
}

.form__choice label {
  flex: 1 1 auto;
}


/* Form actions */

.form__actions {
  margin-top: 32px;

  display: flex;
  flex-wrap: wrap;

  gap: 16px;
}


/* ---------------------------------------------------------
   11. Form validation
   --------------------------------------------------------- */

.form__error {
  margin-top: 6px;

  color: #b91c1c;

  font-size: 14px;
  font-weight: 600;
}

.form [aria-invalid="true"] {
  border-color: #dc2626;
}


/* ---------------------------------------------------------
   12. Page title
   --------------------------------------------------------- */

.page-title {
  margin-bottom: 40px;
}

.page-title__heading {
  margin-bottom: 12px;
}

.page-title__lead {
  max-width: 720px;

  color: var(--color-text);
  font-size: 18px;
}


/* ---------------------------------------------------------
   13. Steps
   --------------------------------------------------------- */

.steps {
  display: grid;

  gap: 20px;

  padding-left: 0;
  list-style: none;

  counter-reset: kitt-step;
}

.steps__item {
  position: relative;

  padding: 24px 24px 24px 72px;

  border: 1px solid var(--color-border);
  border-radius: 12px;

  counter-increment: kitt-step;
}

.steps__item::before {
  content: counter(kitt-step);

  position: absolute;
  top: 24px;
  left: 24px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--color-primary);
  color: #ffffff;

  border-radius: 50%;

  font-weight: 700;
}

.steps__title {
  margin-bottom: 8px;

  color: var(--color-heading);
  font-weight: 700;
}


/* ---------------------------------------------------------
   14. Definition list
   --------------------------------------------------------- */

.definition-list {
  border-top: 1px solid var(--color-border);
}

.definition-list__row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);

  padding-block: 20px;

  border-bottom: 1px solid var(--color-border);
}

.definition-list dt {
  font-weight: 700;
}

.definition-list dd {
  margin: 0;
}


/* ---------------------------------------------------------
   15. Visually hidden
   --------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  padding: 0 !important;
  margin: -1px !important;

  overflow: hidden !important;

  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;

  white-space: nowrap !important;

  border: 0 !important;
}

/* ---------------------------------------------------------
   KITT英語 ヘッダーブランド修正
   --------------------------------------------------------- */

.site-header__brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;

  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.site-header__brand:hover {
  text-decoration: none;
}

.site-header__brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.site-header__brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
}

.site-header__brand-copy strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: #173b6c;
}

.site-header__brand-copy small {
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 400;
  color: #66758a;
}

/* PCではハンバーガーボタンを出さない */
.menu-toggle {
  display: none;
}

/* =========================================================
   Limited Tester Application Form
   /tester/apply/
   ========================================================= */

.tester-form {
  width: 100%;
  max-width: 820px;
  margin: 2rem auto 0;
}

.form-section {
  margin: 0 0 2rem;
  padding: 2rem;
  border: 1px solid #d9dee5;
  border-radius: 16px;
  background: #ffffff;
}

.form-section legend {
  padding: 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.form-group {
  margin-top: 1.5rem;
}

.form-group:first-of-type {
  margin-top: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.5;
}

.form-required,
.form-conditional {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: middle;
}

.form-required {
  background: #b91c1c;
  color: #ffffff;
}

.form-conditional {
  background: #eef2f7;
  color: #475569;
}

.form-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  line-height: 1.5;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: #6b7280;
}

.form-input:hover {
  border-color: #6b7280;
}

.form-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.form-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.form-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 160px;
  padding: 0.85rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.form-choice:hover {
  border-color: #94a3b8;
}

.form-choice:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}

.form-choice input,
.form-check input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #2563eb;
}

.form-check {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.75rem;
  align-items: start;
  line-height: 1.7;
  cursor: pointer;
}

.form-check input {
  margin-top: 0.3rem;
}

.form-check a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.form-help {
  margin-top: 0.5rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.7;
}

.form-error {
  margin-top: 0.5rem;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-actions {
  margin-top: 2.5rem;
  text-align: center;
}

.form-actions .button {
  min-width: 280px;
}

.form-actions .button:disabled,
.form-actions .button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/*
 * Spam bot対策用。
 * display:none はbotに見破られやすいため、
 * 画面外へ安全に退避させる。
 */
.form-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================
   FAQ
========================== */

.faq-category-nav__title {
  margin-bottom: 1rem;
  font-weight: 700;
}

.faq-category-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-section {
  scroll-margin-top: 6rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.faq-item__question {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 3.25rem 1rem 1rem;
  position: relative;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.6;
  list-style: none;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::after {
  content: "＋";
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  font-size: 1.25rem;
  line-height: 1;
}

.faq-item[open] .faq-item__question::after {
  content: "−";
}

.faq-item__question:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: -3px;
}

.faq-item__number {
  flex: 0 0 auto;
  font-weight: 700;
}

.faq-item__answer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0 1rem 1.25rem;
}

.faq-item__answer-label {
  font-weight: 700;
}

.faq-item__answer a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* =========================================================
   Support Form
   ========================================================= */

.support-form {
  width: 100%;
  max-width: 760px;
  margin-top: 2rem;
}

.support-form__field {
  margin-bottom: 2rem;
}

.support-form__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-text, #1f2937);
}

.support-form__subheading {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.6;
}

.support-form__required,
.support-form__optional {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 0.08em;
}

.support-form__required {
  color: #ffffff;
  background: #d94841;
}

.support-form__optional {
  color: #4b5563;
  background: #e9edf2;
}

.support-form__help {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #5f6875;
}

.support-form__input,
.support-form__select,
.support-form__textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid #cbd2da;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
  line-height: 1.6;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.support-form__input,
.support-form__select {
  min-height: 48px;
  padding: 0.7rem 0.85rem;
}

.support-form__textarea {
  display: block;
  min-height: 160px;
  padding: 0.8rem 0.85rem;
  resize: vertical;
}

.support-form__input::placeholder,
.support-form__textarea::placeholder {
  color: #9aa3ad;
}

.support-form__input:hover,
.support-form__select:hover,
.support-form__textarea:hover {
  border-color: #9da8b5;
}

.support-form__input:focus,
.support-form__select:focus,
.support-form__textarea:focus {
  outline: none;
  border-color: #246fe5;
  box-shadow: 0 0 0 3px rgba(36, 111, 229, 0.16);
}

.support-form__input:disabled,
.support-form__select:disabled,
.support-form__textarea:disabled {
  cursor: not-allowed;
  background: #f3f5f7;
  color: #7b8490;
}

.support-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.95rem;
  line-height: 1.8;
  cursor: pointer;
}

.support-form__consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0.2rem 0 0;
  accent-color: #246fe5;
}

.support-form__consent a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.support-form__actions {
  margin-top: 2.5rem;
}

.support-form__actions .button {
  min-width: 240px;
}

.support-form__actions .button:disabled,
.support-form__actions .button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.support-form__actions .support-form__help {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.support-form__status {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border-radius: 8px;
  line-height: 1.7;
  background: #f3f6fa;
}

.support-form__status[hidden] {
  display: none;
}


/* Honeypot
   画面には表示しないが、bot検出用にDOMには残す
*/

.support-form__honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}


/* =========================================================
   Support Form - validation states
   ========================================================= */

.support-form__input[aria-invalid="true"],
.support-form__select[aria-invalid="true"],
.support-form__textarea[aria-invalid="true"] {
  border-color: #d94841;
}

.support-form__input[aria-invalid="true"]:focus,
.support-form__select[aria-invalid="true"]:focus,
.support-form__textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(217, 72, 65, 0.15);
}

.support-form__error {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.6;
  color: #b42318;
}

/* =========================================================
   Support form
   /support/login/
   /support/bug/
   /support/material/
   /support/withdraw-test/
========================================================= */

.kitt-contact-form {
  width: 100%;
  max-width: 820px;
  margin-top: 2rem;
}

.kitt-contact-field {
  margin-bottom: 2rem;
}

.kitt-contact-field > label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.6;
}

.kitt-contact-field > p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

/* checkbox / radio / hidden 以外のフォーム部品 */
.kitt-contact-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.kitt-contact-field select,
.kitt-contact-field textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;

  padding: 0.8rem 0.9rem;

  border: 1px solid #c7cdd4;
  border-radius: 6px;

  background: #fff;
  color: inherit;

  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
}

.kitt-contact-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.kitt-contact-field select {
  min-height: 48px;
}

.kitt-contact-field textarea {
  min-height: 140px;
  resize: vertical;
}

/* focus */
.kitt-contact-field input:not([type="checkbox"]):not([type="radio"]):focus,
.kitt-contact-field select:focus,
.kitt-contact-field textarea:focus {
  border-color: #2f6fed;
  outline: 3px solid rgba(47, 111, 237, 0.16);
  outline-offset: 1px;
}

/* placeholder */
.kitt-contact-field input::placeholder,
.kitt-contact-field textarea::placeholder {
  color: #7a828c;
}

/* 必須表示 */
.kitt-contact-required {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;

  border-radius: 4px;

  background: #fff0f0;
  color: #b42318;

  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: middle;
}

/* 個人情報同意欄 */
.kitt-contact-privacy {
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;

  border: 1px solid #d9dde3;
  border-radius: 8px;

  background: #f8f9fb;
}

.kitt-contact-privacy > label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;

  margin-bottom: 0;

  font-weight: 400;
  cursor: pointer;
}

.kitt-contact-privacy input[type="checkbox"] {
  flex: 0 0 auto;

  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.22rem;

  cursor: pointer;
}

/* 送信ボタン */
.kitt-contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 220px;
  min-height: 50px;

  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;

  border: 0;
  border-radius: 6px;

  background: #2f6fed;
  color: #fff;

  font: inherit;
  font-weight: 700;

  cursor: pointer;
}

.kitt-contact-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.kitt-contact-submit:focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.28);
  outline-offset: 3px;
}

/* 現在は送信無効 */
.kitt-contact-submit:disabled,
.kitt-contact-submit[aria-disabled="true"] {
  background: #c8cdd4;
  color: #666d75;

  cursor: not-allowed;
  opacity: 1;
}