/* The GRIP Framework: warm paper, ink, and one colour per dimension. */
:root {
  --paper: #f2ede3; --paper2: #e9e2d4; --card: #fbf8f2; --ink: #1c1b18; --ink2: #3b3832; --muted: #6a655b; --line: #d8cfbd;
  --g: #2c5b8c; --r: #3c7a4c; --i: #c0532a; --p: #b8862b;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --four: linear-gradient(90deg, var(--g) 0 25%, var(--r) 25% 50%, var(--i) 50% 75%, var(--p) 75% 100%);
}
.d-guidance { --dc: var(--g); } .d-resources { --dc: var(--r); } .d-implementation { --dc: var(--i); } .d-performance { --dc: var(--p); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 67px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
img, svg { display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 12px; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 14px; }

/* header */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(242, 237, 227, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.12rem; white-space: nowrap; }
.logo b { letter-spacing: 0.04em; }
.logo sup { font-size: 0.55em; font-family: var(--sans); margin-left: 1px; }
.mark { width: 30px; height: 30px; }
.mark text { font: 700 10px var(--serif); fill: #fff; }
.menu { display: flex; gap: 22px; font-size: 15px; }
.menu a { text-decoration: none; color: var(--ink2); }
.menu a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: 12px; font-weight: 700; }
.lang a { padding: 5px 9px; text-decoration: none; color: var(--muted); }
.lang a.on { background: var(--ink); color: var(--paper); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; padding: 12px 20px; font-weight: 650; font-size: 15px; text-decoration: none; transition: transform 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.ink .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.ink .btn.ghost { background: transparent; color: var(--paper); }

/* hero */
.hero { padding: 76px 0 70px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.025em; }
.hero h1 em { font-style: italic; color: var(--i); }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink2); max-width: 50ch; margin: 22px 0 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.by { margin: 22px 0 0; font-size: 14.5px; color: var(--ink2); padding-left: 12px; border-left: 4px solid; border-image: linear-gradient(180deg, var(--g) 0 25%, var(--r) 25% 50%, var(--i) 50% 75%, var(--p) 75% 100%) 1; }
.stamp { font: 12.5px var(--mono); color: var(--muted); margin: 14px 0 0; text-transform: uppercase; letter-spacing: 0.06em; }

/* the matrix */
.matrix { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 520px; margin-left: auto; aspect-ratio: 1; }
.tile { --dc: var(--ink); position: relative; display: flex; flex-direction: column; gap: 4px; padding: 24px; border-radius: 16px; background: var(--dc); color: #fff; text-decoration: none; overflow: hidden;
  box-shadow: inset 0 -40px 60px -40px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease; animation: grip 0.75s cubic-bezier(0.2, 1.35, 0.4, 1) both; }
.tile.d-guidance { --dc: var(--g); } .tile.d-resources { --dc: var(--r); } .tile.d-implementation { --dc: var(--i); } .tile.d-performance { --dc: var(--p); }
.tile .L { font: 700 clamp(3.2rem, 7vw, 5.6rem)/0.9 var(--serif); opacity: 0.95; }
.tile .nm { font: 700 clamp(1.05rem, 2vw, 1.45rem)/1.15 var(--serif); margin-top: 8px; }
.tile .q { font-size: 0.93rem; opacity: 0.9; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.45); outline: none; }
.t0 { --fx: -22px; --fy: -22px; animation-delay: 0.05s; } .t1 { --fx: 22px; --fy: -22px; animation-delay: 0.13s; }
.t2 { --fx: -22px; --fy: 22px; animation-delay: 0.21s; } .t3 { --fx: 22px; --fy: 22px; animation-delay: 0.29s; }
.t1, .t3 { align-items: flex-end; text-align: right; } .t2, .t3 { justify-content: flex-end; }
@keyframes grip { from { transform: translate(var(--fx), var(--fy)) scale(0.94); } to { transform: none; } }
.knot { position: absolute; left: 50%; top: 50%; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); display: grid; place-items: center;
  font: 700 13px var(--serif); letter-spacing: 0.18em; padding-left: 0.18em; pointer-events: none; animation: knot 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 0.6s both; }
@keyframes knot { from { transform: scale(0.4) rotate(-40deg); } to { transform: none; } }
.matrix.small { max-width: 300px; gap: 7px; }
.matrix.small .tile { padding: 12px; border-radius: 12px; }
.matrix.small .L { font-size: 2.3rem; }
.matrix.small .nm { font-size: 0.98rem; }
.matrix.small .q { font-size: 0.78rem; }
.matrix.small .knot { width: 50px; height: 50px; margin: -25px 0 0 -25px; font-size: 9px; }
.matrix.small .tile:not(.cur) { opacity: 0.42; }
.matrix.small .tile:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tile, .knot { animation: none; } html { scroll-behavior: auto; } }

