
:root {
  color-scheme: light;
  --canvas: #f5f2e9;
  --paper: #fffcf5;
  --forest: #183326;
  --ink: #20342a;
  --muted: #526056;
  --line: #dfded1;
  --terra: #a64c38;
  --sage: #d3d5b9;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--canvas); color: var(--ink); font: 1rem/1.5 var(--sans); }
h1, h2, h3, p, ul, dl { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
a, button, summary, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a34a34; outline-offset: 3px; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 20; transform: translateY(-160%); padding: .6rem 1rem; background: var(--paper); border-radius: .4rem; }
.skip-link:focus { transform: none; }
.icon { width: 1.15rem; height: 1.15rem; flex: none; }
.brand { display: inline-flex; align-items: center; gap: .55rem; width: fit-content; color: inherit; font-size: 1.05rem; font-weight: 750; letter-spacing: .18em; text-decoration: none; }
.brand svg { width: 1.75rem; height: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; gap: .6rem; padding: .65rem 1rem; border: 1px solid transparent; border-radius: .5rem; text-decoration: none; font-size: .86rem; font-weight: 650; line-height: 1.35; }
.button-primary { background: var(--forest); color: #fffaf0; }
.button-primary:hover { background: #294d37; }
.button-secondary { border-color: #b6beae; color: var(--forest); background: transparent; }
.button-secondary:hover { background: #edf0e3; }
.button-quiet { color: #8d3c2c; background: transparent; }
.button-quiet:hover { background: #f7e9e2; }
.button-small { font-size: .78rem; min-height: 2.75rem; padding-inline: .8rem; }

.feedback { display: flex; align-items: flex-start; gap: .6rem; padding: .85rem 1rem; margin-bottom: 1.15rem; border: 1px solid; border-radius: .55rem; font-size: .87rem; }
.feedback .icon { margin-top: .12rem; }
.feedback-error { background: #f8e9e2; color: #812e23; border-color: #ebc7ba; }
.feedback-success { background: #edf0e3; color: #2f5239; border-color: #d8dfce; }

.auth-body { background: var(--paper); }
.auth-frame { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.auth-cover { --brand-pupil: #d2d4b8; position: relative; z-index: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; overflow: hidden; min-height: 37rem; padding: clamp(1.7rem, 5vw, 4.5rem); background: radial-gradient(ellipse at 70% 40%, #c4c6a9 12%, #d2d4b8 72%); }
.auth-cover-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-cover-top > span { color: #495347; font-size: .8rem; white-space: nowrap; }
.auth-art { position: absolute; z-index: -1; width: min(105%, 48rem); height: auto; left: 52%; top: 46%; transform: translate(-50%, -50%); mask-image: radial-gradient(ellipse 66% 64% at 52% 50%, #000 48%, transparent 88%); }
.auth-cover-copy { padding-top: clamp(15rem, 30vw, 27rem); }
.auth-cover-copy p { margin-bottom: .75rem; font: clamp(2.6rem, 5vw, 5rem)/.97 var(--serif); letter-spacing: -.055em; }
.auth-cover-copy p em { font-weight: 400; }
.auth-cover-copy > span { color: #465647; font-size: .96rem; }
.auth-main { display: grid; place-items: center; padding: 3rem clamp(1.5rem, 6vw, 6.5rem); }
.auth-container { width: 100%; max-width: 24rem; }
.eyebrow { display: flex; align-items: center; gap: .55rem; margin-bottom: 1.2rem; color: #8a4333; font-size: .74rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow > span { width: 1.35rem; height: 1px; background: currentColor; }
.auth-container h1 { font: clamp(3rem, 5.2vw, 5.25rem)/.93 var(--serif); letter-spacing: -.062em; }
.auth-container h1 em, .workspace-hero h1 em { font-weight: 400; }
.auth-intro { margin: 1.05rem 0 1.65rem; color: var(--muted); font-size: .96rem; }
.stack-form { display: grid; gap: .5rem; }
.stack-form label { display: block; font-size: .84rem; font-weight: 650; }
.stack-form label:not(:first-child) { margin-top: .35rem; }
.stack-form label:first-of-type { margin-top: 0; }
.stack-form input:not([type="hidden"]), .stack-form select { min-width: 0; width: 100%; min-height: 2.9rem; padding: .64rem .8rem; background: #fffdf8; color: var(--ink); border: 1px solid #babdb0; border-radius: .45rem; }
.stack-form input::placeholder { color: #737c72; opacity: 1; }
.stack-form input:focus, .stack-form select:focus { border-color: #6b826c; }
.stack-form small { color: var(--muted); font-size: .78rem; }
.auth-submit { justify-content: space-between; margin-top: .7rem; }
.auth-note { display: flex; align-items: center; gap: .5rem; margin-top: 1.4rem; color: var(--muted); font-size: .82rem; }
.auth-back { display: inline-flex; min-height: 2.75rem; color: var(--forest); }
.auth-back .icon { width: 1rem; }
.auth-note .icon { width: .98rem; }
.auth-invite-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--forest); font-size: .82rem; }

.workspace-frame { display: grid; min-height: 100vh; grid-template-columns: 14.1rem minmax(0, 1fr); }
.rail { --brand-pupil: #193528; position: sticky; top: 0; display: flex; flex-direction: column; align-self: start; min-height: 100vh; min-height: 100svh; background: #193528; color: #f7f1e4; padding: 1.7rem 1rem 1.05rem; }
.rail :focus-visible { outline-color: #ecb5a3; }
.rail-logo { padding: .3rem .85rem 2.15rem; }
.rail-nav { display: grid; gap: .4rem; }
.rail-nav a { position: relative; display: flex; align-items: center; min-height: 2.75rem; gap: .75rem; padding: .5rem .85rem; border: 1px solid transparent; border-radius: .5rem; color: #d9e3d5; font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.rail-nav a[aria-current="page"] { color: #fffaf0; background: #30503c; border-color: #415e49; }
.rail-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -1px; top: .6rem; bottom: .6rem; width: 2px; background: #e0a183; border-radius: 2px; }
.rail-nav a:hover { background: #294834; }
.rail-foot { margin-top: auto; padding: .75rem .85rem 0; border-top: 1px solid #3c5646; color: #c3d0c0; font-size: .77rem; }
.workspace-content { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 4.25rem; padding: .6rem clamp(1.25rem, 3.2vw, 3.35rem); background: var(--paper); border-bottom: 1px solid var(--line); }
.workspace-picker, .account { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.account { flex: none; }
.tenant-avatar { display: grid; flex: none; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .5rem; color: #34543d; background: #e0e5d6; font-size: .84rem; font-weight: 750; }
.tenant-name, .tenant-menu > summary { font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.tenant-menu { position: relative; min-width: 0; }
.tenant-menu > summary { display: flex; align-items: center; min-height: 2.75rem; gap: .35rem; padding-right: .25rem; }
.tenant-menu > summary .icon { width: .9rem; color: var(--muted); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] > summary .icon { transform: rotate(180deg); }
.tenant-menu ul { position: absolute; top: calc(100% + .35rem); left: -2.35rem; z-index: 5; min-width: min(16rem, 81vw); max-width: 23rem; padding: .35rem; list-style: none; border: 1px solid var(--line); border-radius: .55rem; background: var(--paper); box-shadow: 0 .4rem 1rem #22372b1c; }
.tenant-menu a { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .65rem .7rem; border-radius: .35rem; text-decoration: none; }
.tenant-menu a:hover, .tenant-menu a[aria-current="true"] { background: #ecf0e2; }
.tenant-menu a .icon { color: #3f6949; }
.account-email { display: block; max-width: min(20rem, 26vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .82rem; }
.logout { color: var(--forest); background: transparent; padding-inline: .6rem; }
.logout:hover { background: #edf0e3; }
.logout .icon { width: 1rem; }

.content { width: min(100%, 94rem); margin-inline: auto; padding: clamp(1.05rem, 2vw, 1.7rem) clamp(1.25rem, 3.2vw, 3.35rem) 2.7rem; }
.workspace-identity { display: flex; align-items: center; gap: .55rem; margin-bottom: .85rem; color: var(--muted); font-size: .76rem; font-weight: 650; }
.role-label { display: inline-flex; align-items: center; padding: .1rem .5rem; background: #e8ecdf; border: 1px solid #dfe3d4; color: #3e5544; border-radius: .3rem; font-size: .72rem; }
.workspace-hero { position: relative; display: grid; align-items: center; min-height: clamp(17rem, 27vw, 22.5rem); overflow: hidden; isolation: isolate; border: 1px solid #c9cdb2; border-radius: .85rem; background: radial-gradient(ellipse at 74% 40%, #c3c6a9, #d2d5b9 75%); }
.workspace-hero > img { position: absolute; z-index: -1; top: 50%; right: 0; transform: translateY(-50%); width: min(54%, 45rem); height: auto; mask-image: radial-gradient(ellipse 81% 61% at 62% 51%, #000 39%, transparent 94%); }
.workspace-hero-copy { max-width: 54%; padding: 1.8rem clamp(1.4rem, 4.2vw, 4.15rem); }
.workspace-hero h1 { font: clamp(2.4rem, 4.45vw, 5.15rem)/.93 var(--serif); letter-spacing: -.055em; }
.workspace-hero p { max-width: 27rem; margin: .95rem 0 1.2rem; color: #3a4d3e; font-size: .92rem; }
.hero-break { display: block; }

.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; }
.agent-panel, .channels-panel { padding: clamp(.85rem, 1.65vw, 1.4rem); }
.panel-heading, .panel-title { display: flex; align-items: center; gap: .6rem; }
.panel-heading { justify-content: space-between; gap: .45rem; }
.panel-title { min-width: 0; }
.panel h2 { min-width: 0; font-size: .98rem; line-height: 1.25; overflow-wrap: anywhere; }
.panel-mark, .platform-mark { display: grid; flex: none; place-items: center; width: 2rem; height: 2rem; background: #e7ebdf; color: #3b5b43; border-radius: .45rem; }
.platform-mark svg { width: 1.22rem; height: 1.22rem; }
.platform-facebook { background: #e5eaf2; color: #32568a; }
.platform-instagram { background: #f4e3de; color: #8a483b; }
.platform-linkedin { background: #e3eaee; color: #345c71; }
.platform-tiktok { background: #ecece4; color: #313e36; }
.platform-youtube { background: #f4e3df; color: #953f37; }
.agent-content { margin: .95rem 0 .9rem; }
.agent-content h3 { font: 1.85rem/1.1 var(--serif); letter-spacing: -.04em; }
.agent-content p { max-width: 34ch; margin-top: .3rem; color: var(--muted); font-size: .85rem; }
.agent-content .agent-reference { max-width: none; font-size: .74rem; }
.agent-reference code { overflow-wrap: anywhere; }
.empty-rows { border-top: 1px solid var(--line); }
.empty-rows > div { display: flex; align-items: center; gap: .65rem; min-height: 2.45rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.empty-rows > div:last-child { border-bottom: 0; }
.empty-rows strong { margin-left: auto; color: var(--ink); font-weight: 700; }
.empty-rows .icon { width: 1rem; }
.channel-count { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.channel-list { margin-top: .65rem; padding: 0; list-style: none; }
.channel-list li { display: flex; align-items: center; gap: .55rem; min-height: 2.65rem; border-bottom: 1px solid var(--line); }
.channel-list .platform-mark { width: 1.65rem; height: 1.65rem; border-radius: .35rem; }
.channel-list .platform-mark svg { width: 1rem; height: 1rem; }
.channel-name { flex: 1; font-size: .82rem; font-weight: 610; }
.status { display: inline-flex; flex: none; align-items: center; gap: .32rem; min-height: 1.4rem; padding: .1rem .46rem; border-radius: 2rem; font-size: .69rem; font-weight: 660; line-height: 1.15; white-space: nowrap; }
.status > span { width: .34rem; height: .34rem; border-radius: 50%; background: currentColor; }
.status-disconnected, .status-manual { background: #eeeee4; color: #555f51; }
.status-pending { background: #f3ead4; color: #745819; }
.status-expired { background: #f7e3da; color: #863e30; }
.status-connected { background: #e3ecdc; color: #3f6443; }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; gap: .4rem; margin-top: .15rem; color: #385840; font-size: .82rem; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: .95rem; }

.integration-header { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; padding: .75rem 0 1.4rem; }
.integration-header h1 { font: clamp(2.45rem, 5vw, 4.65rem)/1 var(--serif); letter-spacing: -.06em; }
.integration-header p { max-width: 40rem; margin-top: .6rem; color: var(--muted); font-size: .94rem; }
.integration-count { display: grid; flex: none; align-content: center; gap: .1rem; min-width: 8.3rem; padding: .65rem .9rem; border-radius: .5rem; background: #e7ebde; color: #415b45; font-size: .76rem; }
.integration-count strong { color: var(--forest); font: 1.65rem/1.1 var(--serif); }
.integration-note { display: flex; align-items: start; gap: .65rem; padding: .8rem .9rem; margin-bottom: 1rem; border: 1px solid #d7ddcb; border-radius: .58rem; background: #eff0e5; color: #405341; font-size: .84rem; }
.integration-note .icon { margin-top: .13rem; }
.integration-grid { display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.integration-card { padding: clamp(.85rem, 1.8vw, 1.35rem); }
.integration-card-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .6rem; }
.integration-card-heading .platform-mark { width: 2.55rem; height: 2.55rem; }
.integration-card-heading .platform-mark svg { width: 1.48rem; height: 1.48rem; }
.integration-platform { align-self: center; }
.integration-platform p { margin-top: .1rem; color: var(--muted); font-size: .72rem; }
.connection-detail { min-height: 2.6rem; margin: .7rem 0 .55rem; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.connection-detail small { display: block; margin-top: .2rem; font-size: .73rem; }
.capabilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: .35rem; border: 1px solid var(--line); border-radius: .45rem; background: #f7f6ef; }
.capabilities > div { padding: .45rem .6rem; }
.capabilities > div + div { border-left: 1px solid var(--line); }
.capabilities dt { font-size: .71rem; font-weight: 700; }
.capabilities dd { margin: .16rem 0 0; color: var(--muted); font-size: .72rem; }
.connection-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .55rem; }
.connection-actions:empty { display: none; }
.credential-disclosure > summary, .scope-disclosure > summary { display: flex; justify-content: space-between; align-items: center; gap: .6rem; min-height: 2.75rem; color: var(--forest); font-size: .82rem; font-weight: 700; }
.scope-disclosure > summary { font-weight: 600; }
.credential-disclosure > summary:hover, .scope-disclosure > summary:hover { text-decoration: underline; }
.credential-disclosure .icon, .scope-disclosure .icon { width: .94rem; }
.credential-form { padding-top: .65rem; border-top: 1px solid var(--line); }
.credential-form .button { justify-self: start; margin-top: .45rem; }
.optional { font-weight: 400; }
.scope-disclosure ul { padding: 0 0 .4rem 1rem; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
  .workspace-frame { grid-template-columns: 11.6rem minmax(0, 1fr); }
  .workspace-hero-copy { max-width: 58%; }
  .integration-card-heading { grid-template-columns: auto minmax(0, 1fr); }
  .integration-card-heading .status { grid-column: 2; justify-self: start; }
}
@media (max-width: 810px) {
  .auth-cover { padding: 1.75rem; }
  .auth-cover-copy { padding-top: 20rem; }
  .auth-main { padding-inline: 1.65rem; }
  .workspace-frame { display: block; }
  .rail { z-index: 2; flex-direction: row; align-items: center; justify-content: space-between; gap: .7rem; min-height: auto; padding: .5rem 1rem; }
  .rail-logo { padding: 0; }
  .rail-nav { display: flex; gap: .25rem; }
  .rail-nav a { padding-inline: .55rem; gap: .35rem; font-size: .78rem; }
  .rail-nav a .icon { width: .93rem; }
  .rail-foot { display: none; }
  .content, .topbar { padding-inline: 1rem; }
  .workspace-hero h1 { font-size: clamp(2.6rem, 6vw, 4.7rem); }
}
@media (max-width: 575px) {
  .auth-frame { display: block; }
  .auth-cover { min-height: 8.3rem; padding: .9rem 1.3rem; }
  .auth-art { top: 69%; left: auto; right: -.5rem; transform: translateY(-50%); width: 10.1rem; }
  .auth-cover-copy { padding-top: .45rem; }
  .auth-cover-copy p { margin: 0; font-size: 1.42rem; }
  .auth-cover-copy > span { display: none; }
  .auth-main { display: block; padding: 1.6rem 1.3rem 2rem; }
  .auth-container { margin-inline: auto; }
  .auth-container h1 { font-size: clamp(2.8rem, 11vw, 3.7rem); }
  .eyebrow { margin-bottom: .8rem; }
  .auth-intro { margin: .75rem 0 1.1rem; }
  .topbar { min-height: 3.5rem; }
  .account-email { display: none; }
  .overview-grid, .integration-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-hero { min-height: 0; }
  .workspace-hero > img { top: .1rem; right: 0; width: clamp(8.7rem, 40vw, 14rem); transform: none; }
  .workspace-hero-copy { max-width: none; padding: 1.15rem .95rem; }
  .workspace-hero h1 { max-width: 11ch; font-size: clamp(1.95rem, 7.9vw, 2.7rem); }
  .workspace-hero p { max-width: 25ch; margin: .8rem 0 .95rem; }
  .integration-header { gap: .55rem; padding: .45rem 0 1rem; align-items: start; }
  .integration-header h1 { font-size: clamp(1.95rem, 9.5vw, 3rem); overflow-wrap: anywhere; }
  .integration-header p { font-size: .85rem; }
  .integration-count { min-width: auto; padding: .42rem .5rem; font-size: .69rem; }
  .integration-count strong { font-size: 1.15rem; }
  .integration-card-heading { grid-template-columns: auto minmax(0, 1fr) auto; }
  .integration-card-heading .status { grid-column: auto; }
}
@media (max-width: 355px) {
  .rail { padding-inline: .6rem; }
  .rail-logo .brand { gap: .3rem; font-size: .85rem; }
  .rail-logo .brand svg { width: 1.25rem; }
  .rail-nav a { padding-inline: .35rem; gap: .25rem; font-size: .74rem; }
  .workspace-hero > img { width: 7.4rem; }
  .integration-card-heading { grid-template-columns: auto minmax(0, 1fr); }
  .integration-card-heading .status { grid-column: 2; justify-self: start; }
}
@media (max-width: 310px) {
  .rail-nav a .icon { display: none; }
}
