/* Automatic Optical Dew-Control System — page-specific layout.
   Loaded after assets/styles.css and intentionally reuses the shared MDNT
   tokens, typography, sections, actions, project proof, spec panel, contact,
   and footer. No parallel palette or interaction model is introduced. */

/* ---------- Hero ---------- */

.dew-hero {
  width: min(100% - var(--pad) * 2, var(--max));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 8vw, 100px);
}

.dew-breadcrumb {
  display: inline-block;
  margin: -12px -4px 16px;
  padding: 12px 4px;
  color: var(--mdnt-dim);
  font-size: 14px;
  font-weight: 700;
  transition: color 160ms ease;
}

.dew-breadcrumb:hover {
  color: var(--mdnt-text);
}

.dew-hero h1 {
  max-width: 900px;
  margin-bottom: 24px;
  color: var(--mdnt-text);
  font-size: clamp(2.75rem, 5.6vw, 4.6rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.01em;
}

.dew-hero .hero-lede {
  max-width: 760px;
  margin-bottom: 34px;
}

.dew-meta {
  display: grid;
  max-width: 980px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 34px;
  border-top: 1px solid var(--mdnt-border-strong);
  border-bottom: 1px solid var(--mdnt-border-strong);
}

.dew-meta div {
  min-height: 90px;
  padding: 18px 20px;
  border-right: 1px solid var(--mdnt-border);
}

.dew-meta div:last-child {
  border-right: 0;
}

.dew-meta dt,
.dew-meta dd {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: uppercase;
}

.dew-meta dt {
  margin-bottom: 9px;
  color: var(--mdnt-red);
}

.dew-meta dd {
  margin: 0;
  color: var(--mdnt-text-soft);
}

/* ---------- Architecture ---------- */

.dew-architecture {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--mdnt-border-strong);
  list-style: none;
}

.dew-architecture::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 1px;
  background: var(--mdnt-red-deep);
  content: "";
}

.dew-architecture li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(250px, 1.15fr) minmax(190px, 0.9fr);
  gap: 26px;
  align-items: center;
  min-height: 92px;
  padding: 20px 0 20px 34px;
  border-bottom: 1px solid var(--mdnt-border-strong);
}

.dew-architecture li::before {
  position: absolute;
  left: 2px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--mdnt-bg);
  border-radius: 50%;
  background: var(--mdnt-red);
  box-shadow: 0 0 0 1px var(--mdnt-red-deep);
  content: "";
}

.dew-architecture li > span,
.dew-architecture small {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

.dew-architecture li > span {
  color: var(--mdnt-red);
}

.dew-architecture strong {
  color: var(--mdnt-text);
  font-size: 18px;
  line-height: 1.3;
}

.dew-architecture small {
  color: var(--mdnt-dim);
}

/* ---------- Automatic control ---------- */

.dew-control-model .section-intro,
.dew-boundaries .section-intro,
.dew-hardware .section-intro,
.dew-software .section-intro,
.dew-eds-link .section-intro,
.dew-field-status .section-intro {
  max-width: 860px;
}

.dew-control-model .section-intro > p:last-child,
.dew-boundaries .section-intro > p:last-child,
.dew-hardware .section-intro > p:last-child,
.dew-software .section-intro > p:last-child,
.dew-eds-link .section-intro > p:last-child,
.dew-field-status .section-intro > p:last-child {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--mdnt-text-soft);
}

.power-domain {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) 110px minmax(340px, 1.3fr);
  align-items: stretch;
  margin-bottom: 72px;
}

.power-state {
  display: grid;
  min-height: 220px;
  align-content: space-between;
  padding: 28px;
  border: 1px solid var(--mdnt-border-strong);
  background: rgba(11, 12, 15, 0.72);
}

.power-state > span,
.power-state small {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.power-state > span {
  color: var(--mdnt-dim);
}

.power-state strong {
  color: var(--mdnt-text);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
}

.power-state small {
  color: var(--mdnt-text-soft);
}

.power-state-active {
  border-color: var(--mdnt-red-deep);
  background: linear-gradient(135deg, var(--mdnt-red-soft), rgba(11, 12, 15, 0.72) 54%);
}

.power-state-active > span,
.power-state-active small {
  color: var(--mdnt-red);
}

.power-domain-transition {
  display: grid;
  place-items: center;
}

.power-domain-transition span {
  position: relative;
  width: 100%;
  height: 1px;
  background: var(--mdnt-border-strong);
}

.power-domain-transition span::before,
.power-domain-transition span::after {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mdnt-red);
  content: "";
}

.power-domain-transition span::before {
  left: 0;
  transform: translate(-50%, -50%);
}

.power-domain-transition span::after {
  right: 0;
  transform: translate(50%, -50%);
}

.profile-model {
  border-top: 1px solid var(--mdnt-border-strong);
  border-bottom: 1px solid var(--mdnt-border-strong);
}

