/* Community R4: an authored gift sample book. Shared rules, existing structure.
   Scope is discovery + public product detail. Private designs and other routes
   inherit their existing mother system, and product/author images keep their color.
   Design read: an authored gift archive, charcoal index / paper front / creative reverse.
   DESIGN_VARIANCE 4; MOTION_INTENSITY 2; VISUAL_DENSITY 4. */
#typewriterWorkshop .cw-community-page,
#typewriterWorkshop #view-result[data-community-product] {
  /* Foundations: current ContextWrap canvas, ink and brand orange. */
  --cw-community-canvas: #f6f7f8;
  --cw-community-paper: #ffffff;
  --cw-community-soft: #eef0f1;
  --cw-community-paper-warm: #fffdf9;
  --cw-community-stage: #202124;
  --cw-community-ink: #202124;
  --cw-community-muted: #646970;
  --cw-community-rule: #dadddf;
  --cw-community-control-rule: #858c96;
  --cw-community-brand: #f2642a;
  --cw-community-brand-text: #9d3d19;
  --cw-community-brand-on-inverse: #ff925f;
  --cw-community-brand-soft: #fff2e9;
  --cw-community-brand-border: #e7a68a;

  /* Functional colors: focus and selection are not favorite or stock signals. */
  --cw-community-hover: #eef0f2;
  --cw-community-pressed: #e1e5e9;
  --cw-community-selected: var(--cw-community-hover);
  --cw-community-disabled: #e9ecef;
  --cw-community-action-hover: #34373d;
  --cw-community-action-pressed: #454a52;
  --cw-community-focus: var(--cw-community-ink);
  --cw-community-focus-halo: rgb(32 33 36 / 12%);
  --cw-community-shadow-art: 0 14px 34px rgb(32 33 36 / 7%);
  /* Existing status colors are mapped, not new status behavior. */
  --cw-community-success: #252523;
  --cw-community-success-soft: #edf3e9;
  --cw-community-warning: #a23d18; /* Reserved: no new warning state introduced. */
  --cw-community-error: #843d30;
  --cw-community-error-soft: #f7eee8;

  /* Charcoal indexes and spotlights work; colored paper carries its story. */
  --cw-community-inverse: var(--cw-community-ink);
  --cw-community-inverse-text: #f7f8f8;
  --cw-community-inverse-muted: #bec3ca;
  --cw-community-inverse-rule: #41464e;
  --cw-community-inverse-control-rule: #9097a1;
  --cw-community-inverse-surface: #30343b;
  --cw-community-inverse-hover: #2b2f35;
  --cw-community-inverse-pressed: #454a52;
  --cw-community-learning: var(--cw-community-paper);
  --cw-community-learning-rule: var(--cw-community-rule);

  /* One local family; size, weight and measure distinguish the roles. */
  --cw-community-font-ui: var(--cw-font-sans, "Manrope", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif);
  --cw-community-font-display: var(--cw-community-font-ui);
  --cw-community-font-prompt: var(--cw-community-font-ui);
  --cw-community-type-page: clamp(36px, 3vw, 48px);
  --cw-community-type-intro: clamp(32px, 2.4vw, 40px);
  --cw-community-type-section: clamp(28px, 2.6vw, 32px);
  --cw-community-type-feature: 28px;
  --cw-community-type-item: 20px;
  --cw-community-type-card: 18px;
  --cw-community-type-small-heading: 24px;
  --cw-community-type-body: 15px;
  --cw-community-type-control: 13px;
  --cw-community-type-meta: 12px;
  --cw-community-type-prompt: 16px;
  --cw-community-line-body: 1.6;
  --cw-community-line-prompt: 1.65;
  --cw-community-line-heading: 1.18;
  --cw-community-weight-heading: 500;
  --cw-community-weight-item: 600;
  --cw-community-tracking-display: -.025em;

  /* A finite spacing scale, with roles shared across different page densities. */
  --cw-community-space-1: 4px;
  --cw-community-space-2: 8px;
  --cw-community-space-3: 12px;
  --cw-community-space-4: 16px;
  --cw-community-space-5: 20px;
  --cw-community-space-6: 24px;
  --cw-community-space-7: 28px;
  --cw-community-space-8: 32px;
  --cw-community-space-10: 40px;
  --cw-community-space-12: 48px;
  --cw-community-space-14: 56px;
  --cw-community-space-16: 64px;
  --cw-community-space-18: 72px;
  --cw-community-gap-inline: var(--cw-community-space-2);
  --cw-community-gap-group: var(--cw-community-space-4);
  --cw-community-gap-grid: var(--cw-community-space-6);
  --cw-community-gap-section: var(--cw-community-space-16);
  --cw-community-radius-panel: 16px;
  --cw-community-radius-inner: 12px;
  --cw-community-radius-paper: 8px;
  --cw-community-radius-stage: 24px;
  --cw-community-radius-control: 10px;
  --cw-community-content-max: var(--cw-display-width, 1760px);
  --cw-community-reading-max: 68ch;
  --cw-community-motion-feedback: 140ms;
  --cw-community-motion-content: 240ms;
  --cw-community-ease-out: cubic-bezier(.23,1,.32,1);
  --cw-community-motion-current: 24s;
}

