* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.18;
}
h1 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -1.1px;
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 21px;
}
p {
  color: var(--muted);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.icon {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 2.1px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}
.sidebar {
  display: none;
}
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--surface);
}
.topbar-label {
  display: none;
}
.mobile-brand {
  display: flex;
  align-items: center;
  font-family: var(--font-title);
  font-size: 22px;
  line-height: 1.1;
}
.mobile-brand img {
  width: 42px;
}
.icon-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--graphite);
}
main {
  padding: 28px 18px;
  max-width: var(--max-width);
  margin: auto;
  min-height: calc(100svh - 190px);
}
.welcome {
  margin-bottom: 24px;
}
.welcome p {
  margin-top: 12px;
  font-size: 15px;
}
.home-grid,
.home-main,
.home-aside {
  display: grid;
  gap: 18px;
  align-content: start;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
}
.card p {
  margin-top: 8px;
  font-size: 14px;
}
.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.action-card:hover {
  border-color: var(--olive);
  transform: translateY(-1px);
}
.action-card > .icon:last-child {
  margin-left: auto;
  width: 18px;
}
.action-card h3 {
  font-size: 22px;
}
.icon-halo {
  color: var(--primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  flex-shrink: 0;
}
.landscape-card {
  background:
    linear-gradient(90deg, var(--hero-shade), var(--shade)),
    url("../assets/landscape.svg") center/cover;
  border-radius: var(--radius);
  padding: 28px 24px;
  min-height: 310px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  color: var(--on-primary);
}
.landscape-card h2 {
  font-size: 31px;
  max-width: 450px;
  text-shadow: 0 2px 12px var(--graphite);
}
.landscape-card p,
.landscape-card .eyebrow {
  color: var(--on-primary);
}
.landscape-card p {
  max-width: 290px;
  font-size: 14px;
  margin: 14px 0 24px;
}
.button {
  min-height: 46px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--small-radius);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
  font-size: 14px;
}
.button:hover {
  background: var(--primary-hover);
}
.button.secondary,
.button.light {
  color: var(--graphite);
  background: var(--soft);
  border-color: var(--line);
}
.button.light {
  background: var(--surface);
}
.button.danger {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger);
}
.text-link,
.section-heading a,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 14px;
  min-height: 44px;
}
.text-link {
  margin-top: 16px;
}
.text-link .icon,
.section-heading .icon {
  width: 16px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.summary-grid .card {
  padding: 16px 10px;
  display: block;
}
.summary-grid .icon-halo {
  background: none;
  width: auto;
  display: block;
  height: 30px;
}
.summary-grid h3 {
  font-size: 17px;
}
.summary-grid p {
  font-size: 12px;
}
.summary-grid .action-card > .icon:last-child {
  display: none;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.section-heading h2 {
  font-size: 23px;
}
.section-heading a {
  white-space: nowrap;
  font-size: 12px;
}
.quiet-note {
  padding: 20px;
  text-align: center;
}
.quiet-note > .icon {
  color: var(--olive);
  width: 35px;
  height: 35px;
}
.quiet-note p {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 21px;
  margin-top: 10px;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  z-index: 10;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  border: 0;
  background: none;
}
.nav-link.active {
  color: var(--primary);
  background: var(--soft);
}
.bottom-nav .nav-link {
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  min-height: 52px;
  border-radius: 8px;
  font-size: 10px;
}
.bottom-nav .nav-link.active {
  background: none;
  font-weight: 700;
}
.page-footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 12px 16px calc(100px + env(safe-area-inset-bottom));
}
.drawer {
  position: fixed;
  margin: 0;
  padding: 20px;
  border: 0;
  width: min(340px, 90vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  color: var(--graphite);
  background: var(--surface);
  overflow: auto;
}
.drawer::backdrop {
  background: var(--shade);
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.drawer nav {
  display: grid;
  gap: 3px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.page-header p {
  margin-top: 12px;
  max-width: 600px;
}
.back-link {
  display: flex;
  width: fit-content;
  margin-bottom: 15px;
}
.back-link .icon {
  width: 15px;
}
.empty-state {
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 50px 24px;
  background: var(--surface);
}
.empty-state > .icon {
  width: 42px;
  height: 42px;
  color: var(--olive);
  margin-bottom: 20px;
}
.empty-state p {
  max-width: 460px;
  margin: 15px auto 24px;
}
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--graphite);
  color: var(--on-primary);
  border-radius: 12px;
  max-width: calc(100vw - 32px);
  width: max-content;
  padding: 12px 20px;
  z-index: 100;
  display: none;
  font-size: 14px;
}
.toast.visible {
  display: block;
}
.skip-link {
  position: fixed;
  top: -100px;
  background: var(--surface);
  padding: 15px;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
.muted {
  color: var(--muted);
}
@media (min-width: 760px) {
  main {
    padding: 36px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(220px, 1fr);
    gap: 24px;
  }
  .landscape-card {
    min-height: 340px;
  }
  .page-header h1 {
    font-size: 42px;
  }
}
@media (min-width: 900px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    width: 245px;
    top: 0;
    bottom: 0;
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    background: var(--surface);
    overflow: auto;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 30px;
    font-family: var(--font-title);
    font-size: 28px;
    line-height: 0.95;
  }
  .brand img {
    width: 58px;
  }
  .brand small {
    display: block;
    font-family: var(--font-body);
    font-size: 8px;
    letter-spacing: 1.5px;
    margin-top: 14px;
  }
  .sidebar nav {
    display: grid;
    gap: 2px;
  }
  .sidebar-note {
    font-size: 13px;
    padding: 32px 14px 0;
    font-style: italic;
  }
  .workspace {
    margin-left: 245px;
  }
  .bottom-nav {
    display: none;
  }
  .topbar {
    height: 70px;
    padding: 10px 40px;
    justify-content: space-between;
    background: transparent;
  }
  .topbar #menu,
  .mobile-brand {
    display: none;
  }
  .topbar-label {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 2px;
  }
  .page-footer {
    padding-bottom: 24px;
  }
  main {
    padding: 36px 40px;
  }
  .toast {
    bottom: 24px;
  }
  .landscape-card h2 {
    font-size: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