.profile-model-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(320px, 1.35fr);
  gap: 34px;
  padding: 26px 0;
  border-bottom: 1px solid var(--mdnt-border);
}

.profile-model-head .section-label,
.profile-model-head p {
  margin: 0;
}

.profile-model-head p:last-child {
  max-width: 670px;
  color: var(--mdnt-text-soft);
}

.profile-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(340px, 1.3fr) minmax(220px, 0.8fr);
  gap: 34px;
  align-items: center;
  min-height: 126px;
  padding: 24px 0;
  border-bottom: 1px solid var(--mdnt-border);
}

.profile-row > div:first-child {
  display: grid;
  gap: 8px;
}

.profile-row span,
.profile-axis {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-row span {
  color: var(--mdnt-red);
}

.profile-row h3 {
  margin: 0;
  color: var(--mdnt-text);
  font-size: 20px;
  line-height: 1.25;
}

.profile-row p {
  max-width: 620px;
  margin: 0;
  color: var(--mdnt-text-soft);
}

.profile-scale {
  display: flex;
  height: 14px;
  align-items: center;
  justify-content: flex-end;
  border-right: 1px solid var(--mdnt-red);
  background: linear-gradient(90deg, transparent, var(--mdnt-border));
}

.profile-scale i {
  height: 4px;
  background: var(--mdnt-red);
}

.profile-calm .profile-scale i {
  width: 43%;
}

.profile-crisp .profile-scale i {
  width: 71%;
}

.profile-paranoid .profile-scale i {
  width: 100%;
}

.profile-axis {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  color: var(--mdnt-dim);
}

/* ---------- Boundaries and hardware ---------- */

.dew-boundary-grid,
.dew-hardware-grid {
  display: grid;
  border-top: 1px solid var(--mdnt-border-strong);
  border-bottom: 1px solid var(--mdnt-border-strong);
}

.dew-boundary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dew-boundary-grid article,
.dew-hardware-grid article {
  min-height: 250px;
  padding: 26px 24px;
  border-right: 1px solid var(--mdnt-border);
}

.dew-boundary-grid article:last-child,
.dew-hardware-grid article:last-child {
  border-right: 0;
}

.dew-boundary-grid article > span,
.dew-hardware-grid article > span {
  display: block;
  margin-bottom: 42px;
  color: var(--mdnt-red);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dew-boundary-grid h3,
.dew-hardware-grid h3 {
  margin-bottom: 14px;
  color: var(--mdnt-text);
  font-size: 20px;
  line-height: 1.2;
}

.dew-boundary-grid p,
.dew-hardware-grid p {
  margin: 0;
  color: var(--mdnt-text-soft);
  font-size: 16px;
}

.dew-hardware-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Software and EDS relationship ---------- */

.integration-stack {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--mdnt-border-strong);
  list-style: none;
}

.integration-stack li {
  display: grid;
  grid-template-columns: minmax(160px, 0.65fr) minmax(270px, 0.95fr) minmax(360px, 1.4fr);
  gap: 34px;
  align-items: center;
  min-height: 104px;
  padding: 22px 0;
  border-bottom: 1px solid var(--mdnt-border-strong);
}

.integration-stack span {
  color: var(--mdnt-red);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.integration-stack strong {
  color: var(--mdnt-text);
  font-size: 18px;
  line-height: 1.3;
}

.integration-stack p {
  margin: 0;
  color: var(--mdnt-text-soft);
}

.eds-action-loop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: stretch;
  margin-bottom: 28px;
}

.eds-action-loop article {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--mdnt-border-strong);
  background: rgba(11, 12, 15, 0.64);
}

.eds-action-loop article > span {
  display: block;
  margin-bottom: 46px;
  color: var(--mdnt-red);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.eds-action-loop h3 {
  margin-bottom: 14px;
  color: var(--mdnt-text);
  font-size: 24px;
  line-height: 1.2;
}

.eds-action-loop p {
  margin: 0;
  color: var(--mdnt-text-soft);
}

.eds-action-loop > div {
  display: grid;
  place-items: center;
  color: var(--mdnt-red);
  font-family: var(--font-mono);
  font-size: 22px;
}

/* ---------- Field state and contact ---------- */

.field-state-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 64px;
  padding: 34px 0;
  border-top: 1px solid var(--mdnt-border-strong);
  border-bottom: 1px solid var(--mdnt-border-strong);
}

.field-state-mark {
  display: grid;
  gap: 14px;
  align-content: start;
  padding-left: 22px;
  border-left: 2px solid var(--mdnt-red);
}

.field-state-mark span,
.field-state-mark p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.field-state-mark span {
  color: var(--mdnt-red);
}

.field-state-mark strong {
  color: var(--mdnt-text);
  font-size: 30px;
  line-height: 1.15;
}

.field-state-mark p {
  color: var(--mdnt-dim);
}

