:root {
  color-scheme: light;
  --paper: #f3f1eb;
  --card: #fbf9f4;
  --ink: #22241f;
  --muted: #66695e;
  --rule: #dedbd0;
  --dark: #181916;
  --blue: #3042b5;
  --blue-paper: #e8ecfb;
  --serif: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, textarea { font: inherit; }
button, a.download, label.upload { -webkit-tap-highlight-color: transparent; }
button, a.download { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid #5163da; outline-offset: 3px; }

.shell { width: min(100% - 40px, 840px); margin-inline: auto; }
.masthead { background: var(--dark); color: #faf8ef; }
.masthead-inner, .person, .list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.masthead-inner { min-height: 62px; }
.brand { font: 24px/1.2 var(--serif); letter-spacing: .04em; }
.person { font-size: 13px; }
.person .quiet { background: #292b24; color: #f6f3e8; border-color: #42453a; }

main { padding-block: 24px 44px; }
h1, h2, p { margin: 0; }
h1 { font: 34px/1.16 var(--serif); }
h2 { font: 27px/1.2 var(--serif); }
.hero {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  min-height: 258px;
  overflow: hidden;
  background: var(--dark);
  color: #f7f4ea;
}
.hero img {
  position: absolute;
  inset: 0 0 0 auto;
  width: 56%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #181916 32%, #181916d9 53%, #1819163b 100%);
}
.hero-copy { padding: 33px 34px 37px; }
.hero h1 { font-size: clamp(42px, 6vw, 65px); letter-spacing: -.04em; }
.hero p { max-width: 60%; margin-top: 11px; color: #dedbd0; }
.photo-label { position: absolute; right: 15px; bottom: 12px; color: #f8f5ec; font-size: 12px; }

.card {
  margin: 0 0 16px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.login { max-width: 480px; margin: 24px auto 0; }
label:not(.upload) { display: block; margin: 16px 0 6px; font-weight: 600; }
input:not([type="file"]), textarea {
  display: block;
  width: 100%;
  border: 1px solid #d7d5ca;
  border-radius: 6px;
  padding: 10px 13px;
  color: var(--ink);
  background: #f6f4ee;
  min-height: 44px;
}
textarea { resize: vertical; }
.primary, .quiet, .tabs button {
  min-height: 44px;
  border-radius: 999px;
  padding: 8px 17px;
  color: var(--ink);
  background: #edeae0;
  border: 1px solid var(--rule);
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
  background: #23251f;
  color: #f9f7ee;
  text-decoration: none;
  border-color: #23251f;
}
.login .primary { margin-top: 22px; }
.compact { min-height: 34px; padding: 5px 13px; font-size: 13px; }
.status { color: var(--muted); margin-top: 13px; }
.status:empty { display: none; }
.error { color: #a43830; }
.muted { color: var(--muted); margin-top: 12px; }

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #e9e6dc;
}
.tabs button { flex: 1; border: none; background: transparent; padding: 8px; }
.tabs button[aria-current="true"] { color: #faf8ef; background: #242820; }
.upload {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.upload:first-of-type { margin-top: 14px; border-top: 1px solid var(--rule); }
.upload:has(+ .file-input:focus-visible) { outline: 2px solid #5163da; outline-offset: 2px; }
.upload > span:nth-child(2) { flex: 1; min-width: 0; }
.upload strong, .upload small { display: block; }
.upload strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload small { color: var(--muted); }
.file-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 5px;
  color: var(--blue);
  background: var(--blue-paper);
  font-weight: 700;
  font-size: 13px;
}
.file-input {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip-path: inset(50%);
}
.plus { color: var(--blue); font-size: 22px; }
#resume, #refresh-chat { margin-top: 12px; }
.result img { display: block; width: 100%; height: auto; margin-top: 16px; border-radius: 6px; }

.chat-log { max-height: min(54vh, 460px); overflow-y: auto; margin-block: 14px; }
.chat-turn { display: flex; flex-direction: column; gap: 9px; margin-bottom: 13px; }
.bubble {
  max-width: 94%;
  padding: 10px 13px;
  border-radius: 7px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.from-user { align-self: flex-end; background: var(--blue-paper); color: #283787; }
.from-codex { align-self: flex-start; background: #efede4; }
.waiting-message { font-size: 13px; color: var(--muted); }
.list-heading { margin-bottom: 12px; }
.employee { border-top: 1px solid var(--rule); padding-block: 13px 8px; }
.employee-meta, .employee-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.employee-meta { justify-content: space-between; overflow-wrap: anywhere; }
.employee-meta small { color: var(--muted); }
.employee-meta small.enabled { color: var(--blue); }
.employee-actions { margin-top: 8px; }
.issued { background: #f2f3fb; border-color: #c9d0ee; }
.issued pre { overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; color: #283787; }

@media (max-width: 480px) {
  .shell { width: calc(100% - 28px); }
  main { padding-top: 14px; }
  .hero { min-height: 224px; }
  .hero img { width: 66%; }
  .hero-copy { padding: 22px 20px 37px; }
  .hero p { max-width: 72%; }
  .card { padding: 18px; }
  h1 { font-size: 30px; }
}
