@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Source+Code+Pro:wght@300;400;700&display=swap");
html, body {
  height: 100%;
  min-height: 100%; }

* {
  color: #dbe5f2;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif; }

html {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #090b10; }

body {
  margin: 0;
  background: radial-gradient(circle at top right, #17243a 0, transparent 33%), #090b10;
  height: 100%;
  min-height: 100%; }

.devtools {
  width: calc(100% - 30px);
  margin: 25px 15px;
  padding: 30px;
  background: #151c29;
  border-radius: 12px; }

.search_block {
  background: #39507b17;
  padding-left: 158px;
  border-bottom: 1px solid #293141;
  height: 100px;
  display: flex;
  align-items: center; }
  .search_block form {
    display: flex;
    margin-right: 15px; }
    .search_block form input[type=text] {
      height: 46px;
      color: #f3f7fc;
      background: #0d141f;
      width: 670px;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
      border-radius: 10px;
      border: 1px solid #344154;
      outline: none;
      font-size: 16px;
      padding: 0 11px; }
  .search_block a {
    min-width: 110px;
    margin-right: 10px;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 46px;
    background: #111925;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 0 11px;
    color: #b9cce4;
    transition: 0.3s; }
    .search_block a:hover {
      background: #182a40; }
  .search_block .user-menu {
    position: relative;
    margin-left: auto;
    margin-right: 18px; }
  .search_block .login-button {
    margin-left: auto;
    margin-right: 18px;
    border: 1px solid #344154;
    color: #f4f7fb;
    background: #111925; }
  .search_block .user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    height: 46px;
    border: 1px solid #344154;
    border-radius: 10px;
    padding: 0 11px;
    color: #f4f7fb;
    background: #111925;
    font: inherit;
    cursor: pointer; }
  .search_block .avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #cbe3ff;
    background: #284e79;
    font-size: 13px;
    font-weight: 800; }
  .search_block .user-name {
    overflow: hidden;
    max-width: 150px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700; }
  .search_block .chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid #94a2b7;
    border-bottom: 2px solid #94a2b7;
    transform: rotate(45deg) translateY(-2px); }
  .search_block .user-button[aria-expanded="true"] .chevron { transform: rotate(225deg) translateY(-2px); }
  .search_block .user-dropdown {
    position: absolute;
    z-index: 5;
    top: calc(100% + 9px);
    right: 0;
    display: none;
    width: 210px;
    overflow: hidden;
    border: 1px solid #303a4c;
    border-radius: 14px;
    background: #151b26;
    box-shadow: 0 18px 42px #0009; }
  .search_block .user-dropdown.open { display: block; }
  .search_block .user-dropdown a {
    display: block;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 12px 14px;
    border-radius: 0;
    color: #dce7f6;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    font-weight: 650; }
  .search_block .user-dropdown a:hover { background: #202a3a; color: #fff; }
  .search_block .user-dropdown .logout { border-top: 1px solid #2b3546; color: #ffb8b0; }

.field {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  color: #f3f7fc;
  background: #0d141f;
  width: 100%;
  border-radius: 10px;
  border: 1px solid #344154;
  outline: none;
  font-size: 16px;
  padding: 7px 7px; }

.result {
  padding: 20px 15px 10px;
  width: 100%;
  margin: 0; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border: 1px solid #344154;
  -webkit-text-fill-color: #dbe5f2;
  -webkit-box-shadow: 0 0 0 1000px #0d141f inset;
  transition: background-color 5000s ease-in-out 0s;
  font-size: 16px;
  font-family: "Open Sans", sans-serif; }

.form_block {
  width: 88.5%;
  margin: 15px auto;
  height: 100%;
  display: flex; }
  .form_block .tools {
    padding: 52px 15px 15px;
    width: 30%; }
    .form_block .tools textarea {
      padding: 15px; }
  .form_block .searchResult {
    padding: 15px;
    width: 30%; }
    .form_block .searchResult .result__snippet {
      text-decoration: none; }
  .form_block .translate {
    padding: 15px;
    width: 70%;
    display: flex;
    position: relative; }
    .form_block .translate #revertLang {
      position: absolute;
      left: calc(50% - 14px);
      top: 235px;
      user-select: none;
      background: #151c29;
      height: 28px;
      width: 28px;
      border-radius: 50%;
      color: #afd5ff;
      display: flex;
      justify-content: center;
      align-items: center;
      transition: 0.3s;
      cursor: pointer; }
      .form_block .translate #revertLang:hover {
        background: #182a40; }
    .form_block .translate .textarea-wrapper {
      width: 100%;
      height: max-content;
      position: relative;
      display: inline-block;
      margin-right: 30px; }
      .form_block .translate .language-picker {
        display: flex;
        gap: 6px;
        margin-bottom: 8px; }
        .form_block .translate .language-picker button {
          min-width: 38px;
          border: 1px solid #344154;
          border-radius: 7px;
          padding: 5px 8px;
          color: #9eafc5;
          background: #111925;
          font: 700 12px "Open Sans", sans-serif;
          cursor: pointer; }
          .form_block .translate .language-picker button.active {
            border-color: #3d5f89;
            color: #b9daff;
            background: #182a40; }
      .form_block .translate .textarea-wrapper:last-child {
        margin-right: 0; }
      .form_block .translate .textarea-wrapper:after {
        content: '';
        display: block;
        position: absolute;
        right: 1px;
        bottom: 6px;
        border-style: solid;
        border-width: 0 9px 9px 0;
        border-color: transparent transparent #344154 #344154;
        transform: rotate(-90deg);
        pointer-events: none;
        box-sizing: content-box;
        z-index: 10; }
    .form_block .translate textarea {
      height: 400px;
      min-height: 400px;
      resize: vertical;
      position: relative;
      padding: 15px; }

.bookmarksBar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  background: inherit; }
  .bookmarksBar ul li {
    position: relative;
    padding: 6px 10px;
    white-space: nowrap; }
    .bookmarksBar ul li:hover > ul {
      display: block; }
    .bookmarksBar ul li a {
      color: white;
      text-decoration: none; }
      .bookmarksBar ul li a:hover {
        text-decoration: underline; }
    .bookmarksBar ul li ul {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      flex-direction: column;
      background: #2a2a2a;
      z-index: 100;
      min-width: 180px; }

.bookmarksBar > ul > li {
  border-right: 1px solid #333; }

::-webkit-scrollbar {
  width: 8px;
  background: black; }

::-webkit-scrollbar-thumb {
  transition: 0.3s;
  background: #2a2a2a;
  -webkit-border-radius: 0px; }
  ::-webkit-scrollbar-thumb:hover {
    background: #3d3d3d; }

::-webkit-scrollbar-corner {
  margin: 2px;
  background: black; }

.codex-form {
  width: 88.5%;
  height: calc(100vh - 130px);
  margin: 15px auto; }
  .codex-form .codex-chat {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #293141;
    border-radius: 12px;
    background: #151c29; }
  .codex-form .codex-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px; }
  .codex-form .codex-message {
    max-width: 80%;
    margin: 6px 0;
    padding: 9px 12px;
    border-radius: 12px;
    color: #dbe5f2;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word; }
    .codex-form .codex-message.user { margin-left: auto; background: #1d334e; }
    .codex-form .codex-message.assistant { background: #111925; }
  .codex-form .codex-input {
    padding: 10px 12px;
    border-top: 1px solid #293141;
    background: #10141c; }
  .codex-form .codex-input textarea {
    display: block;
    width: 100%;
    min-height: 38px;
    max-height: 240px;
    padding: 8px 11px;
    border: 0;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    color: #f3f7fc;
    background: transparent;
    font: 15px/1.4 "Open Sans", sans-serif;
    resize: none; }
  .codex-form .codex-input textarea:focus { outline: 0; box-shadow: none; }

.chatApp {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%; }
  .chatApp .toolbarWrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 50px; }
  .chatApp .mainWrapper {
    height: 100%;
    display: flex; }
    .chatApp .mainWrapper .chatListWrapper {
      width: 300px;
      min-width: 300px;
      height: 100%;
      background: #0d0d0d;
      padding-top: 50px; }
    .chatApp .mainWrapper .chatWrapper {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column; }
      .chatApp .mainWrapper .chatWrapper .chatBoxWrapper {
        overflow-y: auto;
        height: 100%;
        padding-top: 50px; }
        .chatApp .mainWrapper .chatWrapper .chatBoxWrapper .chatBox {
          width: 60%;
          margin: 0 auto;
          display: flex;
          flex-direction: column; }
          .chatApp .mainWrapper .chatWrapper .chatBoxWrapper .chatBox .message {
            display: inline-flex;
            border-radius: 1.8rem;
            margin: 10px 0;
            padding: 1rem 1.5rem;
            font-size: 22px;
            max-width: 80%;
            word-wrap: break-word;
            white-space: pre-wrap;
            line-height: 38px; }
            .chatApp .mainWrapper .chatWrapper .chatBoxWrapper .chatBox .message.user {
              margin-left: auto;
              background: #262626; }
            .chatApp .mainWrapper .chatWrapper .chatBoxWrapper .chatBox .message.assistant {
              margin-right: auto; }
      .chatApp .mainWrapper .chatWrapper .chatInput {
        width: 60%;
        margin: 0 auto 50px;
        display: flex;
        justify-content: center;
        align-items: end; }
        .chatApp .mainWrapper .chatWrapper .chatInput .inputWrapper {
          width: 100%;
          background: #262626;
          border-radius: 1.8rem;
          overflow: hidden;
          padding: 5px 30px 5px 25px; }
        .chatApp .mainWrapper .chatWrapper .chatInput textarea {
          overflow-y: hidden;
          width: 100%;
          background: #262626;
          border: 0;
          outline: none;
          font-size: 22px;
          line-height: 38px;
          padding: 15px 15px 0 15px;
          resize: none;
          border-radius: 1.8rem; }
          .chatApp .mainWrapper .chatWrapper .chatInput textarea::-webkit-scrollbar {
            border-radius: 8px;
            width: 8px;
            background: #262626; }
          .chatApp .mainWrapper .chatWrapper .chatInput textarea::-webkit-scrollbar-thumb {
            transition: 0.3s;
            background: #484848;
            border-radius: 8px; }
          .chatApp .mainWrapper .chatWrapper .chatInput textarea::-webkit-scrollbar-thumb:hover {
              background: #5d5d5d; }

/* Codex terminal */
.codex-body { background: #0b0d0e; }
.codex-form { width: min(2000px, calc(100% - 28px)); height: calc(100vh - 108px); margin: 14px auto 10px; }
.codex-form .codex-terminal { display: flex; flex-direction: column; height: calc(100% - 25px); overflow: hidden; border: 1px solid #2a3033; border-radius: 8px; background: #0d0f10; box-shadow: 0 16px 42px rgba(0,0,0,.22); }
.terminal-bar { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-bottom: 1px solid #262c2f; color: #8d9a9f; background: #121617; font: 12px/1 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; letter-spacing: .03em; }
.terminal-bar b { color: #e4ecec; font-weight: 700; letter-spacing: .1em; }
.terminal-status { margin-left: auto; color: #69767c; }
.terminal-status.online { color: #78c58b; }
.terminal-status.working { color: #e3b568; }
.terminal-status.error { color: #ea8181; }
.terminal-bar button { border: 0; padding: 0; color: #98a4a8; background: transparent; font: inherit; cursor: pointer; }
.terminal-bar button:hover { color: #e8f0f0; }
.terminal-output { flex: 1; overflow-y: auto; padding: 20px 24px; font: 16px/1.62 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.terminal-line { margin: 0 0 13px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.terminal-line.user { width: fit-content; max-width: min(85%, 980px); margin-left: auto; padding: 11px 14px; border: 1px solid #294539; border-radius: 7px; color: #e6f2ec; background: #14271f; box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.terminal-line.user::first-letter { color: #75c992; }
.terminal-line.assistant { color: #c4d0d1; }
.terminal-line.markdown { white-space: normal; }
.terminal-line.markdown > :first-child { margin-top: 0; }
.terminal-line.markdown > :last-child { margin-bottom: 0; }
.terminal-line.markdown h1, .terminal-line.markdown h2, .terminal-line.markdown h3, .terminal-line.markdown h4 { margin: 17px 0 8px; color: #edf4f4; font: 700 1em/1.35 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.terminal-line.markdown h1 { font-size: 1.28em; }
.terminal-line.markdown p { margin: 0 0 10px; line-height: 1.65; }
.terminal-line.markdown ul { margin: 0 0 10px; padding-left: 23px; }
.terminal-line.markdown li { margin: 3px 0; }
.terminal-line.markdown table { width: 100%; margin: 0 0 12px; border-collapse: collapse; font-size: .92em; }
.terminal-line.markdown th, .terminal-line.markdown td { padding: 7px 9px; border: 1px solid #30393b; text-align: left; }
.terminal-line.markdown th { color: #e3ecec; background: #171c1d; font-weight: 700; }
.terminal-line.markdown tr:nth-child(even) td { background: #111516; }
.terminal-line.markdown blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 2px solid #65777a; color: #9facaf; }
.terminal-line.markdown code { padding: 1px 4px; border-radius: 3px; color: #e1b56b; background: #181c1d; font: .92em ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.terminal-line.markdown .md-code { margin: 0 0 11px; padding: 11px 13px; overflow-x: auto; border: 1px solid #2b3234; border-radius: 5px; color: #c8d3d4; background: #101314; white-space: pre; }
.terminal-line.markdown .md-code code { padding: 0; color: inherit; background: transparent; }
.terminal-line.markdown a { color: #87c9d5; text-decoration: none; border-bottom: 1px solid #466f76; }
.terminal-line.markdown a:hover { color: #b3e8ef; }
.terminal-line.markdown .local-path { color: #839093; font-size: .9em; }
.terminal-line.command { padding: 10px 12px; border-left: 2px solid #53646a; color: #99a9ad; background: #101415; font-size: 12px; line-height: 1.5; }
.terminal-line.activity { color: #79878a; font-size: 12px; }
.terminal-line.error { color: #ef8b8b; }
.codex-terminal:not(.show-activity) .reasoning-block,
.codex-terminal:not(.show-activity) .terminal-line.command,
.codex-terminal:not(.show-activity) .terminal-line.activity { display: none; }
.reasoning-block { margin: 0 0 13px; border-left: 2px solid #48575b; color: #819093; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.reasoning-block summary { padding: 0 10px; cursor: pointer; color: #98a7a9; user-select: none; }
.reasoning-block pre { margin: 7px 0 0; padding: 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.terminal-input { display: flex; align-items: flex-start; gap: 10px; padding: 13px 20px 15px; border-top: 1px solid #262c2f; background: #101314; }
.prompt-mark { padding-top: 0; color: #75c992; font: 700 18px/25px ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.terminal-input textarea { display: block; flex: 1; width: 100%; min-height: 25px; max-height: 200px; margin: 0; padding: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; border-radius: 0; resize: none; color: #eef4f4; background: transparent; font: 16px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.terminal-input textarea::placeholder { color: #59666a; }
/* Phone layout: search, keyboard helper and translator are intentionally stacked. */
@media (max-width: 760px) {
  html { overflow-x: hidden; overflow-y: auto; }
  body:not(.codex-body) { height: auto; min-height: 100dvh; }

  .search_block {
    height: auto;
    min-height: 0;
    padding: 12px 14px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .search_block form { flex: 0 0 100%; width: 100%; margin: 0; }
  .search_block form input[type=text] { width: 100%; height: 44px; }
  .search_block > a {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
    height: 40px;
    margin: 0;
    padding: 0 8px;
    font-size: 13px;
  }
  .search_block .login-button {
    flex: 1 1 calc(33.333% - 6px);
    margin: 0;
  }
  .search_block .user-menu { flex: 1 1 100%; margin: 0; }
  .search_block .user-button { width: 100%; justify-content: center; height: 40px; }
  .search_block .user-dropdown { width: 100%; top: calc(100% + 6px); }

  .form_block { width: 100%; height: auto; margin: 0; display: block; }
  .form_block .tools { width: 100%; padding: 14px; }
  .form_block .tools textarea { width: 100%; height: 150px !important; }
  .form_block .translate {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    padding: 0 14px 20px;
  }
  .form_block .translate .textarea-wrapper { width: 100%; margin: 0; }
  .form_block .translate .textarea-wrapper:after { display: none; }
  .form_block .translate .language-picker { overflow-x: auto; padding-bottom: 2px; }
  .form_block .translate .language-picker button { flex: 0 0 auto; }
  .form_block .translate textarea { height: 230px; min-height: 230px; }
  .form_block .translate #revertLang {
    position: static;
    justify-self: center;
    margin: 12px 0;
  }
}

@media (max-width: 700px) {
  body.codex-body { overflow: hidden; }
  .codex-form { width: calc(100% - 20px); height: calc(100dvh - 20px); margin: 10px auto; }
  .codex-form .codex-terminal { height: calc(100% - 25px); border-radius: 7px; }
  .terminal-output { padding: 14px; font-size: 15px; }
  .terminal-line { margin-bottom: 11px; }
  .terminal-line.user { max-width: 94%; padding: 9px 11px; }
  .terminal-input { gap: 8px; padding: 11px 14px 13px; }
  .terminal-input textarea { font-size: 15px; }
  .terminal-bar { height: 40px; padding: 0 12px; gap: 8px; }
  .terminal-bar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .terminal-status { display: none; }
  .prompt-mark { font-size: 17px; line-height: 24px; }
}