/* sections */
section { padding: 76px 0; }
section + section { border-top: 1px solid var(--line); }
.paper2 { background: var(--paper2); }
.ink { background: var(--ink); color: var(--paper); border-top: 0 !important; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 700 12px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.kicker::before { content: ""; width: 34px; height: 6px; border-radius: 2px; background: var(--four); }
.ink .kicker { color: #bdb6a8; }
.sub { color: var(--ink2); font-size: 1.08rem; max-width: 64ch; margin-bottom: 34px; }

/* framework columns */
.dims { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 16px; row-gap: 0; }
.dim-col { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start; margin-bottom: 16px; background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--dc); border-radius: 12px; padding: 18px 18px 8px; }
.dim-head { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; margin-bottom: 12px; }
.dim-head .L { width: 46px; height: 46px; flex: none; border-radius: 10px; background: var(--dc); color: #fff; display: grid; place-items: center; font: 700 1.6rem var(--serif); }
.dim-head b { display: block; font: 700 1.2rem var(--serif); }
.dim-head em { font-style: normal; font-size: 0.9rem; color: var(--dc); font-weight: 600; }
.dim-head:hover b { text-decoration: underline; text-underline-offset: 4px; }
.dim-col > p { font-size: 0.92rem; color: var(--ink2); margin: 0 0 16px; }
.area-card { display: grid; grid-template-columns: 30px 1fr; gap: 2px 8px; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; }
.area-card .n { grid-row: span 2; font: 600 12px var(--mono); color: var(--dc); padding-top: 3px; }
.area-card b { font: 700 1rem var(--serif); }
.area-card .own { font-size: 0.8rem; color: var(--muted); }
.area-card:hover b { color: var(--dc); }

/* stages and steps */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stage, .steps li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.stage:nth-child(3) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stage p, .steps p { font-size: 0.95rem; margin: 8px 0 0; color: inherit; opacity: 0.85; }
.sn { display: block; font: 600 13px var(--mono); color: var(--muted); margin-bottom: 14px; }
.stage:nth-child(3) .sn { color: #bdb6a8; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { border-top: 6px solid var(--line); }
.steps li:nth-child(1) { border-top-color: var(--g); } .steps li:nth-child(2) { border-top-color: var(--r); } .steps li:nth-child(3) { border-top-color: var(--i); } .steps li:nth-child(4) { border-top-color: var(--p); }

/* who */
.ink h2 { color: var(--paper); }
.who { display: grid; grid-template-columns: 170px 1fr; gap: 34px; margin-top: 26px; background: #262420; border: 1px solid #3a3731; border-radius: 16px; padding: 30px; }
.who-side { display: flex; flex-direction: column; gap: 12px; }
.rank { font: 700 5rem/0.9 var(--serif); background: var(--four); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rank span { font-size: 1.4rem; margin-right: 4px; vertical-align: top; }
.who-cap { font-size: 0.85rem; color: #bdb6a8; }
.who-main h3 { font-size: 1.6rem; color: var(--paper); }
.who-main > p { color: #e6e0d4; margin: 12px 0 18px; }
.who-main ul { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.who-main li b { display: block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #bdb6a8; }
.who-main li span { font-size: 0.95rem; color: #efe9de; }
.links { display: flex; gap: 10px; flex-wrap: wrap; }
.alt-row { color: #bdb6a8; font-size: 0.92rem; margin: 18px 0 0; max-width: 80ch; }

/* articles */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 20px 44px; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.35); }
.card h3 { font-size: 1.15rem; }
.card p { font-size: 0.93rem; color: var(--ink2); margin: 0; }
.card .more { position: absolute; left: 20px; bottom: 16px; color: var(--muted); }
.chips { display: flex; gap: 4px; }
.chips i, .chip i, footer i { font: 700 11px/1 var(--serif); font-style: normal; color: #fff; width: 20px; height: 20px; border-radius: 5px; display: inline-grid; place-items: center; background: var(--dc); }
.chips i.d-guidance, footer i.d-guidance { --dc: var(--g); } .chips i.d-resources, footer i.d-resources { --dc: var(--r); }
.chips i.d-implementation, footer i.d-implementation { --dc: var(--i); } .chips i.d-performance, footer i.d-performance { --dc: var(--p); }
.latest { margin-top: 40px; }
.latest h3 { font-size: 1rem; font-family: var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.latest ul { list-style: none; padding: 0; margin: 0; }
.latest li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.latest time { font: 13px var(--mono); color: var(--muted); min-width: 150px; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--ink2); }

/* faq and cite */
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font: 700 1.08rem var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--sans); color: var(--muted); }
details[open] summary::after { content: "−"; }
details p { margin: 10px 0 0; color: var(--ink2); }
.cite { margin-top: 32px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--i); border-image: none; border-radius: 10px; padding: 18px 20px; }
.cite h3 { font-size: 1rem; margin-bottom: 6px; }
.cite p { font: 14.5px var(--mono); margin: 0; }

/* page heads */
.phead { padding: 46px 0 40px; border-bottom: 1px solid var(--line); }
.phead-grid { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.wrap.narrow:not(.phead-grid) { display: block; }
.crumbs { display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.bigL { display: block; font: 700 7rem/0.8 var(--serif); color: var(--dc); margin: 6px 0 10px; }
.phead h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); max-width: 24ch; }
.answer { font-size: 1.16rem; color: var(--ink2); margin: 18px 0 0; max-width: 64ch; }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px 3px 3px; font-size: 13px; font-weight: 600; text-decoration: none; background: var(--card); }
.chip:hover { border-color: var(--dc); }

/* areas on a dimension page */
.area { margin: 0 0 54px; scroll-margin-top: 24px; }
.area h2 { display: flex; gap: 14px; align-items: baseline; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.area h2 .n { font: 600 0.9rem var(--mono); color: var(--dc); }
.area .def { font-size: 1.1rem; color: var(--ink2); margin: 12px 0 20px; }
.wb { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wb > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.wb h3 { font: 700 12px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.wb .w h3 { color: var(--r); } .wb .b h3 { color: var(--i); }
.wb ul { margin: 0; padding-left: 18px; font-size: 0.95rem; }
.wb li { margin: 4px 0; }
.spec { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin: 14px 0; }
.spec div { border-top: 2px solid var(--ink); padding-top: 8px; }
.spec dt { font: 700 12px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 4px 0 0; font-size: 0.97rem; }
.spec dd ul { margin: 0; padding-left: 18px; }
.wq { background: var(--card); border-left: 6px solid var(--dc); border-radius: 0 10px 10px 0; padding: 14px 18px; font: italic 1.12rem var(--serif); margin: 0; }
.wq b { display: block; font: 700 11.5px var(--sans); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dc); margin-bottom: 4px; }
.next { margin-top: 10px; }

/* prose */
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 2.1em 0 0.5em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 1.07rem; line-height: 1.72; color: var(--ink2); }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose ol li::marker { font-family: var(--mono); color: var(--muted); }
.sheet { margin: 22px 0; background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sheet figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper2); font: 700 12px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.sheet button { font: 600 12px var(--sans); border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.sheet pre { margin: 0; padding: 16px 18px; font: 14px/1.7 var(--mono); white-space: pre-wrap; color: var(--ink); }
.srcs { font-size: 0.95rem; }
.srcs small { color: var(--muted); }
blockquote.pull { margin: 0 0 34px; padding: 4px 0 4px 22px; border-left: 6px solid var(--i); }
blockquote.pull p { font: italic 1.55rem/1.35 var(--serif); color: var(--ink); margin: 0 0 8px; }
blockquote.pull cite { font-style: normal; font-size: 0.9rem; color: var(--muted); }

/* footer */
footer { background: var(--paper2); border-top: 1px solid var(--line); padding: 52px 0 60px; font-size: 14.5px; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 0.8fr; gap: 32px; }
.foot p { color: var(--ink2); margin-top: 12px; max-width: 40ch; }
.foot h4 { font: 700 12px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.foot a:not(.logo) { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 3px 0; color: var(--ink2); }
.foot a:not(.logo):hover { color: var(--ink); text-decoration: underline; }

/* responsive */
@media (max-width: 1020px) {
  .dims { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu { display: none; }
  .hero-grid, .phead-grid { grid-template-columns: 1fr; gap: 40px; }
  .matrix { margin: 0 auto; max-width: 460px; }
  .phead-grid .matrix.small { display: none; }
  .stages { grid-template-columns: 1fr; }
  .who { grid-template-columns: 1fr; gap: 16px; }
  .who-side { flex-direction: row; align-items: center; gap: 16px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
  .top-in { gap: 12px; }
  .right .btn { display: none; }
  .hero { padding: 48px 0 52px; }
  section { padding: 56px 0; }
  .dims, .steps, .cards, .wb, .spec, .who-main ul, .foot { grid-template-columns: 1fr; }
  .tile { padding: 14px; }
  .tile .nm { font-size: 1.05rem; }
  .tile .q { font-size: 0.8rem; }
  .knot { width: 60px; height: 60px; margin: -30px 0 0 -30px; font-size: 10.5px; }
  .latest time { min-width: 0; }
  .bigL { font-size: 5rem; }
}
