/* R18: sales hierarchy and mobile content pacing. */

.hero-copy h1 {
  max-width: 760px;
}

.hero-copy > p {
  max-width: 670px;
}

.field textarea {
  width: 100%;
  min-height: 112px;
  padding: 13px 14px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(46,107,255,.1);
}

.field textarea::placeholder {
  color: var(--muted);
  opacity: .8;
}

.case-evidence-note {
  display: block;
  margin-top: 13px;
  color: #9ca9ba;
  font-size: 10px;
  line-height: 1.5;
}

.module-tabs button[aria-selected="true"] {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
              0 14px 28px color-mix(in srgb, var(--accent) 8%, transparent);
}

.module-panel .module-copy > p {
  max-width: 60ch;
}

.module-flow li {
  transition: background-color 180ms ease, border-color 180ms ease;
}

.module-flow li:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, rgba(255,255,255,.1));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.panel-proof-grid {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255,122,82,.2);
  border-radius: 11px;
  overflow: hidden;
  background: rgba(6,12,20,.38);
}

.panel-proof-grid > span {
  min-width: 0;
  padding: 11px 8px 10px;
  display: grid;
  gap: 4px;
  border-right: 1px solid rgba(255,122,82,.15);
}

.panel-proof-grid > span:last-child {
  border-right: 0;
}

.panel-proof-grid b {
  color: #ff8d6b;
  font: 720 20px/1 var(--display);
  letter-spacing: -.035em;
}

.panel-proof-grid small {
  color: #bdc7d4;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.25;
}

.panel-capability-stage {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0a1119;
}

.panel-capability-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a1119;
}

.extension-summary__toggle {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--extension-color) 38%, rgba(255,255,255,.18));
  border-radius: 12px;
  background: color-mix(in srgb, var(--extension-color) 11%, #101925);
  color: #edf3fc;
  font: 750 12px/1.2 var(--body);
  cursor: pointer;
}

.extension-summary__toggle::after {
  content: "+";
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--extension-color) 20%, rgba(255,255,255,.08));
  color: currentColor;
  font-size: 19px;
  line-height: 1;
  transition: transform 180ms ease;
}

.extension-summary.is-open .extension-summary__toggle::after {
  content: "−";
  transform: rotate(180deg);
}

.extension-summary__details {
  padding-top: 16px;
  display: grid;
  gap: 16px;
}

.extension-summary__details[hidden] {
  display: none;
}

.extension-summary__details .extension-example,
.extension-summary__details small {
  margin-top: 0;
}

:root[data-theme="light"] .extension-summary__toggle {
  border-color: color-mix(in srgb, var(--extension-color) 30%, #d7deea);
  background: color-mix(in srgb, var(--extension-color) 7%, #f7f9fc);
  color: #172235;
}

:root[data-theme="light"] .extension-summary__details > p {
  color: #52647c;
}

@media (min-width: 651px) {
  .extensions-overview.has-open .extension-summary.is-open {
    grid-column: 1 / -1;
    order: -1;
  }

  .extensions-overview.has-open .extension-summary.is-open .extension-summary__details {
    max-width: 760px;
  }
}

.team-only-visual,
#module-team .team-only-visual {
  height: auto;
  min-height: 720px;
  background:
    radial-gradient(circle at 30% 25%, rgba(46,107,255,.17), transparent 37%),
    linear-gradient(145deg, #0a111b, #111b29);
}

.team-only-visual .team-planner {
  display: none;
}

.team-product-showcase {
  width: 100%;
  min-height: 720px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(210px, 260px);
  align-items: stretch;
}

.team-product-stage {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 34px 24px;
  border-right: 1px solid rgba(255,255,255,.09);
}

.team-product-screen {
  width: min(330px, 78%);
  margin: 0;
  position: relative;
}

.team-product-screen[hidden] {
  display: none;
}

.team-product-screen img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0,0,0,.46), 0 0 0 8px rgba(255,255,255,.025);
}

.team-product-screen figcaption {
  width: calc(100% - 24px);
  margin: -26px auto 0;
  padding: 15px 16px;
  position: relative;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 13px;
  background: rgba(12,20,31,.93);
  color: #f7f9fc;
  box-shadow: 0 14px 32px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
}

