/*
 * Chintai Article Editor Blocks Plus r1 — public rendering layer.
 * Additive to Article Public UI Polish r2 / Reading Rhythm r3.
 */

.article-block--callout,
.article-block--table,
.article-block--cta,
.article-block--property_spotlight,
.article-block--faq,
.article-block--video_embed {
  max-width: var(--article-feature, 900px);
}

.article-block--property_spotlight,
.article-block--table.article-block--layout-wide,
.article-block--video_embed {
  max-width: var(--article-wide, 1080px);
}

.article-block--table.article-block--layout-full {
  max-width: var(--article-full, 1180px);
}

/* Callout ------------------------------------------------------------- */
.article-callout {
  --callout-accent: #0f766e;
  --callout-bg: #f2faf8;
  --callout-border: rgba(15, 118, 110, 0.22);
  align-items: flex-start;
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: 18px;
  display: grid;
  gap: 14px;
  grid-template-columns: 30px minmax(0, 1fr);
  margin: 34px 0;
  padding: 20px 22px;
}

.article-callout--tip {
  --callout-accent: #15803d;
  --callout-bg: #f2fbf5;
  --callout-border: rgba(21, 128, 61, 0.2);
}

.article-callout--warning {
  --callout-accent: #b45309;
  --callout-bg: #fff9ed;
  --callout-border: rgba(180, 83, 9, 0.2);
}

.article-callout--important {
  --callout-accent: #7c3aed;
  --callout-bg: #faf7ff;
  --callout-border: rgba(124, 58, 237, 0.18);
}

.article-callout__icon {
  align-items: center;
  background: #fff;
  border: 1px solid var(--callout-border);
  border-radius: 999px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  position: relative;
  width: 30px;
}

.article-callout__icon::before {
  background: var(--callout-accent);
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.article-callout__content {
  min-width: 0;
}

.article-callout__title {
  color: var(--article-heading, #0f172a);
  display: block;
  font-family: var(--font-display, "Manrope", "Inter", sans-serif);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin: 2px 0 5px;
}

.article-callout p {
  color: var(--article-text, #344054);
  font-size: 15.5px;
  line-height: 1.65;
  margin: 0;
}

/* Structured table ---------------------------------------------------- */
.article-data-table {
  margin: 42px 0;
}

.article-data-table__scroll {
  background: #fff;
  border: 1px solid var(--article-border, rgba(15, 23, 42, 0.1));
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.045);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.article-data-table__scroll:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 3px;
}

.article-data-table table {
  border-collapse: collapse;
  min-width: 620px;
  table-layout: auto;
  width: 100%;
}

.article-data-table th,
.article-data-table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.075);
  padding: 15px 17px;
  text-align: left;
  vertical-align: top;
}

.article-data-table th {
  background: #f6faf8;
  color: #1e3d39;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.4;
  text-transform: uppercase;
}

