.study-page.profile-page {
  display: grid;
  grid-template-columns: minmax(190px, .38fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 68px);
  max-width: var(--study-page-width);
  color: var(--study-ink);
}
.profile-index { min-width: 0; }
.profile-cover {
  position: relative;
  display: grid;
  align-content: end;
  gap: 9px;
  min-height: 145px;
  padding: 24px 20px 22px 32px;
  border-inline-start: 7px solid #44364e;
  border-radius: 3px 7px 7px 3px;
  background: var(--study-cover);
  color: #fffaf5;
}
.profile-cover::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 3px;
  border-inline-start: 1px solid #74627f;
}
.profile-cover::after {
  content: '';
  position: absolute;
  inset: 0 23px auto auto;
  width: 13px;
  height: 25px;
  background: var(--study-gold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.profile-cover h2 {
  margin: 0;
  color: inherit;
  font: 680 var(--study-heading-size)/1.18 var(--study-title);
}
.profile-cover p { display: flex; align-items: center; gap: 7px; margin: 0; color: #efe8ed; font-size: .875rem; }
.profile-cover .study-icon { width: 14px; height: 14px; flex-basis: 14px; }
.profile-links { display: grid; margin-block-start: 14px; }
.profile-links a {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) 12px;
  gap: 12px;
  align-items: center;
  padding: 14px 8px;
  border-block-end: 1px solid var(--study-line);
  color: var(--study-ink);
  font: 530 .94rem/1.5 var(--study-body);
}
.profile-links a:hover { color: var(--study-action); background: var(--study-side); }
.profile-links svg { width: 19px; height: 19px; color: var(--study-action); }
.profile-links svg:last-child { width: 12px; height: 12px; color: var(--study-muted); }
.profile-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-start: 10px;
  padding-inline: 8px;
  border: none;
  color: var(--study-muted);
  font-size: .8125rem;
}
.profile-logout:hover { color: var(--study-ink); text-decoration: underline; }
.profile-logout svg { width: 15px; height: 15px; flex-basis: 15px; }
.profile-tools { align-self: start; min-width: 0; }
.profile-tools .education-sync,
.profile-guest-entry {
  display: block;
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--study-line);
}
.profile-tools .draft-import-entry, .profile-guest-entry { border-top: 2px solid var(--study-action); }
.profile-tools h3, .profile-guest-entry h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--study-ink);
  font: 650 clamp(1.27rem, 2.15vw, 1.65rem)/1.4 var(--study-title);
}
.profile-tools h3 .study-icon { width: 22px; height: 22px; color: var(--study-action); stroke-width: 1.6; }
.profile-tools .education-sync p, .profile-guest-entry p { margin: 7px 0 0; color: var(--study-muted); font-size: .91rem; }
.profile-tools .draft-import-entry > button,
.profile-tools .obsidian-setup-actions,
.profile-guest-entry .actions { margin-top: 15px; }
.profile-tools .obsidian-sync-heading { display: block; }
.profile-page :is(.primary, .secondary) { min-height: 41px; padding: 8px 16px; border-radius: 5px; font: 550 .875rem/1.5 var(--study-body); }
.profile-page .secondary { background: var(--study-surface); border-color: var(--study-line); }
.profile-tools .obsidian-setup-hint { font-size: .8125rem; }
.profile-tools .obsidian-sync-options { margin: 0; padding-inline: 2px; max-inline-size: none; border-bottom: 1px solid var(--study-line); }
.profile-tools .obsidian-sync-options:first-of-type { margin-top: 16px; border-top: 1px solid var(--study-line); }
.profile-tools .obsidian-sync-options summary { gap: 8px; padding: 8px 1px; color: var(--study-muted); min-height: 42px; }
.profile-tools .obsidian-sync-options summary:hover { color: var(--study-action); }
.profile-tools .obsidian-sync-options summary::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.profile-tools .obsidian-sync-options[open] summary::after { transform: translateY(2px) rotate(225deg); }
.profile-tools .obsidian-sync-options[open] { padding-bottom: 10px; }
.profile-guest .profile-cover { align-self: start; }
.profile-guest-entry .actions { display: flex; flex-wrap: wrap; gap: 9px; }

@media (max-width: 700px) {
  .study-page.profile-page { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .profile-cover { min-height: 94px; gap: 5px; padding: 15px 20px; }
  .profile-index { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .profile-index .profile-cover { grid-column: 1 / -1; grid-row: 1; padding-inline-end: 100px; }
  .profile-links { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 8px 0 0; }
  .profile-links a { display: flex; justify-content: center; padding: 10px 2px; gap: 6px; font-size: .875rem; }
  .profile-links svg:last-child { display: none; }
  .profile-index .profile-logout { grid-column: 2; grid-row: 1; z-index: 1; margin: 0 10px 7px 0; color: #fffaf5; }
  .profile-tools .education-sync, .profile-guest-entry { padding-block: 15px; }
  .profile-page :is(.primary, .secondary), .profile-tools .obsidian-sync-options summary { min-height: 44px; }
}
