body.w2c-page {
  background: #f6f7fb !important;
  overflow-x: hidden;
}

body.w2c-page .container,
body.w2c-page .main {
  background: #f6f7fb;
}

body.w2c-page .main {
  min-width: 0;
  padding: 12px;
}

.w2c.content-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 64px clamp(16px, 2.3vw, 32px) 28px;
  color: #111827;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.w2c button,
.w2c input,
.w2c select,
.w2c textarea {
  font: inherit;
}

.w2c-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 18px;
  align-items: end;
  padding: 8px 0 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.w2c-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.w2c h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.1rem, 4vw, 3.45rem);
  line-height: 1;
  letter-spacing: 0;
}

.w2c-lead {
  max-width: 780px;
  margin: 0;
  color: #5b6475;
  font-size: 1rem;
  line-height: 1.65;
}

.w2c-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.w2c-stat {
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}

.w2c-stat strong {
  display: block;
  color: #111827;
  font-size: 1.3rem;
  line-height: 1;
}

.w2c-stat span {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
}

.w2c-shell {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.w2c-panel,
.w2c-topics {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
}

.w2c-topics {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow: auto;
}

.w2c-panel-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.w2c-panel-head h2,
.w2c-panel-head h3,
.w2c-topic-head h2 {
  margin: 0;
  line-height: 1.25;
}

.w2c-panel-head h2,
.w2c-panel-head h3 {
  font-size: 1rem;
}

.w2c-panel-head p,
.w2c-topic-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.w2c-topic-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.w2c-topic-btn {
  width: 100%;
  min-height: 82px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.w2c-topic-btn:hover,
.w2c-topic-btn.is-active {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.w2c-topic-btn.is-active {
  background: #ecfdf5;
}

.w2c-topic-btn strong,
.w2c-topic-btn span {
  display: block;
}

.w2c-topic-btn strong {
  font-size: 0.92rem;
  line-height: 1.3;
}

.w2c-topic-btn span {
  margin-top: 5px;
  color: #64748b;
  font-size: 0.8rem;
}

.w2c-workspace {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.w2c-topic-head {
  padding: 16px;
}

.w2c-topic-head h2 {
  margin-top: 5px;
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
}

.w2c-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 240px) minmax(220px, 300px);
  gap: 10px;
}

.w2c-search,
.w2c-select,
.w2c-segment,
.w2c-btn,
.w2c-gap-select {
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: #fff;
  color: #111827;
}

.w2c-search,
.w2c-select,
.w2c-gap-select {
  width: 100%;
  padding: 0 12px;
}

.w2c-segments,
.w2c-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.w2c-segment,
.w2c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  font-weight: 820;
  cursor: pointer;
}

.w2c-segment.is-active,
.w2c-btn.is-primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.w2c-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px;
  padding: 14px;
}

.w2c-card,
.w2c-question,
.w2c-writing-drill {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
}

.w2c-card {
  min-height: 216px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.w2c-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.w2c-source {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.w2c-source.is-expanded {
  background: #ecfdf5;
  color: #0f766e;
}

.w2c-card h3,
.w2c-question h4 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.w2c-card p,
.w2c-question p,
.w2c-writing-drill p {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.55;
}

.w2c-card .w2c-uz {
  color: #0f766e;
  font-weight: 750;
}

.w2c-card .w2c-example {
  padding-top: 10px;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

.w2c-hidden {
  display: none !important;
}

.w2c-test-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.w2c-test-score {
  min-height: 42px;
  display: none;
  align-items: center;
  margin: 14px 14px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 850;
}

.w2c-test-score.is-visible {
  display: flex;
}

.w2c-test-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.w2c-question {
  padding: 14px;
}

.w2c-question h4 {
  margin-bottom: 10px;
}

.w2c-options {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.w2c-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
}

.w2c-option input {
  margin-top: 3px;
}

.w2c-question.is-correct {
  border-color: rgba(15, 118, 110, 0.42);
  background: #f0fdfa;
}

.w2c-question.is-wrong {
  border-color: rgba(185, 28, 28, 0.34);
  background: #fff7f7;
}

.w2c-answer-note {
  margin-top: 10px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 750;
}

.w2c-writing-drill {
  margin: 0 14px 14px;
  padding: 14px;
}

.w2c-drill-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.w2c-drill-terms span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 850;
}

.w2c-writing-drill textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
}

@media (max-width: 980px) {
  .w2c-hero,
  .w2c-shell,
  .w2c-toolbar {
    grid-template-columns: 1fr;
  }

  .w2c-topics {
    position: static;
    max-height: none;
    overflow: hidden;
  }

  .w2c-topic-list {
    display: flex;
    overflow-x: auto;
    grid-template-columns: none;
    scroll-snap-type: x proximity;
  }

  .w2c-topic-btn {
    flex: 0 0 min(78vw, 280px);
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  body.w2c-page .main {
    padding: 8px;
  }

  .w2c.content-section {
    padding: 58px 12px 22px;
  }

  .w2c-stats,
  .w2c-list {
    grid-template-columns: 1fr;
  }

  .w2c-card {
    min-height: auto;
  }

  .w2c-segments .w2c-segment,
  .w2c-actions .w2c-btn {
    flex: 1 1 calc(50% - 8px);
  }
}
