/* scope page — stakeholder view */

.section-alt {
  background: #ece9dd;
  border-top: 1px solid #d9d6c8;
  border-bottom: 1px solid #d9d6c8;
  padding-left: 0;
  padding-right: 0;
}
.section-alt .audience-card,
.section-alt .inout-col,
.section-alt .next-card,
.section-alt .decision-table,
.section-alt .risk-card,
.section-alt .process-card,
.section-alt .access-table,
.section-alt .view-card { background: var(--paper); }

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plain-list li {
  position: relative;
  padding-left: 18px;
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.55;
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* WHY grid */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.why-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
}
.why-card h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.why-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-3);
  line-height: 1.6;
}
.why-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 3px 8px;
  border-radius: 999px;
}

/* AUDIENCE grid */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.audience-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audience-h { display: flex; align-items: center; gap: 8px; }
.audience-role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
}
.audience-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

/* SHAPE */
.shape-grid { margin-top: 22px; }
.shape-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.shape-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
}
.step-h { font-weight: 700; font-size: 14.5px; color: var(--ink); margin-bottom: 4px; }
.step-b { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }

.shape-foot {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.foot-k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.foot-v { font-size: var(--text-sm); color: var(--ink-2); line-height: 1.55; }
.foot-v .kbd { white-space: normal; word-break: break-all; }

/* IN / OUT */
.inout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}
.inout-col {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.inout-h {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.inout-in { border-left: 3px solid var(--brand); }
.inout-in .inout-h { color: var(--brand); }
.inout-out { border-left: 3px solid var(--ink-5); }
.inout-out .inout-h { color: var(--ink-3); }
.inout-out .plain-list li::before { background: var(--ink-5); }

/* MILESTONES */
.milestone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.ms-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ms-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 4px 10px;
  border-radius: 999px;
}
.ms-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.ms-sub {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.5;
}
.ms-size {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}
.ms-s { background: var(--ok-tint); color: var(--ok); }
.ms-m { background: var(--warn-tint); color: var(--warn); }
.ms-l { background: var(--bad-tint); color: var(--bad); }

/* AI callout */
.ai-callout {
  margin-top: 26px;
  border-left: 3px solid var(--brand);
  background: var(--brand-tint-2);
  padding: 22px 24px;
  border-radius: var(--radius);
}
.ai-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.ai-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.ai-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

/* RISKS */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.risk-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.risk-h { margin-bottom: 8px; }
.risk-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
}
.risk-card h3 {
  margin: 8px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.risk-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-3);
  line-height: 1.6;
}

