/* Tishe Happ Control R5 — isolated component styles, loaded by CSP-safe <link>. */
.happ-page{--happ-surface:var(--surface);--happ-alt:var(--surface-alt);--happ-bg:var(--bg);--happ-text:var(--text);--happ-muted:var(--muted);--happ-line:var(--line);--happ-accent:var(--accent);--happ-soft:var(--soft);--happ-shadow:var(--shadow);display:grid;gap:22px;min-width:0}
.happ-status-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;min-width:0}
.happ-status-card{display:grid;gap:14px;padding:22px;border:1px solid var(--happ-line);border-radius:var(--radius);background:var(--happ-surface);box-shadow:var(--happ-shadow);min-width:0;overflow:hidden}
.happ-status-card.primary{background:linear-gradient(135deg,var(--happ-soft),var(--happ-surface) 76%)}
.happ-status-card .eyebrow,.happ-nav-head .eyebrow,.happ-section-head .eyebrow,.happ-link-head .eyebrow{margin:0 0 7px}
.happ-status-title{display:flex;align-items:center;gap:9px;min-width:0}.happ-status-title b{font-size:17px;line-height:1.35;overflow-wrap:anywhere}.happ-dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 5px color-mix(in srgb,var(--green) 13%,transparent);flex:none}
.happ-status-card p{font-size:12px;line-height:1.65;max-width:680px}.happ-tags{display:flex;flex-wrap:wrap;gap:8px}.happ-tags span,.happ-badge,.happ-scope,.happ-section-count{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border:1px solid var(--happ-line);border-radius:999px;background:var(--happ-alt);color:var(--happ-muted);font-size:10px;font-weight:650;line-height:1.2;white-space:nowrap}
.happ-status-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.happ-provider-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.happ-provider-grid>div{display:grid;gap:5px;padding:13px 14px;border:1px solid var(--happ-line);border-radius:12px;background:var(--happ-alt);min-width:0}.happ-provider-grid small{color:var(--happ-muted);font-size:10px}.happ-provider-grid b{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.happ-system{border-top:1px solid var(--happ-line);padding-top:12px}.happ-system summary{cursor:pointer;color:var(--happ-accent);font-size:11px;font-weight:650}.happ-system>div{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;margin-top:12px}.happ-system span{color:var(--happ-muted);font-size:10px}.happ-system code{display:block;min-width:0;padding:8px 10px;border:1px solid var(--happ-line);border-radius:8px;background:var(--happ-alt);font-size:10px;line-height:1.5;word-break:break-all}

.happ-editor{display:block;min-width:0}.happ-layout{display:grid;grid-template-columns:286px minmax(0,1fr);gap:18px;align-items:start;min-width:0}.happ-nav{display:block;position:sticky;top:12px;padding:11px;border:1px solid var(--happ-line,var(--line));border-radius:var(--radius);background:var(--happ-surface,var(--surface));box-shadow:var(--happ-shadow,var(--shadow));min-width:0}.happ-nav-head{display:grid;gap:3px;padding:10px 10px 13px;border-bottom:1px solid var(--happ-line,var(--line));margin-bottom:9px}.happ-nav-head b{font-size:15px;line-height:1.35}.happ-nav-head small{font-size:10px;line-height:1.45;color:var(--happ-muted,var(--muted))}.happ-nav-list{display:grid;gap:8px}
.happ-nav-button{appearance:none!important;-webkit-appearance:none!important;display:grid!important;grid-template-columns:38px minmax(0,1fr) 18px!important;gap:11px!important;align-items:center!important;width:100%!important;min-width:0!important;min-height:68px!important;padding:11px 12px!important;margin:0!important;border:1px solid transparent!important;border-radius:12px!important;background:transparent!important;color:var(--happ-text,var(--text))!important;text-align:left!important;white-space:normal!important;line-height:1.25!important;box-shadow:none!important;opacity:1!important;pointer-events:auto!important}
.happ-nav-button:hover{background:var(--happ-alt,var(--surface-alt))!important;border-color:var(--happ-line,var(--line))!important}.happ-nav-button.active{background:var(--happ-soft,var(--soft))!important;border-color:color-mix(in srgb,var(--happ-accent,var(--accent)) 35%,var(--happ-line,var(--line)))!important;color:var(--happ-accent,var(--accent))!important}
.happ-nav-icon{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;border-radius:10px!important;background:var(--happ-alt,var(--surface-alt))!important;color:var(--happ-accent,var(--accent))!important;font-size:16px!important;line-height:1!important}.happ-nav-button.active .happ-nav-icon{background:var(--happ-surface,var(--surface))!important}.happ-nav-copy{display:grid!important;gap:5px!important;min-width:0!important}.happ-nav-copy b{display:block!important;font-size:12px!important;line-height:1.35!important;color:inherit!important;overflow-wrap:anywhere!important}.happ-nav-copy small{display:block!important;font-size:9px!important;line-height:1.45!important;color:var(--happ-muted,var(--muted))!important;overflow-wrap:anywhere!important}.happ-nav-arrow{display:block!important;color:var(--happ-muted,var(--muted))!important;font-size:22px!important;line-height:1!important;text-align:right!important}.happ-nav-button.active .happ-nav-arrow{color:var(--happ-accent,var(--accent))!important}
.happ-workspace{display:block;min-width:0;min-height:520px;border:1px solid var(--happ-line,var(--line));border-radius:var(--radius);background:var(--happ-surface,var(--surface));box-shadow:var(--happ-shadow,var(--shadow));overflow:hidden}.happ-empty{display:grid;place-items:center;min-height:520px;padding:48px 32px;text-align:center}.happ-empty[hidden],.happ-section[hidden]{display:none!important}.happ-empty-icon{display:grid;place-items:center;width:62px;height:62px;margin:0 auto 16px;border-radius:18px;background:var(--happ-soft,var(--soft));color:var(--happ-accent,var(--accent));font-size:28px}.happ-empty h3{font-size:20px}.happ-empty p{max-width:430px;margin:9px auto 0;font-size:12px;line-height:1.65}
.happ-section{display:block;min-width:0}.happ-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 24px;border-bottom:1px solid var(--happ-line,var(--line));background:var(--happ-surface,var(--surface))}.happ-section-head>div{min-width:0}.happ-section-head h3{font-size:21px;line-height:1.35}.happ-section-head p{margin-top:8px;font-size:12px;line-height:1.6;max-width:760px}.happ-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}.happ-field{display:grid!important;gap:10px!important;align-content:start!important;min-width:0!important;min-height:126px!important;padding:19px 20px!important;margin:0!important;border-bottom:1px solid var(--happ-line,var(--line))!important;background:transparent!important}.happ-field:nth-child(odd){border-right:1px solid var(--happ-line,var(--line))!important}.happ-field-title{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;min-width:0!important}.happ-field-title b{display:block!important;font-size:12px!important;line-height:1.5!important;overflow-wrap:anywhere!important}.happ-control{display:block!important;min-width:0!important}.happ-control input,.happ-control select,.happ-control textarea{display:block!important;width:100%!important;min-width:0!important;margin:0!important}.happ-control textarea{min-height:92px!important;resize:vertical!important}.happ-help{display:grid!important;place-items:center!important;position:relative!important;width:22px!important;height:22px!important;flex:none!important;border:1px solid var(--happ-line,var(--line))!important;border-radius:50%!important;background:var(--happ-surface,var(--surface))!important;color:var(--happ-muted,var(--muted))!important;font:600 10px/1 Onest,Inter,sans-serif!important;font-style:normal!important;cursor:help!important}.happ-help:hover,.happ-help:focus{border-color:var(--happ-accent,var(--accent))!important;color:var(--happ-accent,var(--accent))!important}.happ-help:after{content:attr(data-tip);display:none;position:absolute;z-index:50;right:0;top:29px;width:min(330px,72vw);padding:10px 11px;border:1px solid var(--happ-line,var(--line));border-radius:9px;background:var(--happ-surface,var(--surface));color:var(--happ-text,var(--text));box-shadow:0 14px 36px #0003;font:11px/1.5 Onest,Inter,sans-serif;white-space:normal;text-align:left}.happ-help:hover:after,.happ-help:focus:after{display:block}
.happ-savebar{position:sticky;bottom:10px;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border:1px solid var(--happ-line);border-radius:var(--radius);background:color-mix(in srgb,var(--happ-surface) 94%,transparent);box-shadow:0 12px 30px #0002;backdrop-filter:blur(12px)}.happ-savebar span{font-size:11px;line-height:1.55;color:var(--happ-muted)}

/* Per-link editor */
#modal:has(.happ-link-card){width:min(1180px,calc(100vw - 28px));max-width:1180px}.happ-link-card{display:grid;gap:18px;padding:19px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-alt);min-width:0}.happ-link-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.happ-link-head h3{font-size:19px}.happ-link-head p{margin-top:7px;max-width:760px;font-size:11px;line-height:1.6}.happ-link-basics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.happ-link-basics>label{min-width:0}.happ-toggle{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;min-width:0!important;padding:13px 14px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface)!important}.happ-toggle>span{display:grid;gap:4px;min-width:0}.happ-toggle b{font-size:12px;line-height:1.4}.happ-toggle small{font-size:10px;line-height:1.5;color:var(--muted)}.happ-toggle input[type=checkbox]{width:18px!important;height:18px!important;flex:none!important}.happ-override{margin-top:2px!important;border-color:color-mix(in srgb,var(--accent) 28%,var(--line))!important}.happ-link-editor{display:block;min-width:0;padding-top:2px}.happ-link-editor[hidden]{display:none!important}.happ-link-editor .happ-layout{grid-template-columns:258px minmax(0,1fr)}

/* Five ATELIER designs — same layout, native visual language. */
html[data-design=cloud] .happ-nav-button.active{box-shadow:inset 3px 0 0 var(--accent)!important}
html[data-design=studio] .happ-status-card,html[data-design=studio] .happ-nav,html[data-design=studio] .happ-workspace,html[data-design=studio] .happ-link-card{border-radius:24px}html[data-design=studio] .happ-nav-button{border-radius:16px!important}html[data-design=studio] .happ-nav-icon{border-radius:13px!important}
html[data-design=midnight] .happ-status-card,html[data-design=midnight] .happ-nav,html[data-design=midnight] .happ-workspace,html[data-design=midnight] .happ-link-card{background:var(--surface-alt)}html[data-design=midnight] .happ-nav-button:hover{background:color-mix(in srgb,var(--soft) 45%,var(--surface-alt))!important}html[data-design=midnight] .happ-help:after{box-shadow:0 14px 36px #0009}
html[data-design=linen] .happ-status-card,html[data-design=linen] .happ-nav,html[data-design=linen] .happ-workspace,html[data-design=linen] .happ-link-card{box-shadow:none;border-radius:10px}html[data-design=linen] .happ-nav-button{border-radius:7px!important}html[data-design=linen] .happ-status-title b,html[data-design=linen] .happ-section-head h3,html[data-design=linen] .happ-link-head h3{font-family:Georgia,"Times New Roman",serif;font-weight:400}
html[data-design=mono] .happ-status-card,html[data-design=mono] .happ-nav,html[data-design=mono] .happ-workspace,html[data-design=mono] .happ-link-card{box-shadow:none;border-radius:8px}html[data-design=mono] .happ-nav-button{border-radius:6px!important}html[data-design=mono] .happ-nav-button.active{background:#202e24!important;color:#d5edaa!important;border-color:#314134!important}html[data-design=mono] .happ-nav-button.active .happ-nav-icon{background:#27382b!important;color:#d5edaa!important}

@media(max-width:1050px){.happ-status-grid{grid-template-columns:1fr}.happ-layout,.happ-link-editor .happ-layout{grid-template-columns:240px minmax(0,1fr)}.happ-fields{grid-template-columns:1fr}.happ-field:nth-child(odd){border-right:0}.happ-field{min-height:0}}
@media(max-width:820px){.happ-layout,.happ-link-editor .happ-layout{grid-template-columns:1fr}.happ-nav{position:static}.happ-nav-list{grid-template-columns:repeat(2,minmax(0,1fr))}.happ-workspace,.happ-empty{min-height:360px}.happ-link-basics{grid-template-columns:1fr}.happ-link-head,.happ-section-head{flex-direction:column}.happ-section-count,.happ-scope{align-self:flex-start}}
@media(max-width:560px){.happ-nav-list{grid-template-columns:1fr}.happ-nav-button{min-height:64px!important}.happ-provider-grid{grid-template-columns:1fr}.happ-system>div{grid-template-columns:1fr}.happ-savebar{align-items:stretch;flex-direction:column}.happ-savebar .btn{width:100%}.happ-status-card{padding:18px}.happ-section-head{padding:18px}.happ-field{padding:17px}.happ-help:after{right:auto;left:0}.happ-tags{gap:6px}.happ-tags span{font-size:9px}}

/* Component display rules must never override the HTML hidden state. */
.happ-editor [hidden],.happ-link-editor[hidden]{display:none!important}
