:root {
  --ts-blue: #2563eb;
  --ts-blue-dark: #1e3a8a;
  --ts-blue-soft: #eff6ff;
  --ts-cyan: #06b6d4;
  --ts-ink: #1f2937;
  --ts-muted: #64748b;
  --ts-line: #dbeafe;
  --ts-bg: #f8fbff;
  --ts-white: #fff;
  --ts-shadow: 0 18px 48px rgba(30, 58, 138, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ts-ink);
  background: var(--ts-bg);
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
}

.ts-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--ts-line);
  backdrop-filter: blur(14px);
}

.ts-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  min-height: 76px;
  margin: 0 auto;
  padding: 0 24px;
}

.ts-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ts-blue-dark);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
}

.ts-logo strong {
  overflow-wrap: anywhere;
}

.ts-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--ts-white);
  background: var(--ts-blue);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.ts-header-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.ts-nav-list,
.ts-footer-list {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ts-nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.ts-nav-list a:hover,
.ts-nav-list a.is-current {
  color: var(--ts-blue);
}

.ts-header-cta,
.ts-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.ts-header-cta,
.ts-button--primary {
  color: var(--ts-white);
  background: var(--ts-blue);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.ts-header-cta:hover,
.ts-button--primary:hover {
  transform: translateY(-1px);
  background: #1d4ed8;
}

.ts-button--secondary {
  color: var(--ts-blue-dark);
  background: var(--ts-white);
  border: 1px solid var(--ts-line);
}

.ts-button--light {
  color: var(--ts-blue-dark);
  background: var(--ts-white);
}

.ts-button--ghost-light {
  color: var(--ts-white);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.ts-button--block {
  width: 100%;
}

.ts-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ts-blue-dark);
  background: var(--ts-white);
  border: 1px solid var(--ts-line);
  border-radius: 8px;
}

.ts-menu-toggle-bars {
  display: grid;
  gap: 5px;
  width: 18px;
  margin: auto;
}

.ts-menu-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.ts-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
  gap: 36px;
  align-items: center;
  max-width: 1180px;
  min-height: 640px;
  margin: 0 auto;
  padding: 64px 24px 48px;
}

.ts-hero-copy h1,
.ts-page-header h1,
.ts-article-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 54px;
  line-height: 1.18;
  letter-spacing: 0;
}

.ts-hero-copy p {
  max-width: 660px;
  margin: 22px 0 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
}

.ts-label {
  margin: 0 0 10px;
  color: var(--ts-blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ts-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ts-hero-visual {
  position: relative;
  margin: 0;
  padding: 34px;
  background: #0f172a;
  border: 1px solid #233558;
  border-radius: 8px;
  box-shadow: var(--ts-shadow);
}

.ts-code-window {
  overflow: hidden;
  min-height: 310px;
  padding: 22px;
  color: #bfdbfe;
  background: #111827;
  border: 1px solid #2b3953;
  border-radius: 8px;
}

.ts-code-window > span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  background: var(--ts-cyan);
  border-radius: 999px;
}

.ts-code-window > span:nth-child(2) {
  background: #60a5fa;
}

.ts-code-window > span:nth-child(3) {
  background: #93c5fd;
}

.ts-code-window pre {
  margin: 28px 0 0;
  white-space: pre-wrap;
}

.ts-code-window code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 17px;
  line-height: 1.9;
}

.ts-progress-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 190px;
  padding: 16px;
  color: #0f172a;
  background: var(--ts-white);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.ts-progress-card small,
.ts-progress-card strong {
  display: block;
}

.ts-progress-card small {
  color: var(--ts-muted);
  font-size: 12px;
  font-weight: 800;
}

.ts-progress-card strong {
  margin-top: 4px;
  font-size: 32px;
  line-height: 1;
}

.ts-progress-card span {
  display: block;
  overflow: hidden;
  height: 8px;
  margin-top: 12px;
  background: var(--ts-blue-soft);
  border-radius: 999px;
}

.ts-progress-card i {
  display: block;
  height: 100%;
  background: var(--ts-blue);
}

.ts-section,
.ts-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px;
}

.ts-section--compact {
  padding-top: 20px;
}

.ts-section--flat {
  padding: 0;
}

.ts-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.ts-section-heading h2,
.ts-managed-content h2,
.ts-contact-note h2,
.ts-cta h2 {
  margin: 0;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: 0;
}

.ts-section-heading a {
  color: var(--ts-blue);
  font-weight: 800;
}

.ts-stat-grid,
.ts-card-grid,
.ts-course-grid,
.ts-voice-grid,
.ts-article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ts-stat-grid article,
.ts-card,
.ts-course-card,
.ts-voice-card,
.ts-article-card a,
.ts-empty,
.ts-sidebox,
.ts-contact-note,
.ts-contact-box {
  background: var(--ts-white);
  border: 1px solid var(--ts-line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.06);
}

.ts-stat-grid article,
.ts-card,
.ts-course-card,
.ts-voice-card {
  padding: 24px;
}

