Repository: Hestenb62/_legacy_backup
Author: Hesten Berger
Commit Message: added grammar.php
URL: https://github.com/Hestenb62/_legacy_backup/commit/1b26cc94ade1fb0a6cdc12f2ba91b7e9d35bd08d
Code Changes:
diff --git a/assets/css/pages/grammar.css b/assets/css/pages/grammar.css
new file mode 100644
index 0000000..c3cc8a6
--- /dev/null
+++ b/assets/css/pages/grammar.css
@@ -0,0 +1,729 @@
+@layer components {
+ /* ==========================================================================
+ Universal English Grammar Codex & Index Styles (pages/grammar.php)
+ ========================================================================== */
+
+ /* Main Container Layout */
+ .grammar-index-page {
+ max-width: 86rem;
+ margin: 0 auto;
+ padding: 1.5rem 1.25rem 4rem;
+ min-height: 80vh;
+ }
+
+ /* Hero Banner */
+ .grammar-index-hero {
+ position: relative;
+ background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(79, 70, 229, 0.06) 50%, rgba(236, 72, 153, 0.08) 100%);
+ border: 1px solid color-mix(in srgb, var(--color-border) 80%, #10b981 20%);
+ border-radius: 1.5rem;
+ padding: 3rem 2rem 2.5rem;
+ text-align: center;
+ margin-bottom: 2rem;
+ overflow: hidden;
+ box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.08);
+ }
+
+ .grammar-index-hero-badge {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.5rem;
+ padding: 0.4rem 1rem;
+ font-size: 0.8rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ border-radius: 9999px;
+ background: color-mix(in srgb, #10b981 15%, transparent);
+ color: #059669;
+ border: 1px solid color-mix(in srgb, #10b981 30%, transparent);
+ margin-bottom: 1rem;
+ }
+
+ .grammar-index-hero-title {
+ font-size: clamp(2rem, 4.5vw, 3rem);
+ font-weight: 900;
+ letter-spacing: -0.03em;
+ line-height: 1.15;
+ color: var(--color-text-main, #0f172a);
+ margin-bottom: 0.75rem;
+ }
+
+ .grammar-index-hero-desc {
+ font-size: clamp(1rem, 1.8vw, 1.15rem);
+ color: var(--color-text-muted, #475569);
+ max-width: 50rem;
+ margin: 0 auto 2rem;
+ line-height: 1.6;
+ }
+
+ /* Live Search Toolbar */
+ .grammar-index-search-wrap {
+ max-width: 44rem;
+ margin: 0 auto;
+ position: relative;
+ }
+
+ .grammar-index-search-bar {
+ display: flex;
+ align-items: center;
+ position: relative;
+ background: var(--color-bg-surface, #ffffff);
+ border: 2px solid color-mix(in srgb, var(--color-border, #cbd5e1) 85%, #10b981 15%);
+ border-radius: 9999px;
+ padding: 0.35rem 0.5rem 0.35rem 1.25rem;
+ box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
+ transition: all 0.25s ease;
+ }
+
+ .grammar-index-search-bar:focus-within {
+ border-color: #10b981;
+ box-shadow: 0 0 0 4px color-mix(in srgb, #10b981 20%, transparent), 0 8px 24px -4px rgba(16, 185, 129, 0.15);
+ }
+
+ .grammar-index-search-icon {
+ color: var(--color-text-muted, #64748b);
+ font-size: 1.1rem;
+ margin-right: 0.75rem;
+ }
+
+ .grammar-index-search-input {
+ flex: 1;
+ background: transparent;
+ border: none;
+ outline: none;
+ font-size: 1.05rem;
+ font-weight: 600;
+ color: var(--color-text-main, #0f172a);
+ min-width: 0;
+ }
+
+ .grammar-index-search-input::placeholder {
+ color: var(--color-text-muted, #94a3b8);
+ font-weight: 500;
+ }
+
+ .grammar-index-clear-btn {
+ background: none;
+ border: none;
+ color: var(--color-text-muted, #94a3b8);
+ padding: 0.4rem 0.6rem;
+ cursor: pointer;
+ display: none;
+ font-size: 0.9rem;
+ border-radius: 50%;
+ transition: color 0.15s ease;
+ }
+
+ .grammar-index-clear-btn:hover {
+ color: var(--color-text-main, #0f172a);
+ }
+
+ /* Syntax Diagrammer Sandbox */
+ .grammar-sandbox-card {
+ background: var(--color-bg-surface, #ffffff);
+ border: 1px solid var(--color-border, #e2e8f0);
+ border-radius: 1.25rem;
+ padding: 1.5rem;
+ box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0,0,0,0.1));
+ text-align: left;
+ }
+
+ .syntax-token {
+ display: inline-flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 0.35rem 0.65rem;
+ margin: 0.25rem 0.2rem;
+ border-radius: 0.5rem;
+ font-weight: 700;
+ font-size: 0.95rem;
+ transition: transform 0.15s ease;
+ line-height: 1.2;
+ }
+
+ .syntax-token .token-role {
+ font-size: 0.65rem;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ font-weight: 800;
+ opacity: 0.85;
+ margin-top: 0.2rem;
+ }
+
+ .syntax-token-subj {
+ background: rgba(59, 130, 246, 0.12);
+ color: #2563eb;
+ border: 1px solid rgba(59, 130, 246, 0.3);
+ }
+
+ .syntax-token-verb {
+ background: rgba(239, 68, 68, 0.12);
+ color: #dc2626;
+ border: 1px solid rgba(239, 68, 68, 0.3);
+ }
+
+ .syntax-token-obj {
+ background: rgba(16, 185, 129, 0.12);
+ color: #059669;
+ border: 1px solid rgba(16, 185, 129, 0.3);
+ }
+
+ .syntax-token-prep {
+ background: rgba(139, 92, 246, 0.12);
+ color: #7c3aed;
+ border: 1px solid rgba(139, 92, 246, 0.3);
+ }
+
+ .syntax-token-conj {
+ background: rgba(245, 158, 11, 0.12);
+ color: #d97706;
+ border: 1px solid rgba(245, 158, 11, 0.3);
+ }
+
+ .syntax-token-mod {
+ background: rgba(236, 72, 153, 0.12);
+ color: #db2777;
+ border: 1px solid rgba(236, 72, 153, 0.3);
+ }
+
+ /* Sticky A–Z Quick-Jump Ribbon */
+ .grammar-az-ribbon-container {
+ position: sticky;
+ top: 4.25rem;
+ z-index: 30;
+ background: color-mix(in srgb, var(--color-bg-base, #ffffff) 90%, transparent);
+ backdrop-filter: blur(12px);
+ -webkit-backdrop-filter: blur(12px);
+ border-top: 1px solid var(--color-border, #e2e8f0);
+ border-bottom: 1px solid var(--color-border, #e2e8f0);
+ padding: 0.6rem 0;
+ margin: 0 -1.25rem 2rem;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
+ }
+
+ .grammar-az-ribbon {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-wrap: wrap;
+ gap: 0.25rem 0.35rem;
+ max-width: 86rem;
+ margin: 0 auto;
+ padding: 0 1.25rem;
+ }
+
+ .grammar-az-letter-btn {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 2rem;
+ height: 2rem;
+ font-size: 0.85rem;
+ font-weight: 800;
+ border-radius: 0.5rem;
+ color: var(--color-text-main, #0f172a);
+ text-decoration: none;
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
+ border: 1px solid transparent;
+ }
+
+ .grammar-az-letter-btn:hover:not(.disabled) {
+ background: color-mix(in srgb, #10b981 15%, transparent);
+ color: #059669;
+ border-color: color-mix(in srgb, #10b981 30%, transparent);
+ transform: translateY(-1px);
+ }
+
+ .grammar-az-letter-btn.active {
+ background: #10b981;
+ color: #ffffff;
+ box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
+ }
+
+ .grammar-az-letter-btn.disabled {
+ opacity: 0.28;
+ pointer-events: none;
+ color: var(--color-text-muted, #94a3b8);
+ }
+
+ /* Filter Control Panel */
+ .grammar-filter-panel {
+ background: var(--color-bg-surface, #ffffff);
+ border: 1px solid var(--color-border, #e2e8f0);
+ border-radius: 1.25rem;
+ padding: 1.25rem 1.5rem;
+ margin-bottom: 2rem;
+ box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.04);
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ }
+
+ .grammar-filter-row {
+ display: flex;
+ align-items: flex-start;
+ gap: 1rem;
+ flex-wrap: wrap;
+ }
+
+ .grammar-filter-label {
+ font-size: 0.8rem;
+ font-weight: 800;
+ letter-spacing: 0.05em;
+ text-transform: uppercase;
+ color: var(--color-text-muted, #64748b);
+ min-width: 8.5rem;
+ padding-top: 0.35rem;
+ display: flex;
+ align-items: center;
+ gap: 0.4rem;
+ }
+
+ .grammar-pills-wrap {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.4rem;
+ flex: 1;
+ }
+
+ .grammar-pill-btn {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.4rem;
+ padding: 0.35rem 0.85rem;