/**
 * Type scale for this page is deliberately limited to three steps:
 *   --itmk-fz-title  panel and section titles only
 *   --itmk-fz-base   body copy, list items, disclosure summaries, form inputs
 *   --itmk-fz-sm     labels, meta, captions, secondary buttons, fine print
 * Hierarchy beyond that comes from weight and color, not from new sizes.
 */
.itmk-market-withdrawal-page {
  --itmk-fz-title: 17px;
  /* 13px matches the body copy on the other legal pages (terms-page.css). */
  --itmk-fz-base: 13px;
  --itmk-fz-sm: 12px;

  color: #111a24;
  min-width: 0;
}

/* ---------------------------------------------------------------- Intro */

.itmk-withdrawal-intro {
  padding: 18px 0 4px;
}

.itmk-withdrawal-intro > p {
  color: #26384b;
  font-size: var(--itmk-fz-base);
  line-height: 1.58;
  margin: 0;
}

.itmk-withdrawal-facts {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.itmk-withdrawal-facts li {
  background: #f4f7fa;
  border: 1px solid #e2e9f0;
  border-radius: 11px;
  padding: 9px 12px;
}

.itmk-withdrawal-facts strong {
  color: #142131;
  display: block;
  font-size: var(--itmk-fz-base);
  font-weight: 850;
  line-height: 1.25;
}

.itmk-withdrawal-facts span {
  color: #66788b;
  display: block;
  font-size: var(--itmk-fz-sm);
  line-height: 1.4;
  margin-top: 2px;
}

.itmk-withdrawal-tab-icon {
  align-items: center;
  background: #dce8f2;
  border-radius: 10px;
  color: #315a85;
  display: flex;
  flex: 0 0 36px;
  font-size: var(--itmk-fz-title);
  height: 36px;
  justify-content: center;
}

.itmk-withdrawal-content p,
.itmk-withdrawal-content li {
  color: #26384b;
  font-size: var(--itmk-fz-base);
  line-height: 1.58;
}

/* ------------------------------------------------------- Form tab switch */

.itmk-withdrawal-forms {
  margin-bottom: 22px;
  margin-top: 34px;
  scroll-margin-top: 85px;
}

.itmk-withdrawal-forms-head h2 {
  color: #142131;
  font-size: var(--itmk-fz-title);
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 3px;
}

.itmk-withdrawal-forms-head p {
  color: #718092;
  font-size: var(--itmk-fz-sm);
  margin: 0 0 12px;
}

.itmk-withdrawal-tablist {
  display: grid;
  gap: 10px;
}

.itmk-withdrawal-tab {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe3ea;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  font-size: var(--itmk-fz-base);
  gap: 11px;
  padding: 13px 14px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  width: 100%;
}

.itmk-withdrawal-tab:hover {
  border-color: #b9c6d4;
}

.itmk-withdrawal-tab:focus-visible {
  box-shadow: 0 0 0 3px rgba(77, 103, 134, 0.2);
  outline: 0;
}

.itmk-withdrawal-tab-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.itmk-withdrawal-tab-copy strong {
  color: #142131;
  display: block;
  font-size: var(--itmk-fz-base);
  font-weight: 850;
  line-height: 1.3;
}

.itmk-withdrawal-tab-copy small {
  color: #718092;
  display: block;
  font-size: var(--itmk-fz-sm);
  line-height: 1.42;
  margin-top: 2px;
}

.itmk-withdrawal-tab-caret {
  color: #8a99a9;
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

.itmk-withdrawal-tab.is-active {
  border-color: #e62d3a;
  box-shadow: 0 6px 18px rgba(230, 45, 58, 0.12);
}

.itmk-withdrawal-tab.is-active .itmk-withdrawal-tab-icon {
  background: #fde5e7;
  color: #c91f2b;
}

.itmk-withdrawal-tab.is-active .itmk-withdrawal-tab-caret {
  color: #c91f2b;
  transform: rotate(180deg);
}

.itmk-withdrawal-panel {
  background: #fff;
  border: 1px solid #cad8e5;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(17, 26, 36, 0.07);
  margin-top: 12px;
  padding: 18px;
}

.itmk-withdrawal-panel[hidden] {
  display: none;
}

.itmk-withdrawal-panel-head {
  border-bottom: 1px solid #e2e8ee;
  padding-bottom: 13px;
}

.itmk-withdrawal-panel-head h3 {
  color: #142131;
  font-size: var(--itmk-fz-title);
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 4px;
}

.itmk-withdrawal-panel-head p {
  color: #718092;
  font-size: var(--itmk-fz-sm);
  margin: 0;
}

.itmk-withdrawal-form-eyebrow {
  color: #e62d3a;
  display: block;
  font-size: var(--itmk-fz-sm);
  font-weight: 850;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

/* -------------------------------------------------------- Detail content */

.itmk-withdrawal-content {
  display: grid;
  gap: 10px;
}

.itmk-withdrawal-content-title {
  color: #142131;
  font-size: var(--itmk-fz-title);
  font-weight: 850;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
}

.itmk-withdrawal-accordion,
.itmk-withdrawal-footer-info {
  background: #fff;
  border: 1px solid #e0e6ec;
  border-radius: 14px;
}

.itmk-withdrawal-accordion {
  overflow: clip;
}

.itmk-withdrawal-accordion > summary {
  align-items: center;
  color: #142131;
  cursor: pointer;
  display: flex;
  font-size: var(--itmk-fz-base);
  font-weight: 850;
  gap: 12px;
  justify-content: space-between;
  line-height: 1.35;
  list-style: none;
  padding: 14px 16px;
}

.itmk-withdrawal-accordion > summary::-webkit-details-marker {
  display: none;
}

.itmk-withdrawal-accordion > summary i {
  color: #66788b;
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

.itmk-withdrawal-accordion[open] > summary i {
  transform: rotate(180deg);
}

.itmk-withdrawal-accordion-body {
  border-top: 1px solid #e5eaf0;
  padding: 14px 16px 16px;
}

.itmk-withdrawal-accordion-body p {
  margin: 0 0 8px;
}

.itmk-withdrawal-accordion-body p:last-child {
  margin-bottom: 0;
}

.itmk-withdrawal-accordion-body ul {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 8px 0 10px;
  padding: 0;
}

/* Scoped to ul so the ordered step cards in section 2 keep their own layout. */
.itmk-withdrawal-accordion-body ul > li {
  padding-left: 18px;
  position: relative;
}

.itmk-withdrawal-accordion-body ul > li::before {
  background: #4d6786;
  border-radius: 50%;
  content: "";
  height: 6px;
  left: 1px;
  position: absolute;
  top: 0.63em;
  width: 6px;
}

.itmk-withdrawal-inline-action {
  margin: 12px 0 0 !important;
}

.itmk-withdrawal-ghost-action {
  background: #eef2f6;
  border: 1px solid #d7e0e9;
  border-radius: 9px;
  color: #274866;
  cursor: pointer;
  font-size: var(--itmk-fz-sm);
  font-weight: 800;
  min-height: 36px;
  padding: 8px 13px;
}

.itmk-withdrawal-ghost-action:hover {
  background: #e2e9f1;
}

.itmk-withdrawal-steps {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.itmk-withdrawal-steps li {
  align-items: flex-start;
  background: #f7f9fb;
  border: 1px solid #e4e9ee;
  border-radius: 11px;
  display: flex;
  gap: 9px;
  padding: 11px;
}

.itmk-withdrawal-steps li > span {
  align-items: center;
  background: #e7eef5;
  border-radius: 50%;
  color: #315a85;
  display: flex;
  flex: 0 0 24px;
  font-size: var(--itmk-fz-sm);
  font-weight: 850;
  height: 24px;
  justify-content: center;
}

.itmk-withdrawal-steps strong {
  color: #182b3f;
  display: block;
  font-size: var(--itmk-fz-base);
  margin-bottom: 2px;
}

.itmk-withdrawal-steps p {
  color: #607083;
  font-size: var(--itmk-fz-sm);
  line-height: 1.45;
  margin: 0;
}

.itmk-withdrawal-compact-copy {
  background: #f7f9fb;
  border: 1px solid #e4e9ee;
  border-radius: 11px;
  padding: 12px;
}

.itmk-withdrawal-compact-copy p {
  margin: 0 0 7px;
}

.itmk-withdrawal-compact-copy p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------- CF7 forms */

.itmk-withdrawal-cf7 {
  max-width: 880px;
}

.itmk-withdrawal-form-section {
  border-bottom: 1px solid #e6ebf0;
  padding: 14px 0;
}

.itmk-withdrawal-form-section:first-child {
  padding-top: 4px;
}

.itmk-withdrawal-form-section:last-of-type {
  border-bottom: 0;
}

.itmk-withdrawal-form-section h3 {
  align-items: center;
  color: #182b3f;
  display: flex;
  font-size: var(--itmk-fz-base);
  font-weight: 850;
  gap: 8px;
  margin: 0 0 10px;
}

.itmk-withdrawal-form-section h3 > span {
  align-items: center;
  background: #eef2f6;
  border-radius: 7px;
  color: #4d6786;
  display: flex;
  flex: 0 0 22px;
  font-size: var(--itmk-fz-sm);
  height: 22px;
  justify-content: center;
}

.itmk-withdrawal-field-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.itmk-withdrawal-field-grid > * {
  grid-column: span 12;
  min-width: 0;
}

/* Belt and braces against CF7 auto-formatting: a stray <br> or <p> must never
   become a grid item, or it pushes the real fields onto rows of their own. */
.itmk-withdrawal-field-grid > br {
  display: none;
}

.itmk-fld > p {
  margin: 0;
}

.itmk-withdrawal-cf7 label {
  color: #33475b;
  display: block;
  font-size: var(--itmk-fz-sm);
  font-weight: 750;
  line-height: 1.4;
}

.itmk-withdrawal-cf7 .wpcf7-form-control-wrap {
  display: block;
  margin-top: 5px;
}

.itmk-withdrawal-cf7 input:not([type="checkbox"]):not([type="submit"]),
.itmk-withdrawal-cf7 select,
.itmk-withdrawal-cf7 textarea {
  background: #fff;
  border: 1px solid #ccd6e0;
  border-radius: 9px;
  color: #111a24;
  font-size: var(--itmk-fz-base);
  line-height: 1.4;
  min-height: 40px;
  padding: 8px 11px;
  width: 100%;
}

.itmk-withdrawal-cf7 select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2366788b'%3E%3Cpath d='M8 11.2 3.4 6.6l1-1L8 9.2l3.6-3.6 1 1z'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 15px;
  padding-right: 32px;
}

/* Textarea height is pinned per field rather than left to the rows attribute or
   to the theme-wide `textarea { height: 7rem }` in main.css, so neither can
   stretch a field. Two classes deep to outrank that bare element selector. */
.itmk-withdrawal-cf7 textarea {
  min-height: 0;
  resize: vertical;
}

.itmk-withdrawal-cf7 .itmk-fld--rows1 textarea {
  height: 42px;
}

.itmk-withdrawal-cf7 .itmk-fld--rows2 textarea {
  height: 66px;
}

.itmk-withdrawal-cf7 .itmk-fld--rows3 textarea {
  height: 90px;
}

.itmk-withdrawal-cf7 input[readonly] {
  background: #f4f7fa;
  color: #526477;
  cursor: default;
}

.itmk-withdrawal-cf7 input:focus,
.itmk-withdrawal-cf7 select:focus,
.itmk-withdrawal-cf7 textarea:focus {
  border-color: #4d6786;
  box-shadow: 0 0 0 3px rgba(77, 103, 134, 0.14);
  outline: 0;
}

.itmk-withdrawal-statement {
  background: #f7f9fb;
  border-left: 3px solid #4d6786;
  color: #26384b;
  font-size: var(--itmk-fz-base);
  margin: 0 0 10px;
  max-width: 640px;
  padding: 9px 11px;
}

.itmk-withdrawal-form-note {
  color: #718092;
  font-size: var(--itmk-fz-sm);
  margin: 0;
}

.itmk-withdrawal-form-note {
  margin-top: 8px;
}

.itmk-withdrawal-confirmation .wpcf7-list-item {
  margin: 0;
}

.itmk-withdrawal-confirmation .wpcf7-list-item label {
  align-items: flex-start;
  display: flex;
  gap: 8px;
}

.itmk-withdrawal-confirmation input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 3px;
}

.itmk-withdrawal-submit {
  background: #e62d3a;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: var(--itmk-fz-base);
  font-weight: 850;
  margin-top: 14px;
  min-height: 44px;
  padding: 10px 18px;
  width: 100%;
}

.itmk-withdrawal-submit:hover {
  background: #c91f2b;
}

.itmk-withdrawal-cf7 .wpcf7-not-valid-tip {
  color: #b3202b;
  font-size: var(--itmk-fz-sm);
  margin-top: 4px;
}

.itmk-withdrawal-cf7 .wpcf7-response-output {
  border: 0 !important;
  border-radius: 10px;
  font-size: var(--itmk-fz-base);
  margin: 12px 0 0 !important;
  padding: 11px 13px !important;
}

.itmk-withdrawal-cf7 form.sent .wpcf7-response-output {
  background: #eaf6ec;
  color: #286437;
}

.itmk-withdrawal-cf7 form.invalid .wpcf7-response-output,
.itmk-withdrawal-cf7 form.failed .wpcf7-response-output {
  background: #fff0f1;
  color: #9e2730;
}

.itmk-withdrawal-email-alternative {
  color: #66788b;
  font-size: var(--itmk-fz-sm) !important;
  margin: 12px 0 0;
  text-align: center;
}

.itmk-withdrawal-email-alternative a,
.itmk-withdrawal-footer-info a {
  color: #315a85;
  font-weight: 750;
}

.itmk-withdrawal-form-unavailable {
  background: #fff0f1;
  border-radius: 10px;
  padding: 12px;
}

.itmk-withdrawal-form-unavailable p {
  color: #9e2730;
  margin: 0;
}

/* ----------------------------------------------------------- Page footer */

.itmk-withdrawal-footer-info {
  background: #f7f9fb;
  padding: 15px 16px;
}

.itmk-withdrawal-footer-info > p {
  font-size: var(--itmk-fz-sm) !important;
  margin: 0;
}

.itmk-withdrawal-footer-info nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
}

.itmk-withdrawal-footer-info nav a {
  font-size: var(--itmk-fz-sm);
}

.itmk-withdrawal-operator {
  border-top: 1px solid #dde4ea;
  display: grid;
  gap: 11px;
  margin-top: 12px;
  padding-top: 12px;
}

.itmk-withdrawal-operator strong {
  color: #182b3f;
  display: block;
  font-size: var(--itmk-fz-sm);
  margin-bottom: 3px;
}

.itmk-withdrawal-operator p {
  color: #66788b;
  font-size: var(--itmk-fz-sm);
  line-height: 1.55;
  margin: 0;
}

/* ------------------------------------------------------------ Breakpoints */

@media (min-width: 576px) {
  .itmk-withdrawal-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .itmk-withdrawal-submit {
    width: auto;
  }
}

@media (min-width: 720px) {
  /* Spans are written as `auto / span N` so --break can override only the
     start line and force a new row without collapsing the width. */
  .itmk-fld--sm {
    grid-column: auto / span 3;
  }

  .itmk-fld--md {
    grid-column: auto / span 4;
  }

  .itmk-fld--lg {
    grid-column: auto / span 6;
  }

  .itmk-fld--xl {
    grid-column: auto / span 8;
  }

  .itmk-fld--full {
    grid-column: auto / span 12;
  }

  .itmk-fld--break {
    grid-column-start: 1;
  }
}

@media (min-width: 768px) {
  .itmk-withdrawal-tablist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .itmk-withdrawal-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .itmk-withdrawal-operator {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .itmk-withdrawal-intro {
    padding-top: 22px;
  }

  .itmk-withdrawal-accordion-body,
  .itmk-withdrawal-panel,
  .itmk-withdrawal-footer-info {
    padding-left: 20px;
    padding-right: 20px;
  }

  .itmk-withdrawal-accordion > summary {
    padding: 15px 20px;
  }

  .itmk-withdrawal-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ----------------------------------------------------------- Dark theme */

[data-bs-theme="dark"] .itmk-market-withdrawal-page,
[data-bs-theme="dark"] .itmk-withdrawal-intro > p,
[data-bs-theme="dark"] .itmk-withdrawal-statement,
[data-bs-theme="dark"] .itmk-withdrawal-content p,
[data-bs-theme="dark"] .itmk-withdrawal-content li {
  color: #b5c0cb;
}

[data-bs-theme="dark"] .itmk-withdrawal-accordion,
[data-bs-theme="dark"] .itmk-withdrawal-tab,
[data-bs-theme="dark"] .itmk-withdrawal-panel,
[data-bs-theme="dark"] .itmk-withdrawal-footer-info {
  background: #191f26;
  border-color: #303a45;
}

[data-bs-theme="dark"] .itmk-withdrawal-facts li {
  background: #202a34;
  border-color: #354352;
}

[data-bs-theme="dark"] .itmk-withdrawal-facts strong,
[data-bs-theme="dark"] .itmk-withdrawal-accordion > summary,
[data-bs-theme="dark"] .itmk-withdrawal-content-title,
[data-bs-theme="dark"] .itmk-withdrawal-forms-head h2,
[data-bs-theme="dark"] .itmk-withdrawal-tab-copy strong,
[data-bs-theme="dark"] .itmk-withdrawal-panel-head h3,
[data-bs-theme="dark"] .itmk-withdrawal-form-section h3,
[data-bs-theme="dark"] .itmk-withdrawal-steps strong,
[data-bs-theme="dark"] .itmk-withdrawal-operator strong {
  color: #f2f5f7;
}

[data-bs-theme="dark"] .itmk-withdrawal-accordion-body,
[data-bs-theme="dark"] .itmk-withdrawal-panel-head,
[data-bs-theme="dark"] .itmk-withdrawal-form-section,
[data-bs-theme="dark"] .itmk-withdrawal-operator {
  border-color: #303a45;
}

[data-bs-theme="dark"] .itmk-withdrawal-steps li,
[data-bs-theme="dark"] .itmk-withdrawal-compact-copy,
[data-bs-theme="dark"] .itmk-withdrawal-statement,
[data-bs-theme="dark"] .itmk-withdrawal-ghost-action {
  background: #202832;
  border-color: #34404c;
}

[data-bs-theme="dark"] .itmk-withdrawal-ghost-action {
  color: #c4d9eb;
}

[data-bs-theme="dark"] .itmk-withdrawal-form-section h3 > span {
  background: #2a3744;
  color: #c4d9eb;
}

[data-bs-theme="dark"] .itmk-withdrawal-cf7 label {
  color: #c1cbd5;
}

[data-bs-theme="dark"] .itmk-withdrawal-cf7 input:not([type="checkbox"]):not([type="submit"]),
[data-bs-theme="dark"] .itmk-withdrawal-cf7 select,
[data-bs-theme="dark"] .itmk-withdrawal-cf7 textarea {
  background: #11171d;
  border-color: #3b4855;
  color: #f2f5f7;
}

[data-bs-theme="dark"] .itmk-withdrawal-cf7 input[readonly] {
  background: #1a222b;
  color: #9fb0c1;
}

@media (prefers-reduced-motion: reduce) {
  .itmk-withdrawal-accordion > summary i,
  .itmk-withdrawal-tab,
  .itmk-withdrawal-tab-caret {
    transition: none;
  }
}
