:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --light: #f5f5f7;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --green: #248a3d;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none!important; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
header { height: 58px; border-bottom: 1px solid rgba(0,0,0,.08); background: rgba(250,250,252,.9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.nav-inner { width: min(1120px, calc(100% - 40px)); height: 100%; margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { display: inline-flex; width: fit-content; align-items: center; }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
nav { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: 42px; color: #454547; font-size: 13px; }
.download { grid-column: 3; justify-self: end; padding: 8px 16px; border-radius: 980px; background: var(--blue); color: #fff; font-size: 13px; }
.download:hover, #run-agent:hover, .auth-primary:hover { background: var(--blue-hover); }

.directory-hero { padding: 94px 20px 72px; background: #fff; text-align: center; }
.eyebrow { margin: 0 0 20px; color: #bf4800; font-size: 15px; font-weight: 600; }
.directory-hero h1, .detail h1 { margin: 0; font-size: clamp(46px, 5.5vw, 64px); font-weight: 700; letter-spacing: -.05em; line-height: .98; }
.directory-hero > p:last-child { max-width: 650px; margin: 24px auto 0; color: var(--muted); font-size: 17px; font-weight: 500; line-height: 1.45; }
.catalog { padding: 0 max(24px, calc((100% - 1320px) / 2)) 130px; }
.catalog-tools { margin-bottom: 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { padding: 9px 15px; border: 0; border-radius: 980px; background: var(--light); color: #4d4d51; font-size: 12px; cursor: pointer; }
.filters button:hover { background: #e8e8ed; }
.filters button.active { background: var(--ink); color: #fff; }
.search { min-width: 210px; padding: 9px 13px; display: flex; align-items: center; gap: 8px; border-radius: 980px; background: var(--light); color: #86868b; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 17px; }
.card { min-width: 0; padding: 14px 14px 20px; display: flex; flex-direction: column; border-radius: 22px; background: var(--light); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 45px rgba(0,0,0,.09); }
.card img { width: 100%; aspect-ratio: 1.18; border-radius: 14px; background: #e7e7ea; object-fit: cover; }
.card h2 { margin: 18px 5px 8px; font-size: 20px; letter-spacing: -.025em; line-height: 1.1; }
.card p { min-height: 58px; margin: 0 5px 18px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.card-bottom { margin: auto 5px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #86868b; font-size: 10px; }
.card-bottom b { color: var(--blue); font-weight: 500; }
.try-badge { padding: 5px 8px; border-radius: 99px; background: #e7f4e8; color: var(--green)!important; }
.loading { color: var(--muted); }

.detail-page, .sign-in-route { min-height: 100vh; background: radial-gradient(circle at 92% 60%, rgba(247,229,215,.55), transparent 31%), #fff; }
.detail-page::before, .sign-in-route::before { position: fixed; z-index: 0; top: 140px; right: -180px; width: 620px; height: 620px; border-radius: 50%; background: repeating-radial-gradient(circle at center, transparent 0 49px, rgba(204,125,72,.075) 50px 51px); content: ""; pointer-events: none; }
.detail-page > header, .detail-page > footer, .sign-in-route > header, .sign-in-route > footer { display: none; }
.detail { position: relative; z-index: 1; min-height: 100vh; padding: 32px 44px 54px; }
.agent-page-top { display: flex; align-items: center; }
.back-to-agents { display: inline-flex; align-items: center; gap: 13px; color: #56565b; font-size: 13px; font-weight: 500; }
.back-to-agents:hover span { color: #000; }
.back-to-agents img { width: 48px; height: 48px; display: block; border-radius: 13px; background: #f5f0eb; object-fit: cover; box-shadow: 0 8px 22px rgba(60,42,28,.11); }
.detail-main { width: min(880px, calc(100% - 32px)); margin: 30px auto 0; text-align: center; }
.detail h1 { margin: 0; font-size: clamp(44px, 5vw, 64px); font-weight: 700; letter-spacing: -.052em; line-height: .98; }
.detail-description { max-width: 660px; margin: 18px auto 0; color: var(--muted); font-size: 18px; font-weight: 500; line-height: 1.4; }
.agent-composer { margin-top: 36px; }
.input-fields { margin: 0 0 26px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; text-align: left; }
.input-fields.single-field { grid-template-columns: 1fr; }
.file-field { min-width: 0; }
.file-field-title { margin: 0 0 9px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: #4d4d51; font-size: 12px; font-weight: 600; }
.file-field-title span { color: #86868b; font-size: 10px; font-weight: 400; }
.file-drop { min-height: 235px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #d6bba8; border-radius: 20px; background: rgba(255,255,255,.56); color: var(--ink); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; backdrop-filter: blur(16px); }
.file-drop:hover, .file-drop.dragging { border-color: #b06d3e; background: rgba(255,250,246,.9); }
.file-drop input, .optional-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-symbol { width: 64px; height: 64px; margin-bottom: 17px; display: grid; place-items: center; border-radius: 50%; background: #f6ece5; color: #a45420; font-size: 29px; line-height: 1; }
.file-drop strong { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.file-drop em { margin-top: 8px; color: #86868b; font-size: 14px; font-style: normal; }
.file-drop small { margin-top: 18px; color: #86868b; font-size: 11px; line-height: 1.4; }
.selected-files { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.selected-file { min-width: 0; padding: 7px 10px 7px 7px; display: flex; align-items: center; gap: 7px; border: 1px solid #e5e5e7; border-radius: 10px; background: #fff; color: #4d4d51; font-size: 10px; }
.selected-file img { width: 31px; height: 31px; border-radius: 6px; object-fit: cover; }
.selected-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.optional-divider { margin: 10px 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; color: #86868b; font-size: 11px; }
.optional-divider::before, .optional-divider::after { height: 1px; background: #e2e2e5; content: ""; }
.prompt-composer { position: relative; min-height: 188px; padding: 28px 72px 58px 34px; border: 1px solid #dcdce1; border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 18px 45px rgba(38,29,22,.08); text-align: left; backdrop-filter: blur(18px); }
.prompt-label { display: block; margin-bottom: 16px; color: #4d4d51; font-size: 14px; font-weight: 500; }
.prompt-composer textarea { width: 100%; min-height: 70px; padding: 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 17px; line-height: 1.45; }
.prompt-composer textarea::placeholder { color: #a2a2a8; }
.has-required-inputs .prompt-composer { min-height: 76px; padding: 25px 72px 20px 58px; }
.has-required-inputs .prompt-label { display: none; }
.has-required-inputs .prompt-composer textarea { min-height: 30px; overflow: hidden; white-space: nowrap; }
.has-required-inputs .attach-trigger { left: 22px; bottom: 20px; }
.has-required-inputs #run-agent { right: 18px; bottom: 14px; }
.attach-trigger { position: absolute; left: 28px; bottom: 22px; width: 34px; height: 34px; padding: 0; border: 0; background: none; color: #76767d; font-size: 0; cursor: pointer; }
.attach-trigger::before { width: 11px; height: 21px; display: block; border: 2px solid currentColor; border-radius: 7px; content: ""; transform: rotate(38deg); }
.attach-trigger::after { position: absolute; top: 8px; left: 7px; width: 6px; height: 13px; border: 1.5px solid currentColor; border-radius: 5px; content: ""; transform: rotate(38deg); }
#run-agent { position: absolute; right: 28px; bottom: 22px; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: #efefef; color: #222; font-size: 25px; line-height: 1; cursor: pointer; }
#run-agent:hover { background: #dedede; }
#run-agent:disabled { opacity: .42; cursor: default; }
.composer-files { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fine-print { margin: 31px auto 0; color: #86868b; font-size: 12px; line-height: 1.45; }
.fine-print span { position: relative; width: 12px; height: 10px; margin-right: 8px; display: inline-block; border: 1.5px solid #8e8e93; border-radius: 2px; transform: translateY(2px); }
.fine-print span::before { position: absolute; left: 2px; bottom: 7px; width: 5px; height: 5px; border: 1.5px solid #8e8e93; border-bottom: 0; border-radius: 5px 5px 0 0; content: ""; }
.trial-status { max-width: 760px; margin: 18px auto 0; padding: 14px 16px; border: 1px solid #e5e5e7; border-radius: 14px; background: rgba(255,255,255,.8); color: #48484a; font-size: 13px; line-height: 1.5; text-align: left; }
.trial-status a { color: var(--blue); }

.sign-in-page { position: relative; z-index: 1; min-height: 100vh; padding: 32px; display: grid; place-items: center; }
.sign-in-home { position: absolute; top: 32px; left: 42px; }
.sign-in-home img { width: 46px; height: 46px; display: block; border-radius: 13px; box-shadow: 0 9px 25px rgba(0,0,0,.1); }
.sign-in-panel { width: min(450px, calc(100% - 28px)); padding: 42px; border: 1px solid rgba(210,210,215,.8); border-radius: 26px; background: rgba(255,255,255,.84); box-shadow: 0 28px 80px rgba(63,44,31,.11); text-align: center; backdrop-filter: blur(22px); }
.sign-in-kicker { display: inline-flex; padding: 7px 11px; border-radius: 99px; background: #e7f4e8; color: var(--green); font-size: 11px; font-weight: 600; }
.sign-in-panel h1 { margin: 21px 0 0; font-size: 38px; letter-spacing: -.045em; }
.sign-in-panel > p { margin: 14px auto 25px; color: var(--muted); font-size: 14px; line-height: 1.5; }
#password-auth-form { display: grid; gap: 13px; }
#password-auth-form label { color: #48484a; font-size: 12px; font-weight: 600; text-align: left; }
#password-auth-form input { width: 100%; min-height: 48px; margin-top: 6px; padding: 0 14px; border: 1px solid #c7c7cc; border-radius: 12px; outline: 0; background: #fff; font-size: 15px; font-weight: 400; }
#password-auth-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.auth-primary { min-height: 48px; margin-top: 4px; border: 0; border-radius: 13px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.auth-primary:hover { background: #000; }
.auth-secondary { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 22px; }
.auth-secondary button { padding: 0; border: 0; background: none; color: var(--blue); font-size: 12px; cursor: pointer; }
.auth-secondary button:hover { text-decoration: underline; }
.auth-message { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--light); color: #48484a; font-size: 12px; line-height: 1.45; text-align: center; }
.sign-in-panel .sign-in-security { margin: 24px 0 0; color: #929298; font-size: 10px; }
footer { min-height: 110px; padding: 30px max(24px, calc((100% - 1024px) / 2)); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e5e5e7; background: var(--light); color: #6e6e73; font-size: 11px; }
footer div { display: flex; gap: 20px; }

@media (max-width: 1050px) {
  .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 650px) {
  header { height: 52px; }
  .nav-inner { width: calc(100% - 28px); }
  nav { gap: 20px; font-size: 12px; }
  .brand img { width: 27px; height: 27px; }
  .download { display: none; }
  .directory-hero { padding: 82px 18px 58px; }
  .directory-hero h1 { font-size: 40px; }
  .directory-hero > p:last-child { font-size: 16px; }
  .catalog { padding-right: 12px; padding-left: 12px; }
  .catalog-tools { display: block; }
  .search { margin-top: 12px; }
  .grid { grid-template-columns: 1fr; }
  .card { max-width: 480px; margin: auto; }
  .card p { min-height: 0; }
  .detail-page::before, .sign-in-route::before { right: -360px; opacity: .7; }
  .detail { padding: 20px 18px 48px; }
  .back-to-agents { gap: 10px; font-size: 12px; }
  .back-to-agents img { width: 43px; height: 43px; border-radius: 12px; }
  .detail-main { width: 100%; margin-top: 34px; }
  .detail h1 { font-size: 42px; }
  .detail-description { margin-top: 17px; padding: 0 8px; font-size: 16px; }
  .agent-composer { margin-top: 30px; }
  .input-fields { grid-template-columns: 1fr; }
  .file-drop { min-height: 210px; padding: 20px 15px; }
  .prompt-composer { min-height: 175px; padding: 25px 63px 55px 23px; border-radius: 18px; }
  .prompt-composer textarea { font-size: 16px; }
  .has-required-inputs .prompt-composer { padding-right: 64px; padding-left: 51px; }
  .attach-trigger { left: 20px; bottom: 18px; }
  #run-agent { right: 20px; bottom: 18px; }
  .sign-in-page { padding: 84px 14px 30px; }
  .sign-in-home { top: 20px; left: 20px; }
  .sign-in-home img { width: 42px; height: 42px; }
  .sign-in-panel { width: 100%; padding: 32px 22px; border-radius: 22px; }
  .sign-in-panel h1 { font-size: 34px; }
  .auth-secondary { gap: 16px; }
  footer { align-items: flex-start; flex-wrap: wrap; }
}
