:root {
  --teal-dark: #064E54;
  --teal: #028090;
  --seafoam: #00A896;
  --mint: #02C39A;
  --ink: #10292b;
  --ink-soft: #4a6366;
  --line: #d6e6e5;
  --bg: #f3f8f8;
  --card: #ffffff;
  --mint-tint: #e6f8f3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(6, 78, 84, 0.06), 0 6px 18px rgba(6, 78, 84, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--teal); }
.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-soft); }
svg.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* header */
.top {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 70%, var(--seafoam) 100%);
  color: #fff;
  padding-top: env(safe-area-inset-top);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brandline { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.dpp-mark {
  font-weight: 800; letter-spacing: 0.08em; font-size: 13px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.35);
  padding: 3px 8px; border-radius: 6px;
}
.dpp-title { font-weight: 600; font-size: 15px; }
.demo-pill { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.85; }

main { flex: 1; padding-top: 20px; padding-bottom: 32px; }
.loading { color: var(--ink-soft); text-align: center; padding: 40px 0; }

/* product card */
.product {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 18px;
}
.product-art {
  width: 64px; height: 64px; flex: none; border-radius: 12px;
  background: var(--mint-tint); display: grid; place-items: center;
}
.product-art svg { width: 44px; height: 44px; fill: none; stroke: var(--teal-dark); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.product h1 { font-size: 18px; margin: 0 0 2px; line-height: 1.25; }
.product .sub { margin: 0; font-size: 13px; color: var(--ink-soft); }
.product .sub code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* role picker */
.picker h2 { font-size: 17px; margin: 0 0 4px; }
.picker .lead { margin: 0 0 16px; color: var(--ink-soft); font-size: 15px; }
.roles { display: grid; grid-template-columns: 1fr; gap: 12px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 480px) { .roles { grid-template-columns: 1fr 1fr; } }
.role-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; text-align: left; text-decoration: none; color: var(--ink);
  min-height: 84px; transition: transform .08s ease, border-color .12s ease;
}
.role-btn:active { transform: scale(0.985); }
.role-btn:hover, .role-btn:focus-visible { border-color: var(--seafoam); outline: none; }
.role-ic {
  width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal), var(--mint)); color: #fff;
}
.role-ic svg { width: 28px; height: 28px; stroke-width: 1.7; }
.role-txt { min-width: 0; }
.role-txt b { display: block; font-size: 17px; }
.role-txt small { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.35; margin-top: 2px; }
.picker .note { margin-top: 18px; font-size: 13px; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.picker .note svg { margin-top: 3px; color: var(--teal); }

/* role view */
.rolebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rolechip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rolechip .role-ic { width: 40px; height: 40px; }
.rolechip .role-ic svg { width: 22px; height: 22px; }
.rolechip .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); display: block; line-height: 1.1; }
.rolechip .nm { font-weight: 700; font-size: 16px; line-height: 1.2; display: block; }
.btn-change {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: #fff; color: var(--teal-dark); border: 1.5px solid var(--teal); border-radius: 999px;
  padding: 9px 14px; font-size: 14px; font-weight: 600; text-decoration: none; min-height: 40px;
}
.btn-change:hover { background: var(--mint-tint); }
.intro { margin: 0 0 16px; font-size: 15px; color: var(--ink-soft); background: var(--mint-tint); border-left: 3px solid var(--mint); padding: 10px 12px; border-radius: 0 10px 10px 0; }
.count { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.count .bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.count .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--mint)); }

.section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.section-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfdfd; }
.section-h .sic { width: 34px; height: 34px; border-radius: 9px; background: var(--mint-tint); color: var(--teal-dark); display: grid; place-items: center; }
.section-h .sic svg { width: 20px; height: 20px; }
.section-h h2 { font-size: 15px; margin: 0; letter-spacing: 0.01em; }
.field { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field .k { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 3px; }
.field .v { font-size: 15.5px; margin: 0; overflow-wrap: anywhere; }
.field ul { margin: 4px 0 0; padding-left: 18px; }
.field li { margin: 3px 0; font-size: 15px; }
.score { display: flex; align-items: center; gap: 10px; }
.score .num { font-weight: 800; font-size: 22px; color: var(--teal-dark); }
.score .track { flex: 1; height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.score .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--seafoam), var(--mint)); }

.hidden-box { background: #fff; border: 1px dashed #b7d2d1; border-radius: var(--radius); margin-top: 6px; }
.hidden-box summary { cursor: pointer; padding: 12px 16px; font-size: 14px; color: var(--teal-dark); font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.hidden-box summary::-webkit-details-marker { display: none; }
.hidden-box summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--teal); }
.hidden-box[open] summary::after { content: "−"; }
.hidden-box ul { margin: 0; padding: 0 16px 12px 36px; font-size: 14px; color: var(--ink-soft); }
.hidden-box li { margin: 3px 0; }
.hidden-box li b { color: var(--ink); font-weight: 600; }
.hidden-box .why { margin: 0 16px 12px; font-size: 13px; color: var(--ink-soft); }

.err { background: #fff3f0; border-left: 3px solid #d9534f; padding: 12px; border-radius: 0 10px 10px 0; }

/* footer */
.foot { background: var(--teal-dark); color: #d8ecec; font-size: 13px; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); }
.foot p { margin: 0 0 4px; }
.foot .muted { color: #9fc9c7; }
.foot strong { color: #fff; }

@media (min-width: 720px) {
  .product h1 { font-size: 21px; }
  .field .v { font-size: 16px; }
}