/* Discovery-only calibration. Product-detail and saved-design surfaces keep
   their existing palette. One white object surface, one charcoal index. */
#typewriterWorkshop .cw-community-page {
  --cw-community-inverse-surface: #2e3130;
  --cw-community-inverse-rule: #444846;
  --cw-community-inverse-muted: #c2c7c4;
  --cw-community-inverse-hover: #353936;
  --cw-community-inverse-pressed: #464c48;
  --cw-community-divider: #e6e8e7;
  --cw-community-shadow-card-art: 0 7px 12px rgb(32 33 36 / 6%);
  --cw-community-shadow-feature-art: 0 10px 20px rgb(32 33 36 / 7%);
  --cw-community-line-item: 1.25;
  --cw-community-tracking-item: -.018em;
  --cw-community-card-content-inset: 16px 0 0;
  --cw-community-card-maker-gap: 8px 0 16px;
  --cw-community-type-creator: 13px;
  --cw-community-size-creator: 32px;
  --cw-community-weight-action: 600;
}

@media (max-width:820px) {
  #typewriterWorkshop .cw-community-page {
    --cw-community-gap-grid: var(--cw-community-space-5);
    --cw-community-gap-section: var(--cw-community-space-12);
  }
}

/* The public purchase detail keeps its existing reading / purchase measure. */
#typewriterWorkshop #view-result[data-community-product] {
  --cw-community-content-max: 1176px;
}

