/* Detail views share the overview's graphite palette. Color belongs to the work. */
.expanded-tile {
  background: linear-gradient(145deg, #191919, #101010 65%);
  border-color: #ffffff13;
}
.section-heading { padding: 38px 0 32px; }
.section-heading h1 { color: #f5f4f2; font-weight: 450; letter-spacing: -.055em; }
.section-heading > p { color: #a4a4a4; font-size: 13px; max-width: 460px; }
.eyebrow { color: #969695; }
.primary-button { background: linear-gradient(#f5f4f1, #d9d8d5); color: #171717; box-shadow: 0 2px 1px #ffffff24 inset; }
.primary-button:hover { background: #fff; }
.reveal-pending { opacity: 0; }

/* Each content layer travels independently while its bento tile reshapes. */
::view-transition-group(detail-heading),
::view-transition-group(detail-stage),
::view-transition-group(detail-notes) { animation: none; }
::view-transition-old(detail-heading),
::view-transition-old(detail-stage),
::view-transition-old(detail-notes) { animation: tile-out 80ms both; }
::view-transition-new(detail-heading) { animation: detail-arrive 480ms 45ms cubic-bezier(.16,1,.3,1) both; }
::view-transition-new(detail-stage) { animation: stage-arrive 620ms 65ms cubic-bezier(.16,1,.3,1) both; }
::view-transition-new(detail-notes) { animation: detail-arrive 540ms 95ms cubic-bezier(.16,1,.3,1) both; }
@keyframes detail-arrive {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes stage-arrive {
  from { opacity: 0; transform: translateY(40px) scale(.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Toolkit: a working library, grouped by where each tool earns its place. */
.library-controls { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 0 22px; border-bottom: 1px solid #ffffff15; }
.library-filters { display: flex; gap: 4px; padding: 4px; border: 1px solid #ffffff0e; background: #080808; border-radius: 12px; }
.library-filters button { color: #939391; background: transparent; border: 0; border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 11px; white-space: nowrap; transition: background .2s, color .2s; }
.library-filters button:hover { color: #f3f3f3; }
.library-filters button[aria-pressed="true"] { background: #30302f; color: #fff; box-shadow: 0 1px 3px #0006, 0 1px 0 #ffffff12 inset; }
.library-filters button > span { color: #bbb; font-size: 9px; }
.library-filters .icon { width: 12px; height: 12px; }
.library-status { font-size: 9px; color: #a1a19f; text-align: right; line-height: 1.6; }
.tool-family { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 24px; padding: 25px 0; border-bottom: 1px solid #ffffff0e; }
.tool-family-heading { padding-top: 5px; }
.tool-family-heading > .eyebrow { color: #70706e; font-size: 8px; }
.tool-family h2 { color: #e8e7e4; font-size: 17px; font-weight: 450; letter-spacing: -.4px; margin-top: 10px; }
.tool-family p { color: #8e8e8b; font-size: 10px; line-height: 1.7; margin-top: 9px; max-width: 120px; }
.tool-shelf { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; align-content: start; }
.library-tool { min-width: 0; border: 1px solid #ffffff10; border-radius: 13px; background: linear-gradient(145deg,#272726,#1d1d1c); padding: 17px 10px 15px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform .22s, border-color .22s, background .22s; }
.technology-mark { width: 40px; height: 40px; display: grid; place-items: center; color: #eee; font-size: 24px; font-weight: 600; letter-spacing: -1.5px; margin-bottom: 14px; line-height: 1; }
.library-tool strong { color: #e9e9e6; font-size: 11px; font-weight: 450; letter-spacing: -.1px; }
.tool-purpose { color: #91918e; font-size: 9px; margin-top: 6px; line-height: 1.5; }
.mark-react { color: #80cddd; font-size: 40px; font-weight: 400; }
.mark-next { color: #1c1c1c; background: #eeedeb; border-radius: 50%; font-size: 26px; font-weight: 450; }
.mark-typescript { background: #315f91; color: #fff; border-radius: 7px; font-size: 20px; align-items: end; justify-items: end; padding: 5px; }
.mark-tailwind { color: #77c4d6; font-size: 49px; font-weight: 400; }
.mark-python { color: #e9cd7c; font-size: 27px; }
.mark-fastapi { color: #82c6b1; font-size: 44px; }
.mark-node { color: #a2c484; font-size: 23px; }
.mark-postgres { color: #93b7d0; font-family: Georgia,serif; font-weight: 400; }
.mark-sqlite { color: #a8c4ce; font-size: 20px; }
.mark-redis { color: #d5776c; font-size: 44px; }
.mark-drizzle { color: #c2d78a; transform: rotate(-30deg); font-size: 28px; }
.mark-ai { border: 1px solid #b5b5b1; border-radius: 50%; font-size: 18px; font-weight: 450; }
.mark-docker { color: #83b8dd; font-size: 38px; }
.mark-git { color: #dc937d; font-size: 53px; font-weight: 400; }
.stack-context { padding-top: 34px; }
.stack-context > .eyebrow { display: block; margin-bottom: 17px; }
.stack-context > a { display: flex; align-items: center; gap: 17px; padding: 20px 0; border-bottom: 1px solid #ffffff12; }
.stack-project-mark { display: grid; place-items: center; border: 1px solid #ffffff17; border-radius: 12px; width: 46px; height: 46px; flex-shrink: 0; background: #252524; color: #deded9; font-size: 28px; }
.stack-project-mark .icon { width: 23px; height: 23px; }
.stack-context strong { font-size: 14px; font-weight: 450; color: #e9e9e5; }
.stack-context p { color: #91918d; font-size: 11px; line-height: 1.6; margin-top: 5px; }
.stack-explore { display: flex; gap: 10px; align-items: center; margin-left: auto; white-space: nowrap; font-size: 10px; color: #bcbcb6; }
.stack-explore .icon { width: 16px; height: 16px; transition: transform .2s; }
.stack-context > a:hover .stack-explore .icon { transform: translate(2px,-2px); }

/* Project details: a product stage, a concise overview, then the decisions. */
.project-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.project-heading .section-heading { min-width: 0; }
.project-heading > .primary-button { white-space: nowrap; flex-shrink: 0; font-size: 10px; }
.product-stage { position: relative; border-radius: 17px; border: 1px solid #ffffff15; overflow: hidden; }
.stage-topline, .stage-bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 25px; }
.stage-topline { font-size: 7px; letter-spacing: 1.5px; color: #9d9d96; }
.stage-topline > span:last-child { color: #77776f; font-size: 6px; }
.product-stage.project-chatui { background: radial-gradient(ellipse at 50% 48%,#4d4d46,#242423 62%,#20201f); }
.product-preview { position: relative; margin: 8px auto 0; width: min(84%,660px); aspect-ratio: 1.9; transform: perspective(1000px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.product-preview .chat-art { position: absolute; inset: 0; height: 100%; width: 100%; transform: none; }
.product-preview .chat-window { border-radius: 10px; background: #efefeb; border: 1px solid #ffffff6b; box-shadow: 0 32px 50px -16px #0009, 0 0 0 5px #ffffff06; }
.product-preview .chat-titlebar { height: 29px; color: #777770; background: #e4e4df; border-color: #0000000d; font-size: 7px; }
.product-preview .chat-titlebar i { background: #b6b6ae; width: 5px; height: 5px; }
.product-preview .chat-titlebar i:first-child { background: #cf8e81; }
.product-preview .chat-titlebar i:nth-child(2) { background: #c7b67c; }
.product-preview .chat-titlebar i:nth-child(3) { background: #94ad89; }
.product-preview .chat-layout { grid-template-columns: 24% 1fr; height: calc(100% - 29px); }
.product-preview .chat-sidebar { background: #e4e4dd; border-color: #0000000b; padding: 18px 12px; font-size: 6px; color: #74746d; gap: 17px; }
.product-preview .chat-sidebar > strong { color: #242422; font-size: 15px; }
.product-preview .chat-sidebar > strong > span { color: #55554d; }
.product-preview .new-chat { color: #45453e; background: #f6f6f0; border-color: #00000008; padding: 6px; font-size: 6px; }
.product-preview .chat-history { color: #7f7f75; font-size: 6px; }
.product-preview .chat-user { color: #44443f; bottom: 16px; left: 12px; }
.product-preview .chat-user > span { color: #74746c; font-size: 5px; }
.product-preview .chat-canvas { background: #f4f4ef; padding: 16px 20px; }
.product-preview .model-label { color: #838379; font-size: 6px; }
.product-preview .chat-greeting { margin-top: 7%; }
.product-preview .chat-symbol { color: #57574c; font-size: 38px; }
.product-preview .chat-greeting h3 { color: #292924; font-size: clamp(14px,1.5vw,22px); letter-spacing: -.7px; margin-top: 12px; }
.product-preview .chat-greeting p { color: #929287; font-size: 7px; }
.product-preview .chat-input { left: 8%; right: 8%; bottom: 27px; background: #fff; color: #8d8d83; border: 1px solid #dfdfd4; padding: 12px; font-size: 7px; box-shadow: 0 3px 8px #00000004; }
.product-preview .chat-input > div { font-size: 6px; margin-top: 16px; }
.product-preview .chat-input b { background: #33332d; color: #eeeee6; width: 18px; height: 18px; }
.product-preview .chat-caption { color: #9d9d92; font-size: 5px; bottom: 10px; }
.stage-bottom { padding-top: 25px; }
.stage-note { color: #c2c2b8; font-size: 10px; }
.preview-switch { display: flex; gap: 3px; border: 1px solid #ffffff14; background: #11110f; border-radius: 30px; padding: 4px; }
.preview-switch button { padding: 7px 13px; border: 0; border-radius: 30px; background: transparent; color: #92928a; font-size: 9px; transition: color .2s, background .2s; }
.preview-switch button[aria-pressed="true"] { color: #292925; background: #e7e7df; }
.project-overview { display: grid; grid-template-columns: 1.55fr 1fr; gap: 30px; padding: 33px 0; border-bottom: 1px solid #ffffff14; }
.project-overview p { color: #c0c0bc; font-size: 15px; line-height: 1.85; margin-top: 14px; letter-spacing: -.15px; }
.project-stack { border-left: 1px solid #ffffff13; padding-left: 26px; }
.project-stack .skill-tags { margin-top: 17px; }
.project-stack .skill-tags > span { color: #b8b8b1; font-size: 9px; background: #ffffff04; border-color: #ffffff16; padding: 7px 9px; }
.project-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 28px; }
.project-features section { padding: 20px 19px 23px; border-radius: 13px; border: 1px solid #ffffff10; background: linear-gradient(145deg,#232321,#1a1a19); min-width: 0; }
.feature-top { display: flex; align-items: center; justify-content: space-between; color: #8b8b83; font-size: 8px; }
.feature-top .icon { width: 15px; height: 15px; }
.project-features h2 { color: #e0e0d9; font-size: 14px; font-weight: 450; line-height: 1.5; margin-top: 19px; letter-spacing: -.2px; }
.project-features p { color: #a1a19a; font-size: 11px; line-height: 1.85; margin-top: 10px; }
.provider-marks, .workspace-marks, .service-marks, .policy-marks, .review-mark { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; align-content: center; min-height: 75px; padding-top: 16px; }
.provider-marks > span, .service-marks > span, .policy-marks > span { color: #c7c7b9; font-size: 8px; padding: 5px 7px; border-radius: 5px; border: 1px solid #ffffff13; background: #ffffff04; }
.provider-marks > span:last-child { border-color: transparent; background: none; color: #7b7b72; }
.workspace-marks > span { display: grid; place-items: center; border: 1px solid #ffffff1c; border-radius: 50%; background: #33332e; color: #dbdbc8; width: 33px; height: 33px; font-size: 12px; }
.workspace-marks > span:nth-child(2) { margin-left: -13px; color: #99998d; background: #20201d; }
.workspace-marks > b { font-weight: 400; color: #aaa99e; font-size: 8px; }
.service-marks { gap: 4px; }
.service-marks > span { font-size: 7px; padding: 5px; }
.service-marks > i { color: #77776b; font-size: 10px; font-style: normal; }
.policy-marks > span { display: flex; align-items: center; gap: 4px; color: #b3c0ad; }
.policy-marks .icon { width: 10px; height: 10px; }
.review-mark { color: #acbaa4; }
.review-mark > .icon { width: 27px; height: 27px; }
.review-mark > span { color: #b1b4a8; font-size: 8px; line-height: 2; }
.review-mark i { color: #75826e; font-style: normal; }
.project-next { display: flex; align-items: center; gap: 20px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #ffffff13; }
.project-next strong { margin-left: auto; font-size: 21px; color: #d8d8d0; font-weight: 450; letter-spacing: -.5px; }
.project-next > .icon { height: 20px; width: 20px; color: #c0c0b6; transition: transform .2s; }
.project-next:hover > .icon { transform: translate(3px,-3px); }
.product-stage.project-agentshield { background: radial-gradient(ellipse at 50% 70%,#30392c,#20251e 55%,#191c18); }
.authorization-flow { display: flex; align-items: center; justify-content: center; padding: 64px 26px 60px; position: relative; background-image: radial-gradient(#b8c0a714 .8px,transparent .8px); background-size: 19px 19px; }
.flow-source { display: flex; flex-direction: column; align-items: center; gap: 15px; color: #b5bdae; font-size: 9px; text-align: center; width: 110px; flex-shrink: 0; }
.flow-source > .icon { width: 40px; height: 40px; padding: 10px; border: 1px solid #ffffff1c; border-radius: 12px; background: #252c22; }
.flow-line { flex: 1; max-width: 65px; height: 1px; background: #95aa7f55; margin-bottom: 25px; position: relative; }
.flow-line:after { content: ""; position: absolute; right: 0; top: -2px; border: solid #a1b38f; border-width: 0 1px 1px 0; padding: 2px; transform: rotate(-45deg); }
.flow-engine { width: 185px; min-height: 170px; background: linear-gradient(135deg,#414d36,#2b3326); border: 1px solid #b9c8a53d; border-radius: 25px; box-shadow: 0 25px 45px #0004, 0 1px 0 #d8e3c91f inset; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; flex-shrink: 0; }
.flow-engine > .icon { width: 37px; height: 37px; color: #d5e1c3; }
.flow-engine > strong { font-size: 19px; font-weight: 450; letter-spacing: -.7px; color: #e0e5d6; }
.flow-engine > span { color: #a8b29a; font-size: 7px; }
.flow-caption { font-size: 7px; letter-spacing: 1px; color: #8d9c81; }

@media (hover:hover) and (pointer:fine) {
  .library-tool:hover { transform: translateY(-4px); border-color: #ffffff30; background: linear-gradient(145deg,#30302d,#232321); }
}
@media (max-width:1100px) and (min-width:761px) {
  .tool-family { grid-template-columns: 105px minmax(0,1fr); gap: 16px; }
  .tool-shelf { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .library-controls { align-items: flex-start; flex-direction: column; }
  .project-heading { align-items: flex-start; flex-direction: column; gap: 0; padding-bottom: 24px; }
  .project-heading .section-heading { padding-bottom: 18px; }
  .product-preview { width: 89%; aspect-ratio: 1.65; }
  .project-features { grid-template-columns: 1fr; }
  .project-features section { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0 22px; }
  .feature-top { grid-column: 1/-1; }
  .project-features section > div:not(.feature-top) { grid-row: 2/4; grid-column: 1; }
  .project-features h2 { grid-column: 2; }
  .project-features p { grid-column: 2; }
  .flow-source { width: 76px; font-size: 8px; }
  .flow-engine { width: 145px; min-height: 155px; }
  .flow-engine > strong { font-size: 17px; }
}
@media (max-width:760px) {
  .section-heading { padding-top: 28px; }
  .tool-family { grid-template-columns: 115px minmax(0,1fr); gap: 15px; }
  .tool-shelf { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .library-controls { flex-wrap: wrap; }
  .library-status { text-align: left; }
  .project-heading > .primary-button { padding: 10px; font-size: 9px; }
  .product-preview { width: 89%; }
  .project-overview { gap: 20px; }
  .project-overview p { font-size: 13px; }
  .project-stack { padding-left: 18px; }
  .project-features { gap: 10px; }
  .project-features section { padding: 18px 15px; }
  .project-features h2 { font-size: 12px; }
  .project-features p { font-size: 10px; }
  .stage-topline, .stage-bottom { padding: 18px; }
  .stage-note { font-size: 8px; }
  .stack-explore { font-size: 0; }
  .flow-source { width: 75px; }
  .flow-engine { width: 165px; }
}
@media (max-width:520px) {
  .section-heading h1 { font-size: 39px; }
  .section-heading > p { font-size: 12px; margin-top: 14px; }
  .library-controls { padding-bottom: 20px; gap: 12px; }
  .library-filters { gap: 1px; width: 100%; padding: 3px; }
  .library-filters button { justify-content: center; flex: 1; padding: 10px 7px; font-size: 9px; gap: 5px; }
  .library-filters .icon { height: 10px; width: 10px; }
  .library-status { font-size: 9px; }
  .tool-family { display: block; padding: 23px 0; }
  .tool-family-heading { display: grid; grid-template-columns: 22px 1fr; align-items: center; padding: 0; margin-bottom: 15px; }
  .tool-family h2 { margin: 0; font-size: 17px; }
  .tool-family p { grid-column: 2; margin-top: 6px; max-width: none; font-size: 10px; }
  .tool-shelf { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .library-tool { padding: 17px 9px; }
  .library-tool strong { font-size: 11px; }
  .tool-purpose { font-size: 9px; }
  .stack-context { padding-top: 25px; }
  .stack-context > a { gap: 12px; }
  .stack-project-mark { width: 36px; height: 36px; font-size: 23px; border-radius: 10px; }
  .stack-context p { font-size: 10px; }
  .project-heading { display: block; padding-bottom: 23px; }
  .project-heading .section-heading { padding-bottom: 18px; }
  .project-heading > .primary-button { padding: 11px 13px; font-size: 10px; }
  .stage-topline { padding: 17px 13px; font-size: 6px; letter-spacing: 1px; }
  .stage-topline > span:last-child { font-size: 5px; letter-spacing: .5px; }
  .product-stage { border-radius: 12px; }
  .product-preview { width: 94%; aspect-ratio: 1.45; min-height: 220px; margin-top: 2px; }
  .product-preview .chat-window { border-radius: 7px; }
  .product-preview .chat-titlebar { height: 22px; padding: 0 8px; font-size: 5px; }
  .product-preview .chat-titlebar i { width: 3px; height: 3px; }
  .product-preview .chat-layout { grid-template-columns: 22% 1fr; height: calc(100% - 22px); }
  .product-preview .chat-sidebar { padding: 12px 6px; gap: 12px; font-size: 4px; }
  .product-preview .chat-sidebar > strong { font-size: 10px; gap: 3px; }
  .product-preview .chat-sidebar > strong > span { font-size: 9px; }
  .product-preview .new-chat { font-size: 4px; padding: 4px; }
  .product-preview .chat-history { font-size: 4px; }
  .product-preview .chat-user { font-size: 8px; left: 6px; gap: 3px; bottom: 10px; }
  .product-preview .chat-user > span { font-size: 3px; }
  .product-preview .chat-canvas { padding: 11px 10px; }
  .product-preview .model-label { font-size: 4px; }
  .product-preview .chat-greeting { margin-top: 15px; }
  .product-preview .chat-symbol { font-size: 26px; }
  .product-preview .chat-greeting h3 { font-size: 12px; margin-top: 8px; letter-spacing: -.4px; }
  .product-preview .chat-greeting p { font-size: 5px; margin-top: 5px; }
  .product-preview .chat-input { padding: 8px; font-size: 5px; bottom: 20px; left: 7%; right: 7%; }
  .product-preview .chat-input > div { font-size: 4px; margin-top: 10px; }
  .product-preview .chat-input b { width: 13px; height: 13px; font-size: 8px; }
  .product-preview .chat-caption { font-size: 3px; bottom: 7px; }
  .stage-bottom { padding: 18px 13px; gap: 10px; align-items: flex-start; }
  .stage-note { font-size: 8px; line-height: 1.6; max-width: 100px; }
  .preview-switch { padding: 3px; gap: 0; }
  .preview-switch button { font-size: 8px; padding: 7px 10px; }
  .project-overview { grid-template-columns: 1fr; padding: 26px 0; gap: 25px; }
  .project-overview p { font-size: 14px; margin-top: 12px; line-height: 1.85; }
  .project-stack { padding: 0; border: 0; }
  .project-stack .skill-tags { margin-top: 12px; }
  .project-stack .skill-tags > span { font-size: 8px; padding: 6px 8px; }
  .project-features { grid-template-columns: 1fr; gap: 13px; margin-top: 25px; }
  .project-features section { padding: 21px; }
  .project-features h2 { font-size: 16px; margin-top: 12px; }
  .project-features p { font-size: 12px; }
  .provider-marks > span, .policy-marks > span { font-size: 10px; padding: 7px; }
  .service-marks > span { font-size: 9px; padding: 7px; }
  .workspace-marks > b, .review-mark > span { font-size: 10px; }
  .project-next { gap: 13px; }
  .project-next strong { font-size: 19px; }
  .project-next .eyebrow { font-size: 7px; letter-spacing: 1px; }
  .authorization-flow { flex-direction: column; padding: 20px 13px; }
  .flow-source { width: auto; gap: 9px; font-size: 9px; }
  .flow-source > .icon { width: 32px; height: 32px; padding: 8px; }
  .flow-line { flex: none; height: 26px; width: 1px; margin: 12px 0; }
  .flow-line:after { top: auto; bottom: 0; right: -2px; transform: rotate(45deg); }
  .flow-engine { min-height: 140px; width: 160px; border-radius: 21px; }
  .flow-engine > .icon { width: 30px; height: 30px; }
  .flow-engine > strong { font-size: 18px; }
  .flow-caption { font-size: 6px; line-height: 1.8; max-width: 100px; text-align: right; }
}
@media (prefers-reduced-motion:reduce) {
  .reveal-pending { opacity: 1; }
  .product-preview { transform: none; }
  ::view-transition-group(*), ::view-transition-new(*), ::view-transition-old(*) { animation: none !important; }
}
