:root {
  color-scheme: light;
  --paper: #f6f6ee;
  --white: #fff;
  --ink: #22251c;
  --muted: #61655b;
  --edge: #dfe1d6;
  --lime: #daf479;
  --olive: #54691c;
  font-family: 'Instrument Sans', 'Avenir Next', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
button, .attach { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid #506125; outline-offset: 4px; }
.sidebar { min-height: 100vh; position: sticky; top: 0; height: 100vh; background: #eeefe5; border-right: 1px solid var(--edge); display: flex; flex-direction: column; padding: 27px 17px 20px; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 44px; text-decoration: none; font-size: 23px; font-weight: 750; letter-spacing: -.055em; line-height: 1.05; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 550; letter-spacing: 0; }
.brand-icon { display: grid; place-items: center; height: 36px; width: 36px; border-radius: 10px; background: var(--lime); color: #263211; font-size: 27px; font-weight: 600; }
nav { display: grid; gap: 5px; }
nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; color: #505449; font-weight: 600; }
nav a span { width: 19px; text-align: center; font-size: 19px; line-height: 1; }
nav a:hover, nav a[aria-current] { background: #e1e7ce; color: #28321a; }
.identity { margin-top: auto; padding: 15px 8px 0; border-top: 1px solid #d9dcce; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.identity button { display: block; margin-top: 8px; }
.top { min-height: 68px; padding: 0 36px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--edge); color: var(--muted); font-size: 14px; }
.top strong { color: var(--ink); }
.separator { padding: 0 7px; color: #777d6b; }
.workspace { max-width: 1260px; padding: 48px 36px; margin: auto; }
.page-heading { margin-bottom: 32px; }
h1 { font-size: clamp(38px, 5.7vw, 76px); margin: 0 0 10px; line-height: 1; letter-spacing: -.075em; font-weight: 680; }
h1 span { color: #708b2f; }
p { line-height: 1.5; }
.page-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.columns { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 18px; align-items: start; }
.card { min-width: 0; background: var(--white); border: 1px solid var(--edge); border-radius: 14px; box-shadow: 0 3px 12px #292c1d08; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 20px; border-bottom: 1px solid #eaebe4; }
h2 { font-size: 17px; margin: 0; letter-spacing: -.03em; }
.card-header span { font-size: 12px; color: var(--muted); }
textarea { resize: vertical; display: block; width: 100%; min-height: 200px; padding: 20px; border: 0; color: var(--ink); background: transparent; }
textarea:focus-visible { outline-offset: -4px; }
.toolbar, .composer-footer { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-top: 1px solid #eaebe4; }
.toolbar { color: var(--muted); font-size: 12px; }
.attach, .quiet { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border-radius: 7px; font-size: 13px; font-weight: 650; color: var(--ink); border: 1px solid var(--edge); background: var(--white); text-decoration: none; }
.quiet:hover, .attach:hover { background: #f0f1e8; }
.toolbar:focus-within .attach { outline: 2px solid var(--olive); }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #bcd661; border-radius: 8px; padding: 10px 14px; background: var(--lime); color: #252d15; font-size: 13px; font-weight: 750; white-space: nowrap; }
.primary:hover { background: #cde962; }
.composer-footer { justify-content: space-between; flex-wrap: wrap; }
.status { margin: 0; color: #795026; font-size: 13px; flex: 1; }
.platform-row, .history-item, .key-row { padding: 15px 18px; border-bottom: 1px solid #eaebe4; }
.platform-title, .connection, .key-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.platform-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.platform-name strong { font-size: 14px; font-weight: 720; }
.platform-mark { flex: 0 0 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: white; background: #272922; font-size: 16px; font-weight: 750; }
.platform-mark.facebook { background: #1662ba; }.platform-mark.linkedin { background: #0a6395; }.platform-mark.youtube { background: #b6272a; }
.platform-mark.instagram { background: #a93367; }
.meta { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.connection { padding: 9px 0 0 42px; font-size: 13px; overflow-wrap: anywhere; }
.connection span, .connection label, .key-row span { min-width: 0; overflow-wrap: anywhere; }
.connection label { display: flex; align-items: center; gap: 8px; }
input[type="checkbox"] { accent-color: var(--olive); }
.account-link { display: flex; justify-content: space-between; color: #3c5011; text-decoration: none; padding: 15px 18px; font-size: 13px; font-weight: 700; }
.account-link:hover { text-decoration: underline; }
.empty, .notice { padding: 16px 20px; font-size: 14px; color: var(--muted); }
.notice { background: #e9efd6; border: 1px solid #d6e2b3; border-radius: 8px; margin: 0 0 22px; color: var(--ink); }
.list-card { overflow: hidden; }
.list-card .platform-row:last-child, .history-item:last-child, .key-row:last-child { border-bottom: 0; }
.list-card .platform-row, .history-item { padding: 20px; }
.history-item p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-item ul { padding-left: 18px; margin-bottom: 0; font-size: 13px; line-height: 1.8; }
fieldset { margin: 0; padding: 10px 20px 16px; border: 0; }
legend { padding: 0; margin-bottom: 5px; font-size: 14px; font-weight: 720; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
fieldset label, .auth-panel label { display: grid; gap: 6px; margin-bottom: 10px; font-size: 13px; font-weight: 650; }
input:not([type="checkbox"], [type="file"]), select { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid var(--edge); border-radius: 7px; background: #fff; color: var(--ink); }
.consent { display: flex; align-items: start; gap: 7px; padding: 12px 20px; font-size: 13px; }
#file-info { padding: 10px 20px; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }
#file-info button { margin-left: 10px; }
.inline-form { display: flex; gap: 8px; padding: 17px 20px; }
#key-created, #key-status:not(:empty), .endpoints p, .endpoints dl { margin: 12px 20px; font-size: 13px; }
#key-created p { margin: 0 0 5px; }
#key-created button { margin-top: 8px; }
code { overflow-wrap: anywhere; color: #41501d; }
dt { margin-top: 12px; font-weight: 700; } dd { margin: 3px 0 0; }
dialog { border: 1px solid var(--edge); border-radius: 14px; padding: 0; max-width: calc(100% - 28px); width: 390px; }
dialog::backdrop { background: #242a1d85; }
.auth-panel { position: relative; padding: 25px; display: grid; gap: 10px; }
.auth-panel h2 { font-size: 25px; margin: 0 0 10px; }
.auth-panel .close { position: absolute; top: 14px; right: 14px; padding: 2px 9px; font-size: 18px; }
.auth-panel .quiet { justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  body { grid-template-columns: 176px minmax(0, 1fr); }
  .workspace { padding: 36px 22px; }
  .top { padding: 0 22px; }
  .columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 580px) {
  body { display: block; }
  .sidebar { min-height: 0; height: auto; position: static; padding: 13px 12px; border-right: none; border-bottom: 1px solid var(--edge); }
  .brand { margin: 0 4px 12px; }
  nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  nav a { justify-content: center; padding: 8px 3px; font-size: 12px; }
  nav a span { display: none; }
  .identity { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: 8px; padding-top: 5px; min-height: 28px; }
  .identity button { margin: 0; }
  .top { min-height: 50px; padding: 0 16px; }
  .workspace { padding: 26px 14px; }
}