.ts-stat-grid span,
.ts-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  color: var(--ts-blue-dark);
  background: var(--ts-blue-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.ts-stat-grid strong,
.ts-card strong,
.ts-course-card strong,
.ts-voice-card strong {
  display: block;
  margin-top: 14px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.35;
}

.ts-stat-grid p,
.ts-card p,
.ts-course-card p,
.ts-voice-card p,
.ts-empty p {
  margin: 10px 0 0;
  color: var(--ts-muted);
}

.ts-page-header,
.ts-article-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 24px 24px;
}

.ts-page-header h1,
.ts-article-header h1 {
  font-size: 44px;
}

.ts-article-header p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--ts-muted);
  font-size: 17px;
}

.ts-managed-content {
  color: #334155;
}

.ts-managed-content > *:first-child {
  margin-top: 0;
}

.ts-managed-content h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

.ts-managed-content h3 {
  margin-top: 28px;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.35;
}

.ts-managed-content p,
.ts-managed-content li {
  font-size: 16px;
  line-height: 1.95;
}

.ts-managed-content p {
  margin: 12px 0;
}

.ts-managed-content ul {
  padding-left: 1.2em;
}

.ts-managed-content .ts-card-grid,
.ts-managed-content .ts-course-grid,
.ts-managed-content .ts-voice-grid {
  margin: 22px 0 34px;
}

.ts-course-card {
  display: grid;
  gap: 12px;
}

.ts-course-card .ts-price {
  color: var(--ts-blue);
  font-size: 22px;
  font-weight: 900;
}

.ts-article-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ts-article-card a {
  display: grid;
  min-height: 100%;
  overflow: hidden;
}

.ts-article-card-thumb {
  display: grid;
  place-items: center;
  min-height: 132px;
  color: var(--ts-white);
  background: #1e3a8a;
}

.ts-article-card-thumb span {
  font-family: Consolas, "Courier New", monospace;
  font-size: 34px;
  font-weight: 900;
}

.ts-article-card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.ts-article-card-body strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.45;
}

.ts-article-card-body > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ts-muted);
  font-size: 14px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ts-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.ts-column-main {
  min-width: 0;
}

.ts-guide-intro,
.ts-article .ts-managed-content {
  padding: 28px;
  background: var(--ts-white);
  border: 1px solid var(--ts-line);
  border-radius: 8px;
}

.ts-column-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.ts-sidebox {
  padding: 18px;
}

.ts-sidebox-title {
  margin: 0 0 12px;
  color: #0f172a;
  font-weight: 900;
}

.ts-sidebox ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ts-sidebox a:not(.ts-button) {
  display: block;
  padding: 10px 12px;
  color: #334155;
  background: #f8fbff;
  border: 1px solid var(--ts-line);
  border-radius: 8px;
  font-weight: 800;
}

.ts-sidebox a.is-current {
  color: var(--ts-white);
  background: var(--ts-blue);
  border-color: var(--ts-blue);
}

.ts-sidebox--cta p:not(.ts-sidebox-title) {
  color: var(--ts-muted);
  font-size: 14px;
}

.ts-article-hero {
  margin: 0 0 18px;
}

.ts-article-hero img,
.ts-code-hero {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.ts-code-hero {
  padding: 34px;
  color: #bfdbfe;
  background: #0f172a;
  border: 1px solid #233558;
}

.ts-code-hero span,
.ts-code-hero strong {
  display: block;
  font-family: Consolas, "Courier New", monospace;
}

.ts-code-hero strong {
  margin: 12px 0;
  color: var(--ts-white);
  font-size: 30px;
  line-height: 1.35;
}

.ts-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.ts-contact-note,
.ts-contact-box {
  padding: 26px;
}

.ts-contact-note ul {
  margin: 18px 0 0;
  padding-left: 1.2em;
  color: #334155;
}

.ts-contact-box input,
.ts-contact-box textarea,
.ts-contact-box select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ts-ink);
  background: var(--ts-white);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.ts-contact-box textarea {
  min-height: 150px;
}

.ts-contact-box input[type="submit"],
.ts-contact-box button[type="submit"] {
  width: auto;
  min-width: 180px;
  color: var(--ts-white);
  background: var(--ts-blue);
  border-color: var(--ts-blue);
  font-weight: 900;
  cursor: pointer;
}

.pw-article-toc {
  margin: 24px 0;
  padding: 18px;
  background: var(--ts-blue-soft);
  border: 1px solid var(--ts-line);
  border-radius: 8px;
}

.pw-article-toc-title {
  margin: 0 0 10px;
  color: var(--ts-blue-dark);
  font-weight: 900;
}

.pw-article-toc ol,
.pw-article-toc ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
}

.pw-article-toc a {
  color: #334155;
  font-weight: 800;
}

.pw-start-speech {
  --pw-speech-bg: #eff6ff;
  --pw-speech-border: #bfdbfe;
  --pw-speech-text: #1e3a8a;

  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-areas: "person bubble";
  gap: 10px;
  align-items: start;
  margin: 18px 0;
}

