/* =========================================================================
   Kuumba Work page (kuumba-work.html) — page-specific components only.
   Loaded after main.css and pages.css. Reuses the home product-mock classes
   (.bubble, .answer, .sources, .card-approve, .composer, .orbit…) from main.css.
   Order: 1 hero · 2 chapter nav · 3 chapters · 4 vignette window · 5 vignette parts ·
   6 connections · 7 own environment · 8 onward cards
   ========================================================================= */

/* ---------- 1. Hero ---------- */
.kw-hero .phero__img { object-position: 46% 58%; }
.kw-hero .eyebrow { margin-bottom: 24px; }
.kw-hero .phero__title { max-width: 13ch; }

/* ---------- 2. Chapter nav ---------- */
.kw-chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(48px, 6vw, 80px); }
.kw-chapters a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 8px;
  border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px; font-weight: 500; transition: background-color .25s, box-shadow .25s;
}
.kw-chapters a:hover { background: var(--sunken); }
.kw-chapters a > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sunken); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kw-chapters .tag { height: 20px; font-size: 11px; font-style: normal; padding-inline: 8px; }

/* ---------- 3. Capability chapters ---------- */
.chapter {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 5.5vw, 88px); align-items: center;
  scroll-margin-top: 96px;
}
.chapter + .chapter { margin-top: clamp(88px, 10vw, 152px); }
.chapter--flip { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
.chapter--flip .chapter__copy { order: 2; }
.chapter__k {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px;
  font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.chapter__k .ic { width: 18px; height: 18px; color: var(--ink); }
.status {
  display: inline-flex; align-items: center; gap: 8px; height: 24px; margin-left: 4px; padding-inline: 10px;
  border-radius: var(--r-pill); background: rgba(47, 125, 85, .1); color: var(--success);
  font-size: 12px; letter-spacing: .02em; text-transform: none;
}
.status--next { background: var(--accent-soft); color: #4B33D6; }
.status--next .lg--next { box-shadow: inset 0 0 0 1.5px #8C74FF; }
.chapter__title { font-size: clamp(30px, 3vw, 44px); line-height: 1.12; font-weight: 300; letter-spacing: -0.03em; max-width: 18ch; text-wrap: balance; }
.chapter__text { margin-top: 18px; color: var(--muted); font-size: clamp(16px, 1.2vw, 17px); line-height: 1.6; max-width: 46ch; text-wrap: pretty; }
.chapter__list { margin-top: 28px; border-top: 1px solid var(--line); }
.chapter__list li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; line-height: 1.5; }
.chapter__list .lg { margin-top: 7px; }
.chapter__list b { font-weight: 500; color: var(--ink); }
.chapter__list .tag { margin: 0 6px; vertical-align: 1px; height: 20px; font-size: 11px; }

.kw-next { display: flex; align-items: center; gap: 10px; margin-top: clamp(56px, 6vw, 88px); padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.kw-next .ic { color: var(--ink); }
.kw-next b { font-weight: 500; color: #4B33D6; }

@media (max-width: 1000px) {
  .chapter, .chapter--flip { grid-template-columns: 1fr; gap: 36px; }
  .chapter--flip .chapter__copy { order: 0; }
}

/* ---------- 4. Vignette: a Porcelain window on a photographic backdrop ---------- */
.vig {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-xl); background: #BBAEA8;
  padding: clamp(14px, 3.4vw, 48px);
}
.vig__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.vig__bg img { position: absolute; inset: -8% -4%; width: 108%; height: 116%; max-width: none; object-fit: cover; }
.vig__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(251, 251, 250, .08), rgba(251, 251, 250, .22)); }

.win {
  position: relative; display: flex; flex-direction: column;
  background: var(--ground); border-radius: 18px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(28, 26, 24, .06), 0 32px 80px -28px rgba(40, 20, 10, .5);
  font-size: 14px; line-height: 1.45; color: var(--ink); text-align: left;
}
.win .ic { width: 16px; height: 16px; }
.win__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--rail); border-bottom: 1px solid var(--line); min-height: 50px; }
.win__tile { width: 24px; height: 24px; flex: none; }
.win__title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.win__meta { margin-left: auto; flex: none; }
.win__metas { display: inline-flex; align-items: center; gap: 8px; }
.win__body { display: flex; flex-direction: column; gap: 14px; padding: 18px clamp(14px, 2.4vw, 28px) 20px; }
.win .composer { width: calc(100% - 2 * clamp(14px, 2.4vw, 28px)); margin: 0 auto 18px; }
.win .card-approve { max-width: none; }

