:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: #f7f8fc;
  color: #15213a;
  font-synthesis: none;
  color-scheme: light;
  --bg: #f7f8fc;
  --card: #fff;
  --soft: #f0f2f8;
  --text: #15213a;
  --muted: #5b6680;
  --line: #dce1ed;
  --accent: #5845bc;
  --tint: #efebfc;
  --green: #236d58;
  --error: #ad294c;
  --shadow: 0 18px 60px #2632600c;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  background: #0b0f1a;
  color: #eef1fb;
  --bg: #0b0f1a;
  --card: #141a29;
  --soft: #1a2233;
  --text: #eef1fb;
  --muted: #a8b4cd;
  --line: #303a50;
  --accent: #bbadff;
  --tint: #2b2446;
  --green: #8ce2c1;
  --error: #ffa1bd;
  --shadow: 0 18px 60px #0003;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 15px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.5;
  text-decoration: none;
}
button:hover,
.button:hover {
  border-color: var(--accent);
  background: var(--tint);
}
button:active,
.button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary,
.button.primary {
  background: #6751d3;
  color: white;
  border-color: #6751d3;
}
.primary:hover,
.button.primary:hover {
  background: #5540bc;
}
.danger {
  color: var(--error);
}
.active {
  color: var(--accent);
  background: var(--tint);
  border-color: var(--accent);
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
p {
  line-height: 1.7;
}
h1 {
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: -2.8px;
  margin: 20px 0;
}
h1 span {
  background: linear-gradient(110deg, #607ee2, #8e63c7);
  color: transparent;
  background-clip: text;
}
h2 {
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.7px;
}
h3 {
  font-size: 17px;
  line-height: 1.4;
}
small {
  font-size: 12px;
}
.subtle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}
.tag {
  display: inline-block;
  font-size: 10px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--tint);
  color: var(--accent);
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.actions h3 {
  margin: 0 auto 0 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1376px;
  padding: 24px 40px;
  margin: auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 19px;
  font-weight: 750;
  white-space: nowrap;
}
.brand span {
  font-weight: 400;
  margin-left: -6px;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 13px;
}
main {
  max-width: 1296px;
  margin: 0 auto;
  padding: 0 24px;
}
.hero {
  padding: 45px 28px 48px;
  max-width: 900px;
}
.lead {
  max-width: 580px;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.8;
}
.hero .actions {
  margin: 30px 0 18px;
  gap: 25px;
}
.hero .button {
  padding: 15px 22px;
}
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
}
.orbit {
  position: absolute;
  width: 390px;
  height: 340px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: rotate(-25deg);
  box-shadow: 0 0 90px #755bd512;
}
.flow-card {
  position: relative;
  width: 340px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 27px;
  background: var(--card);
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}
.flow-card > div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.flow-card > div > span:last-child {
  margin-left: auto;
  color: var(--accent);
}
.step-num {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
  border-radius: 9px;
  background: var(--tint);
  padding: 10px;
}
.flow-card p {
  margin: 0;
}
.flow-card strong {
  display: block;
  font-size: 16px;
}
.flow-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.flow-card .flow-foot {
  font-size: 10px;
  color: var(--muted);
  margin-top: 23px;
}
.flow-foot i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 70px;
}
.feature-grid article {
  padding: 28px;
  border-top: 1px solid var(--line);
}
.feature-grid h2 {
  font-size: 21px;
}
.feature-grid p:last-child {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.guide-section {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 70px;
  padding: 48px 28px;
  border-top: 1px solid var(--line);
}
.guide-section p {
  color: var(--muted);
  font-size: 15px;
}
.cta {
  text-align: center;
  padding: 75px 25px;
}
.cta h2 {
  font-size: 32px;
}
.cta .button {
  margin-top: 12px;
}
footer {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  max-width: 1248px;
  border-top: 1px solid var(--line);
  margin: 25px auto 0;
  padding: 28px 0 35px;
  font-size: 12px;
  color: var(--muted);
}
footer span {
  margin-left: auto;
}
.skip {
  position: absolute;
  top: -100px;
  left: 18px;
  padding: 12px;
  background: var(--card);
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
.guide-main {
  max-width: 960px;
  padding: 45px 24px 60px;
}
.guide-main h1 {
  font-size: 46px;
}
.guide-main section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.guide-main section:first-of-type {
  margin-top: 35px;
}
.guide-main p {
  color: var(--muted);
  font-size: 16px;
}
.guide-main a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.app-main {
  max-width: 1390px;
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 24px 0 12px;
}
.workspace-heading h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 0;
}
.workspace-tools {
  text-align: right;
}
#save-state {
  font-size: 12px;
  color: var(--muted);
}
.workspace-tools .actions {
  justify-content: flex-end;
}
.local-note {
  padding: 14px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
}
.notice,
.error {
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--tint);
  color: var(--accent);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 15px;
}
.error {
  color: var(--error);
}
.warning {
  font-size: 13px;
  padding: 12px;
  border-left: 3px solid var(--accent);
  background: var(--tint);
}
.view-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 28px;
}
.view-tabs button {
  border: 0;
  background: none;
  padding: 12px 18px;
  color: var(--muted);
}
.view-tabs button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--tint);
}
.view-tabs span {
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
textarea {
  line-height: 1.65;
  resize: vertical;
  min-height: 100px;
}
.field,
.search-box label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.field {
  margin: 15px 0;
}
.field:has(select),
.search-box label:has(select) {
  overflow: clip;
  overflow-clip-margin: 7px;
}
@supports not (overflow-clip-margin: 7px) {
  .field:has(select),
  .search-box label:has(select) {
    padding: 7px;
    margin-inline: -7px;
  }
}
.section-heading h2 {
  overflow-wrap: anywhere;
}
.search-box {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr auto;
  gap: 14px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.search-box button {
  height: 44px;
}
.search-box label {
  min-width: 0;
}
.result-summary {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: baseline;
  margin: 20px 0;
}
.result-summary p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.result-summary a {
  font-size: 12px;
  white-space: nowrap;
}
.search-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
}
.result-list {
  display: grid;
  gap: 0;
}
.result-card {
  border-bottom: 1px solid var(--line);
  padding: 23px;
  background: var(--card);
}
.result-card h2 {
  font-size: 19px;
  margin: 14px 0 10px;
  overflow-wrap: anywhere;
}
.result-card .actions {
  margin: 0;
}
.date-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.text-button {
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--accent);
  margin-top: 12px;
}
.detail-panel {
  min-height: 360px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 28px;
  overflow-wrap: anywhere;
}
.detail-panel > .primary {
  margin-bottom: 24px;
}
.empty {
  text-align: center;
  padding: 45px 22px;
  color: var(--muted);
  font-size: 14px;
}
.empty h2 {
  color: var(--text);
  font-size: 23px;
}
.empty-symbol {
  font-size: 38px;
  color: var(--accent);
  display: block;
  margin-bottom: 24px;
}
.source-view h2 {
  font-size: 24px;
  margin-bottom: 10px;
}
.source-view > a {
  font-size: 13px;
}
.source-view > .subtle {
  margin-top: 14px;
}
.fit-box {
  padding: 16px;
  background: var(--soft);
  border-radius: 12px;
  margin: 20px 0;
}
.fit-box p {
  font-size: 12px;
  margin: 0 0 10px;
}
.fit-box p:last-child {
  margin: 0;
}
details {
  border-top: 1px solid var(--line);
  padding: 17px 0;
}
summary {
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
details p {
  margin: 12px 0 0;
}
.source-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}
.section-heading {
  margin: 30px 0;
  max-width: 780px;
}
.edit-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 20px;
  background: var(--card);
  margin: 18px 0;
}
.edit-card .field:first-child {
  margin-top: 0;
}
.edit-card > button {
  font-size: 12px;
}
.edit-card fieldset {
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
  padding: 13px 0 0;
}
.edit-card legend {
  font-size: 12px;
  color: var(--muted);
  padding-right: 10px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 10px 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.check-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
#profile {
  max-width: 900px;
  margin: auto;
}
.saved-grid {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 25px;
}
.application-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
}
.application-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 18px;
  gap: 8px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.application-item strong {
  font-size: 13px;
}
.application-item small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.application-item[aria-current="true"] {
  border-color: var(--accent);
  background: var(--tint);
}
.application-editor {
  min-width: 0;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
}
.application-editor > h2 {
  font-size: 25px;
  overflow-wrap: anywhere;
}
.editor-body {
  border-top: 1px solid var(--line);
  padding-top: 25px;
  margin-top: 25px;
}
.readiness {
  padding: 20px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
}
.readiness h3 {
  margin-bottom: 10px;
}
.readiness p {
  margin: 0;
}
.budget-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.budget-row .field {
  min-width: 0;
}
.budget-row > button {
  margin-bottom: 15px;
}
.budget-total {
  padding: 15px;
  background: var(--tint);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.review-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 16px;
}
.review-card > p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.read-packet {
  white-space: pre-wrap;
  font:
    13px/1.75 system-ui,
    sans-serif;
  overflow-wrap: anywhere;
}
dialog {
  padding: 25px;
  width: min(650px, calc(100% - 28px));
  max-height: 85vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 20px 80px #0003;
}
dialog::backdrop {
  background: #10172c9e;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font-size: 24px;
  margin: 0;
}
.dialog-head button {
  font-size: 22px;
  padding: 0 10px;
}
dialog p {
  font-size: 13px;
}
dialog .actions {
  justify-content: flex-end;
}
#modal-error {
  color: var(--error);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .search-box {
    grid-template-columns: 1.5fr 1fr;
  }
  .search-box button {
    height: 45px;
  }
  .hero-art {
    transform: scale(0.88);
  }
  .hero {
    gap: 20px;
  }
  .saved-grid {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .budget-row {
    grid-template-columns: 1fr 1fr;
  }
  .budget-row > button {
    justify-self: start;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 20px 18px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 17px;
  }
  .topbar nav {
    gap: 12px;
    font-size: 12px;
    flex-wrap: wrap;
  }
  .topbar .tag {
    display: inline-block;
  }
  main {
    padding: 0 16px;
  }
  .hero {
    display: block;
    padding: 40px 5px;
  }
  .hero h1 {
    font-size: 48px;
    letter-spacing: -2.3px;
  }
  .lead {
    font-size: 16px;
  }
  .hero-art {
    min-height: 340px;
    transform: scale(0.88);
    margin: 15px 0 0;
  }
  .orbit {
    width: 330px;
    height: 300px;
  }
  .flow-card {
    width: min(340px, 100%);
  }
  .hero .actions {
    gap: 20px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 32px;
  }
  .feature-grid article {
    padding: 25px;
  }
  .guide-section {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 32px 5px;
  }
  .cta {
    padding: 45px 5px;
  }
  .cta h2 {
    font-size: 26px;
  }
  footer {
    margin: 25px 18px 0;
    gap: 18px;
  }
  footer span {
    margin-left: 0;
    width: 100%;
  }
  .guide-main {
    padding: 25px 20px 50px;
  }
  .guide-main h1 {
    font-size: 37px;
    letter-spacing: -1.5px;
  }
  .guide-main p {
    font-size: 14px;
  }
  .workspace-heading {
    display: block;
    padding: 25px 0 10px;
  }
  .workspace-heading h1 {
    font-size: 28px;
  }
  .workspace-tools {
    text-align: left;
    margin-top: 25px;
  }
  .workspace-tools .actions {
    justify-content: flex-start;
  }
  .workspace-tools button {
    padding: 8px 11px;
    font-size: 12px;
  }
  .view-tabs {
    gap: 3px;
    flex-wrap: wrap;
  }
  .view-tabs button {
    font-size: 12px;
    padding: 10px;
  }
  .search-box {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .search-box button {
    width: 100%;
  }
  .search-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .result-summary {
    flex-direction: column;
    gap: 10px;
  }
  .detail-panel {
    padding: 22px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .saved-grid {
    grid-template-columns: 1fr;
  }
  .application-list {
    flex-direction: row;
    overflow: auto;
    max-height: 180px;
  }
  .application-item {
    min-width: 220px;
    max-width: 260px;
    flex-shrink: 0;
    padding: 14px;
  }
  .application-editor {
    padding: 20px 15px;
  }
  .application-editor > h2 {
    font-size: 22px;
  }
  .edit-card {
    padding: 16px;
  }
  .budget-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .budget-row .field {
    margin: 8px 0;
  }
  .budget-row > button {
    margin-bottom: 20px;
  }
  .review-card {
    padding: 16px;
  }
  .source-view h2 {
    font-size: 22px;
  }
  .actions button {
    font-size: 12px;
  }
  .local-note {
    font-size: 11px;
  }
  .readiness {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    background: #0b0f1a;
    color: #eef1fb;
    --bg: #0b0f1a;
    --card: #141a29;
    --soft: #1a2233;
    --text: #eef1fb;
    --muted: #a8b4cd;
    --line: #303a50;
    --accent: #bbadff;
    --tint: #2b2446;
    --green: #8ce2c1;
    --error: #ffa1bd;
  }
}
@media (scripting: none) {
  #discovery,
  #saved,
  #profile,
  .view-tabs,
  .workspace-tools,
  #theme {
    display: none !important;
  }
}