/* DECISION TABLE */
.decision-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.decision-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  background: var(--bg);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.decision-table tbody td {
  padding: 18px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.55;
}
.decision-table tbody tr:last-child td { border-bottom: none; }
.d-h { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.d-b { font-size: 13px; color: var(--ink-4); }
.d-rec {
  display: inline-block;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 2px 8px;
  border-radius: 6px;
  margin-right: 6px;
}

/* VIEWS — wireframe sketches */
.view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.view-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.view-h {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.view-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 3px 8px;
  border-radius: 999px;
}
.view-t {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
}
.view-cap {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* wireframe shell */
.wf {
  background: #f7f6f1;
  border: 1px solid #e3dfd0;
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wf .mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
}

/* shared bits */
.wf-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.wf-pill {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.wf-search {
  flex: 1;
  min-width: 120px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: var(--ink-4);
  font-style: italic;
}
.wf-btn {
  background: var(--brand);
  color: white;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
}
.wf-btn-ok { background: var(--ok); color: white; }
.wf-btn-no { background: white; color: var(--ink-3); border: 1px solid var(--line); }
.wf-link { color: var(--brand); font-size: 11.5px; text-decoration: underline; }
.wf-x { color: var(--ink-4); font-size: 11px; }

/* table */
.wf-table {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.wf-row {
  display: grid;
  grid-template-columns: 60px 70px 1fr 90px 70px;
  gap: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line-2);
  align-items: center;
}
.wf-row:last-child { border-bottom: none; }
.wf-head {
  background: #faf9f4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.wf-row-muted { opacity: 0.6; }

/* suppressions + keys reuse the same wf-table but with 4 cols */
.wf-card-cols-4 .wf-row,
#views .view-card:nth-child(3) .wf-row,
#views .view-card:nth-child(5) .wf-row {
  grid-template-columns: 1fr 110px 90px 70px;
}

/* status chips */
.st {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
}
.st-ok { color: var(--ok); background: var(--ok-tint); }
.st-bad { color: var(--bad); background: var(--bad-tint); }
.st-wait { color: var(--warn); background: var(--warn-tint); }
.st-q { color: var(--ink-3); background: #ece9dd; }

/* per-vault tabs + form */
.wf-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 0 2px 6px;
  font-size: 11.5px;
  color: var(--ink-4);
}
.wf-tabs .on {
  color: var(--brand);
  font-weight: 700;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 6px;
  margin-bottom: -7px;
}
.wf-form { display: flex; flex-direction: column; gap: 10px; }
.wf-field { display: flex; flex-direction: column; gap: 4px; }
.wf-field label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.wf-input {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--ink-2);
}
.wf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wf-row2 > div { display: flex; flex-direction: column; gap: 4px; }

/* list / list-tight (domains, mailerq) */
.wf-list { display: flex; flex-direction: column; gap: 6px; }
.wf-li {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}
.wf-li-h { font-size: 12.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.wf-li-b { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }
.wf-list-tight .wf-li { padding: 6px 10px; }
.wf-li-tight { display: flex; align-items: center; justify-content: space-between; }

/* stat row (mailerq) */
.wf-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wf-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}
.wf-stat-k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 2px;
}
.wf-stat-v { font-size: 18px; font-weight: 700; color: var(--ink); }

/* settings toggle */
.wf-toggle {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wf-toggle-h { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.wf-toggle-b { font-size: 11.5px; color: var(--ink-4); line-height: 1.45; }
.wf-toggle-b .mono { word-break: break-all; }
.wf-switch {
  width: 32px;
  height: 18px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s;
}
.wf-switch span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: left 0.15s;
}
.wf-switch.on { background: var(--brand); }
.wf-switch.on span { left: 16px; }

/* approval card */
.wf-approval {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wf-app-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wf-app-kind {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 2px 6px;
  border-radius: 4px;
}
.wf-app-from { font-size: 11.5px; color: var(--ink-4); }
.wf-app-body { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--ink-2); }
.wf-app-preview {
  margin-top: 4px;
  background: #faf9f4;
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-style: italic;
}
.wf-app-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }

/* ACCESS MATRIX */
.access-scroll {
  margin-top: 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.access-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}
.access-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  background: var(--bg);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
  white-space: nowrap;
}
.access-table thead th.axis {
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.4;
  white-space: normal;
  min-width: 180px;
}
.access-table tbody td,
.access-table tbody th.row-h {
  padding: 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.5;
  text-align: left;
}
.access-table tbody tr:last-child td,
.access-table tbody tr:last-child th.row-h { border-bottom: none; }
.access-table tbody th.row-h {
  background: var(--bg);
  font-weight: 600;
  width: 200px;
  min-width: 180px;
  border-right: 1px solid var(--line-2);
}
.rh-h { font-weight: 700; color: var(--ink); margin-bottom: 4px; font-size: 13.5px; }
.rh-b { font-size: 12px; color: var(--ink-4); line-height: 1.45; }
.a-yes, .a-some, .a-no {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.a-yes { color: var(--ok); background: var(--ok-tint); }
.a-some { color: var(--warn); background: var(--warn-tint); }
.a-no { color: var(--ink-4); background: var(--bg); border: 1px solid var(--line); }
.a-b { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }

.access-legend {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  color: var(--ink-3);
}
.access-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.lg-yes { background: var(--ok); }
.lg-some { background: var(--warn); }
.lg-no { background: var(--ink-5); }

/* PROCESS */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.process-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.process-n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.process-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.process-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.55;
}
.process-card .kbd { white-space: normal; word-break: break-all; }

