:root { --gram-font-sans: system-ui, -apple-system, sans-serif; --gram-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* Semantic Colors - Base (Light Mode defaults) */ --item-ingredient-text: #7c3aed; /* Purple */ --item-cookware-text: #2563eb; /* Blue */ --item-timer-text: #d97706; /* Yellow/Orange */ --item-temp-text: #dc2626; /* Red */ --item-ref-text: #059669; /* Green (Intermediates) */ --item-decl-text: #059669; /* Green (Declarations) */ --item-qty-text: var(--color-text-strong); /* Grays */ --gray-0: oklch(100% 0 0); --gray-25: oklch(98.5% 0 0); --gray-50: oklch(97% 0 0); --gray-100: oklch(93% 0 0); --gray-200: oklch(88% 0 0); --gray-300: oklch(80% 0 0); --gray-400: oklch(70% 0 0); --gray-500: oklch(58% 0 0); --gray-600: oklch(46% 0 0); --gray-700: oklch(35% 0 0); --gray-800: oklch(25% 0 0); --gray-900: oklch(15% 0 0); --gray-950: oklch(10% 0 0); --gray-1000: oklch(0% 0 0); --bg-dark-anchor: var(--vp-c-bg, #1a1a1a); --color-bg: var(--gray-0); --color-bg-subtle: var(--gray-25); --color-bg-muted: var(--gray-100); --color-surface: var(--gray-25); --color-surface-raised: var(--gray-0); --color-border: var(--gray-200); --color-border-strong: var(--gray-300); --color-text-muted: var(--gray-500); --color-text: var(--gray-700); --color-text-strong: var(--gray-900); } .dark, body.vscode-dark, :root[class~="dark"], :root[data-theme="dark"] { --item-ingredient-text: #c68aff; --item-cookware-text: #60a5fa; --item-timer-text: #fbbf24; --item-temp-text: #f87171; --item-ref-text: #34d399; --item-decl-text: #34d399; --item-qty-text: var(--color-text-strong); --color-bg: var(--bg-dark-anchor); --color-bg-subtle: oklch(from var(--bg-dark-anchor) calc(l - 0.03) c h); --color-bg-muted: oklch(from var(--bg-dark-anchor) calc(l + 0.02) c h); --color-surface: oklch(from var(--bg-dark-anchor) calc(l + 0.035) c h); --color-surface-raised: oklch(from var(--bg-dark-anchor) calc(l + 0.06) c h); --color-border: oklch(from var(--bg-dark-anchor) calc(l + 0.14) c h); --color-border-strong: oklch(from var(--bg-dark-anchor) calc(l + 0.22) c h); --color-text-muted: oklch(from var(--bg-dark-anchor) calc(l + 0.42) c h); --color-text: oklch(from var(--bg-dark-anchor) calc(l + 0.60) c h); --color-text-strong: oklch(100% 0 0); } .gram-preview details.shopping-list, .gram-preview details.cookware, .gram-preview details.section-ingredients, .gram-preview details.recipe-meta-secondary, .section-ingredients, .gram-preview div.cookware { background-color: red; } /* Base styles for GRAM HTML output */ .gram-preview { font-family: var(--gram-font-sans); line-height: 1.6; color: var(--vscode-editor-foreground, inherit); font-size: 15px; } .gram-preview h1 { font-size: 2rem; font-weight: 700; margin-bottom: 24px; border-bottom: 2px solid var(--color-border); padding-bottom: 16px; } .gram-preview h2, .gram-preview h3, .gram-preview h4 { color: var(--vscode-editor-foreground, inherit); } .gram-preview h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 1rem; font-weight: 600; } .gram-preview h4 { display: none; } /* Metadata & Sections (Time info) */ /* Recipe Timings Grid (Cards) */ .gram-preview .recipe-timings-grid { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; } .gram-preview .timing-card { display: flex; flex-direction: column; align-items: flex-start; padding: 10px 14px; border-radius: 8px; min-width: 120px; border: 1px solid var(--color-border); flex-grow: 1; } .gram-preview .timing-card .meta-label { color: var(--color-text-muted); text-transform: uppercase; font-size: 0.75em; font-weight: 700; display: flex; align-items: center; gap: 6px; } .gram-preview .timing-card .meta-label i { font-size: 1.2em; } .gram-preview .timing-card .meta-value { font-weight: 600; font-size: 0.9em; font-family: var(--gram-font-mono); } /* Secondary Metadata (Frontmatter) */ .gram-preview .metadata-grid { display: flex; flex-direction: column; /* Requested: write them one below the other */ gap: 5px; margin-bottom: 10px; padding-block: 20px; border-block: 1px dashed var(--color-border); } .gram-preview .meta-secondary-item { display: flex; align-items: baseline; gap: 12px; font-size: 0.9em; } .gram-preview .meta-secondary-item .label { color: var(--color-text-muted); text-transform: uppercase; font-size: 0.85em; font-weight: 600; width: 140px; /* Align values */ flex-shrink: 0; } .gram-preview .meta-secondary-item .value { font-weight: 500; font-family: var(--gram-font-mono); } /* Accordions */ .gram-preview details { margin-bottom: 16px; } .gram-preview details>summary { cursor: pointer; list-style: none; user-select: none; margin: 0; display: flex; justify-content: space-between; align-items: center; } .gram-preview details>summary::-webkit-details-marker { display: none; } .gram-preview details>summary>h2 { display: inline-flex; align-items: center; margin: 0; border: none; padding: 0; font-size: 1rem; } .gram-preview details>summary::after { content: ""; display: inline-block; width: 1.2em; height: 1.2em; margin-left: 8px; background-color: var(--color-text-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z'/%3E%3C/svg%3E") no-repeat center / contain; transition: transform 0.2s ease; transform: rotate(180deg); } .gram-preview details[open]>summary::after { transform: rotate(0deg); } .gram-preview details>summary+ul { margin-top: 10px !important; } /* Callouts for Shopping List & Ingredients */ .gram-preview details.shopping-list, .gram-preview details.cookware, .gram-preview details.section-ingredients, .section-ingredients, .gram-preview div.cookware { background-color: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 13px 20px; margin: 10px 0 10px 0; } .gram-preview details.section-ingredients, .section-ingredients { margin: 16px 0 24px 0; } .gram-preview .section-ingredients h4, .gram-preview div.cookware h2 { margin: 0 0 12px 0; font-size: 1.1em; font-weight: 600; border-bottom: 1px solid var(--color-border); padding-bottom: 8px; color: var(--color-text-strong); border-top: none; padding-top: 0; } .gram-preview .shopping-list ul, .gram-preview .section-ingredients ul, .gram-preview .cookware ul { margin: 0; padding: 0; list-style: none; /* No bullets */ } .gram-preview .section-ingredients ul { margin-top: 0 !important; } .gram-preview .shopping-list ul li, .gram-preview .section-ingredients ul li, .gram-preview details.cookware ul li { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; margin: 0; border-bottom: 1px dashed var(--color-border); /* Dashed lines between ingredients */ } .gram-preview .shopping-list ul li:first-child, .gram-preview .section-ingredients ul li:first-child, .gram-preview details.cookware ul li:first-child { border-top: none; padding-top: 0; } .gram-preview .shopping-list ul li:last-child, .gram-preview .section-ingredients ul li:last-child, .gram-preview details.cookware ul li:last-child { border-bottom: none; padding-bottom: 0; } /* A composite/mixed-units shopping-list or cookware entry wraps a nested