/* Published color directions become paired paper / ink families. */
#typewriterWorkshop .cw-community-page {
  --cw-community-poster-lavender-soft-paper: #eeedf4;
  --cw-community-poster-lavender-soft-ink: #342c40;
  --cw-community-poster-lavender-soft-muted: #685f72;
  --cw-community-poster-lavender-soft-rule: #cfc8d6;
  --cw-community-poster-lavender-soft-panel: #ffffff70;
  --cw-community-poster-rose-soft-paper: #f2e7e6;
  --cw-community-poster-rose-soft-ink: #553b40;
  --cw-community-poster-rose-soft-muted: #786065;
  --cw-community-poster-rose-soft-rule: #ddc8cb;
  --cw-community-poster-rose-soft-panel: #ffffff70;
  --cw-community-poster-honey-soft-paper: #f1ebdc;
  --cw-community-poster-honey-soft-ink: #49402d;
  --cw-community-poster-honey-soft-muted: #706653;
  --cw-community-poster-honey-soft-rule: #d6ccb6;
  --cw-community-poster-honey-soft-panel: #ffffff70;
  --cw-community-poster-sky-soft-paper: #e7ecf4;
  --cw-community-poster-sky-soft-ink: #354462;
  --cw-community-poster-sky-soft-muted: #58667c;
  --cw-community-poster-sky-soft-rule: #c5cedd;
  --cw-community-poster-sky-soft-panel: #ffffff70;
  --cw-community-poster-apricot-soft-paper: #f4e7db;
  --cw-community-poster-apricot-soft-ink: #583e2e;
  --cw-community-poster-apricot-soft-muted: #7a604d;
  --cw-community-poster-apricot-soft-rule: #ddcbbb;
  --cw-community-poster-apricot-soft-panel: #ffffff70;
  --cw-community-poster-sage-soft-paper: #e8eee6;
  --cw-community-poster-sage-soft-ink: #304535;
  --cw-community-poster-sage-soft-muted: #5c695c;
  --cw-community-poster-sage-soft-rule: #c5d0c2;
  --cw-community-poster-sage-soft-panel: #ffffff70;
  --cw-community-poster-lavender-rich-paper: #d8cdea;
  --cw-community-poster-lavender-rich-ink: #372644;
  --cw-community-poster-lavender-rich-muted: #675173;
  --cw-community-poster-lavender-rich-rule: #b5a4c6;
  --cw-community-poster-lavender-rich-panel: #ffffff40;
  --cw-community-poster-rose-rich-paper: #edc1c5;
  --cw-community-poster-rose-rich-ink: #502b38;
  --cw-community-poster-rose-rich-muted: #784754;
  --cw-community-poster-rose-rich-rule: #ce999f;
  --cw-community-poster-rose-rich-panel: #ffffff40;
  --cw-community-poster-honey-rich-paper: #ead587;
  --cw-community-poster-honey-rich-ink: #453719;
  --cw-community-poster-honey-rich-muted: #695728;
  --cw-community-poster-honey-rich-rule: #c9b363;
  --cw-community-poster-honey-rich-panel: #ffffff40;
  --cw-community-poster-sky-rich-paper: #bcd8e6;
  --cw-community-poster-sky-rich-ink: #253f52;
  --cw-community-poster-sky-rich-muted: #3d5e72;
  --cw-community-poster-sky-rich-rule: #95b8ce;
  --cw-community-poster-sky-rich-panel: #ffffff40;
  --cw-community-poster-apricot-rich-paper: #efbd99;
  --cw-community-poster-apricot-rich-ink: #512f22;
  --cw-community-poster-apricot-rich-muted: #72442f;
  --cw-community-poster-apricot-rich-rule: #ca936e;
  --cw-community-poster-apricot-rich-panel: #ffffff40;
  --cw-community-poster-sage-rich-paper: #c8d8b1;
  --cw-community-poster-sage-rich-ink: #31422d;
  --cw-community-poster-sage-rich-muted: #4c5f3f;
  --cw-community-poster-sage-rich-rule: #a1b68a;
  --cw-community-poster-sage-rich-panel: #ffffff40;
}

/* One work keeps its board color across shelf, library and recommendation. */
#typewriterWorkshop .cw-community-page .cd-card[data-design="midnight-garden"] { --cd-library-art:#d2c8d2; --cd-ready-art:#d2c8d2; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="thirty-in-blush"] { --cd-library-art:#aebbb0; --cd-ready-art:#aebbb0; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="golden-stems"] { --cd-library-art:#71806b; --cd-ready-art:#71806b; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="hello-little-one"] { --cd-library-art:#d8bbbd; --cd-ready-art:#d8bbbd; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="poppy-just-because"] { --cd-library-art:#ecd6c2; --cd-ready-art:#ecd6c2; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="joy-to-your-home"] { --cd-library-art:#71877e; --cd-ready-art:#71877e; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="ribbon-rhythm"] { --cd-library-art:#665361; --cd-ready-art:#665361; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="mint-confetti"] { --cd-library-art:#e4cfa4; --cd-ready-art:#e4cfa4; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="pages-she-opened"] { --cd-library-art:#453341; --cd-ready-art:#453341; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="quiet-new-home"] { --cd-library-art:#75897b; --cd-ready-art:#75897b; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="teacher-opened-worlds"] { --cd-library-art:#c8ad7b; --cd-ready-art:#c8ad7b; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="fifty-full-green"] { --cd-library-art:#d6cbaf; --cd-ready-art:#d6cbaf; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="thirty-years"] { --cd-library-art:#cab2b1; --cd-ready-art:#cab2b1; }
#typewriterWorkshop .cw-community-page .cd-card[data-design="moonlit-wishes"] { --cd-library-art:#4c5775; --cd-ready-art:#4c5775; }