.team-product-screen figcaption strong {
  font: 700 14px/1.2 var(--display);
}

.team-product-screen figcaption span {
  color: #aeb9c9;
  font-size: 11px;
  line-height: 1.45;
}

.team-product-control {
  padding: 34px 18px 24px;
  display: flex;
  flex-direction: column;
}

.team-product-control > span {
  color: #fa85ae;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.team-product-control h4 {
  margin: 10px 0 20px;
  color: #f7f9fc;
  font: 700 25px/1.02 var(--headline);
  letter-spacing: -.035em;
}

.team-product-tabs {
  display: grid;
  gap: 7px;
}

.team-product-tabs button {
  width: 100%;
  min-height: 66px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  color: #f7f9fc;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.team-product-tabs button:hover {
  transform: translateX(-2px);
  border-color: rgba(250,133,174,.35);
}

.team-product-tabs button[aria-selected="true"] {
  border-color: rgba(250,133,174,.48);
  background: rgba(250,133,174,.1);
}

.team-product-tabs button > i {
  color: #fa85ae;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.team-product-tabs button > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.team-product-tabs b {
  font-size: 12px;
  line-height: 1.15;
}

.team-product-tabs small {
  overflow: hidden;
  color: #9caabd;
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-product-control > p {
  margin: auto 0 0;
  padding-top: 18px;
  color: #718096;
  font-size: 9px;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(43px, 12.2vw, 56px);
    line-height: .96;
  }

  .hero-copy > p {
    max-width: 34ch;
  }

  .modules-section .section-heading h2 {
    max-width: 12ch;
  }

  .module-tabs button[aria-selected="true"] {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
  }

  .module-panel .module-copy > p {
    font-size: 15.5px;
    line-height: 1.65;
  }

  .panel-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-proof-grid > span:nth-child(2) {
    border-right: 0;
  }

  .panel-proof-grid > span:nth-child(-n+2) {
    border-bottom: 1px solid rgba(255,122,82,.15);
  }

  .panel-proof-grid b {
    font-size: 22px;
  }

  .panel-proof-grid small {
    font-size: 10px;
  }

  .extensions-overview {
    gap: 10px;
  }

  .extension-summary.is-collapsible {
    padding-bottom: 14px;
  }

  .extension-summary__toggle {
    margin-top: 16px;
  }

  .team-only-visual,
  #module-team .team-only-visual {
    height: auto;
    min-height: 0;
  }

  .team-product-showcase {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .team-product-control {
    padding: 20px 18px 18px;
    order: -1;
  }

  .team-product-control h4 {
    max-width: 12ch;
    margin-bottom: 15px;
    font-size: 24px;
  }

  .team-product-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-product-tabs button {
    min-height: 58px;
    grid-template-columns: 22px 1fr;
    gap: 6px;
    padding: 8px;
  }

  .team-product-tabs button:last-child {
    grid-column: 1 / -1;
  }

  .team-product-tabs button:hover {
    transform: none;
  }

  .team-product-control > p {
    margin-top: 14px;
  }

  .team-product-stage {
    padding: 24px 16px 34px;
    border-top: 1px solid rgba(255,255,255,.09);
    border-right: 0;
  }

  .team-product-screen {
    width: min(292px, 88%);
  }
}