.pw-start-speech--reverse {
  grid-template-columns: minmax(0, 1fr) 64px;
  grid-template-areas: "bubble person";
}

.pw-start-speech-person {
  display: grid;
  grid-area: person;
  gap: 6px;
  justify-items: center;
  min-width: 0;
}

.pw-start-speech-icon {
  display: block;
  overflow: hidden;
  width: 64px;
  aspect-ratio: 1 / 1;
  background: var(--ts-blue-soft);
  border-radius: 8px;
}

.pw-start-speech-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pw-start-speech-name {
  display: block;
  max-width: 64px;
  color: var(--ts-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
}

.pw-start-speech-bubble {
  position: relative;
  grid-area: bubble;
  min-height: 64px;
  padding: 14px 16px;
  background: var(--pw-speech-bg);
  border: 1px solid var(--pw-speech-border);
  border-radius: 8px;
}

.pw-start-speech-bubble::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -9px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-right: 9px solid var(--pw-speech-bg);
  border-bottom: 8px solid transparent;
}

.pw-start-speech--reverse .pw-start-speech-bubble::before {
  right: -9px;
  left: auto;
  border-right: 0;
  border-left: 9px solid var(--pw-speech-bg);
}

.pw-start-speech-bubble p {
  margin: 0;
  color: var(--pw-speech-text);
  font-size: 15px;
  font-weight: 800;
}

.ts-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  max-width: 1180px;
  margin: 32px auto 72px;
  padding: 34px;
  color: var(--ts-white);
  background: var(--ts-blue-dark);
  border-radius: 8px;
}

.ts-cta .ts-label,
.ts-cta h2,
.ts-cta p {
  color: var(--ts-white);
}

.ts-cta p {
  max-width: 720px;
  margin: 12px 0 0;
}

.ts-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ts-footer {
  background: #0f172a;
  color: #cbd5e1;
}

.ts-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px;
}

.ts-logo--footer {
  color: var(--ts-white);
}

.ts-footer-brand p {
  margin: 12px 0 0;
  font-size: 13px;
}

.ts-footer-list {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ts-footer-list a {
  color: #e2e8f0;
  font-size: 14px;
}

@media (max-width: 980px) {
  .ts-hero,
  .ts-contact-layout,
  .ts-column-layout,
  .ts-cta {
    grid-template-columns: 1fr;
  }

  .ts-column-sidebar {
    position: static;
  }

  .ts-stat-grid,
  .ts-card-grid,
  .ts-course-grid,
  .ts-voice-grid,
  .ts-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .ts-header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .ts-menu-toggle {
    display: inline-grid;
  }

  .ts-header-menu {
    position: absolute;
    top: 64px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 18px;
    background: var(--ts-white);
    border: 1px solid var(--ts-line);
    border-radius: 8px;
    box-shadow: var(--ts-shadow);
  }

  .ts-header.is-menu-open .ts-header-menu {
    display: grid;
    gap: 16px;
  }

  .ts-nav-list {
    display: grid;
    gap: 8px;
  }

  .ts-nav-list a {
    min-height: 44px;
    padding: 0 10px;
    background: var(--ts-blue-soft);
    border-radius: 8px;
  }

  .ts-header-actions,
  .ts-header-cta {
    width: 100%;
  }

  .ts-hero {
    min-height: 0;
    padding: 42px 16px 32px;
  }

  .ts-hero-copy h1,
  .ts-page-header h1,
  .ts-article-header h1 {
    font-size: 34px;
  }

  .ts-section,
  .ts-page {
    padding: 42px 16px;
  }

  .ts-page-header,
  .ts-article-header {
    padding: 42px 16px 20px;
  }

  .ts-section-heading {
    display: grid;
    align-items: start;
  }

  .ts-section-heading h2,
  .ts-managed-content h2,
  .ts-contact-note h2,
  .ts-cta h2 {
    font-size: 28px;
  }

  .ts-contact-layout {
    padding: 0 16px 42px;
  }

  .ts-cta {
    margin: 24px 16px 44px;
    padding: 24px;
  }

  .ts-footer-inner {
    display: grid;
    padding: 28px 16px;
  }

  .ts-footer-list {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .ts-logo {
    font-size: 18px;
  }

  .ts-logo-mark {
    width: 36px;
    height: 36px;
  }

  .ts-hero-visual {
    padding: 18px;
  }

  .ts-code-window {
    min-height: 240px;
    padding: 16px;
  }

  .ts-code-window code {
    font-size: 14px;
  }

  .ts-progress-card {
    position: static;
    width: auto;
    margin-top: 14px;
  }

  .ts-stat-grid,
  .ts-card-grid,
  .ts-course-grid,
  .ts-voice-grid,
  .ts-article-grid {
    grid-template-columns: 1fr;
  }

  .ts-guide-intro,
  .ts-article .ts-managed-content,
  .ts-contact-note,
  .ts-contact-box {
    padding: 20px;
  }
}