.field-state-copy {
  display: grid;
  gap: 18px;
}

.field-state-copy p {
  max-width: 690px;
  margin: 0;
  color: var(--mdnt-text-soft);
}

.contact-security-note {
  margin: 20px 0 0;
  color: var(--mdnt-dim);
  font-family: var(--font-mono);
  font-size: 12px;
}

.contact-security-note a {
  color: var(--mdnt-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1060px) {
  .dew-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dew-meta div:nth-child(2) {
    border-right: 0;
  }

  .dew-meta div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--mdnt-border);
  }

  .dew-architecture li {
    grid-template-columns: minmax(170px, 0.72fr) minmax(260px, 1.28fr);
  }

  .dew-architecture small {
    grid-column: 2;
  }

  .power-domain {
    grid-template-columns: minmax(220px, 0.8fr) 70px minmax(300px, 1.2fr);
  }

  .profile-row {
    grid-template-columns: minmax(190px, 0.7fr) minmax(340px, 1.3fr);
  }

  .profile-scale {
    grid-column: 2;
  }

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

  .dew-boundary-grid article:nth-child(even) {
    border-right: 0;
  }

  .dew-boundary-grid article:nth-child(-n + 4) {
    border-bottom: 1px solid var(--mdnt-border);
  }

  .dew-boundary-grid article:last-child {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .integration-stack li {
    grid-template-columns: minmax(150px, 0.55fr) minmax(250px, 0.9fr) minmax(300px, 1.3fr);
    gap: 24px;
  }

  .eds-action-loop {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .eds-action-loop article {
    min-height: 0;
  }

  .eds-action-loop > div {
    min-height: 54px;
    transform: rotate(90deg);
  }
}

@media (max-width: 900px) {
  .dew-hardware-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dew-hardware-grid article:nth-child(2) {
    border-right: 0;
  }

  .dew-hardware-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--mdnt-border);
  }

  .integration-stack li {
    grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1.45fr);
  }

  .integration-stack p {
    grid-column: 2;
  }

  .field-state-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 700px) {
  .dew-hero {
    padding-top: 32px;
    padding-bottom: 56px;
  }

  .dew-breadcrumb {
    margin-top: -4px;
  }

  .dew-hero h1 {
    font-size: 38px;
  }

  .dew-meta {
    grid-template-columns: 1fr;
  }

  .dew-meta div,
  .dew-meta div:nth-child(2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--mdnt-border);
  }

  .dew-meta div:last-child {
    border-bottom: 0;
  }

  .dew-hero .hero-actions {
    margin-bottom: 0;
  }

  .dew-architecture li {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .dew-architecture small {
    grid-column: auto;
  }

  .power-domain {
    grid-template-columns: 1fr;
    margin-bottom: 54px;
  }

  .power-state {
    min-height: 190px;
  }

  .power-domain-transition {
    min-height: 64px;
  }

  .power-domain-transition span {
    width: 1px;
    height: 64px;
  }

  .power-domain-transition span::before {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .power-domain-transition span::after {
    top: auto;
    right: auto;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
  }

  .profile-model-head,
  .profile-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .profile-row {
    padding: 26px 0;
  }

  .profile-scale {
    grid-column: auto;
  }

  .dew-boundary-grid,
  .dew-hardware-grid {
    grid-template-columns: 1fr;
  }

  .dew-boundary-grid article,
  .dew-boundary-grid article:nth-child(even),
  .dew-hardware-grid article,
  .dew-hardware-grid article:nth-child(2) {
    min-height: 0;
    padding: 26px 0;
    border-right: 0;
    border-bottom: 1px solid var(--mdnt-border);
  }

  .dew-boundary-grid article:last-child,
  .dew-hardware-grid article:last-child {
    grid-column: auto;
    border-bottom: 0;
  }

  .dew-boundary-grid article > span,
  .dew-hardware-grid article > span {
    margin-bottom: 24px;
  }

  .integration-stack li {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding: 24px 0;
  }

  .integration-stack p {
    grid-column: auto;
    margin-top: 8px;
  }

  .eds-action-loop article {
    padding: 24px;
  }

  .eds-action-loop article > span {
    margin-bottom: 28px;
  }

  .field-state-mark strong {
    font-size: 26px;
  }
}

@media (max-width: 420px) {
  .dew-hero h1 {
    font-size: 34px;
  }

  .dew-hero .hero-actions {
    grid-template-columns: 1fr;
  }

  .profile-axis {
    display: grid;
    gap: 4px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .dew-hero {
    padding-top: 28px;
    padding-bottom: 30px;
  }

  .dew-hero h1 {
    margin-bottom: 14px;
    font-size: 36px;
  }

  .dew-hero .hero-lede {
    margin-bottom: 18px;
  }

  .dew-meta {
    margin-bottom: 20px;
  }
}
