* { box-sizing:border-box; }
body { margin:0; font-size:1rem; }
.auth-gate {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1420px;
  margin: auto;
  padding: 0 clamp(24px, 6vw, 96px);
}
.auth-gate[hidden], .app-shell[hidden] { display: none; }
.login-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  min-height: 5.25rem;
  padding-block: .65rem;
  border-bottom: 1px solid var(--ink);
}
#loginWordmark { font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.15; }
.login-masthead a, .company-link { color: inherit; text-underline-offset: .35em; }
.login-masthead a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .875rem;
}
.login-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  padding-block: clamp(1rem, 2.5vw, 2.25rem) clamp(2.5rem, 6vw, 6rem);
}
.login-spread .login-cover {
  display: grid;
  align-content: end;
  grid-template-columns: minmax(0, 1fr);
  aspect-ratio: auto;
  min-block-size: clamp(20rem, 36vw, 30rem);
  padding: clamp(1.5rem, 4.8vw, 4.5rem);
  background:
    linear-gradient(to right, #f4f0e7 0%, rgb(244 240 231 / 88%) 32%, transparent 70%),
    var(--paper-deep) url("/assets/brand/ink-grid.webp") center / cover;
}
.login-cover h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.8vw, 4.75rem);
  font-weight: 500;
  line-height: 1.32;
  overflow-wrap: break-word;
  line-break: strict;
}
.login-initials {
  display: inline-block;
  margin-inline-end: .14em;
  font-size: 1.18em;
  letter-spacing: -.045em;
}
.login-actions { width: min(100%, 21rem); justify-self: end; overflow-wrap: break-word; }
.login-actions button {
  display: flex;
  width: 100%;
  min-height: 3.25rem;
  padding: .85rem 1rem;
  justify-content: center;
  align-items: center;
  gap: .7rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  line-height: 1.5;
  font-weight: 650;
  cursor: pointer;
}
.login-actions button:hover { background: #45433f; }
.login-actions button svg { flex: none; stroke: none; fill: currentColor; }
.auth-error { margin: .75rem 0 0; color: #a3241a; font-size: .875rem; line-height: 1.6; }
.auth-error:empty { margin: 0; }
.ink-plate { position: relative; aspect-ratio: 5/4; border: 1px solid var(--line); background-color: var(--paper-deep); }
.ink-plate::before, .ink-plate::after { content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none; }
.ink-plate::before { top: -1px; left: -1px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.ink-plate::after { right: -1px; bottom: -1px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
@media (max-width: 48rem) {
  .auth-gate { padding-inline: clamp(1rem, 5vw, 2rem); }
  .login-masthead { min-height: 4.25rem; }
  .login-spread .login-cover {
    min-block-size: clamp(15rem, 72vw, 24rem);
    background-image:
      linear-gradient(to top, #f4f0e7 0%, rgb(244 240 231 / 88%) 25%, transparent 72%),
      url("/assets/brand/ink-grid.webp");
    background-position: center, 72% center;
  }
  .login-cover h1 { font-size: clamp(2rem, 7vw, 3.25rem); }
  .login-initials { display: block; margin: 0; font-size: 1.7em; line-height: 1.05; }
  .login-actions { width: 100%; }
}
@media (width > 48rem) {
  .auth-gate { max-width: 1700px; padding-inline: clamp(1.5rem, 4vw, 4.5rem); }
  .login-spread {
    --cover-inset: clamp(2rem, 5vw, 6rem);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-content: center;
    min-block-size: clamp(31rem, 74svh, 56rem);
    margin-block: clamp(1rem, 2vw, 2rem) 2rem;
    padding: var(--cover-inset);
    border: 1px solid var(--line);
    background:
      linear-gradient(90deg, #f4f0e7 0%, rgb(244 240 231 / 90%) 45%, transparent 80%),
      var(--paper-deep) url("/assets/brand/ink-grid.webp") center / cover;
  }
  .login-spread .login-cover {
    min-block-size: 0;
    padding: 0;
    border: 0;
    background: none;
  }
  .login-cover::before, .login-cover::after { content: none; }
  .login-cover h1 { max-inline-size: 12em; font-size: clamp(3.25rem, 6.2vw, 7rem); }
  .login-actions { width: min(100%, 24rem); justify-self: start; }
  .login-actions button { min-height: 4.25rem; font-size: 1.125rem; }
}
.user-menu { min-width:0; margin-left:auto; display:flex; align-items:center; gap:10px; font-size:.78rem; }.user-menu > span { min-width:0; overflow-wrap:anywhere; }.user-menu[hidden] { display:none; }.user-menu a,.user-menu button { min-height:38px; padding:8px 11px; border:1px solid var(--line);  background:white; color:var(--ink); text-decoration:none; cursor:pointer; }.user-menu a { background:var(--ink); color:white; }
button,input { font:inherit; }
button { color:inherit; }
button:focus-visible,a:focus-visible,input:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:260px minmax(0,1fr); }
.sidebar { position:sticky; top:0; height:100vh; background:var(--ink); color:white; padding:32px 22px 24px; display:flex; flex-direction:column; z-index:20; }
.brand { display: grid; justify-items: start; gap: 10px; color: white; text-decoration: none; margin-bottom: 40px; }
.brand .coco-wordmark { font-size: 3.2rem; }
.brand-caption { font-size: .78rem; letter-spacing: .14em; }
.company-link { width: fit-content; margin-top: auto; padding-block: 16px 4px; color: #ddd9d1; font-size: .8rem; }
nav { display:grid; gap:7px; }
.nav-item { width:100%; border:0;  background:transparent; color:#bbb; padding:13px 14px; text-align:left; cursor:pointer; display:flex; justify-content:space-between; }
.nav-item:hover,.nav-item.active { background:#45433f; color:white; }.nav-item.active { box-shadow:inset 2px 0 var(--paper); }

main { min-width:0; }.topbar { min-height:76px; padding:0 clamp(20px,5vw,72px); display:flex; align-items:center; border-bottom:1px solid var(--line); }
.menu-button { display:none; width:44px; height:44px; place-items:center; border:0; background:none; }
.search-box { width:min(620px,100%); min-width:0; height:44px; display:flex; align-items:center; gap:10px; padding:0 14px; background:white; border:1px solid var(--line);  }
.search-box>svg { width:18px; height:18px; color:var(--muted); }.search-box input { flex:1; min-width:0; border:0; outline:0; background:transparent; }.search-box:focus-within { outline:2px solid var(--focus); outline-offset:1px; }
kbd { border:1px solid var(--line); border-bottom-width:2px; padding:2px 7px;  color:var(--muted); font-size:.75rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 64px);
  align-items: center;
  padding: clamp(36px, 5vw, 76px) clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.hero .ink-plate { background: var(--paper-deep) url("/assets/brand/ink-grid.webp") 74% center/cover; }
.eyebrow { margin: 0 0 16px; color: var(--muted); font-size: .78rem; letter-spacing: .12em; }
.hero h1 { margin: 0; font-weight: 500; font-size: clamp(2.35rem, 4vw, 4rem); line-height: 1.18; }
.hero-copy > p:not(.eyebrow) { max-width: 32em; margin: 18px 0 0; color: var(--muted); line-height: 1.85; }
.hero-copy > .hero-meta { font-size: .82rem; }
.hero-meta strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.library { padding:58px clamp(20px,5vw,72px) 100px; }.section-heading { display:flex; justify-content:space-between; align-items:end; gap:20px; }.section-heading h2 { font-size:clamp(1.8rem,3vw,2.5rem); margin:0; }.section-heading .eyebrow { margin-bottom:8px; }.section-heading>p { color:var(--muted); }
.filters { display:flex; flex-wrap:wrap; gap:8px; margin:28px 0; }.filter { min-height:44px; padding:9px 17px; border:1px solid var(--line); background:transparent;  cursor:pointer; }.filter:hover,.filter.active { background:var(--ink); color:white; border-color:var(--ink); }
.manual-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }.manual-card { background:white; border:1px solid var(--line);  padding:22px; transition:border-color .2s ease; }.manual-card:hover { border-color:var(--ink); }
.card-topline { display:flex; justify-content:space-between; }.category { align-self:center; display:inline-flex; width:max-content; padding:5px 10px; background:var(--paper-deep);  font-size:.76rem; font-weight:800; }.star { min-width:44px; min-height:44px; border:0; background:none; font-size:1.4rem; color:var(--muted); cursor:pointer; }.star.active { color:var(--ink); }
.card-link { display:block; width:100%; padding:0; border:0; background:none; text-align:left; cursor:pointer; }.card-link h3 { font-size:1.35rem; line-height:1.55; font-weight:600; margin:18px 0 10px; }.card-link>p { min-height:52px; color:var(--muted); line-height:1.65; margin:0; }.card-meta,.progress-row { display:flex; gap:14px; color:var(--muted); font-size:.78rem; }.card-meta { margin-top:24px; }.progress-row { justify-content:space-between; margin-top:20px; }.progress-track { height:5px; background:#ecebe5;  margin-top:7px; overflow:hidden; }.progress-track span { display:block; height:100%; background:var(--ink); }
.empty-state { text-align:center; padding:60px 20px; border:1px dashed var(--line);  color:var(--muted); }.empty-state strong { color:var(--ink); }
dialog { width:calc(100% - 28px); max-width:1500px; height:calc(100% - 28px); max-height:none; padding:0; border:0;  box-shadow:0 30px 80px rgba(0,0,0,.3); }dialog::backdrop { background:rgba(12,12,10,.72); backdrop-filter:blur(6px); }.dialog-layout { min-height:100%; background:var(--white); }.dialog-topbar { position:sticky; top:0; z-index:20; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; padding:12px 18px; background:rgba(255,255,255,.94); backdrop-filter:blur(12px); border-bottom:1px solid var(--line); }.dialog-brand { display:flex; align-items:center; gap:10px; font-size:.75rem; letter-spacing:.16em; }.dialog-brand .coco-wordmark { font-size:1.75rem; }.icon-button,.favorite-button { min-height:44px; border:1px solid var(--line); background:white;  padding:8px 14px; cursor:pointer; }.icon-button { width:44px; display:grid; place-items:center; }.favorite-button { justify-self:end; }.favorite-button.active { background:var(--ink); color:white; }
.detail-header { padding: clamp(36px, 5vw, 76px) max(5vw, calc((100% - 1120px) / 2)); background: var(--paper); border-bottom: 1px solid var(--line); }
.detail-header h2 { max-width: 22em; font-size: clamp(2rem, 3.8vw, 3.8rem); font-weight: 500; line-height: 1.35; margin: 18px 0; overflow-wrap: anywhere; }
.detail-header > p { max-width: 49em; color: var(--muted); line-height: 1.9; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: .8rem; color: var(--muted); }
.article-layout { display:grid; grid-template-columns:minmax(150px,210px) minmax(0,780px); justify-content:center; gap:clamp(30px,5vw,80px); padding:80px clamp(24px,5vw,80px) 110px; }.article-toc { position:sticky; top:95px; align-self:start; }.article-toc>p { margin:0 0 16px; font-size:.75rem; font-weight:800; letter-spacing:.12em; }.article-toc a { display:flex; gap:12px; padding:12px 0; border-top:1px solid var(--line); color:var(--muted); font-size:.82rem; line-height:1.4; text-decoration:none; }.article-toc a:hover { color:var(--ink); }.article-toc a span { color:var(--ink); font-family:ui-monospace,monospace; }.detail-body { min-width:0; }.article-section { margin:0 0 100px; scroll-margin-top:100px; }.section-number { width:48px; height:48px; display:grid; place-items:center; margin-bottom:22px;  background:var(--ink); color:var(--paper-deep); font-family:ui-monospace,monospace; font-size:.8rem; }.detail-body h3 { font-size:clamp(1.65rem,3vw,2.25rem); letter-spacing:-.035em; margin:0 0 20px; }.detail-body .article-section>p { max-width:720px; margin:0; color:#41413d; font-size:1.04rem; line-height:2; word-break:auto-phrase; }.article-note { margin:30px 0; padding:20px 22px; border-left:2px solid var(--ink); background:var(--paper-deep); }.article-note strong { display:block; margin-bottom:7px; font-size:.83rem; }.article-note p { margin:0; color:var(--ink); line-height:1.7; }
.manual-shot { margin:38px 0 0; }.shot-stage,.shot-placeholder>div { display:grid; place-items:center; width:100%; min-height:360px; padding:32px; overflow:hidden; border:1px solid #bcbab2;  background:#ebe9e2;  }.manual-shot img { display:block; width:100%;  }.manual-shot.portrait .shot-stage { background:var(--paper-deep); }.manual-shot.portrait img { width:min(390px,100%); border:1px solid #b3b0a8;   }.shot-placeholder>div { aspect-ratio:16/9; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; background-color:#f0efe9; background-image:linear-gradient(45deg,#e7e5dd 25%,transparent 25%),linear-gradient(-45deg,#e7e5dd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7e5dd 75%),linear-gradient(-45deg,transparent 75%,#e7e5dd 75%); background-size:20px 20px; background-position:0 0,0 10px,10px -10px,-10px 0; }.shot-placeholder>div>* { position:relative; z-index:1; }.shot-placeholder svg { width:42px; height:42px; color:var(--ink); }.shot-placeholder strong { font-size:1rem; }.shot-placeholder small { max-width:70%; padding:5px 9px; background:white;  color:var(--muted); text-align:center; }.shot-placeholder>div>span { padding:4px 8px; background:var(--ink); color:white; font-size:.66rem; letter-spacing:.12em; }.manual-shot figcaption { display:flex; gap:18px; padding:13px 2px; color:var(--muted); font-size:.78rem; line-height:1.5; }.manual-shot figcaption span { flex:none; color:var(--ink); font-family:ui-monospace,monospace; font-weight:800; letter-spacing:.08em; }
.checklist { scroll-margin-top:100px; padding:32px; background:var(--ink); color:white;  }.checklist .eyebrow { color:var(--paper-deep); }.checklist h3 { margin-bottom:20px; }.checklist label { min-height:52px; display:flex; gap:12px; align-items:center; padding:12px 0; border-top:1px solid #383833; cursor:pointer; }.checklist input { flex:none; width:22px; height:22px; accent-color:var(--paper-deep); }.checklist input:checked+span { color:#c7c4be; text-decoration:line-through; }
.scrim { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:10; }
@media (max-width:1100px) { .article-layout { grid-template-columns:minmax(0,780px); }.article-toc { position:static; }.article-toc { display:flex; gap:8px; overflow:auto; padding-bottom:8px; }.article-toc>p { display:none; }.article-toc a { flex:none; padding:9px 12px; border:1px solid var(--line);  }}
@media (max-width:860px) { .app-shell { grid-template-columns:1fr; }.sidebar { position:fixed; left:0; visibility:hidden; transform:translateX(-100%); width:min(300px,86vw); transition:.2s ease; }.sidebar.open { transform:translateX(0); visibility:visible; }.menu-button { display:grid; margin-right:6px; }.manual-grid { grid-template-columns:1fr; }.topbar { padding:0 12px; } kbd { display:none; } dialog { width:100%; height:100%; border-radius:0; }.dialog-brand strong { display:none; }.dialog-topbar { padding:10px 12px; }.detail-header { padding:38px 22px; }.article-layout { padding:38px 20px 70px; gap:35px; }.article-section { margin-bottom:70px; }.shot-stage { min-height:280px; padding:18px; }.manual-shot.portrait img { width:min(390px,100%); }.manual-shot figcaption { display:grid; gap:5px; }.shot-placeholder small { max-width:88%; }.favorite-button { font-size:.78rem; padding:8px 10px; } }
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; transition:none!important; } }
.manual-card.coming-soon { background:transparent; border-style:dashed; box-shadow:none; }.manual-card.coming-soon:hover { transform:none; box-shadow:none; }.coming-soon-badge { color:var(--ink); font-size:.68rem; font-weight:900; letter-spacing:.12em; }.static-card { cursor:default; }
.close-reader { min-height:44px; display:flex; align-items:center; gap:7px; padding:8px 14px; border:1px solid var(--line);  background:white; font-weight:700; cursor:pointer; }.close-reader:hover { background:var(--ink); color:white; border-color:var(--ink); }
@media (max-width:860px) { .dialog-brand { display:none; }.dialog-topbar { grid-template-columns:auto 1fr; }.close-reader { justify-self:start; }.favorite-button { justify-self:end; } }
.image-workflow { margin-top:36px; }.download-panel { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:22px; border:1px solid var(--line);  background:var(--paper); }.download-panel strong { font-size:1rem; }.download-panel p { margin:5px 0 0; color:var(--muted); font-size:.82rem; }.store-links { display:flex; gap:8px; flex:none; }.store-links a,.prompt-box>a { padding:10px 14px;  background:var(--ink); color:white; font-size:.8rem; font-weight:800; text-decoration:none; }.workflow-steps { display:grid; gap:18px; margin-top:24px; }.workflow-steps article { display:grid; grid-template-columns:minmax(0,1fr) 250px; align-items:center; gap:28px; padding:24px; border:1px solid var(--line);  background:white; }.workflow-copy>span { color:var(--ink); font-family:ui-monospace,monospace; font-size:.7rem; font-weight:800; letter-spacing:.1em; }.workflow-copy h4 { margin:8px 0 10px; font-size:1.2rem; }.workflow-copy p { margin:0; color:var(--muted); line-height:1.7; font-size:.9rem; }.workflow-shot { padding:12px;  background:#efede7; }.workflow-shot img { display:block; width:100%; max-height:430px; object-fit:contain;  }.prompt-box { margin-top:24px; padding:28px;  background:var(--ink); color:white; }.prompt-box .eyebrow { margin-bottom:6px; color:var(--paper-deep); }.prompt-box h4 { margin:0 0 20px; font-size:1.25rem; }.prompt-box pre { margin:0 0 20px; padding:18px; overflow:auto; border:1px solid #3f3f39;  background:#20201d; color:#eee; font:400 .9rem/1.8 system-ui,sans-serif; white-space:pre-wrap; word-break:auto-phrase; }.prompt-box button { min-height:46px; display:inline-flex; align-items:center; gap:8px; margin-right:8px; padding:10px 16px; border:0;  background:var(--paper-deep); color:var(--ink); font-weight:900; cursor:pointer; }.prompt-box>a { display:inline-flex; background:white; color:var(--ink); }
@media (max-width:680px) { .download-panel { display:grid; }.store-links { display:grid; grid-template-columns:1fr 1fr; }.store-links a { text-align:center; }.workflow-steps article { grid-template-columns:1fr; }.workflow-shot { order:-1; }.prompt-box button,.prompt-box>a { width:100%; justify-content:center; margin:0 0 8px; } }
.research-example { margin:34px 0; padding:28px; border:1px solid var(--line);  background:#f8f7f2; }.example-heading .eyebrow { margin-bottom:7px; color:var(--ink); }.example-heading h4 { margin:0 0 24px; font-size:1.35rem; }.research-example figure { margin:0 0 22px; }.research-example figure img { display:block; width:100%; max-height:520px; object-fit:contain; border:1px solid #cbc8c0;  background:#111; }.research-example figure figcaption { padding:9px 2px; color:var(--muted); font-size:.78rem; }.example-values { display:grid; grid-template-columns:1fr 1fr; gap:1px; margin:0 0 22px; overflow:hidden; border:1px solid var(--line);  background:var(--line); }.example-values div { min-width:0; display:grid; gap:5px; padding:14px; background:white; }.example-values span { color:var(--muted); font-size:.72rem; }.example-values strong { overflow-wrap:break-word; font-size:.88rem; }.example-tip { margin:0!important; padding:16px 18px; border-left:2px solid var(--ink); background:var(--paper-deep); color:var(--ink)!important; font-size:.86rem!important; line-height:1.7!important; }
@media (max-width:680px) { .research-example { padding:20px 15px; }.example-values { grid-template-columns:1fr; } }
