/* Scoped to the case-study element; inherits the portfolio's theme and Figtree. */
nakamotox-case-study{ display:block; width:100%; min-width:0; }
nakamotox-case-study .nx-study{ color:var(--text, #fff); padding:28px 0 56px; font-family:inherit; font-size:16px; line-height:1.7; min-width:0; }
nakamotox-case-study .nx-study *{ box-sizing:border-box; }
nakamotox-case-study .nx-study h1,
nakamotox-case-study .nx-study h2,
nakamotox-case-study .nx-study h3{ color:var(--text, #fff); text-wrap:balance; }
nakamotox-case-study .nx-study p{ color:var(--text2, #b5b1bc); max-width:72ch; text-wrap:pretty; margin:0 0 18px; }
nakamotox-case-study .nx-study a{ color:var(--accent, #b99af5); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:4px; }
nakamotox-case-study .nx-study a:hover{ color:var(--greenHover, #cbb3f8); }
nakamotox-case-study .nx-study a:focus-visible,
nakamotox-case-study .nx-study [tabindex]:focus-visible{ outline:2px solid var(--accent, #b99af5); outline-offset:4px; border-radius:4px; }
nakamotox-case-study .nx-study-hero{ display:flex; align-items:center; gap:38px; padding:0 0 26px; }
nakamotox-case-study .nx-study-hero-copy{ flex:1; min-width:0; }
nakamotox-case-study .nx-study .nx-study-course{ display:inline-flex; align-items:center; border:1px solid var(--border, rgb(255 255 255 / .1)); background:var(--surface, #19171b); padding:6px 12px; border-radius:6px; color:var(--text2, #b5b1bc); font-size:13px; font-weight:600; margin-bottom:20px; }
nakamotox-case-study .nx-study h1{ font-size:clamp(30px, 4.2vw, 48px); line-height:1.1; letter-spacing:-.028em; font-weight:800; max-width:19ch; margin:0 0 22px; overflow-wrap:break-word; }
nakamotox-case-study .nx-study .nx-study-intro{ font-size:clamp(17px, 2vw, 20px); line-height:1.55; max-width:60ch; margin-bottom:0; }
nakamotox-case-study .nx-study-mark{ flex:none; display:block; width:172px; height:auto; border-radius:12px; }
nakamotox-case-study .nx-study-stack{ list-style:none; padding:0; margin:0 0 28px; display:flex; flex-wrap:wrap; gap:8px; }
nakamotox-case-study .nx-study-stack li{ padding:4px 11px; border-radius:999px; background:color-mix(in srgb, var(--accent, #b99af5) 12%, transparent); color:var(--accent, #b99af5); font-size:13px; font-weight:600; }
nakamotox-case-study .nx-study-summary{ max-width:74ch; }
nakamotox-case-study .nx-study-section{ border-top:1px solid var(--border, rgb(255 255 255 / .1)); padding:36px 0 18px; min-width:0; }
nakamotox-case-study .nx-study-section-title{ scroll-margin-top:88px; display:flex; gap:14px; align-items:baseline; font-size:clamp(24px, 3vw, 30px); font-weight:800; letter-spacing:-.018em; line-height:1.2; margin:0 0 24px; }
nakamotox-case-study .nx-study h3{ font-size:19px; line-height:1.35; font-weight:700; letter-spacing:-.01em; margin:0 0 12px; }
nakamotox-case-study .nx-study-feature{ display:grid; grid-template-columns:minmax(170px, .36fr) minmax(0, 1fr); column-gap:32px; padding:15px 0; }
nakamotox-case-study .nx-study-feature + .nx-study-feature{ border-top:1px solid var(--border, rgb(255 255 255 / .1)); }
nakamotox-case-study .nx-study-feature p{ margin-bottom:0; }
nakamotox-case-study .nx-study-aside{ margin:22px 0; padding:20px 22px; border-radius:12px; background:var(--surface, #19171b); border:1px solid var(--border, rgb(255 255 255 / .1)); }
nakamotox-case-study .nx-study-aside p{ margin-bottom:0; }
nakamotox-case-study .nx-study .nx-study-note{ font-size:14px; line-height:1.7; margin:20px 0; }
nakamotox-case-study .nx-study-flow{ list-style:none; padding:0; margin:30px 0; display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:24px; }
nakamotox-case-study .nx-study-flow li{ position:relative; padding:16px 14px; border:1px solid var(--border, rgb(255 255 255 / .1)); border-radius:12px; background:var(--surface, #19171b); }
nakamotox-case-study .nx-study-flow strong{ display:block; color:var(--text, #fff); font-size:15px; font-weight:700; line-height:1.3; }
nakamotox-case-study .nx-study-flow small{ display:block; color:var(--text2, #b5b1bc); margin-top:8px; font-size:12px; line-height:1.45; }
nakamotox-case-study .nx-study-flow-arrow{ color:var(--accent, #b99af5); position:absolute; top:50%; right:-21px; font-size:18px; line-height:1; transform:translateY(-50%); }
nakamotox-case-study .nx-study-flow-arrow svg{ display:block; }
nakamotox-case-study .nx-study-table-wrap{ max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; border:1px solid var(--border, rgb(255 255 255 / .1)); border-radius:12px; margin:24px 0; -webkit-overflow-scrolling:touch; }
nakamotox-case-study .nx-study-table{ width:100%; min-width:620px; border-collapse:collapse; text-align:left; line-height:1.6; font-size:14px; }
nakamotox-case-study .nx-study-table th,
nakamotox-case-study .nx-study-table td{ padding:14px 17px; vertical-align:top; border-bottom:1px solid var(--border, rgb(255 255 255 / .1)); }
nakamotox-case-study .nx-study-table thead{ background:var(--surface, #19171b); }
nakamotox-case-study .nx-study-table thead th{ color:var(--text, #fff); font-size:13px; font-weight:700; }
nakamotox-case-study .nx-study-table tbody th{ color:var(--text, #fff); font-weight:600; }
nakamotox-case-study .nx-study-table td{ color:var(--text2, #b5b1bc); }
nakamotox-case-study .nx-study-table tr:last-child th,
nakamotox-case-study .nx-study-table tr:last-child td{ border-bottom:0; }
nakamotox-case-study .nx-study-table tbody th:first-child{ width:145px; }
nakamotox-case-study .nx-study-table td:nth-child(2){ width:210px; }
nakamotox-case-study .nx-study-api{ min-width:680px; }
nakamotox-case-study .nx-study-api td:first-child{ width:76px; }
nakamotox-case-study .nx-study-api th[scope="row"]{ width:230px; white-space:nowrap; }
nakamotox-case-study .nx-study-api code{ font-family:ui-monospace, Consolas, monospace; font-size:12px; }
nakamotox-case-study .nx-study-method{ color:var(--accent, #b99af5); font-size:12px; font-weight:700; }
nakamotox-case-study .nx-study-tree{ color:var(--text, #fff); background:var(--surface, #19171b); border:1px solid var(--border, rgb(255 255 255 / .1)); border-radius:12px; padding:22px; margin:24px 0; max-width:100%; overflow:auto; overscroll-behavior-x:contain; font:13px/1.8 ui-monospace, Consolas, monospace; tab-size:4; }
nakamotox-case-study .nx-study-tree code{ font:inherit; }
nakamotox-case-study .nx-study-algorithm{ margin:28px 0; }
nakamotox-case-study .nx-study-arx{ margin:24px 0; display:flex; flex-direction:column; gap:12px; }
nakamotox-case-study .nx-study-arx div{ display:grid; grid-template-columns:95px minmax(0, 1fr); gap:18px; max-width:72ch; }
nakamotox-case-study .nx-study-arx dt{ font-size:14px; color:var(--accent, #b99af5); font-weight:700; }
nakamotox-case-study .nx-study-arx dd{ margin:0; color:var(--text2, #b5b1bc); font-size:14px; }
nakamotox-case-study .nx-study-sources{ display:flex; flex-wrap:wrap; gap:2px 24px; }
nakamotox-case-study .nx-study-sources a{ min-height:44px; display:inline-flex; align-items:center; gap:4px; font-size:13px; overflow-wrap:anywhere; text-decoration:none; }

@media (max-width:760px){
  nakamotox-case-study .nx-study{ font-size:15px; padding-top:20px; }
  nakamotox-case-study .nx-study-hero{ align-items:flex-start; gap:20px; }
  nakamotox-case-study .nx-study-mark{ width:96px; }
  nakamotox-case-study .nx-study-feature{ grid-template-columns:1fr; gap:0; padding:20px 0; }
  nakamotox-case-study .nx-study-feature h3{ margin-bottom:10px; }
  nakamotox-case-study .nx-study-flow{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px; }
  nakamotox-case-study .nx-study-flow li:nth-child(2) .nx-study-flow-arrow{ display:none; }
}
@media (max-width:520px){
  nakamotox-case-study .nx-study-hero{ display:block; padding-bottom:22px; }
  nakamotox-case-study .nx-study-mark{ display:none; }
  nakamotox-case-study .nx-study .nx-study-course{ font-size:12px; margin-bottom:18px; }
  nakamotox-case-study .nx-study h1{ max-width:18ch; font-size:32px; line-height:1.12; }
  nakamotox-case-study .nx-study-section{ padding-top:28px; }
  nakamotox-case-study .nx-study-section-title{ scroll-margin-top:132px; margin-bottom:20px; gap:12px; }
  nakamotox-case-study .nx-study-aside{ padding:18px; }
  nakamotox-case-study .nx-study-flow{ grid-template-columns:1fr; gap:28px; }
  nakamotox-case-study .nx-study-flow li{ padding:16px 18px; }
  nakamotox-case-study .nx-study-flow-arrow{ right:50%; top:auto; bottom:-25px; transform:translateX(50%) rotate(90deg); }
  nakamotox-case-study .nx-study-flow li:nth-child(2) .nx-study-flow-arrow{ display:block; }
  nakamotox-case-study .nx-study-tree{ padding:17px; font-size:12px; }
  nakamotox-case-study .nx-study-arx div{ grid-template-columns:80px minmax(0, 1fr); gap:12px; }
}

/* Shared reading layout refinements. */
.app .nakamotox-case-body{max-width:1192px;padding:0;}
.app .nakamotox-case-toolbar{max-width:1192px;padding:10px 28px;}
.app .nakamotox-case-page{scrollbar-gutter:stable;}
.app nakamotox-case-study .nx-study{padding:0;font-size:16px;line-height:1.85;}
.app nakamotox-case-study .nx-study-hero{align-items:flex-start;padding-bottom:24px;}
.app nakamotox-case-study .nx-study-mark{width:88px;margin-top:56px;}
.app nakamotox-case-study .nx-study-course{background:none;border:0;padding:0;font-size:12px;margin-bottom:26px;}
.app nakamotox-case-study .wr-project-name{color:var(--accent);font-size:clamp(36px,4.5vw,58px);line-height:1;font-weight:850;letter-spacing:-.035em;margin-bottom:20px;}
.app nakamotox-case-study .nx-study h1{font-size:clamp(28px,3vw,40px);line-height:1.16;font-weight:750;letter-spacing:-.025em;max-width:24ch;}
.app nakamotox-case-study .nx-study-intro{font-size:18px;line-height:1.65;}
.app nakamotox-case-study .nx-study-section{padding:0;border-top:0;margin-bottom:48px;}
.app nakamotox-case-study .nx-study-summary{padding-top:36px;border-top:1px solid var(--border);}
.app nakamotox-case-study .nx-study .nx-study-section-title{font-size:24px;line-height:1.3;font-weight:750;letter-spacing:-.015em;scroll-margin-top:96px;margin-bottom:20px;}
.app nakamotox-case-study #nx-case-top{scroll-margin-top:96px;}
.app nakamotox-case-study .wr-toc a{color:var(--text2);text-decoration:none;font-weight:400;font-size:13px;}
.app nakamotox-case-study .wr-toc a:hover,.app nakamotox-case-study .wr-toc a[aria-current]{color:var(--accent);}
.app nakamotox-case-study .wr-toc a[aria-current]{font-weight:750;}
.app nakamotox-case-study .wr-toc-title{font-size:13px;font-weight:750;color:var(--text);margin-bottom:14px;}
.app nakamotox-case-study .nx-study-aside{background:none;border:0;padding:0;margin:32px 0;}
.app nakamotox-case-study .wr-footer a{text-decoration:none;}
@media(max-width:840px){.app .nakamotox-case-toolbar{padding:10px 20px;}.app nakamotox-case-study .wr-toc a{font-size:12px;}}
@media(max-width:500px){.app .nakamotox-case-toolbar{padding:8px 16px;gap:8px;flex-wrap:nowrap;}.app .nakamotox-case-toolbar a{font-size:12px;}.app .case-controls{gap:0;}.app nakamotox-case-study .nx-study h1{font-size:29px;}.app nakamotox-case-study .nx-study-intro{font-size:16px;}.app nakamotox-case-study .nx-study .nx-study-section-title{font-size:22px;scroll-margin-top:84px;}.app nakamotox-case-study #nx-case-top{scroll-margin-top:84px;}}