/* ---------- 5. Vignette parts ---------- */
/* compact table inside an answer or an app */
.mtable { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12.5px; line-height: 1.35; background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.mtable th { padding: 8px 12px; text-align: left; font-weight: 500; color: var(--muted); background: var(--sunken); }
.mtable td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: middle; color: #3A3835; }
.mtable td b { font-weight: 600; color: var(--ink); margin-right: 4px; font-variant-numeric: tabular-nums; }
.mtable__more { margin-top: 6px; font-size: 12px; color: var(--muted) !important; }
.st { display: inline-flex; align-items: center; height: 22px; padding-inline: 8px; border-radius: var(--r-pill); background: var(--sunken); font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.st--hi { background: #FBEFDF; color: #8A5A14; }
.st--wait { background: var(--accent-soft); color: #4B33D6; }

/* generated files */
.files { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.fcard { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.fcard > span:last-child { display: grid; min-width: 0; }
.fcard b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard small { font-size: 11.5px; color: var(--muted); }
.fcard__ic { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; }
.fcard__ic--doc { background: #E7EEFB; color: #2F5BB7; }
.fcard__ic--xls { background: #E3F1E9; color: var(--success); }
.fcard__ic--pdf { background: #FBE9E5; color: #B04A35; }

/* automation outline */
.said { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--sunken); color: #3A3835; font-size: 13.5px; }
.said .ic { margin-top: 2px; color: var(--muted); }
.flow { position: relative; display: grid; gap: 8px; }
.flow::before { content: ""; position: absolute; left: 25px; top: 20px; bottom: 20px; width: 1px; background: repeating-linear-gradient(180deg, #D3D3CE 0 4px, transparent 4px 8px); }
.flow__node { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }
.flow__node small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.flow__node em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.flow__ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--sunken); color: #44413D; }
.flow__node--you { box-shadow: inset 0 0 0 1.5px var(--ink); }
.flow__node--you .flow__ic { background: var(--ink); color: #fff; }
.win__foot { display: flex; align-items: center; gap: 12px; }
.win__foot .muted { font-size: 12px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.switch span { position: relative; width: 26px; height: 16px; border-radius: 99px; background: #E0E0DC; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(28, 26, 24, .2); }

/* app view */
.apptools { display: flex; align-items: center; gap: 10px; }
.chip--on { background: var(--ink); color: #fff; box-shadow: none; }
.chip--on .ic { color: #fff; }
.apptools__n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mtable--app { margin-top: 0; }
.qc { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(47, 125, 85, .12); color: var(--success); }
.qc .ic { width: 12px; height: 12px; stroke-width: 2; }
.qc--no { background: transparent; box-shadow: inset 0 0 0 1.5px #D3D3CE; }
.assist { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card); font-size: 13px; color: #3A3835; }
.assist__tile { width: 24px; height: 24px; }
.assist b { font-weight: 500; color: var(--ink); }

@media (max-width: 640px) {
  .vig { border-radius: var(--r-lg); padding: 10px; }
  .win { border-radius: 14px; font-size: 13.5px; }
  .win__bar { padding: 8px 12px; }
  .win__body { padding: 14px 12px 16px; gap: 12px; }
  .win .composer { width: calc(100% - 24px); margin-bottom: 12px; }
  .win .bubble--user { max-width: 92%; }
  .mtable th, .mtable td { padding: 7px 8px; }
  .files { grid-template-columns: 1fr 1fr; }
  .fcard--hide-sm { display: none; }
  .col-site, .seg__hide { display: none; }
  .win .sources .source { height: 24px; font-size: 11.5px; }
  .win .card-approve__rows div { grid-template-columns: 62px 1fr; }
  .win .card-approve__foot .muted, .win .card-approve__head .tag { display: none; }
  .win .card-approve__foot { justify-content: flex-end; }
  .win .composer__ask { display: none; }
  .chapter__title { font-size: 30px; }
}
@media (max-width: 380px) { .win__meta.chip { display: none; } }

/* ---------- 6. Connections ---------- */
.connect { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.conn { border-top: 1px solid var(--line); }
.conn__group { padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
.conn__k { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.conn__k .ic { width: 16px; height: 16px; color: var(--muted); }
.conn__rows { display: grid; gap: 12px; }
.conn__rows li { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 4px 20px; }
.conn__rows b { font-size: 16px; font-weight: 500; }
.conn__rows span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.conn__pills li { background: transparent; box-shadow: none; outline: 1px dashed #C9C9C4; outline-offset: -1px; color: var(--muted); }
.conn__note { margin-top: 14px; font-size: 15px; color: var(--muted); }
@media (max-width: 1000px) {
  .connect { grid-template-columns: 1fr; }
  .connect .orbit-wrap { order: 2; }
}
@media (max-width: 600px) { .conn__rows li { grid-template-columns: 1fr; } }

/* ---------- 7. Your own environment (N+ dark panel) ---------- */
.env { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl); background: var(--n-ground); color: #E8E5DF; }
.env__media { position: relative; height: clamp(220px, 26vw, 380px); overflow: hidden; background: #6E625C; }
.env__media img { position: absolute; inset: -6% 0; width: 100%; height: 112%; max-width: none; object-fit: cover; }
.env__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26, 25, 24, 0) 30%, rgba(26, 25, 24, .6) 75%, #1A1918 100%); }
.env__inner { position: relative; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px clamp(40px, 6vw, 96px); padding: 0 clamp(24px, 5vw, 72px) clamp(36px, 5vw, 72px); margin-top: clamp(-120px, -8vw, -64px); }
.env .h2--light { color: #E8E5DF; }
.env__lede { margin-top: 20px; color: var(--n-muted); font-size: 16px; line-height: 1.6; max-width: 40ch; }
.env .link-arrow { margin-top: 16px; color: #E8E5DF; }
.env :focus-visible { outline-color: #fff; }
.env__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; align-self: end; }
.env__grid li { padding: 24px 0 26px; border-top: 1px solid rgba(255, 255, 255, .1); }
.env__grid .ic { width: 22px; height: 22px; margin-bottom: 14px; color: #E8E5DF; }
.env__grid h3 { font-size: 19px; line-height: 26px; font-weight: 400; letter-spacing: -0.01em; color: #E8E5DF; }
.env__grid p { margin-top: 8px; font-size: 15px; line-height: 23px; color: var(--n-muted); max-width: 40ch; }
@media (max-width: 1000px) { .env__inner { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .env { border-radius: var(--r-lg); }
  .env__inner { padding: 0 20px 28px; }
  .env__grid { grid-template-columns: 1fr; }
}

/* ---------- 8. Onward cards (two, not three) ---------- */
@media (min-width: 901px) {
  .related--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related--two .rcard__media { height: 260px; }
}

/* Paused / reduced motion: the orbit here obeys the same rules as on the home page (main.css §17). */