/* NEXT STEPS */
.next-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.next-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.next-n {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.next-h { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 4px; line-height: 1.3; }
.next-b { font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  .shape-row { grid-template-columns: 1fr 1fr; }
  .shape-foot { grid-template-columns: 1fr 1fr; }
  .milestone-grid { grid-template-columns: 1fr 1fr; }
  .risk-grid { grid-template-columns: 1fr 1fr; }
  .next-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .view-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .why-grid { grid-template-columns: 1fr; }
  .shape-row { grid-template-columns: 1fr; }
  .inout-grid { grid-template-columns: 1fr; }
  .milestone-grid { grid-template-columns: 1fr; }
  .risk-grid { grid-template-columns: 1fr; }
  .next-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .view-grid { grid-template-columns: 1fr; }
  .view-card { padding: 14px; }
  .wf { padding: 10px; }
  .wf-row { grid-template-columns: 44px 54px 1fr 70px 50px; font-size: 10.5px; gap: 6px; padding: 6px 8px; }
  #views .view-card:nth-child(3) .wf-row,
  #views .view-card:nth-child(5) .wf-row,
  #views .view-card:nth-child(6) .wf-row {
    grid-template-columns: 1fr 80px 40px 50px;
  }
  #views .view-card .wf-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .wf-stat-row { grid-template-columns: 1fr 1fr 1fr; }
  .wf-tabs { gap: 10px; font-size: 11px; overflow-x: auto; }
  .ai-cols { grid-template-columns: 1fr; gap: 18px; }
  .decision-table thead { display: none; }
  .decision-table, .decision-table tbody, .decision-table tr, .decision-table td { display: block; width: 100%; }
  .decision-table tr {
    border-bottom: 1px solid var(--line);
    padding: 4px 0;
  }
  .decision-table tbody tr:last-child { border-bottom: none; }
  .decision-table tbody td {
    border-bottom: none;
    padding: 12px 18px;
  }
  .decision-table tbody td:first-child { padding-top: 18px; }
  .decision-table tbody td:last-child { padding-bottom: 18px; }
}

/* === Section 05: Canonical message format === */
.format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.format-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 16px;
  overflow: hidden;
}
.format-h {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 12px;
}
.format-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.format-table th,
.format-table td {
  text-align: left;
  padding: 7px 8px 7px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.format-table th {
  font-weight: 600;
  color: var(--ink-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.format-table tbody tr:last-child td { border-bottom: none; }
.format-table td .mono,
.format-table td .kbd {
  font-size: 12px;
}

.rules-list {
  margin-top: 8px;
}
.rules-list li {
  font-size: 14px;
}

/* === Section 07: Configuration === */
.config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.config-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.config-h {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 12px;
}
.config-rule {
  background: #fbfbf6;
  border: 1px solid #e8e5d5;
}
.config-rule p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* Inline code block inside wireframe fields */
.wf-input.wf-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  line-height: 1.5;
  background: #f0ede0;
  border-color: #d9d6c8;
  white-space: normal;
  word-break: break-word;
}

/* === Responsive === */
@media (max-width: 900px) {
  .format-grid { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .config-grid { grid-template-columns: 1fr; }
  .format-table { font-size: 12px; }
  .format-table th,
  .format-table td { padding: 6px 6px 6px 0; }
}

/* Subsection header inside a section */
.subsection-h {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 36px 0 6px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

/* Shape-foot sub-cards (sf-card layout) */
.shape-foot {
  /* override existing block padding for nested cards */
  padding: 0;
  border: none;
  background: transparent;
}
.sf-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.sf-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}
.sf-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* Milestone card variants and inner heads */
.ms-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ms-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 4px 10px;
  border-radius: 999px;
}
.ms-card.ms-now { border-top: 3px solid var(--brand); }
.ms-card.ms-next { border-top: 3px solid var(--brand-2); }
.ms-card.ms-then { border-top: 3px solid #b9b3f4; }
.ms-card.ms-cut { border-top: 3px solid var(--ink-2); }
.ms-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
}

@media (max-width: 720px) {
  .shape-foot { grid-template-columns: 1fr; gap: 12px; }
}

/* Long env-var kbd strings inside narrow cards should wrap */
.kbd {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-all !important;
}
/* duplicate below kept for clarity but neutralised */
.kbd {
  overflow-wrap: anywhere;
  word-break: break-word;
}