.article-data-table td {
  color: var(--article-text, #344054);
  font-size: 15px;
  line-height: 1.58;
}

.article-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.article-data-table tbody tr:hover td {
  background: #fbfdfc;
}

.article-data-table figcaption,
.article-video-embed figcaption {
  color: var(--article-muted, #66758a);
  font-size: 12.5px;
  line-height: 1.55;
  margin-top: 10px;
  text-align: center;
}

/* CTA ----------------------------------------------------------------- */
.article-cta {
  align-items: center;
  background:
    radial-gradient(circle at 92% 14%, rgba(91, 219, 190, 0.19), transparent 34%),
    linear-gradient(135deg, #0b2825 0%, #123e39 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(12, 47, 43, 0.16);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 48px 0;
  overflow: hidden;
  padding: 28px 30px;
}

.article-cta__copy {
  min-width: 0;
}

.article-cta__eyebrow {
  color: #93e3d2;
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.article-cta h2 {
  color: #fff !important;
  font-family: var(--font-display, "Manrope", "Inter", sans-serif);
  font-size: clamp(23px, 2.4vw, 30px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0;
  max-width: 24ch;
}

.article-cta p {
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 14.5px;
  line-height: 1.65;
  margin: 11px 0 0;
  max-width: 62ch;
}

.article-cta__actions {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
  min-width: 190px;
}

.article-cta__button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.article-cta__button:hover {
  transform: translateY(-1px);
}

.article-cta__button--primary {
  background: #fff;
  color: #0c3732;
}

.article-cta__button--secondary {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.article-cta__button--secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.38);
}

.article-cta__button:focus-visible {
  outline: 3px solid rgba(147, 227, 210, 0.52);
  outline-offset: 3px;
}

/* Property Spotlight -------------------------------------------------- */
.article-property-spotlight {
  background: linear-gradient(180deg, #f6faf8 0%, #fff 100%);
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 24px;
  margin: 48px 0;
  padding: 26px;
}

.article-property-spotlight__head {
  margin-bottom: 18px;
}

.article-property-spotlight__head h2 {
  color: var(--article-heading, #0f172a);
  font-family: var(--font-display, "Manrope", "Inter", sans-serif);
  font-size: clamp(24px, 2.6vw, 31px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.18;
  margin: 5px 0 0;
}

.article-property-grid--spotlight {
  margin-top: 0;
}

.article-property-card__placeholder {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(15, 23, 42, 0.04)),
    #eef4f2;
  height: 100%;
  min-height: 160px;
  width: 100%;
}

.article-property-spotlight--featured .article-property-grid--spotlight {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* FAQ ----------------------------------------------------------------- */
.article-faq {
  margin: 52px 0;
}

.article-faq > h2 {
  color: var(--article-heading, #0f172a);
  font-family: var(--font-display, "Manrope", "Inter", sans-serif);
  font-size: clamp(27px, 3vw, 34px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.18;
  margin: 0 0 20px;
}

.article-faq__items {
  border-bottom: 1px solid var(--article-border, rgba(15, 23, 42, 0.1));
  border-top: 1px solid var(--article-border, rgba(15, 23, 42, 0.1));
}

.article-faq__item {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.article-faq__item:last-child {
  border-bottom: 0;
}

.article-faq__item summary {
  align-items: center;
  color: var(--article-heading, #0f172a);
  cursor: pointer;
  display: flex;
  font-family: var(--font-display, "Manrope", "Inter", sans-serif);
  font-size: 16px;
  font-weight: 700;
  gap: 18px;
  justify-content: space-between;
  line-height: 1.45;
  list-style: none;
  padding: 18px 2px;
}

.article-faq__item summary::-webkit-details-marker {
  display: none;
}

.article-faq__chevron {
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  color: var(--article-accent, #0f766e);
  display: inline-flex;
  flex: 0 0 28px;
  font-family: Inter, sans-serif;
  font-size: 18px;
  font-weight: 500;
  height: 28px;
  justify-content: center;
  transition: transform 180ms ease, background 180ms ease;
}

.article-faq__item[open] .article-faq__chevron {
  background: var(--article-accent-soft, #edf8f5);
  transform: rotate(45deg);
}

.article-faq__answer {
  max-width: 68ch;
  padding: 0 44px 18px 2px;
}

.article-faq__answer p {
  color: var(--article-text, #344054);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0;
}

/* Video --------------------------------------------------------------- */
.article-video-embed {
  margin: 44px 0;
}

.article-video-embed__frame {
  aspect-ratio: 16 / 9;
  background: #081412;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  position: relative;
}

.article-video-embed iframe {
  border: 0;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.article-block-preview-note {
  background: #fff8e8;
  border: 1px dashed rgba(180, 83, 9, 0.32);
  border-radius: 12px;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 14px;
}

@media (max-width: 820px) {
  .article-cta {
    grid-template-columns: 1fr;
  }

  .article-cta__actions {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 0;
  }

  .article-property-spotlight--featured .article-property-grid--spotlight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .article-block--callout,
  .article-block--table,
  .article-block--cta,
  .article-block--property_spotlight,
  .article-block--faq,
  .article-block--video_embed {
    max-width: none;
  }

  .article-callout {
    border-radius: 16px;
    grid-template-columns: 24px minmax(0, 1fr);
    margin: 28px 0;
    padding: 17px;
  }

  .article-callout__icon {
    height: 24px;
    width: 24px;
  }

  .article-data-table {
    margin: 34px 0;
  }

  .article-data-table__scroll {
    border-radius: 14px;
    margin-left: -4px;
    margin-right: -4px;
  }

  .article-data-table table {
    min-width: 560px;
  }

  .article-data-table th,
  .article-data-table td {
    padding: 12px 13px;
  }

  .article-cta {
    border-radius: 20px;
    margin: 38px 0;
    padding: 22px;
  }

  .article-cta__actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .article-cta__button {
    width: 100%;
  }

  .article-property-spotlight {
    border-radius: 20px;
    margin: 38px 0;
    padding: 18px;
  }

  .article-property-spotlight--featured .article-property-grid--spotlight {
    grid-template-columns: 1fr;
  }

  .article-faq {
    margin: 42px 0;
  }

  .article-faq__item summary {
    font-size: 15px;
    padding: 16px 0;
  }

  .article-faq__answer {
    padding-right: 0;
  }

  .article-video-embed {
    margin: 36px 0;
  }

  .article-video-embed__frame {
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-cta__button,
  .article-faq__chevron {
    transition: none;
  }
}
