html:has(.projects-page) { overflow: auto; }
.projects-page { height: auto; min-height: 100dvh; overflow: visible; background: var(--paper); color: var(--ink); }
.home-bar { border-bottom: 1px solid var(--line); }
.home-brand, .projects-main { width: min(1064px, calc(100% - 64px)); margin-inline: auto; }
.home-brand { display: flex; align-items: center; gap: 10px; min-height: 72px; }
.home-brand strong { font-size: 20px; font-weight: 650; letter-spacing: -.055em; }
.home-brand span { margin-left: 4px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.projects-main { display: block; height: auto; padding: clamp(32px, 5vw, 68px) 0 60px; overflow: visible; }
.projects-main h1 { margin: 0 0 24px; font-size: clamp(32px, 3.5vw, 46px); line-height: 1.08; letter-spacing: -.055em; font-weight: 600; }
.creation-panel { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 246px; padding: 34px 40px; border-radius: 20px; overflow: hidden; background: #26432a; color: var(--paper); }
.creation-content { position: relative; z-index: 1; width: 43%; }
.creation-content h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.045em; line-height: 1.15; font-weight: 580; }
.creation-content p { margin: 10px 0 24px; max-width: 34ch; color: #e3f0e0; font-size: 14px; line-height: 1.55; }
#createProject { border-radius: 99px; min-height: 44px; padding: 10px 18px; background: var(--paper); color: #26432a; font-size: 14px; font-weight: 600; }
#createProject:hover { background: #e3f0e0; }
#createProject:focus-visible { outline-color: white; }
.cabinet-drawing { position: absolute; right: 0; top: 0; width: 54%; height: 100%; object-fit: contain; }
.current-projects { margin-top: clamp(32px, 4vw, 52px); }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.list-heading h2 { font-size: clamp(20px, 2.3vw, 25px); font-weight: 600; letter-spacing: -.045em; }
.list-heading > span, .project-details { font-size: 13px; line-height: 1.5; color: var(--muted); }
.project-rows { list-style: none; margin: 0; padding: 0; }
.project-rows, .empty-projects, .projects-state { background: var(--glass); border: var(--rim); border-radius: 16px; }
.project-row, .empty-projects { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.project-row { color: inherit; text-decoration: none; }
.project-rows li + li { border-top: 1px solid var(--line); }
.project-rows li:first-child a { border-top-left-radius: 16px; border-top-right-radius: 16px; }
.project-rows li:last-child a { border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }
.project-row:hover { background: var(--wash); }
.project-symbol { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--wash); color: var(--green); }
.project-symbol svg { width: 21px; height: 21px; }
.project-text { display: grid; flex: 1; min-width: 0; gap: 3px; }
.project-text strong { font-size: 15px; font-weight: 570; overflow-wrap: anywhere; }
.project-row > svg { color: var(--muted); }
.example-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; text-decoration: none; color: var(--green); font-weight: 570; }
.example-link:hover { text-decoration: underline; }
.projects-page a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.projects-state { padding: 24px; color: var(--muted); }
@media (max-width: 650px) {
  .home-brand, .projects-main { width: calc(100% - 32px); }
  .home-brand { min-height: 60px; }
  .creation-panel { display: block; padding: 24px; }
  .creation-content { width: auto; }
  .cabinet-drawing { position: static; display: block; width: 100%; height: 135px; margin-top: 8px; }
  .creation-content p { margin-bottom: 16px; }
  .projects-main h1 { margin-bottom: 18px; }
  .project-row, .empty-projects { padding: 14px; gap: 10px; }
  .empty-projects { display: grid; grid-template-columns: auto 1fr; }
  .example-link { grid-column: 2; justify-self: start; }
  .list-heading > span { font-size: 12px; }
}

.home-nav { margin-left: auto; display: flex; gap: 4px; padding: 0; border: 0; overflow: visible; background: transparent; }
.home-nav a { display: grid; min-height: 44px; align-items: center; padding: 0 16px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 550; text-decoration: none; }
.home-nav a:hover { background: var(--wash); }
.home-nav a[aria-current="page"] { background: var(--active); color: var(--green); }
@media (max-width: 650px) {
  .home-brand > span { display: none; }
  .home-nav a { padding-inline: 10px; }
}

.account { padding-top: clamp(24px, 4vw, 48px); }
.account-summary, .account-panel { background: var(--glass); border: var(--rim); border-radius: 18px; }
.account-summary { overflow: hidden; }
.account-cover { height: clamp(92px, 11vw, 136px); background: #26432a url('../assets/workshop-drawing.svg') no-repeat right 10% center / auto 240%; }
.account-identity { position: relative; padding: 0 32px 26px; }
.account-avatar { width: 84px; height: 84px; display: grid; place-items: center; margin-top: -42px; border: 5px solid var(--glass); border-radius: 50%; color: var(--green); background: var(--active); }
.account h1 { margin: 10px 0 5px; font-size: clamp(28px, 3vw, 36px); }
.account-identity p, .account-panel > p, .account-preferences small { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.account-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-top: 22px; }
.account-panel { padding: 24px 28px 10px; }
.account-panel h2 { margin: 0 0 5px; font-size: 22px; font-weight: 600; letter-spacing: -.04em; }
.account-details, .account-preferences { margin: 20px 0 0; padding: 0; list-style: none; }
.account-details > div, .account-preferences li { display: flex; align-items: center; min-height: 68px; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.account-details dt, .account-preferences strong { font-size: 15px; font-weight: 570; }
.account-details dd { margin: 0 0 0 auto; text-align: right; font-size: 14px; color: var(--muted); }
.account-preferences small { display: block; margin-top: 3px; }
@media (max-width: 720px) {
  .account-columns { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  .account-cover { background-position: right -48px center; background-size: auto 175%; }
  .account-identity { padding-inline: 20px; }
  .account-panel { padding: 20px 20px 6px; }
}

.access-panel { max-width: 460px; margin: clamp(28px, 9vh, 90px) auto; padding: 28px; }
.access-panel h1 { margin: 0 0 12px; font-size: 28px; }
.access-panel form:not([hidden]) { display: grid; gap: 18px; margin-block: 24px; }
.access-panel [role="status"]:not(:empty) { margin-block: 16px; }
.access-panel a, .account-panel a { color: var(--green); }
.access-panel .field small { color: var(--muted); font-weight: 400; line-height: 1.45; }
#signupCode { font-variant-numeric: tabular-nums; font-size: 24px; letter-spacing: .18em; }
.signup-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.signup-actions button { background: none; border: 0; padding: 4px 0; color: var(--green); font: inherit; cursor: pointer; }
.signup-actions button:disabled { color: var(--muted); cursor: default; }
.access-panel #recover { margin-inline-start: 12px; }
@media (max-width: 500px) { .access-panel { margin-inline: 12px; } }