@media (hover: none) {
  .module-flow li:hover {
    border-color: inherit;
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-flow li,
  .extension-summary__toggle::after,
  .team-product-tabs button {
    transition: none;
  }
}

/* R18 readability and attraction audit: stronger hierarchy without inflating mock UI. */
.hero-cta-note {
  font-size: 12px;
}

.section-kicker {
  font-size: 11.5px;
  line-height: 1.45;
}

.module-tabs small {
  color: #b8c3d1;
  font-size: 12px;
}

.module-tabs button:last-child {
  grid-column: span 2;
}

.extensions-overview {
  align-items: start;
}

.extension-summary {
  align-self: start;
}

.contact-promise p,
.form-card__top p {
  font-size: 12px;
  line-height: 1.6;
}

.form-action p {
  font-size: 12px;
  line-height: 1.6;
}

.footer-nav a {
  min-height: 44px;
}

.taxonomy-summary p,
.preview-form-note {
  font-size: 11px;
}

@media (min-width: 701px) {
  .module-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .hero-cta-note {
    font-size: 12px;
    line-height: 1.55;
  }

  .section-kicker {
    font-size: 11px;
  }

  .module-tabs small {
    font-size: 12px;
    line-height: 1.4;
  }

  .login-proof__copy > p {
    font-size: 12px;
    line-height: 1.55;
  }

  .contact-mail strong {
    font-size: 17px;
    overflow-wrap: anywhere;
  }
}

/* R18 deep audit — round 1: clearer hierarchy, compact proof and legible UI labels. */
.event-card small {
  font-size: 11px;
}

.stage-note {
  font-size: 11.5px;
}

.map-source small,
.map-result small {
  font-size: 11.5px;
  line-height: 1.35;
}

.kasa-config-copy > small {
  font-size: 12.5px;
  line-height: 1.55;
}

.panel-proof-grid small {
  font-size: 10px;
}

.implementation-assurance span {
  font-size: 12.5px;
}

.module-copy h3 {
  max-width: 520px;
}

@media (min-width: 941px) {
  .modules-section {
    padding-top: 108px;
  }

  .modules-section .section-heading {
    margin-bottom: 42px;
  }

  .login-proof {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
    padding-block: 26px;
  }

  .faq-layout {
    gap: 82px;
  }

  .footer-nav__column:nth-child(2) .footer-nav__group:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }

  .footer-nav__column:nth-child(2) .footer-nav__group:first-child > span {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1180px) {
  .module-tabs {
    gap: 10px;
    padding: 10px;
  }

  .module-tabs button {
    min-height: 92px;
  }
}

@media (max-width: 700px) {
  .map-source small,
  .map-result small {
    font-size: 11px;
  }

  .kasa-config-copy > small {
    font-size: 12px;
  }

  .signal-source {
    min-height: 68px;
    padding: 12px;
  }

  .signal-metrics p {
    padding-block: 12px 14px;
  }
}

/* R18 deep audit — round 2: balanced media, product scan and purchase path. */
.product-taxonomy--compact {
  margin-bottom: 12px;
}

.taxonomy-tools p {
  font-size: 11.5px;
}

.case-card--kukucorn > .module-link {
  margin-top: 24px;
}

.proof-heading > p {
  max-width: 520px;
  color: #b0bac8;
  font-size: 17px;
}

.implementation-assurance span {
  font-weight: 650;
}

.faq-heading h2 {
  max-width: 430px;
  font-size: clamp(48px, 4vw, 60px);
}

@media (min-width: 941px) {
  #module-commerce {
    align-items: center;
  }

  #module-commerce .kasa-config-visual {
    min-height: 0;
    align-self: center;
  }

  #module-commerce .panel-capability-stage {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  #module-commerce .panel-capability-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

@media (min-width: 701px) and (max-width: 940px) {
  .modules-section .section-heading {
    margin-bottom: 40px;
  }

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

  .module-tabs button {
    min-height: 96px;
  }
}

@media (max-width: 430px) {
  #module-commerce .kasa-config-visual {
    height: auto;
    min-height: 0;
  }

  #module-commerce .kasa-config-head {
    min-height: 58px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 13px;
  }

  #module-commerce .kasa-config-head strong {
    white-space: normal;
    font-size: 9px;
  }

  #module-commerce .panel-capability-stage {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  #module-commerce .panel-capability-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #module-commerce .kasa-config-features {
    min-height: 94px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #module-commerce .kasa-config-features span {
    min-height: 47px;
    padding: 8px 5px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 7px;
    font-size: 8px;
    line-height: 1.25;
    text-align: left;
  }

  #module-commerce .kasa-config-features span:nth-child(2) {
    border-right: 0;
  }

  #module-commerce .kasa-config-features span:nth-child(-n+2) {
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  #module-commerce .kasa-config-features i {
    flex: 0 0 auto;
    font-size: 7px;
  }

  #module-commerce .kasa-config-visual figcaption {
    min-height: 58px;
    flex: none;
  }

  .footer-nav__column {
    display: contents;
  }

  .footer-nav__column:last-child .footer-nav__group:last-child {
    grid-column: 1 / -1;
  }
}
