* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --ink: #16243a;
  --muted: #52627a;
  --line: #dbe5f0;
  --blue: #075bc3;
  --canvas: #f3f7fc;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
body { margin: 0; }
.portal-catalog { margin-top: 28px; }
#catalog-more[hidden] { display: none; }
.portal-catalog-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.portal-catalog-grid ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.portal-catalog-grid li { display: flex; gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: white; overflow-wrap: anywhere; }
.portal-catalog-grid img { border-radius: 9px; object-fit: contain; flex: none; }
.portal-catalog-grid small { display: block; color: var(--muted); }
a { color: var(--blue); text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid #1671d6; outline-offset: 3px; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 2; background: white; padding: .6rem; }
.skip:focus { top: 1rem; }
.portal { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #eaf1f9; border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--ink); font-size: 1.28rem; font-weight: 750; text-decoration: none; }
.sidebar nav, .link-list { display: grid; gap: 5px; }
.sidebar nav a { color: var(--ink); text-decoration: none; padding: .68rem .8rem; border-radius: 8px; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { color: #034f9b; background: #d7e8ff; }
.sidebar nav a[aria-current] { font-weight: 650; }
.support { margin-top: auto; padding: 8px; }
.topbar { min-height: 68px; padding: 12px clamp(16px, 3vw, 42px); background: #ffffff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.trail { color: var(--muted); font-size: .9rem; }
.trail span { margin: 0 .4rem; }
.top-actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.top-actions > a:first-child { padding: .35rem; font-weight: 650; }
.content { max-width: 1240px; margin-inline: auto; padding: clamp(18px, 4vw, 48px); }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: .65rem; }
h2 { font-size: 1.2rem; line-height: 1.25; margin-bottom: 1rem; }
.lede, .hint, .auth-copy p { color: var(--muted); }
.lede { max-width: 65ch; margin-bottom: 1.6rem; }
.eyebrow { color: var(--blue); letter-spacing: .085em; font-weight: 700; font-size: .74rem; margin-bottom: .7rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(18px, 5vw, 60px); padding: clamp(22px, 4vw, 52px); background: #e1eeff; border: 1px solid #cbdff8; border-radius: 18px; }
.hero p:not(.eyebrow) { max-width: 51ch; color: #284765; }
.hero img { width: clamp(88px, 13vw, 172px); height: auto; }
.catalog-link { margin-top: 1.2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .54rem .95rem; color: var(--blue); font-weight: 650; background: white; border: 1px solid #c5d5e8; border-radius: 8px; text-decoration: none; cursor: pointer; }
.button:hover:not(:disabled) { background: #eaf3ff; }
.button.primary { color: white; background: var(--blue); border-color: var(--blue); }
.button.primary:hover:not(:disabled) { background: #064990; }
.button.compact { min-height: 36px; font-size: .88rem; }
.button:disabled { opacity: .56; cursor: default; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; padding: clamp(17px, 2.3vw, 28px); min-width: 0; }
.notice { background: #e5efff; border: 1px solid #c4daf6; border-radius: 8px; padding: .8rem 1rem; }
.notice[role="alert"] { color: #792418; background: #fff2ec; border-color: #ebc9bc; }
.auth-layout, .dashboard-grid, .prompt-layout, .docs-layout { display: grid; align-items: start; gap: clamp(16px, 2vw, 26px); }
.auth-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); align-items: center; }
.auth-copy img { margin-bottom: 1.2rem; }
.auth-copy p { max-width: 43ch; }
.auth-panel > a { display: inline-block; margin-top: 1rem; }
.auth-panel form, #prompt-form, .prompt-output { display: grid; gap: .9rem; }
.auth-panel .hint, #prompt-form .hint { margin: 0; font-size: .85rem; }
label { display: grid; gap: .35rem; font-size: .91rem; font-weight: 650; }
input, textarea { width: 100%; min-width: 0; background: #f7faff; color: var(--ink); border: 1px solid #c5d5e8; border-radius: 8px; padding: .65rem .75rem; }
textarea { resize: vertical; }
.dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.account-details, .sdk-list { margin: 0 0 1.2rem; }
.account-details div, .sdk-list div { border-top: 1px solid var(--line); padding: .7rem 0; }
dt { font-weight: 650; }
dd { margin: .15rem 0 0; overflow-wrap: anywhere; color: var(--muted); }
.link-list a { padding: .7rem .8rem; border-radius: 8px; background: #f4f8fd; text-decoration: none; display: grid; gap: .2rem; }
.link-list a:hover { background: #e4effe; }
.link-list span { color: var(--muted); font-size: .87rem; }
.docs-layout { grid-template-columns: minmax(150px, 195px) minmax(0, 1fr); }
.docs-nav { display: grid; gap: .7rem; }
.guide section + section { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.5rem; }
pre { overflow: auto; padding: .9rem; background: #10233d; color: #f0f6ff; border-radius: 9px; font: .85rem/1.55 Consolas, monospace; }
code { overflow-wrap: anywhere; }
.prompt-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.prompt-output textarea { font: .88rem/1.5 Consolas, monospace; }
.prompt-output h2, #prompt-form h2 { margin: 0; }
#copy-status { color: var(--muted); font-size: .88rem; }
@media (max-width: 900px) {
  .portal { grid-template-columns: 175px minmax(0, 1fr); }
  .auth-layout, .dashboard-grid, .docs-layout, .prompt-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { display: flex; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .portal { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 12px; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 3px; }
  .sidebar nav a { font-size: .82rem; padding: .4rem .55rem; }
  .sidebar .support { display: none; }
  .topbar { padding: 8px 14px; }
  .top-actions { gap: .25rem; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero img { display: none; }
}

.submission-list { list-style: none; padding: 0; margin: 0; }
.submission-list li { display: grid; gap: 3px; border-top: 1px solid var(--line); padding: .8rem 0; overflow-wrap: anywhere; }
.submission-list li > span, .submission-list small { color: var(--muted); font-size: .86rem; }
input[type="file"]::file-selector-button { font: inherit; margin-right: .55rem; cursor: pointer; }
