/* Shared semantic palette: applied before the application is rendered. */
:root{color-scheme:light;--bg:#faf9f6;--surface:#fff;--surface-raised:#fff8f3;--ink:#18181b;--blue:#18181b;--muted:#62626b;--line:#e4e4e7;--brand:#FF6633;--orange:#FF6633;--brand-dark:#b33e00;--brand-soft:#fff7ed;--accent-text:#a83a00;--shadow:0 8px 28px #18181b08;--hero:linear-gradient(130deg,#fff,#fff7ed)}
html.dark{color-scheme:dark;--bg:#101010;--surface:#1f1f1f;--surface-raised:#242424;--ink:#fff;--blue:#e5e7eb;--muted:#aeb4bf;--line:#3c3c3c;--brand:#FF6633;--orange:#FF6633;--brand-dark:#ffad70;--brand-soft:#302217;--accent-text:#ffad70;--shadow:0 8px 28px #0003;--hero:radial-gradient(ellipse at 100% 0%,#ff550015,transparent 65%),#121212}
html body{background:var(--bg);color:var(--ink)}
html :is(body,nav,header,footer,main,section,article,aside,button,input,select,textarea,a,summary,table,th,td,.brand-strip,.mode-switch,.portal-search,.digital-submenu,.media-cover-default){transition:background-color .3s ease,color .3s ease,border-color .3s ease}
html :is(.nav,.portal-nav,.staff-header,.card,.award-panel,.month-panel,.daily-section,.service-pillar,.health-panel,.dashboard-card,.editor-form,.settings-group,.save-bar,.digital-submenu,.login-card,.journal-versions){background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:var(--shadow)}
html :is(.portal-nav .brand,.portal-nav .brand b,.portal-nav .navlinks a,.portal-nav .digital-submenu a,.staff-header,.staff-header h2,.card h3,.pillar-title h2,.faq-item summary,.service-guide summary,.telephone-qr summary,.award-detail summary){color:var(--ink)}
html :is(.portal-nav .brand small,.card p,.muted,.copy,.portal-service small,.pillar-title p,.health-panel small,.staff-header small,.staff-header span,.dashboard-card p,.save-bar>span,.sidebar-caption,.award-date,.ordinal,.faq-item .copy,.calendar-legend,.weekday,.month-day small,#admin-count){color:var(--muted)}
html :is(.portal-nav .navlinks a.active,.digital-nav-menu[open]>summary,.text-link,.number,.eyebrow,.portal-icon,.creative .portal-icon){color:var(--accent-text)}
html :is(.portal-hero,.pagehead,.ia-hero){background:var(--hero);color:var(--ink);border-color:var(--line)}
html :is(.portal-hero h1,.pagehead h1,.ia-hero h1){color:var(--ink)}
html :is(.portal-hero p,.pagehead p,.ia-hero p){color:var(--muted)}
html .portal-hero h1 em{color:var(--accent-text)}
html :is(.portal-hero .portal-eyebrow,.tag,.service-icon,.faq-number,.level-pill,.group-number,.popular a){background:var(--brand-soft);color:var(--accent-text);border-color:var(--line)}
html .popular{color:var(--muted)}
html :is(button,.button,input,select,textarea,.portal-search,.portal-search.compact,.mode-switch,.service-guide,.sla-box,.brand-note,.pillar-title,.creative .pillar-title,.pillar-foot,.download-tile,.month-day,.month-blank,.editor-toolbar){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html :is(input,textarea,select){background:var(--surface);color:var(--ink)}
html input::placeholder,html textarea::placeholder{color:var(--muted);opacity:1}
html :is(.portal-search.compact input,.portal-search.compact button,.mode-switch a){color:var(--ink)}
html :is(.primary,.button.primary,.urgent,.portal-nav .urgent,.portal-search button,.mode-switch a.selected,.admin-shell .sidebar a.active,.save-bar .primary){background:#FF6633;color:#18181b;border-color:#FF6633}
html :is(.primary,.urgent,.portal-search button):hover{background:#E65020;border-color:#E65020;color:#18181b}
html .portal-search.compact button{background:transparent;color:var(--ink)}
html .portal-nav .orange-outline{background:var(--brand-soft);border-color:var(--accent-text);color:var(--accent-text)}
html :is(.portal-nav .digital-submenu a:hover,.portal-nav .digital-submenu a[aria-current],.portal-service:hover,.month-day.selected,.month-day:hover){background:var(--brand-soft);color:var(--ink)}
html :is(.portal-service,.pillar-title,.faq-list,.faq-item,details .copy,.calendar-legend,.month-grid,.award-table td,.daily-table td){border-color:var(--line)}
html :is(.award-table th,.daily-table th){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html :is(.award-table tr:nth-child(even),.daily-table tr:nth-child(even)){background:var(--surface-raised)}
html :is(.award-table tbody tr:hover,.daily-table tbody tr:hover){background:var(--brand-soft)}
html :is(.admin-shell,.admin-main,.preview-dialog iframe,.full-calendar){background:var(--bg);color:var(--ink)}
html :is(.admin-shell .sidebar,.brand-strip,.dcc-footer,.footer,.calendar-banner,.login-wrap,.preview-dialog header){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html :is(.sidebar a,.dcc-footer a,.dcc-footer small,.dcc-footer h3,.dcc-footer strong,.dcc-footer-brand,.footer a,.brand-strip-heading h2,.brand-strip-heading p,.brand-strip .portal-eyebrow,.download-tile strong,.download-tile small,.calendar-banner h1,.calendar-banner p,.preview-dialog small){color:var(--ink)!important}
html :is(.admin-brand,.admin-brand small){color:var(--ink)!important}
html .brand-strip-heading>a{color:var(--accent-text)}
html .dcc-social a{color:#fff!important}
html :is(.dcc-line){background:#007d59}html .dcc-facebook{background:#2458ba}
html .calendar-badge{background:var(--brand-soft);color:var(--accent-text);border-color:var(--line)}
html .calendar-banner .button{background:var(--surface);color:var(--ink)}
html .calendar-banner .button.primary{background:#FF6633;color:#18181b}
html .media-cover-frame,html .media-cover.placeholder{background:var(--surface-raised)}
html .media-cover-default{color:var(--accent-text)}
html .pending{background:var(--brand-soft);color:var(--accent-text)}
html .danger{color:#b91c1c}html.dark .danger{color:#fca5a5}
html .theme-toggle{display:inline-grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--surface-raised);color:var(--ink);font-size:21px;line-height:1;cursor:pointer}
html .theme-toggle:hover{border-color:var(--accent-text);background:var(--brand-soft)}
html :focus-visible{outline:3px solid var(--accent-text);outline-offset:3px}
@media(prefers-reduced-motion:reduce){html *,html *::before,html *::after{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:600px){html .nav-tools{flex-wrap:wrap}.theme-toggle{margin-left:0}}
html .portal-search.compact input::placeholder{color:var(--muted)}
html .hero-search{box-shadow:var(--shadow)}
html .portal-nav{border-top-color:var(--orange)}
html :is(.portal-eyebrow,.pillar-title span:not(.pillar-symbol),.download-tile em){color:var(--muted)}
/* Noto Sans Thai typography, shared by public pages and the editor. */
:root{--font-ui:'Noto Sans Thai',-apple-system,BlinkMacSystemFont,sans-serif}
html body,html input,html button,html select,html textarea{font-family:var(--font-ui)!important;letter-spacing:-.015em}
html :is(h1,h2,h3,h4,.brand,.navlinks,.portal-eyebrow,.pillar-kicker,.pillar-title span,.admin-main .edit-row>strong){font-family:var(--font-ui)!important}
html .portal-hero h1,html .hero-title{font-family:var(--font-ui)!important;font-size:2.75rem!important;font-weight:700!important;line-height:1.3!important;color:var(--ink)!important}
html .portal-hero h1 em{color:var(--accent-text)}
html nav a,html nav button,html .digital-nav-menu>summary{font-size:.95rem!important;font-weight:500!important}
html .theme-toggle{font-size:21px!important}
html .portal-section h2,html .section-title{font-size:2rem!important;font-weight:700!important;letter-spacing:-.02em}
html .portal-section .pillar-title h2{font-size:1.5rem!important;line-height:1.5}
html .admin-main .edit-row>strong{font-weight:400}
@media(max-width:600px){html .portal-hero h1,html .hero-title{font-size:2rem!important;line-height:1.45!important}html .portal-section h2,html .section-title{font-size:1.65rem!important}html .portal-section .pillar-title h2{font-size:1.35rem!important}html .portal-nav .navlinks{gap:12px;row-gap:10px}}
