/* The care guides: a reading page in the site's type, tinted with the machine's own card colours
   (--card, --card-2, --accent and --heading come from the app's MachineColors roles, per page). */

@font-face {
  font-family: 'Fredoka';
  src: url('fonts/fredoka-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #2a2730;
  --ink-2: rgba(42, 39, 48, 0.68);
  --line: rgba(42, 39, 48, 0.12);
  --card: #fdece5;
  --card-2: #fbded2;
  --accent: #942c00;
  --heading: #331002;
  --prominent: #541b03;
  --round: 'Fredoka', ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', system-ui, sans-serif;
  --text: ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:lang(ja) {
  --round: 'Fredoka', 'Hiragino Maru Gothic ProN', ui-rounded, 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --text: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 400 18px/1.6 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }

.top { background: var(--card-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px clamp(16px, 4vw, 40px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 20px var(--round); }
.brand img { border-radius: 10px; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); }
.links { display: flex; align-items: center; gap: clamp(22px, 4vw, 36px); }
.nav { font: 600 18px var(--round); text-decoration: none; white-space: nowrap; color: var(--heading); }
.get { white-space: nowrap; text-decoration: none; font: 600 18px var(--round); color: #fff; background: var(--prominent); padding: 10px 18px; border-radius: 99px; }
.nav:hover { text-decoration: underline; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.band { padding: 6px 16px clamp(36px, 6vw, 60px); background: var(--card-2); }
.masthead { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center; max-width: 728px; margin: 0 auto; }
.masthead h1 { margin: 0; font: 600 clamp(38px, 7vw, 60px)/1.05 var(--round); letter-spacing: -0.02em; color: var(--heading); overflow-wrap: break-word; }
.masthead h1 { text-wrap: balance; }
.masthead .lead { margin-bottom: 0 !important; color: var(--secondary, var(--accent)); text-wrap: balance; }
.nb { white-space: nowrap; }
.lead.sub { max-width: 600px; font-weight: 400; color: var(--ink-2); }
.todos { display: grid; gap: 12px; margin: 0; padding: 0 28px 0 0; list-style: none; }
.todos li { display: flex; align-items: center; gap: 14px; width: 310px; padding: 12px 24px 12px 13px; border-radius: 34px; background: #fff; box-shadow: 0 24px 44px -26px rgba(0, 0, 0, .35); }
.todos li:nth-child(2) { translate: 28px 0; }
.todos li:nth-child(3) { translate: 10px 0; }
.todos .ring { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #b3abb5; }
.todos b { display: block; font: 600 17px/1.25 var(--round); text-wrap: pretty; }
.todos small { display: block; font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.guide { max-width: 760px; margin: 0 auto; padding: 36px 16px 64px; overflow-wrap: break-word; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; font: 500 15px var(--round); color: var(--ink-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.guide h2 { margin: 56px 0 14px; font: 600 clamp(26px, 4vw, 32px)/1.2 var(--round); letter-spacing: -0.01em; }
.guide h3 { margin: 0; font: 600 20px/1.3 var(--round); }
.guide p { margin: 0 0 14px; }
.lead { margin: 10px 0 18px !important; font: 500 clamp(20px, 3vw, 24px)/1.35 var(--round); color: var(--accent); }

.intro { font-size: 19px; }
.why h3 { margin: 26px 0 6px; }
.why p a { color: var(--accent); text-decoration-thickness: 1px; }

.schedule { width: 100%; border-collapse: collapse; font-size: 17px; }
.schedule th { padding: 0 12px 8px 0; text-align: left; font: 500 14px var(--round); color: var(--ink-2); border-bottom: 1px solid var(--line); }
.schedule td { padding: 12px 12px 12px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.schedule td:last-child { white-space: nowrap; padding-right: 0; }
.schedule a { text-decoration: none; font-weight: 600; }
.schedule a:hover { text-decoration: underline; }
.tag { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 99px; font: 500 13px/1.6 var(--round); vertical-align: 1px; white-space: nowrap; background: var(--card); color: var(--ink-2); }
.tag.high { background: var(--card-2); color: var(--accent); }

.step { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.step:first-of-type { padding-top: 4px; }
.step .meta { margin: 2px 0 8px; font: 500 15px var(--round); color: var(--accent); }
.step p:last-child { margin: 0; }
.step .when { margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: var(--card); font-size: 16px; line-height: 1.5; }
.step .when b { font: 600 16px var(--round); color: var(--heading); }
.step .when a { color: var(--accent); text-decoration-thickness: 1px; }


.cta { margin-top: 56px; padding: 28px clamp(20px, 4vw, 36px) 30px; border-radius: 32px; background: var(--card); }
.cta .icon { border-radius: 15px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .4); }
.cta h2 { margin: 16px 0 8px; color: var(--heading); }
.actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 18px; }
.see { font: 600 17px var(--round); color: var(--heading); }

.sources ol { margin: 0; padding-left: 1.4em; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.sources li { margin-bottom: 8px; padding-left: 4px; scroll-margin-top: 16px; }
.sources li:target { color: var(--ink); }
.sources a { color: var(--ink); overflow-wrap: anywhere; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tile { display: flex; flex-direction: column; height: 100%; padding: 10px 14px 14px; border-radius: 24px; background: var(--card); text-decoration: none; transition: transform .2s; }
.tile:hover { transform: translateY(-3px); }
.tile img { width: 120px; height: 120px; margin: 0 auto 4px; }
.tile b { font: 600 17px/1.25 var(--round); color: var(--heading); }
.tile small { margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.more .tiles { grid-template-columns: repeat(3, 1fr); }
.more .all { font: 600 17px var(--round); }
.more p { margin-top: 18px; }
.index h2 { margin-top: 8px; }
.index section + section h2 { margin-top: 44px; }

footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 24px clamp(16px, 4vw, 40px) 34px; border-top: 1px solid var(--line); font: 500 15px var(--round); color: var(--ink-2); }
footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.lang select { appearance: none; padding: 6px 30px 6px 12px; border: 1px solid var(--line); border-radius: 99px; font: 500 15px var(--round); color: var(--ink); cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232a2730' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 10px no-repeat; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Phones: one row, the links tucked into a menu button. */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--prominent); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i, .menu summary i::before, .menu summary i::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, background .2s; }
.menu summary i { position: relative; }
.menu summary i::before, .menu summary i::after { content: ''; position: absolute; left: 0; }
.menu summary i::before { top: -6px; }
.menu summary i::after { top: 6px; }
.menu[open] summary i { background: transparent; }
.menu[open] summary i::before { transform: translateY(6px) rotate(45deg); }
.menu[open] summary i::after { transform: translateY(-6px) rotate(-45deg); }
.menu nav { position: absolute; right: 0; top: calc(100% + 10px); z-index: 10; min-width: 200px; display: flex; flex-direction: column; padding: 8px; border-radius: 20px; background: #fff; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45); }
.menu nav a { font: 600 18px var(--round); color: #2a2730; text-decoration: none; padding: 12px 14px; border-radius: 12px; white-space: nowrap; }
.menu nav a:hover { background: rgba(42, 39, 48, .06); }

@media (max-width: 480px) {
  .top .brand span { display: none; }
  .top .nav { display: none; }
  .top .menu { display: block; }
  .top .links { gap: 10px; }
}

@media (max-width: 680px) {
  .masthead { grid-template-columns: 1fr; gap: 22px; }
  .todos { padding: 0; }
  .todos li { width: auto; }
  .todos li:nth-child(n) { translate: none; }
  .todos li:nth-child(3) { display: none; }
  .tag { display: table; margin: 4px 0 0; }
  .more .tiles { grid-template-columns: repeat(2, 1fr); }
}

/* Long German compounds (Dunstabzugshaube) break at a syllable. */
:lang(de) .tile b, :lang(de) h1, :lang(de) h2, :lang(de) h3 { -webkit-hyphens: auto; hyphens: auto; }
